[Python-checkins] r61536 - in external/tix-8.4.2.x: ABOUT.html ChangeLog Makefile.in PyTix-2.0 PyTix-2.0/2.0 PyTix-2.0/2.0/Tkinter.py PyTix-2.0/2.0/Tkinter.py.diff PyTix-2.0/2.0/_tkinter.c PyTix-2.0/2.0/_tkinter.c.diff PyTix-2.0/2.0/tkappinit.c PyTix-2.0/2.0/tkappinit.c.diff PyTix-2.0/BUGS-1.12.txt PyTix-2.0/BUGS-2.0.txt PyTix-2.0/ChangeLog PyTix-2.0/INSTALL-1.12.txt PyTix-2.0/INSTALL-2.0.txt PyTix-2.0/README-1.12.txt PyTix-2.0/README-2.0.txt PyTix-2.0/Tix.py PyTix-2.0/demos PyTix-2.0/demos/bitmaps PyTix-2.0/demos/bitmaps/about.xpm PyTix-2.0/demos/bitmaps/bold.xbm PyTix-2.0/demos/bitmaps/capital.xbm PyTix-2.0/demos/bitmaps/centerj.xbm PyTix-2.0/demos/bitmaps/combobox.xbm PyTix-2.0/demos/bitmaps/combobox.xpm PyTix-2.0/demos/bitmaps/combobox.xpm.1 PyTix-2.0/demos/bitmaps/drivea.xbm PyTix-2.0/demos/bitmaps/drivea.xpm PyTix-2.0/demos/bitmaps/exit.xpm PyTix-2.0/demos/bitmaps/filebox.xbm PyTix-2.0/demos/bitmaps/filebox.xpm PyTix-2.0/demos/bitmaps/italic.xbm PyTix-2.0/demos/bitmaps/justify.xbm PyTix-2.0/demos/bitmaps/leftj.xbm PyTix-2.0/demos/bitmaps/netw.xbm PyTix-2.0/demos/bitmaps/netw.xpm PyTix-2.0/demos/bitmaps/optmenu.xpm PyTix-2.0/demos/bitmaps/rightj.xbm PyTix-2.0/demos/bitmaps/select.xpm PyTix-2.0/demos/bitmaps/tix.gif PyTix-2.0/demos/bitmaps/underline.xbm PyTix-2.0/demos/pman.py PyTix-2.0/demos/samples PyTix-2.0/demos/samples/Balloon.py PyTix-2.0/demos/samples/BtnBox.py PyTix-2.0/demos/samples/CmpImg.py PyTix-2.0/demos/samples/ComboBox.py PyTix-2.0/demos/samples/Control.py PyTix-2.0/demos/samples/NoteBook.py PyTix-2.0/demos/samples/OptMenu.py PyTix-2.0/demos/samples/PopMenu.py PyTix-2.0/demos/samples/SHList1.py PyTix-2.0/demos/samples/SHList2.py PyTix-2.0/demos/samples/Tree.py PyTix-2.0/demos/tixwidgets.py Python Python/BUGS-2.1.txt Python/Demo Python/Demo/tix Python/Demo/tix/BUGS.txt Python/Demo/tix/INSTALL.txt Python/Demo/tix/README.txt Python/Demo/tix/bitmaps Python/Demo/tix/bitmaps/about.xpm Python/Demo/tix/bitmaps/bold.xbm Python/Demo/tix/bitmaps/capital.xbm Python/Demo/tix/bitmaps/centerj.xbm Python/Demo/tix/bitmaps/combobox.xbm Python/Demo/tix/bitmaps/combobox.xpm Python/Demo/tix/bitmaps/combobox.xpm.1 Python/Demo/tix/bitmaps/drivea.xbm Python/Demo/tix/bitmaps/drivea.xpm Python/Demo/tix/bitmaps/exit.xpm Python/Demo/tix/bitmaps/filebox.xbm Python/Demo/tix/bitmaps/filebox.xpm Python/Demo/tix/bitmaps/italic.xbm Python/Demo/tix/bitmaps/justify.xbm Python/Demo/tix/bitmaps/leftj.xbm Python/Demo/tix/bitmaps/netw.xbm Python/Demo/tix/bitmaps/netw.xpm Python/Demo/tix/bitmaps/optmenu.xpm Python/Demo/tix/bitmaps/rightj.xbm Python/Demo/tix/bitmaps/select.xpm Python/Demo/tix/bitmaps/tix.gif Python/Demo/tix/bitmaps/underline.xbm Python/Demo/tix/samples Python/Demo/tix/samples/Balloon.py Python/Demo/tix/samples/BtnBox.py Python/Demo/tix/samples/CmpImg.py Python/Demo/tix/samples/ComboBox.py Python/Demo/tix/samples/Control.py Python/Demo/tix/samples/DirList.py Python/Demo/tix/samples/DirTree.py Python/Demo/tix/samples/NoteBook.py Python/Demo/tix/samples/OptMenu.py Python/Demo/tix/samples/PanedWin.py Python/Demo/tix/samples/PopMenu.py Python/Demo/tix/samples/SHList1.py Python/Demo/tix/samples/SHList2.py Python/Demo/tix/samples/Tree.py Python/Demo/tix/tixwidgets.py Python/INSTALL-2.1.txt Python/Lib Python/Lib/lib-tk Python/Lib/lib-tk/Tix.py Python/README-2.1.txt Python/README-2.2.txt Python/Tix.py README.txt aclocal.m4 configure configure.in demos demos/MkChoose.tcl demos/MkDirLis.tcl demos/MkSample.tcl demos/MkScroll.tcl demos/bitmaps demos/bitmaps/about.xpm demos/bitmaps/bold.xbm demos/bitmaps/capital.xbm demos/bitmaps/centerj.xbm demos/bitmaps/code.xpm demos/bitmaps/combobox.xbm demos/bitmaps/combobox.xpm demos/bitmaps/drivea.xbm demos/bitmaps/drivea.xpm demos/bitmaps/exit.xpm demos/bitmaps/filebox.xbm demos/bitmaps/filebox.xpm demos/bitmaps/harddisk.xbm demos/bitmaps/harddisk.xpm demos/bitmaps/italic.xbm demos/bitmaps/justify.xbm demos/bitmaps/leftj.xbm demos/bitmaps/netw.xbm demos/bitmaps/netw.xpm demos/bitmaps/network.xbm demos/bitmaps/network.xpm demos/bitmaps/optmenu.xpm demos/bitmaps/rightj.xbm demos/bitmaps/select.xpm demos/bitmaps/tix.gif demos/bitmaps/underlin.xbm demos/samples demos/samples/AllSampl.tcl demos/samples/ArrowBtn.tcl demos/samples/Balloon.tcl demos/samples/BtnBox.tcl demos/samples/CObjView.tcl demos/samples/ChkList.tcl demos/samples/CmpImg.tcl demos/samples/CmpImg1.tcl demos/samples/CmpImg2.tcl demos/samples/CmpImg3.tcl demos/samples/CmpImg4.tcl demos/samples/ComboBox.tcl demos/samples/Control.tcl demos/samples/DirDlg.tcl demos/samples/DirList.tcl demos/samples/DirTree.tcl demos/samples/DragDrop.tcl demos/samples/DynTree.tcl demos/samples/EFileDlg.tcl demos/samples/EditGrid.tcl demos/samples/FileDlg.tcl demos/samples/FileEnt.tcl demos/samples/HList1.tcl demos/samples/LabEntry.tcl demos/samples/LabFrame.tcl demos/samples/ListNBK.tcl demos/samples/Meter.tcl demos/samples/NoteBook.tcl demos/samples/OptMenu.tcl demos/samples/PanedWin.tcl demos/samples/PopMenu.tcl demos/samples/SGrid0.tcl demos/samples/SGrid1.tcl demos/samples/SHList.tcl demos/samples/SHList2.tcl demos/samples/SListBox.tcl demos/samples/STList1.tcl demos/samples/STList2.tcl demos/samples/STList3.tcl demos/samples/SText.tcl demos/samples/SWindow.tcl demos/samples/Sample.tcl demos/samples/Select.tcl demos/samples/StdBBox.tcl demos/samples/Tree.tcl demos/samples/Xpm.tcl demos/samples/Xpm1.tcl demos/tclIndex demos/tixwidgets.tcl demos/widget docs docs/FAQ.html docs/FAQ.txt docs/Files.txt docs/Release-8.0.0.txt docs/Release-8.0.1.txt docs/Release-8.0.2.txt docs/Release-8.1.0.txt docs/Release-8.1.1.txt docs/Release-8.1.2.txt docs/Release-8.1.3.txt docs/Release-8.2.0.txt docs/Release-8.4.0.txt docs/Release.html docs/html docs/html/TixBook docs/html/TixBook/TixBook.html docs/html/TixBook/images.pl docs/html/TixBook/labels.pl docs/html/TixBook/section3_3.html docs/html/TixBook/section3_4.html docs/html/TixBook/section3_5.html docs/html/TixBook/section3_6.html docs/html/TixBook/section3_7.html docs/html/TixBook/section3_8.html docs/html/TixBook/sectionstar3_2.html docs/html/TixBook/subsection3_3_1.html docs/html/TixBook/subsection3_3_2.html docs/html/TixBook/subsection3_3_3.html docs/html/TixBook/subsection3_3_4.html docs/html/TixBook/subsection3_3_5.html docs/html/TixBook/subsection3_4_1.html docs/html/TixBook/subsection3_4_2.html docs/html/TixBook/subsection3_4_3.html docs/html/TixBook/subsection3_5_1.html docs/html/TixBook/subsection3_5_2.html docs/html/TixBook/subsection3_5_3.html docs/html/TixBook/subsection3_6_1.html docs/html/TixBook/subsection3_6_2.html docs/html/TixBook/subsection3_7_1.html docs/html/TixBook/subsection3_7_2.html docs/html/TixBook/subsection3_8_1.html docs/html/TixBook/subsection3_8_2.html docs/html/TixBook/subsection3_8_3.html docs/html/TixBook/subsection3_8_4.html docs/html/TixBook/subsection3_8_5.html docs/html/TixBook/subsection3_8_6.html docs/html/TixBook/subsection3_8_7.html docs/html/TixBook/subsectionstar3_2_1.html docs/html/TixBook/subsectionstar3_2_2.html docs/html/TixBook/subsectionstar3_2_3.html docs/html/TixBook/subsubsection3_3_1_1.html docs/html/TixBook/subsubsection3_3_1_2.html docs/html/TixBook/subsubsection3_3_2_1.html docs/html/TixBook/subsubsection3_3_2_2.html docs/html/TixBook/subsubsection3_3_2_4.html docs/html/TixBook/subsubsection3_3_3_1.html docs/html/TixBook/subsubsection3_3_3_2.html docs/html/TixBook/subsubsection3_3_3_3.html docs/html/TixBook/subsubsection3_3_3_4.html docs/html/TixBook/subsubsection3_3_3_5.html docs/html/TixBook/subsubsection3_3_3_6.html docs/html/TixBook/subsubsection3_3_3_7.html docs/html/TixBook/subsubsection3_3_4_1.html docs/html/TixBook/subsubsection3_3_4_2.html docs/html/TixBook/subsubsection3_3_4_3.html docs/html/TixBook/subsubsection3_3_4_4.html docs/html/TixBook/subsubsection3_3_5_1.html docs/html/TixBook/subsubsection3_3_5_5.html docs/html/TixBook/subsubsection3_3_5_6.html docs/html/TixBook/subsubsection3_3_5_7.html docs/html/TixBook/subsubsection3_4_1_1.html docs/html/TixBook/subsubsection3_4_1_2.html docs/html/TixBook/subsubsection3_4_1_3.html docs/html/TixBook/subsubsection3_4_1_4.html docs/html/TixBook/subsubsection3_4_2_1.html docs/html/TixBook/subsubsection3_4_2_2.html docs/html/TixBook/subsubsection3_4_2_3.html docs/html/TixBook/subsubsection3_4_2_4.html docs/html/TixBook/subsubsection3_4_3_1.html docs/html/TixBook/subsubsection3_4_3_2.html docs/html/TixBook/subsubsection3_5_2_1.html docs/html/TixBook/subsubsection3_5_2_2.html docs/html/TixBook/subsubsection3_5_3_1.html docs/html/TixBook/subsubsection3_5_3_2.html docs/html/TixBook/subsubsection3_5_3_3.html docs/html/TixBook/subsubsection3_5_3_4.html docs/html/TixBook/subsubsection3_5_3_5.html docs/html/TixBook/subsubsection3_5_3_6.html docs/html/TixBook/subsubsection3_6_1_1.html docs/html/TixBook/subsubsection3_6_1_2.html docs/html/TixBook/subsubsection3_6_1_3.html docs/html/TixBook/subsubsection3_6_1_4.html docs/html/TixBook/subsubsection3_7_1_1.html docs/html/TixBook/subsubsection3_7_1_2.html docs/html/TixBook/subsubsection3_7_1_3.html docs/html/TixBook/subsubsection3_7_1_4.html docs/html/TixBook/subsubsection3_8_1_1.html docs/html/TixBook/subsubsection3_8_1_2.html docs/html/TixBook/subsubsection3_8_2_1.html docs/html/TixBook/subsubsection3_8_3_1.html docs/html/TixBook/subsubsection3_8_4_1.html docs/html/TixBook/subsubsection3_8_4_4.html docs/html/TixBook/subsubsection3_8_4_5.html docs/html/TixBook/subsubsection3_8_5_1.html docs/html/TixBook/subsubsection3_8_5_3.html docs/html/TixBook/subsubsectionstar3_3_2_3.html docs/html/TixBook/subsubsectionstar3_3_5_2.html docs/html/TixBook/subsubsectionstar3_3_5_3.html docs/html/TixBook/subsubsectionstar3_3_5_4.html docs/html/TixBook/subsubsectionstar3_7_1_5.html docs/html/TixBook/subsubsectionstar3_8_1_3.html docs/html/TixBook/subsubsectionstar3_8_1_4.html docs/html/TixBook/subsubsectionstar3_8_1_5.html docs/html/TixBook/subsubsectionstar3_8_4_2.html docs/html/TixBook/subsubsectionstar3_8_4_3.html docs/html/TixBook/subsubsectionstar3_8_5_2.html docs/html/TixBook/subsubsectionstar3_8_5_4.html docs/html/TixBook/tableofcontents3_1.html docs/html/gif docs/html/gif/tix docs/html/gif/tix/ARROWS.gif docs/html/gif/tix/arrows.png docs/html/gif/tix/container docs/html/gif/tix/container/notebook.gif docs/html/gif/tix/container/pane_add.gif docs/html/gif/tix/container/pane_horz.gif docs/html/gif/tix/container/pane_vert.gif docs/html/gif/tix/container/sl-bar.gif docs/html/gif/tix/container/sl-nobar.gif docs/html/gif/tix/filesel docs/html/gif/tix/filesel/dirlist.gif docs/html/gif/tix/filesel/dirtree.gif docs/html/gif/tix/filesel/exfile.gif docs/html/gif/tix/filesel/fb_comp.gif docs/html/gif/tix/hierarchy.gif docs/html/gif/tix/hierarchy.png docs/html/gif/tix/hlist docs/html/gif/tix/hlist/dirtree.gif docs/html/gif/tix/hlist/hlist1.gif docs/html/gif/tix/hlist/hlist_ex1.gif docs/html/gif/tix/hlist/hlist_ex2.gif docs/html/gif/tix/hlist/hlist_ex3.gif docs/html/gif/tix/intro docs/html/gif/tix/intro/combo.gif docs/html/gif/tix/intro/ctl_noopt.gif docs/html/gif/tix/intro/ctl_subw.gif docs/html/gif/tix/intro/ctl_wopt.gif docs/html/gif/tix/intro/hierarchy.gif docs/html/gif/tix/intro/law_comp.gif docs/html/gif/tix/intro/lawyer.gif docs/html/gif/tix/intro/select-vert.gif docs/html/gif/tix/intro/select.gif docs/html/gif/tix/intro/select1.gif docs/html/gif/tix/oop docs/html/gif/tix/oop/arrows.gif docs/html/gif/tix/tix32.gif docs/html/gif/tix/tix32.png docs/html/gif/tix/tlist docs/html/gif/tix/tlist/horizontal.gif docs/html/gif/tix/tlist/joe.gif docs/html/gif/tix/tlist/relation.gif docs/html/gif/tix/tlist/tlist.gif docs/html/gif/tix/tlist/twofont.gif docs/html/gif/tix/tlist/twofont2.gif docs/html/gif/tix/tlist/vertical.gif docs/html/gif/tix/tlist/widgets.gif docs/img docs/img/demo1.gif docs/img/docview_w.gif docs/img/setup0.gif docs/img/setup1.gif docs/img/setup2.gif docs/img/setup3.gif docs/img/setup5.gif docs/img/setup6.gif docs/img/tk42a.gif docs/img/tk42b.gif docs/license.html_lib docs/license.tcltk docs/pdf docs/pdf/TixBook.pdf docs/pdf/TixUser.pdf docs/pdf/pguide-tix4.0.pdf docs/tix-book docs/tix-book/container.tex.html docs/tix-book/fig docs/tix-book/fig/container docs/tix-book/fig/container/notebook.gif docs/tix-book/fig/container/pane_add.gif docs/tix-book/fig/container/pane_horz.gif docs/tix-book/fig/container/pane_vert.gif docs/tix-book/fig/container/sl-bar.gif docs/tix-book/fig/container/sl-nobar.gif docs/tix-book/fig/cover.gif docs/tix-book/fig/filesel docs/tix-book/fig/filesel/dirlist.gif docs/tix-book/fig/filesel/dirtree.gif docs/tix-book/fig/filesel/exfile.gif docs/tix-book/fig/filesel/fb_comp.gif docs/tix-book/fig/hlist docs/tix-book/fig/hlist/dirtree.gif docs/tix-book/fig/hlist/hlist1.gif docs/tix-book/fig/hlist/hlist_ex1.gif docs/tix-book/fig/hlist/hlist_ex2.gif docs/tix-book/fig/hlist/hlist_ex3.gif docs/tix-book/fig/intro docs/tix-book/fig/intro/ctl_noopt.gif docs/tix-book/fig/intro/ctl_subw.gif docs/tix-book/fig/intro/ctl_wopt.gif docs/tix-book/fig/intro/hierarchy.gif docs/tix-book/fig/intro/law_comp.gif docs/tix-book/fig/intro/lawyer.gif docs/tix-book/fig/intro/select-vert.gif docs/tix-book/fig/intro/select.gif docs/tix-book/fig/intro/select1.gif docs/tix-book/fig/oop docs/tix-book/fig/oop/arrows.gif docs/tix-book/fig/tlist docs/tix-book/fig/tlist/horizontal.gif docs/tix-book/fig/tlist/joe.gif docs/tix-book/fig/tlist/relation.gif docs/tix-book/fig/tlist/tlist.gif docs/tix-book/fig/tlist/twofont.gif docs/tix-book/fig/tlist/twofont2.gif docs/tix-book/fig/tlist/vertical.gif docs/tix-book/fig/tlist/widgets.gif docs/tix-book/filesel.tex.html docs/tix-book/hlist.tex.html docs/tix-book/intro.tex.html docs/tix-book/oop.tex.html docs/tix-book/preface.tex.html docs/tix-book/tix.book.html docs/tix-book/tlist.tex.html generic generic/tix.h generic/tixAppInit.c generic/tixClass.c generic/tixCmds.c generic/tixCompat.c generic/tixDItem.c generic/tixDef.h generic/tixDiITxt.c generic/tixDiImg.c generic/tixDiStyle.c generic/tixDiText.c generic/tixDiWin.c generic/tixError.c generic/tixForm.c generic/tixForm.h generic/tixFormMisc.c generic/tixGeometry.c generic/tixGrData.c generic/tixGrData.h generic/tixGrFmt.c generic/tixGrRC.c generic/tixGrSel.c generic/tixGrSort.c generic/tixGrUtl.c generic/tixGrid.c generic/tixGrid.h generic/tixHLCol.c generic/tixHLHdr.c generic/tixHLInd.c generic/tixHList.c generic/tixHList.h generic/tixImgCmp.c generic/tixImgXpm.c generic/tixImgXpm.h generic/tixInit.c generic/tixInputO.c generic/tixInt.h generic/tixList.c generic/tixMethod.c generic/tixNBFrame.c generic/tixOption.c generic/tixPort.h generic/tixScroll.c generic/tixSmpLs.c generic/tixTList.c generic/tixTList.h generic/tixUtils.c generic/tixWidget.c index.html library library/Balloon.tcl library/BtnBox.tcl library/CObjView.tcl library/ChkList.tcl library/ComboBox.tcl library/Compat.tcl library/Console.tcl library/Control.tcl library/DefSchm.tcl library/DialogS.tcl library/DirBox.tcl library/DirDlg.tcl library/DirList.tcl library/DirTree.tcl library/DragDrop.tcl library/DtlList.tcl library/EFileBox.tcl library/EFileDlg.tcl library/Event.tcl library/FileBox.tcl library/FileCbx.tcl library/FileDlg.tcl library/FileEnt.tcl library/FloatEnt.tcl library/Grid.tcl library/HList.tcl library/HListDD.tcl library/IconView.tcl library/Init.tcl library/LabEntry.tcl library/LabFrame.tcl library/LabWidg.tcl library/ListNBk.tcl library/Makefile library/Meter.tcl library/MultView.tcl library/NoteBook.tcl library/OldUtil.tcl library/OptMenu.tcl library/PanedWin.tcl library/PopMenu.tcl library/Primitiv.tcl library/ResizeH.tcl library/SGrid.tcl library/SHList.tcl library/SListBox.tcl library/STList.tcl library/SText.tcl library/SWidget.tcl library/SWindow.tcl library/Select.tcl library/Shell.tcl library/SimpDlg.tcl library/StackWin.tcl library/StatBar.tcl library/StdBBox.tcl library/StdShell.tcl library/TList.tcl library/Tix.tcl library/Tree.tcl library/Utils.tcl library/VResize.tcl library/VStack.tcl library/VTree.tcl library/Variable.tcl library/WInfo.tcl library/bitmaps library/bitmaps/act_fold.gif library/bitmaps/act_fold.xbm library/bitmaps/act_fold.xpm library/bitmaps/balarrow.xbm library/bitmaps/cbxarrow.xbm library/bitmaps/ck_def.xbm library/bitmaps/ck_off.xbm library/bitmaps/ck_on.xbm library/bitmaps/cross.xbm library/bitmaps/decr.xbm library/bitmaps/drop.xbm library/bitmaps/file.gif library/bitmaps/file.xbm library/bitmaps/file.xpm library/bitmaps/folder.gif library/bitmaps/folder.xbm library/bitmaps/folder.xpm library/bitmaps/harddisk.xbm library/bitmaps/hourglas.mask library/bitmaps/hourglas.xbm library/bitmaps/incr.xbm library/bitmaps/info.gif library/bitmaps/info.xpm library/bitmaps/maximize.xbm library/bitmaps/minimize.xbm library/bitmaps/minus.gif library/bitmaps/minus.xbm library/bitmaps/minus.xpm library/bitmaps/minusarm.gif library/bitmaps/minusarm.xbm library/bitmaps/minusarm.xpm library/bitmaps/mktransgif.tcl library/bitmaps/network.xbm library/bitmaps/no_entry.gif library/bitmaps/no_entry.xpm library/bitmaps/openfile.xbm library/bitmaps/openfold.gif library/bitmaps/openfold.xbm library/bitmaps/openfold.xpm library/bitmaps/plus.gif library/bitmaps/plus.xbm library/bitmaps/plus.xpm library/bitmaps/plusarm.gif library/bitmaps/plusarm.xbm library/bitmaps/plusarm.xpm library/bitmaps/resize1.xbm library/bitmaps/resize2.xbm library/bitmaps/restore.xbm library/bitmaps/srcfile.gif library/bitmaps/srcfile.xbm library/bitmaps/srcfile.xpm library/bitmaps/system.xbm library/bitmaps/textfile.gif library/bitmaps/textfile.xbm library/bitmaps/textfile.xpm library/bitmaps/tick.xbm library/bitmaps/warning.gif library/bitmaps/warning.xpm library/fs.tcl library/pref library/pref/10Point.fs library/pref/10Point.fsc library/pref/12Point.fs library/pref/12Point.fsc library/pref/14Point.fs library/pref/14Point.fsc library/pref/Bisque.cs library/pref/Bisque.csc library/pref/Blue.cs library/pref/Blue.csc library/pref/Gray.cs library/pref/Gray.csc library/pref/Makefile library/pref/Old12Pt.fs library/pref/Old14Pt.fs library/pref/SGIGray.cs library/pref/SGIGray.csc library/pref/TK.cs library/pref/TK.csc library/pref/TK.fs library/pref/TK.fsc library/pref/TixGray.cs library/pref/TixGray.csc library/pref/TkWin.cs library/pref/TkWin.csc library/pref/TkWin.fs library/pref/TkWin.fsc library/pref/WmDefault.cs library/pref/WmDefault.csc library/pref/WmDefault.fs library/pref/WmDefault.fsc library/pref/WmDefault.py library/pref/WmDefault.tcl library/pref/WmDefault.txt library/pref/pkgIndex.tcl library/pref/tixmkpref license.terms man man/GNUmakefile man/Makefile man/TixIntro.n man/compound.n man/html man/html/.cvsignore man/html/README.txt man/index.html man/man.macros man/pixmap.n man/tix.n man/tixBalloon.n man/tixButtonBox.n man/tixCheckList.n man/tixComboBox.n man/tixControl.n man/tixDestroy.n man/tixDirList.n man/tixDirSelectDialog.n man/tixDirTree.n man/tixDisplayStyle.n man/tixExFileSelectBox.n man/tixExFileSelectDialog.n man/tixFileEntry.n man/tixFileSelectBox.n man/tixFileSelectDialog.n man/tixForm.n man/tixGetBoolean.n man/tixGetInt.n man/tixGrid.n man/tixHList.n man/tixInputOnly.n man/tixLabelEntry.n man/tixLabelFrame.n man/tixListNoteBook.n man/tixMeter.n man/tixMwm.n man/tixNBFrame.n man/tixNoteBook.n man/tixOptionMenu.n man/tixPanedWindow.n man/tixPopupMenu.n man/tixScrolledHList.n man/tixScrolledListBox.n man/tixScrolledText.n man/tixScrolledWindow.n man/tixSelect.n man/tixStdButtonBox.n man/tixTList.n man/tixTree.n man/tixUtils.n man/tixwish.1 tclconfig tclconfig/README.txt tclconfig/install-sh tclconfig/tcl.m4 tests tests/Driver.tcl tests/Makefile.in tests/README tests/TODO.txt tests/Test.tcl tests/all.tcl tests/auto_loaded.tcl tests/basic.test tests/class.test tests/cleanup tests/cleanup/cleanup.tcl tests/cleanup/files tests/defs.tcl tests/distyle.test tests/files tests/general tests/general/NoteBook.tcl tests/general/api.tcl tests/general/cmderror.tcl tests/general/combobox.tcl tests/general/dirbox.tcl tests/general/draw.tcl tests/general/event0.tcl tests/general/filebox.tcl tests/general/files tests/general/fs.tcl tests/general/labentry.tcl tests/general/minterp.tcl tests/general/mwm.tcl tests/general/oop.tcl tests/general/options.tcl tests/general/optmenu.tcl tests/general/pane.tcl tests/general/pkginit.tcl tests/general/samples.tcl tests/general/select.tcl tests/general/slistbox.tcl tests/general/testtmpl.tcl tests/general/var1.tcl tests/grid tests/grid.test tests/grid/Grid.tcl tests/grid/files tests/hlist tests/hlist/DirList.tcl tests/hlist/HLHdr.tcl tests/hlist/HLInd.tcl tests/hlist/HList.tcl tests/hlist/files tests/hlist/items.tcl tests/itcl tests/itcl.test tests/itcl/files tests/itcl/general.tcl tests/itcl/itk.tcl tests/itcl/namesp.tcl tests/itcl/pkginit.tcl tests/itcl/scope1.tcl tests/library tests/library/CaseData.tcl tests/library/TestLib.tcl tests/library/TestLib.txt tests/library/load-init.tcl tests/load tests/load/files tests/load/general.tcl tests/load/pkginit.tcl tests/method.test tests/namesp.test tests/option.test tests/tclIndex tests/tlist tests/tlist/TList.tcl tests/tlist/files tests/widgetTestClass1.tcl tests/xpm tests/xpm/2cpp.xpm tests/xpm/brace.xpm tests/xpm/comments.xpm tests/xpm/compound.tcl tests/xpm/f-badcol.xpm tests/xpm/f-badpix.xpm tests/xpm/f-commt.xpm tests/xpm/f-missline.xpm tests/xpm/f-ok.xpm tests/xpm/f-shortln.xpm tests/xpm/files tests/xpm/folder.xpm tests/xpm/xpm.tcl tools tools/README.html tools/README.txt tools/hanno.tcl tools/man2html-fixindex.tcl tools/tcltrim tools/tix-man2html.tcl tools/tixindex tools/winsetup.iss unix unix/.cvsignore unix/README.txt unix/tixUnixDefault.h unix/tixUnixDraw.c unix/tixUnixInt.h unix/tixUnixMwm.c unix/tixUnixPort.h unix/tixUnixWm.c unix/tixUnixXpm.c win win/README.txt win/example.vc6 win/make_pkgIndex.tcl win/makefile.vc win/tixWCmpt.c win/tixWinDefault.h win/tixWinDraw.c win/tixWinInt.h win/tixWinPort.h win/tixWinWm.c win/tixWinXpm.c
trent.nelson
python-checkins at python.org
Tue Mar 18 19:39:24 CET 2008
Author: trent.nelson
Date: Tue Mar 18 19:38:59 2008
New Revision: 61536
Added:
external/tix-8.4.2.x/
external/tix-8.4.2.x/ABOUT.html
external/tix-8.4.2.x/ChangeLog
external/tix-8.4.2.x/Makefile.in
external/tix-8.4.2.x/PyTix-2.0/
external/tix-8.4.2.x/PyTix-2.0/2.0/
external/tix-8.4.2.x/PyTix-2.0/2.0/Tkinter.py
external/tix-8.4.2.x/PyTix-2.0/2.0/Tkinter.py.diff
external/tix-8.4.2.x/PyTix-2.0/2.0/_tkinter.c
external/tix-8.4.2.x/PyTix-2.0/2.0/_tkinter.c.diff
external/tix-8.4.2.x/PyTix-2.0/2.0/tkappinit.c
external/tix-8.4.2.x/PyTix-2.0/2.0/tkappinit.c.diff
external/tix-8.4.2.x/PyTix-2.0/BUGS-1.12.txt
external/tix-8.4.2.x/PyTix-2.0/BUGS-2.0.txt
external/tix-8.4.2.x/PyTix-2.0/ChangeLog
external/tix-8.4.2.x/PyTix-2.0/INSTALL-1.12.txt
external/tix-8.4.2.x/PyTix-2.0/INSTALL-2.0.txt
external/tix-8.4.2.x/PyTix-2.0/README-1.12.txt
external/tix-8.4.2.x/PyTix-2.0/README-2.0.txt
external/tix-8.4.2.x/PyTix-2.0/Tix.py
external/tix-8.4.2.x/PyTix-2.0/demos/
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/about.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/bold.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/capital.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/centerj.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xpm.1
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/drivea.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/drivea.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/exit.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/filebox.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/filebox.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/italic.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/justify.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/leftj.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/netw.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/netw.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/optmenu.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/rightj.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/select.xpm
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/tix.gif (contents, props changed)
external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/underline.xbm
external/tix-8.4.2.x/PyTix-2.0/demos/pman.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/
external/tix-8.4.2.x/PyTix-2.0/demos/samples/Balloon.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/BtnBox.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/CmpImg.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/ComboBox.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/Control.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/NoteBook.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/OptMenu.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/PopMenu.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/SHList1.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/SHList2.py
external/tix-8.4.2.x/PyTix-2.0/demos/samples/Tree.py
external/tix-8.4.2.x/PyTix-2.0/demos/tixwidgets.py
external/tix-8.4.2.x/Python/
external/tix-8.4.2.x/Python/BUGS-2.1.txt
external/tix-8.4.2.x/Python/Demo/
external/tix-8.4.2.x/Python/Demo/tix/
external/tix-8.4.2.x/Python/Demo/tix/BUGS.txt
external/tix-8.4.2.x/Python/Demo/tix/INSTALL.txt
external/tix-8.4.2.x/Python/Demo/tix/README.txt
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/about.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/bold.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/capital.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/centerj.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xpm.1
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/drivea.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/drivea.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/exit.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/filebox.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/filebox.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/italic.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/justify.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/leftj.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/netw.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/netw.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/optmenu.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/rightj.xbm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/select.xpm
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/tix.gif (contents, props changed)
external/tix-8.4.2.x/Python/Demo/tix/bitmaps/underline.xbm
external/tix-8.4.2.x/Python/Demo/tix/samples/
external/tix-8.4.2.x/Python/Demo/tix/samples/Balloon.py
external/tix-8.4.2.x/Python/Demo/tix/samples/BtnBox.py
external/tix-8.4.2.x/Python/Demo/tix/samples/CmpImg.py
external/tix-8.4.2.x/Python/Demo/tix/samples/ComboBox.py
external/tix-8.4.2.x/Python/Demo/tix/samples/Control.py
external/tix-8.4.2.x/Python/Demo/tix/samples/DirList.py
external/tix-8.4.2.x/Python/Demo/tix/samples/DirTree.py
external/tix-8.4.2.x/Python/Demo/tix/samples/NoteBook.py
external/tix-8.4.2.x/Python/Demo/tix/samples/OptMenu.py
external/tix-8.4.2.x/Python/Demo/tix/samples/PanedWin.py
external/tix-8.4.2.x/Python/Demo/tix/samples/PopMenu.py
external/tix-8.4.2.x/Python/Demo/tix/samples/SHList1.py
external/tix-8.4.2.x/Python/Demo/tix/samples/SHList2.py
external/tix-8.4.2.x/Python/Demo/tix/samples/Tree.py
external/tix-8.4.2.x/Python/Demo/tix/tixwidgets.py
external/tix-8.4.2.x/Python/INSTALL-2.1.txt
external/tix-8.4.2.x/Python/Lib/
external/tix-8.4.2.x/Python/Lib/lib-tk/
external/tix-8.4.2.x/Python/Lib/lib-tk/Tix.py
external/tix-8.4.2.x/Python/README-2.1.txt
external/tix-8.4.2.x/Python/README-2.2.txt
external/tix-8.4.2.x/Python/Tix.py
external/tix-8.4.2.x/README.txt
external/tix-8.4.2.x/aclocal.m4
external/tix-8.4.2.x/configure
external/tix-8.4.2.x/configure.in
external/tix-8.4.2.x/demos/
external/tix-8.4.2.x/demos/MkChoose.tcl
external/tix-8.4.2.x/demos/MkDirLis.tcl
external/tix-8.4.2.x/demos/MkSample.tcl
external/tix-8.4.2.x/demos/MkScroll.tcl
external/tix-8.4.2.x/demos/bitmaps/
external/tix-8.4.2.x/demos/bitmaps/about.xpm
external/tix-8.4.2.x/demos/bitmaps/bold.xbm
external/tix-8.4.2.x/demos/bitmaps/capital.xbm
external/tix-8.4.2.x/demos/bitmaps/centerj.xbm
external/tix-8.4.2.x/demos/bitmaps/code.xpm
external/tix-8.4.2.x/demos/bitmaps/combobox.xbm
external/tix-8.4.2.x/demos/bitmaps/combobox.xpm
external/tix-8.4.2.x/demos/bitmaps/drivea.xbm
external/tix-8.4.2.x/demos/bitmaps/drivea.xpm
external/tix-8.4.2.x/demos/bitmaps/exit.xpm
external/tix-8.4.2.x/demos/bitmaps/filebox.xbm
external/tix-8.4.2.x/demos/bitmaps/filebox.xpm
external/tix-8.4.2.x/demos/bitmaps/harddisk.xbm
external/tix-8.4.2.x/demos/bitmaps/harddisk.xpm
external/tix-8.4.2.x/demos/bitmaps/italic.xbm
external/tix-8.4.2.x/demos/bitmaps/justify.xbm
external/tix-8.4.2.x/demos/bitmaps/leftj.xbm
external/tix-8.4.2.x/demos/bitmaps/netw.xbm
external/tix-8.4.2.x/demos/bitmaps/netw.xpm
external/tix-8.4.2.x/demos/bitmaps/network.xbm
external/tix-8.4.2.x/demos/bitmaps/network.xpm
external/tix-8.4.2.x/demos/bitmaps/optmenu.xpm
external/tix-8.4.2.x/demos/bitmaps/rightj.xbm
external/tix-8.4.2.x/demos/bitmaps/select.xpm
external/tix-8.4.2.x/demos/bitmaps/tix.gif (contents, props changed)
external/tix-8.4.2.x/demos/bitmaps/underlin.xbm
external/tix-8.4.2.x/demos/samples/
external/tix-8.4.2.x/demos/samples/AllSampl.tcl
external/tix-8.4.2.x/demos/samples/ArrowBtn.tcl
external/tix-8.4.2.x/demos/samples/Balloon.tcl
external/tix-8.4.2.x/demos/samples/BtnBox.tcl
external/tix-8.4.2.x/demos/samples/CObjView.tcl
external/tix-8.4.2.x/demos/samples/ChkList.tcl
external/tix-8.4.2.x/demos/samples/CmpImg.tcl
external/tix-8.4.2.x/demos/samples/CmpImg1.tcl
external/tix-8.4.2.x/demos/samples/CmpImg2.tcl
external/tix-8.4.2.x/demos/samples/CmpImg3.tcl
external/tix-8.4.2.x/demos/samples/CmpImg4.tcl
external/tix-8.4.2.x/demos/samples/ComboBox.tcl
external/tix-8.4.2.x/demos/samples/Control.tcl
external/tix-8.4.2.x/demos/samples/DirDlg.tcl
external/tix-8.4.2.x/demos/samples/DirList.tcl
external/tix-8.4.2.x/demos/samples/DirTree.tcl
external/tix-8.4.2.x/demos/samples/DragDrop.tcl
external/tix-8.4.2.x/demos/samples/DynTree.tcl
external/tix-8.4.2.x/demos/samples/EFileDlg.tcl
external/tix-8.4.2.x/demos/samples/EditGrid.tcl
external/tix-8.4.2.x/demos/samples/FileDlg.tcl
external/tix-8.4.2.x/demos/samples/FileEnt.tcl
external/tix-8.4.2.x/demos/samples/HList1.tcl
external/tix-8.4.2.x/demos/samples/LabEntry.tcl
external/tix-8.4.2.x/demos/samples/LabFrame.tcl
external/tix-8.4.2.x/demos/samples/ListNBK.tcl
external/tix-8.4.2.x/demos/samples/Meter.tcl
external/tix-8.4.2.x/demos/samples/NoteBook.tcl
external/tix-8.4.2.x/demos/samples/OptMenu.tcl
external/tix-8.4.2.x/demos/samples/PanedWin.tcl
external/tix-8.4.2.x/demos/samples/PopMenu.tcl
external/tix-8.4.2.x/demos/samples/SGrid0.tcl
external/tix-8.4.2.x/demos/samples/SGrid1.tcl
external/tix-8.4.2.x/demos/samples/SHList.tcl
external/tix-8.4.2.x/demos/samples/SHList2.tcl
external/tix-8.4.2.x/demos/samples/SListBox.tcl
external/tix-8.4.2.x/demos/samples/STList1.tcl
external/tix-8.4.2.x/demos/samples/STList2.tcl
external/tix-8.4.2.x/demos/samples/STList3.tcl
external/tix-8.4.2.x/demos/samples/SText.tcl
external/tix-8.4.2.x/demos/samples/SWindow.tcl
external/tix-8.4.2.x/demos/samples/Sample.tcl
external/tix-8.4.2.x/demos/samples/Select.tcl
external/tix-8.4.2.x/demos/samples/StdBBox.tcl
external/tix-8.4.2.x/demos/samples/Tree.tcl
external/tix-8.4.2.x/demos/samples/Xpm.tcl
external/tix-8.4.2.x/demos/samples/Xpm1.tcl
external/tix-8.4.2.x/demos/tclIndex
external/tix-8.4.2.x/demos/tixwidgets.tcl
external/tix-8.4.2.x/demos/widget
external/tix-8.4.2.x/docs/
external/tix-8.4.2.x/docs/FAQ.html
external/tix-8.4.2.x/docs/FAQ.txt
external/tix-8.4.2.x/docs/Files.txt
external/tix-8.4.2.x/docs/Release-8.0.0.txt
external/tix-8.4.2.x/docs/Release-8.0.1.txt
external/tix-8.4.2.x/docs/Release-8.0.2.txt
external/tix-8.4.2.x/docs/Release-8.1.0.txt
external/tix-8.4.2.x/docs/Release-8.1.1.txt
external/tix-8.4.2.x/docs/Release-8.1.2.txt
external/tix-8.4.2.x/docs/Release-8.1.3.txt
external/tix-8.4.2.x/docs/Release-8.2.0.txt
external/tix-8.4.2.x/docs/Release-8.4.0.txt
external/tix-8.4.2.x/docs/Release.html
external/tix-8.4.2.x/docs/html/
external/tix-8.4.2.x/docs/html/TixBook/
external/tix-8.4.2.x/docs/html/TixBook/TixBook.html
external/tix-8.4.2.x/docs/html/TixBook/images.pl
external/tix-8.4.2.x/docs/html/TixBook/labels.pl
external/tix-8.4.2.x/docs/html/TixBook/section3_3.html
external/tix-8.4.2.x/docs/html/TixBook/section3_4.html
external/tix-8.4.2.x/docs/html/TixBook/section3_5.html
external/tix-8.4.2.x/docs/html/TixBook/section3_6.html
external/tix-8.4.2.x/docs/html/TixBook/section3_7.html
external/tix-8.4.2.x/docs/html/TixBook/section3_8.html
external/tix-8.4.2.x/docs/html/TixBook/sectionstar3_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_6_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_6_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_7_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_7_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_6.html
external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_7.html
external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_1_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_1_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_6.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_7.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_6.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_7.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_3_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_3_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_2_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_2_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_6.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_1_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_1_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_2_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_3_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_5_1.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_5_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_2_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_7_1_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_4.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_5.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_4_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_4_3.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_5_2.html
external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_5_4.html
external/tix-8.4.2.x/docs/html/TixBook/tableofcontents3_1.html
external/tix-8.4.2.x/docs/html/gif/
external/tix-8.4.2.x/docs/html/gif/tix/
external/tix-8.4.2.x/docs/html/gif/tix/ARROWS.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/arrows.png (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/container/
external/tix-8.4.2.x/docs/html/gif/tix/container/notebook.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/container/pane_add.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/container/pane_horz.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/container/pane_vert.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/container/sl-bar.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/container/sl-nobar.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/filesel/
external/tix-8.4.2.x/docs/html/gif/tix/filesel/dirlist.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/filesel/dirtree.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/filesel/exfile.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/filesel/fb_comp.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hierarchy.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hierarchy.png (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hlist/
external/tix-8.4.2.x/docs/html/gif/tix/hlist/dirtree.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist1.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist_ex1.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist_ex2.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist_ex3.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/
external/tix-8.4.2.x/docs/html/gif/tix/intro/combo.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/ctl_noopt.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/ctl_subw.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/ctl_wopt.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/hierarchy.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/law_comp.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/lawyer.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/select-vert.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/select.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/intro/select1.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/oop/
external/tix-8.4.2.x/docs/html/gif/tix/oop/arrows.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tix32.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tix32.png (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/
external/tix-8.4.2.x/docs/html/gif/tix/tlist/horizontal.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/joe.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/relation.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/tlist.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/twofont.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/twofont2.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/vertical.gif (contents, props changed)
external/tix-8.4.2.x/docs/html/gif/tix/tlist/widgets.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/
external/tix-8.4.2.x/docs/img/demo1.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/docview_w.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/setup0.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/setup1.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/setup2.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/setup3.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/setup5.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/setup6.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/tk42a.gif (contents, props changed)
external/tix-8.4.2.x/docs/img/tk42b.gif (contents, props changed)
external/tix-8.4.2.x/docs/license.html_lib
external/tix-8.4.2.x/docs/license.tcltk
external/tix-8.4.2.x/docs/pdf/
external/tix-8.4.2.x/docs/pdf/TixBook.pdf
external/tix-8.4.2.x/docs/pdf/TixUser.pdf
external/tix-8.4.2.x/docs/pdf/pguide-tix4.0.pdf (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/
external/tix-8.4.2.x/docs/tix-book/container.tex.html
external/tix-8.4.2.x/docs/tix-book/fig/
external/tix-8.4.2.x/docs/tix-book/fig/container/
external/tix-8.4.2.x/docs/tix-book/fig/container/notebook.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/container/pane_add.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/container/pane_horz.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/container/pane_vert.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/container/sl-bar.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/container/sl-nobar.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/cover.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/filesel/
external/tix-8.4.2.x/docs/tix-book/fig/filesel/dirlist.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/filesel/dirtree.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/filesel/exfile.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/filesel/fb_comp.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/hlist/
external/tix-8.4.2.x/docs/tix-book/fig/hlist/dirtree.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist1.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist_ex1.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist_ex2.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist_ex3.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/
external/tix-8.4.2.x/docs/tix-book/fig/intro/ctl_noopt.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/ctl_subw.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/ctl_wopt.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/hierarchy.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/law_comp.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/lawyer.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/select-vert.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/select.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/intro/select1.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/oop/
external/tix-8.4.2.x/docs/tix-book/fig/oop/arrows.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/
external/tix-8.4.2.x/docs/tix-book/fig/tlist/horizontal.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/joe.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/relation.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/tlist.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/twofont.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/twofont2.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/vertical.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/fig/tlist/widgets.gif (contents, props changed)
external/tix-8.4.2.x/docs/tix-book/filesel.tex.html
external/tix-8.4.2.x/docs/tix-book/hlist.tex.html
external/tix-8.4.2.x/docs/tix-book/intro.tex.html
external/tix-8.4.2.x/docs/tix-book/oop.tex.html
external/tix-8.4.2.x/docs/tix-book/preface.tex.html
external/tix-8.4.2.x/docs/tix-book/tix.book.html
external/tix-8.4.2.x/docs/tix-book/tlist.tex.html
external/tix-8.4.2.x/generic/
external/tix-8.4.2.x/generic/tix.h
external/tix-8.4.2.x/generic/tixAppInit.c
external/tix-8.4.2.x/generic/tixClass.c
external/tix-8.4.2.x/generic/tixCmds.c
external/tix-8.4.2.x/generic/tixCompat.c
external/tix-8.4.2.x/generic/tixDItem.c
external/tix-8.4.2.x/generic/tixDef.h
external/tix-8.4.2.x/generic/tixDiITxt.c
external/tix-8.4.2.x/generic/tixDiImg.c
external/tix-8.4.2.x/generic/tixDiStyle.c
external/tix-8.4.2.x/generic/tixDiText.c
external/tix-8.4.2.x/generic/tixDiWin.c
external/tix-8.4.2.x/generic/tixError.c
external/tix-8.4.2.x/generic/tixForm.c
external/tix-8.4.2.x/generic/tixForm.h
external/tix-8.4.2.x/generic/tixFormMisc.c
external/tix-8.4.2.x/generic/tixGeometry.c
external/tix-8.4.2.x/generic/tixGrData.c
external/tix-8.4.2.x/generic/tixGrData.h
external/tix-8.4.2.x/generic/tixGrFmt.c
external/tix-8.4.2.x/generic/tixGrRC.c
external/tix-8.4.2.x/generic/tixGrSel.c
external/tix-8.4.2.x/generic/tixGrSort.c
external/tix-8.4.2.x/generic/tixGrUtl.c
external/tix-8.4.2.x/generic/tixGrid.c
external/tix-8.4.2.x/generic/tixGrid.h
external/tix-8.4.2.x/generic/tixHLCol.c
external/tix-8.4.2.x/generic/tixHLHdr.c
external/tix-8.4.2.x/generic/tixHLInd.c
external/tix-8.4.2.x/generic/tixHList.c
external/tix-8.4.2.x/generic/tixHList.h
external/tix-8.4.2.x/generic/tixImgCmp.c
external/tix-8.4.2.x/generic/tixImgXpm.c
external/tix-8.4.2.x/generic/tixImgXpm.h
external/tix-8.4.2.x/generic/tixInit.c
external/tix-8.4.2.x/generic/tixInputO.c
external/tix-8.4.2.x/generic/tixInt.h
external/tix-8.4.2.x/generic/tixList.c
external/tix-8.4.2.x/generic/tixMethod.c
external/tix-8.4.2.x/generic/tixNBFrame.c
external/tix-8.4.2.x/generic/tixOption.c
external/tix-8.4.2.x/generic/tixPort.h
external/tix-8.4.2.x/generic/tixScroll.c
external/tix-8.4.2.x/generic/tixSmpLs.c
external/tix-8.4.2.x/generic/tixTList.c
external/tix-8.4.2.x/generic/tixTList.h
external/tix-8.4.2.x/generic/tixUtils.c
external/tix-8.4.2.x/generic/tixWidget.c
external/tix-8.4.2.x/index.html
external/tix-8.4.2.x/library/
external/tix-8.4.2.x/library/Balloon.tcl
external/tix-8.4.2.x/library/BtnBox.tcl
external/tix-8.4.2.x/library/CObjView.tcl
external/tix-8.4.2.x/library/ChkList.tcl
external/tix-8.4.2.x/library/ComboBox.tcl
external/tix-8.4.2.x/library/Compat.tcl
external/tix-8.4.2.x/library/Console.tcl
external/tix-8.4.2.x/library/Control.tcl
external/tix-8.4.2.x/library/DefSchm.tcl
external/tix-8.4.2.x/library/DialogS.tcl
external/tix-8.4.2.x/library/DirBox.tcl
external/tix-8.4.2.x/library/DirDlg.tcl
external/tix-8.4.2.x/library/DirList.tcl
external/tix-8.4.2.x/library/DirTree.tcl
external/tix-8.4.2.x/library/DragDrop.tcl
external/tix-8.4.2.x/library/DtlList.tcl
external/tix-8.4.2.x/library/EFileBox.tcl
external/tix-8.4.2.x/library/EFileDlg.tcl
external/tix-8.4.2.x/library/Event.tcl
external/tix-8.4.2.x/library/FileBox.tcl
external/tix-8.4.2.x/library/FileCbx.tcl
external/tix-8.4.2.x/library/FileDlg.tcl
external/tix-8.4.2.x/library/FileEnt.tcl
external/tix-8.4.2.x/library/FloatEnt.tcl
external/tix-8.4.2.x/library/Grid.tcl
external/tix-8.4.2.x/library/HList.tcl
external/tix-8.4.2.x/library/HListDD.tcl
external/tix-8.4.2.x/library/IconView.tcl
external/tix-8.4.2.x/library/Init.tcl
external/tix-8.4.2.x/library/LabEntry.tcl
external/tix-8.4.2.x/library/LabFrame.tcl
external/tix-8.4.2.x/library/LabWidg.tcl
external/tix-8.4.2.x/library/ListNBk.tcl
external/tix-8.4.2.x/library/Makefile
external/tix-8.4.2.x/library/Meter.tcl
external/tix-8.4.2.x/library/MultView.tcl
external/tix-8.4.2.x/library/NoteBook.tcl
external/tix-8.4.2.x/library/OldUtil.tcl
external/tix-8.4.2.x/library/OptMenu.tcl
external/tix-8.4.2.x/library/PanedWin.tcl
external/tix-8.4.2.x/library/PopMenu.tcl
external/tix-8.4.2.x/library/Primitiv.tcl
external/tix-8.4.2.x/library/ResizeH.tcl
external/tix-8.4.2.x/library/SGrid.tcl
external/tix-8.4.2.x/library/SHList.tcl
external/tix-8.4.2.x/library/SListBox.tcl
external/tix-8.4.2.x/library/STList.tcl
external/tix-8.4.2.x/library/SText.tcl
external/tix-8.4.2.x/library/SWidget.tcl
external/tix-8.4.2.x/library/SWindow.tcl
external/tix-8.4.2.x/library/Select.tcl
external/tix-8.4.2.x/library/Shell.tcl
external/tix-8.4.2.x/library/SimpDlg.tcl
external/tix-8.4.2.x/library/StackWin.tcl
external/tix-8.4.2.x/library/StatBar.tcl
external/tix-8.4.2.x/library/StdBBox.tcl
external/tix-8.4.2.x/library/StdShell.tcl
external/tix-8.4.2.x/library/TList.tcl
external/tix-8.4.2.x/library/Tix.tcl
external/tix-8.4.2.x/library/Tree.tcl
external/tix-8.4.2.x/library/Utils.tcl
external/tix-8.4.2.x/library/VResize.tcl
external/tix-8.4.2.x/library/VStack.tcl
external/tix-8.4.2.x/library/VTree.tcl
external/tix-8.4.2.x/library/Variable.tcl
external/tix-8.4.2.x/library/WInfo.tcl
external/tix-8.4.2.x/library/bitmaps/
external/tix-8.4.2.x/library/bitmaps/act_fold.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/act_fold.xbm
external/tix-8.4.2.x/library/bitmaps/act_fold.xpm
external/tix-8.4.2.x/library/bitmaps/balarrow.xbm
external/tix-8.4.2.x/library/bitmaps/cbxarrow.xbm
external/tix-8.4.2.x/library/bitmaps/ck_def.xbm
external/tix-8.4.2.x/library/bitmaps/ck_off.xbm
external/tix-8.4.2.x/library/bitmaps/ck_on.xbm
external/tix-8.4.2.x/library/bitmaps/cross.xbm
external/tix-8.4.2.x/library/bitmaps/decr.xbm
external/tix-8.4.2.x/library/bitmaps/drop.xbm
external/tix-8.4.2.x/library/bitmaps/file.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/file.xbm
external/tix-8.4.2.x/library/bitmaps/file.xpm
external/tix-8.4.2.x/library/bitmaps/folder.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/folder.xbm
external/tix-8.4.2.x/library/bitmaps/folder.xpm
external/tix-8.4.2.x/library/bitmaps/harddisk.xbm
external/tix-8.4.2.x/library/bitmaps/hourglas.mask
external/tix-8.4.2.x/library/bitmaps/hourglas.xbm
external/tix-8.4.2.x/library/bitmaps/incr.xbm
external/tix-8.4.2.x/library/bitmaps/info.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/info.xpm
external/tix-8.4.2.x/library/bitmaps/maximize.xbm
external/tix-8.4.2.x/library/bitmaps/minimize.xbm
external/tix-8.4.2.x/library/bitmaps/minus.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/minus.xbm
external/tix-8.4.2.x/library/bitmaps/minus.xpm
external/tix-8.4.2.x/library/bitmaps/minusarm.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/minusarm.xbm
external/tix-8.4.2.x/library/bitmaps/minusarm.xpm
external/tix-8.4.2.x/library/bitmaps/mktransgif.tcl
external/tix-8.4.2.x/library/bitmaps/network.xbm
external/tix-8.4.2.x/library/bitmaps/no_entry.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/no_entry.xpm
external/tix-8.4.2.x/library/bitmaps/openfile.xbm
external/tix-8.4.2.x/library/bitmaps/openfold.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/openfold.xbm
external/tix-8.4.2.x/library/bitmaps/openfold.xpm
external/tix-8.4.2.x/library/bitmaps/plus.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/plus.xbm
external/tix-8.4.2.x/library/bitmaps/plus.xpm
external/tix-8.4.2.x/library/bitmaps/plusarm.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/plusarm.xbm
external/tix-8.4.2.x/library/bitmaps/plusarm.xpm
external/tix-8.4.2.x/library/bitmaps/resize1.xbm
external/tix-8.4.2.x/library/bitmaps/resize2.xbm
external/tix-8.4.2.x/library/bitmaps/restore.xbm
external/tix-8.4.2.x/library/bitmaps/srcfile.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/srcfile.xbm
external/tix-8.4.2.x/library/bitmaps/srcfile.xpm
external/tix-8.4.2.x/library/bitmaps/system.xbm
external/tix-8.4.2.x/library/bitmaps/textfile.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/textfile.xbm
external/tix-8.4.2.x/library/bitmaps/textfile.xpm
external/tix-8.4.2.x/library/bitmaps/tick.xbm
external/tix-8.4.2.x/library/bitmaps/warning.gif (contents, props changed)
external/tix-8.4.2.x/library/bitmaps/warning.xpm
external/tix-8.4.2.x/library/fs.tcl
external/tix-8.4.2.x/library/pref/
external/tix-8.4.2.x/library/pref/10Point.fs
external/tix-8.4.2.x/library/pref/10Point.fsc
external/tix-8.4.2.x/library/pref/12Point.fs
external/tix-8.4.2.x/library/pref/12Point.fsc
external/tix-8.4.2.x/library/pref/14Point.fs
external/tix-8.4.2.x/library/pref/14Point.fsc
external/tix-8.4.2.x/library/pref/Bisque.cs
external/tix-8.4.2.x/library/pref/Bisque.csc
external/tix-8.4.2.x/library/pref/Blue.cs
external/tix-8.4.2.x/library/pref/Blue.csc
external/tix-8.4.2.x/library/pref/Gray.cs
external/tix-8.4.2.x/library/pref/Gray.csc
external/tix-8.4.2.x/library/pref/Makefile
external/tix-8.4.2.x/library/pref/Old12Pt.fs
external/tix-8.4.2.x/library/pref/Old14Pt.fs
external/tix-8.4.2.x/library/pref/SGIGray.cs
external/tix-8.4.2.x/library/pref/SGIGray.csc
external/tix-8.4.2.x/library/pref/TK.cs
external/tix-8.4.2.x/library/pref/TK.csc
external/tix-8.4.2.x/library/pref/TK.fs
external/tix-8.4.2.x/library/pref/TK.fsc
external/tix-8.4.2.x/library/pref/TixGray.cs
external/tix-8.4.2.x/library/pref/TixGray.csc
external/tix-8.4.2.x/library/pref/TkWin.cs
external/tix-8.4.2.x/library/pref/TkWin.csc
external/tix-8.4.2.x/library/pref/TkWin.fs
external/tix-8.4.2.x/library/pref/TkWin.fsc
external/tix-8.4.2.x/library/pref/WmDefault.cs
external/tix-8.4.2.x/library/pref/WmDefault.csc
external/tix-8.4.2.x/library/pref/WmDefault.fs
external/tix-8.4.2.x/library/pref/WmDefault.fsc
external/tix-8.4.2.x/library/pref/WmDefault.py
external/tix-8.4.2.x/library/pref/WmDefault.tcl
external/tix-8.4.2.x/library/pref/WmDefault.txt
external/tix-8.4.2.x/library/pref/pkgIndex.tcl
external/tix-8.4.2.x/library/pref/tixmkpref
external/tix-8.4.2.x/license.terms
external/tix-8.4.2.x/man/
external/tix-8.4.2.x/man/GNUmakefile
external/tix-8.4.2.x/man/Makefile
external/tix-8.4.2.x/man/TixIntro.n
external/tix-8.4.2.x/man/compound.n
external/tix-8.4.2.x/man/html/
external/tix-8.4.2.x/man/html/.cvsignore
external/tix-8.4.2.x/man/html/README.txt
external/tix-8.4.2.x/man/index.html
external/tix-8.4.2.x/man/man.macros
external/tix-8.4.2.x/man/pixmap.n
external/tix-8.4.2.x/man/tix.n
external/tix-8.4.2.x/man/tixBalloon.n
external/tix-8.4.2.x/man/tixButtonBox.n
external/tix-8.4.2.x/man/tixCheckList.n
external/tix-8.4.2.x/man/tixComboBox.n
external/tix-8.4.2.x/man/tixControl.n
external/tix-8.4.2.x/man/tixDestroy.n
external/tix-8.4.2.x/man/tixDirList.n
external/tix-8.4.2.x/man/tixDirSelectDialog.n
external/tix-8.4.2.x/man/tixDirTree.n
external/tix-8.4.2.x/man/tixDisplayStyle.n
external/tix-8.4.2.x/man/tixExFileSelectBox.n
external/tix-8.4.2.x/man/tixExFileSelectDialog.n
external/tix-8.4.2.x/man/tixFileEntry.n
external/tix-8.4.2.x/man/tixFileSelectBox.n
external/tix-8.4.2.x/man/tixFileSelectDialog.n
external/tix-8.4.2.x/man/tixForm.n
external/tix-8.4.2.x/man/tixGetBoolean.n
external/tix-8.4.2.x/man/tixGetInt.n
external/tix-8.4.2.x/man/tixGrid.n
external/tix-8.4.2.x/man/tixHList.n
external/tix-8.4.2.x/man/tixInputOnly.n
external/tix-8.4.2.x/man/tixLabelEntry.n
external/tix-8.4.2.x/man/tixLabelFrame.n
external/tix-8.4.2.x/man/tixListNoteBook.n
external/tix-8.4.2.x/man/tixMeter.n
external/tix-8.4.2.x/man/tixMwm.n
external/tix-8.4.2.x/man/tixNBFrame.n
external/tix-8.4.2.x/man/tixNoteBook.n
external/tix-8.4.2.x/man/tixOptionMenu.n
external/tix-8.4.2.x/man/tixPanedWindow.n
external/tix-8.4.2.x/man/tixPopupMenu.n
external/tix-8.4.2.x/man/tixScrolledHList.n
external/tix-8.4.2.x/man/tixScrolledListBox.n
external/tix-8.4.2.x/man/tixScrolledText.n
external/tix-8.4.2.x/man/tixScrolledWindow.n
external/tix-8.4.2.x/man/tixSelect.n
external/tix-8.4.2.x/man/tixStdButtonBox.n
external/tix-8.4.2.x/man/tixTList.n
external/tix-8.4.2.x/man/tixTree.n
external/tix-8.4.2.x/man/tixUtils.n
external/tix-8.4.2.x/man/tixwish.1
external/tix-8.4.2.x/tclconfig/
external/tix-8.4.2.x/tclconfig/README.txt
external/tix-8.4.2.x/tclconfig/install-sh
external/tix-8.4.2.x/tclconfig/tcl.m4
external/tix-8.4.2.x/tests/
external/tix-8.4.2.x/tests/Driver.tcl
external/tix-8.4.2.x/tests/Makefile.in
external/tix-8.4.2.x/tests/README
external/tix-8.4.2.x/tests/TODO.txt
external/tix-8.4.2.x/tests/Test.tcl
external/tix-8.4.2.x/tests/all.tcl
external/tix-8.4.2.x/tests/auto_loaded.tcl
external/tix-8.4.2.x/tests/basic.test
external/tix-8.4.2.x/tests/class.test
external/tix-8.4.2.x/tests/cleanup/
external/tix-8.4.2.x/tests/cleanup/cleanup.tcl
external/tix-8.4.2.x/tests/cleanup/files
external/tix-8.4.2.x/tests/defs.tcl
external/tix-8.4.2.x/tests/distyle.test
external/tix-8.4.2.x/tests/files
external/tix-8.4.2.x/tests/general/
external/tix-8.4.2.x/tests/general/NoteBook.tcl
external/tix-8.4.2.x/tests/general/api.tcl
external/tix-8.4.2.x/tests/general/cmderror.tcl
external/tix-8.4.2.x/tests/general/combobox.tcl
external/tix-8.4.2.x/tests/general/dirbox.tcl
external/tix-8.4.2.x/tests/general/draw.tcl
external/tix-8.4.2.x/tests/general/event0.tcl
external/tix-8.4.2.x/tests/general/filebox.tcl
external/tix-8.4.2.x/tests/general/files
external/tix-8.4.2.x/tests/general/fs.tcl
external/tix-8.4.2.x/tests/general/labentry.tcl
external/tix-8.4.2.x/tests/general/minterp.tcl
external/tix-8.4.2.x/tests/general/mwm.tcl
external/tix-8.4.2.x/tests/general/oop.tcl
external/tix-8.4.2.x/tests/general/options.tcl
external/tix-8.4.2.x/tests/general/optmenu.tcl
external/tix-8.4.2.x/tests/general/pane.tcl
external/tix-8.4.2.x/tests/general/pkginit.tcl
external/tix-8.4.2.x/tests/general/samples.tcl
external/tix-8.4.2.x/tests/general/select.tcl
external/tix-8.4.2.x/tests/general/slistbox.tcl
external/tix-8.4.2.x/tests/general/testtmpl.tcl
external/tix-8.4.2.x/tests/general/var1.tcl
external/tix-8.4.2.x/tests/grid/
external/tix-8.4.2.x/tests/grid.test
external/tix-8.4.2.x/tests/grid/Grid.tcl
external/tix-8.4.2.x/tests/grid/files
external/tix-8.4.2.x/tests/hlist/
external/tix-8.4.2.x/tests/hlist/DirList.tcl
external/tix-8.4.2.x/tests/hlist/HLHdr.tcl
external/tix-8.4.2.x/tests/hlist/HLInd.tcl
external/tix-8.4.2.x/tests/hlist/HList.tcl
external/tix-8.4.2.x/tests/hlist/files
external/tix-8.4.2.x/tests/hlist/items.tcl
external/tix-8.4.2.x/tests/itcl/
external/tix-8.4.2.x/tests/itcl.test
external/tix-8.4.2.x/tests/itcl/files
external/tix-8.4.2.x/tests/itcl/general.tcl
external/tix-8.4.2.x/tests/itcl/itk.tcl
external/tix-8.4.2.x/tests/itcl/namesp.tcl
external/tix-8.4.2.x/tests/itcl/pkginit.tcl
external/tix-8.4.2.x/tests/itcl/scope1.tcl
external/tix-8.4.2.x/tests/library/
external/tix-8.4.2.x/tests/library/CaseData.tcl
external/tix-8.4.2.x/tests/library/TestLib.tcl
external/tix-8.4.2.x/tests/library/TestLib.txt
external/tix-8.4.2.x/tests/library/load-init.tcl
external/tix-8.4.2.x/tests/load/
external/tix-8.4.2.x/tests/load/files
external/tix-8.4.2.x/tests/load/general.tcl
external/tix-8.4.2.x/tests/load/pkginit.tcl
external/tix-8.4.2.x/tests/method.test
external/tix-8.4.2.x/tests/namesp.test
external/tix-8.4.2.x/tests/option.test
external/tix-8.4.2.x/tests/tclIndex
external/tix-8.4.2.x/tests/tlist/
external/tix-8.4.2.x/tests/tlist/TList.tcl
external/tix-8.4.2.x/tests/tlist/files
external/tix-8.4.2.x/tests/widgetTestClass1.tcl
external/tix-8.4.2.x/tests/xpm/
external/tix-8.4.2.x/tests/xpm/2cpp.xpm
external/tix-8.4.2.x/tests/xpm/brace.xpm
external/tix-8.4.2.x/tests/xpm/comments.xpm
external/tix-8.4.2.x/tests/xpm/compound.tcl
external/tix-8.4.2.x/tests/xpm/f-badcol.xpm
external/tix-8.4.2.x/tests/xpm/f-badpix.xpm
external/tix-8.4.2.x/tests/xpm/f-commt.xpm
external/tix-8.4.2.x/tests/xpm/f-missline.xpm
external/tix-8.4.2.x/tests/xpm/f-ok.xpm
external/tix-8.4.2.x/tests/xpm/f-shortln.xpm
external/tix-8.4.2.x/tests/xpm/files
external/tix-8.4.2.x/tests/xpm/folder.xpm
external/tix-8.4.2.x/tests/xpm/xpm.tcl
external/tix-8.4.2.x/tools/
external/tix-8.4.2.x/tools/README.html
external/tix-8.4.2.x/tools/README.txt
external/tix-8.4.2.x/tools/hanno.tcl
external/tix-8.4.2.x/tools/man2html-fixindex.tcl
external/tix-8.4.2.x/tools/tcltrim
external/tix-8.4.2.x/tools/tix-man2html.tcl
external/tix-8.4.2.x/tools/tixindex
external/tix-8.4.2.x/tools/winsetup.iss
external/tix-8.4.2.x/unix/
external/tix-8.4.2.x/unix/.cvsignore
external/tix-8.4.2.x/unix/README.txt
external/tix-8.4.2.x/unix/tixUnixDefault.h
external/tix-8.4.2.x/unix/tixUnixDraw.c
external/tix-8.4.2.x/unix/tixUnixInt.h
external/tix-8.4.2.x/unix/tixUnixMwm.c
external/tix-8.4.2.x/unix/tixUnixPort.h
external/tix-8.4.2.x/unix/tixUnixWm.c
external/tix-8.4.2.x/unix/tixUnixXpm.c
external/tix-8.4.2.x/win/
external/tix-8.4.2.x/win/README.txt
external/tix-8.4.2.x/win/example.vc6
external/tix-8.4.2.x/win/make_pkgIndex.tcl
external/tix-8.4.2.x/win/makefile.vc
external/tix-8.4.2.x/win/tixWCmpt.c
external/tix-8.4.2.x/win/tixWinDefault.h
external/tix-8.4.2.x/win/tixWinDraw.c
external/tix-8.4.2.x/win/tixWinInt.h
external/tix-8.4.2.x/win/tixWinPort.h
external/tix-8.4.2.x/win/tixWinWm.c
external/tix-8.4.2.x/win/tixWinXpm.c
Log:
Initial import of tix-8.4.2.
Added: external/tix-8.4.2.x/ABOUT.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/ABOUT.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,58 @@
+<HTML>
+<HEAD>
+<TITLE>About Tix</TITLE>
+<!-- $Id: ABOUT.html,v 1.5 2001/12/09 05:23:39 idiscovery Exp $ -->
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+
+<H2>About Tix</H2>
+
+<blockquote>
+
+ Tix, which stands for Tk Interface Extension, is an extension
+ library for Tcl/Tk. Tix adds many <a
+ href="man/html/TixCmd/TixIntro.htm"> new widgets </a>, <a
+ href="man/html/TixCmd/TixIntro.htm"> image types </a> and <a
+ href="man/html/TixCmd/TixIntro.htm"> other commands </a> that
+ allows you to create compelling Tcl/Tk-based GUI applications. <p>
+
+ The following sample screen shows some widgets provided by Tix,
+ such as such as <a href="man/html/TixCmd/tixHList.htm">Hierarchical
+ Listbox</a>, <a href="man/html/TixCmd/tixNoteBook.htm">NoteBook </a>
+ and <a href="man/html/TixCmd/tixComboBox.htm">ComboBox </a>.
+
+
+ For a list of all the features in Tix, as well as how to use Tix
+ in your applications, see the <a
+ href="man/index.html"> Tix Manual Index</a>. <p>
+
+ One advantage of Tix over other Tk widget libraries is many of the
+ Tix core widgets are implemented in native code. This enhances
+ performance and provides native look-and-feel for your
+ applications. <p>
+
+
+ Tix is open-source software. See <a
+ href="license.terms">license.terms</a> for details. <p>
+
+</blockquote>
+
+<h3>Getting more information about Tix</h3>
+
+<blockquote>
+
+ To contact the Tix Project Group, reach your fellow Tix users,
+ submit patches or bug reports, and find a range of other
+ information, please visit our web site at <a
+ HREF="http://tix.sourceforge.net">http://tix.sourceforge.net</A>.
+
+</blockquote>
+
+<hr>
+
+<a href=index.html>Documentation Index</a><br>
+
+</BODY>
+</HTML>
+
Added: external/tix-8.4.2.x/ChangeLog
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/ChangeLog Tue Mar 18 19:38:59 2008
@@ -0,0 +1,364 @@
+2006-11-16 Jeff Hobbs <jeffh at ActiveState.com>
+
+ **** 8.4.2 TAGGED ****
+
+ * generic/tix.h (TIX_PATCH_LEVEL): updated to 8.4.2
+ * library/Init.tcl, README.txt, configure.in, configure:
+
+ * generic/tixInit.c, generic/tixInitScript.h: inline initScript
+ into tixInit.c, use patchlevel info for tcl_findLibrary.
+
+ * win/makefile.vc: note that this isn't actually maintained.
+
+ * Makefile.in (dist): make simple and effective dist target.
+ Changes source tarball to Tix$patchLevel-src.tar.gz.
+
+2006-11-15 Jeff Hobbs <jeffh at ActiveState.com>
+
+ **** 8.4.1 TAGGED ****
+
+ * generic/tix.h (TIX_PATCH_LEVEL): updated to 8.4.1
+ * library/Init.tcl:
+ * README.txt, configure.in, configure, tclconfig/tcl.m4:
+
+ * unix/tixUnixXpm.c: define TkPutImage to XPutImage on X11.
+
+ * generic/tixInit.c (Tix_Init): provide patchlevel version detail.
+
+2006-04-11 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * win/make_pkgIndex.tcl: correctly escape \$dir.
+
+ * generic/tix.h (strcasecmp): define to _stricmp on Win32, as
+ VS2005 requires this (and that works still with VC6).
+
+2006-01-25 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * configure, configure.in: update to TEA 3.5
+ * tclconfig/tcl.m4: TEA rcs 1.89 2006/01/25 21:25:02
+
+2005-03-25 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * tclconfig/tcl.m4, configure, configure.in: update to TEA 3.2
+ * generic/tixGeometry.c, generic/tixInit.c: OS X patch from Steffen
+ * generic/tixInputO.c, generic/tixPort.h:
+ * generic/tixUtils.c, generic/tixWidget.c:
+ * man/index.html, unix/tixUnixDraw.c, unix/tixUnixMwm.c:
+ * unix/tixUnixPort.h, unix/tixUnixWm.c, unix/tixUnixXpm.c:
+
+2004-12-23 Jeff Hobbs <jeffh at ActiveState.com>
+
+ **** 8.4.0 TAGGED ****
+
+ * README.txt, index.html: updated with 8.4.0 release info
+ * docs/Files.txt, docs/Release.html, docs/Release-8.4.0.txt:
+
+ * generic/tixInit.c (Tix_Init): remove USE_TIX_SAM refs
+
+ * tools/README.txt: update for removed tools
+ * tools/icon.tcl, tools/etags.tcl, tools/Makefile (removed):
+ * tools/tixverify.tcl, tools/tclc_s.tcl (removed):
+ * tools/makescript.tcl, tools/makebitmap.tcl (removed):
+ * tools/doconfig.tcl, tools/domakefile.tcl (removed):
+ * tools/doxx.tcl, tools/dosstrip.tcl (removed): removed old tools
+
+ * Makefile.in: add 'demo' makefile target
+
+ * library/Tix.tcl (tixAppContext:Constructor): init
+ tixOption(fixed_font) to Courier
+
+ * demos/tixwidgets.tcl: add 'tix initstyle', use real menus,
+ remove impotent "Manager Widgets" tab.
+
+ * docs/SAModule.txt (removed):
+ * docs/FAQ.txt, docs/FAQ.html: removed old info
+
+ * man/tix.n:
+ * library/Tix.tcl (tixAppContext:Constructor, tix initstyle):
+ * library/Init.tcl: reintroduce the 'tixAppContext tix' removed on
+ 2004-04-09 as that defines the 'tix' command. Instead, move the
+ style initialization in that to an explicit 'tix initstyle'
+ command. This preserves the 'tix' command as well as separation
+ of package require and use of tix style.
+
+ * library/pkgIndex.tcl (removed): this is now generated by the TEA
+ configure/makefile script. Other makefiles not creating this need
+ to be fixed.
+
+ * tests/class.test: fix test to note updated args handling
+
+ * tests/method.test: remove dead code
+
+2004-10-08 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * Makefile.in (PKG_CFLAGS): removed EXTRA_CFLAGS ref
+
+2004-10-01 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * generic/tk8.0/console.tcl, generic/tk8.0/tk.tcl (removed): no
+ longer relevant
+
+ * configure, configure.in, tclconfig/tcl.m4: updated to TEA 3.1
+ This corrects some unix 64-bit builds.
+
+ * README.txt, unix/README.txt, win/README.txt: updated notes to be
+ not so out of date.
+
+ * win/example.vc6, win/makefile.vc: made these more relevant, but
+ no attempt to actually test them.
+
+ * README.html, Roadmap.html (removed): Removed lots of
+ * unix/Makefile.in, unix/aclocal.m4 (removed): crufty build stuff
+ * unix/configure, unix/configure.in (removed): that is no longer
+ * unix/install-sh, unix/mkIndex.tcl.in (removed): supported and/or
+ * unix/pkgIndex.tcl.in, unix/tcl.m4 (removed): correct.
+ * unix/tixConfig.sh.in (removed):
+ * win/makefile.gnu, win/patch_win_main.tcl (removed):
+ * win/common.mak, win/example.gnu (removed): There is only the
+ * win/example.vc5, win/makefile.bc (removed): Tix as library
+ * win/winMain_patch.c (removed): now.
+ * win/rc/tixwish.ico, win/rc/tixwish.rc (removed):
+
+ * Makefile.in: set TIX_LIBRARY to $(srcdir)/library
+
+2004-04-09 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * library/pref/WmDefault.tcl: improve default font sizes.
+
+ * generic/tixInit.c: lower Tix default scheme prio to 20 from 79.
+ **** POTENTIAL INCOMPATABILITY ****
+
+ * library/Event.tcl (tixEvalCmdBinding): account for the case that
+ tixAppContext has not been called.
+
+ * library/SHList.tcl (tixScrolledHList:GeometryInfo): handle case
+ that child frame isn't a true Frame.
+
+ * library/Tree.tcl: make Tree recognize HList methods and pass
+ them on accordingly.
+
+ * library/Tix.tcl (tixAppContext:Constructor): do not reset
+ certain toplevel config options (like -menu). Remove all refs to
+ monochrome scheme settings.
+
+ * library/Init.tcl: DO NOT CALL 'tixAppContext tix' on init.
+ This means that the Tix defaults do not kick in on the package
+ require of Tix. You must call 'tixAppContext tix' after the
+ package require to kick in Tix' defaults.
+ **** POTENTIAL INCOMPATABILITY ****
+
+2004-03-27 Jeff Hobbs <jeffh at ActiveState.com>
+
+ * win/tixWinXpm.c (TixpXpmRealizePixmap): fix unreleased DC that
+ caused palette panic on exit
+
+ * ChangeLog.txt (removed), ChangeLog (new): renamed ChangeLog to
+ editor-standard unprefixed version
+
+ * config/acinclude.m4 (removed):
+ * Makefile.in, aclocal.m4, configure, configure.in,
+ * tclconfig/* (new):
+ new TEA based build system. This build Tix as a standard Tcl
+ extension, and does not have support for stand-alone tixwish.
+
+ * generic/tixMwm.c (removed), unix/tixUnixMwm.c (new): renamed
+ * generic/tix.h, generic/tixClass.c, generic/tixCmds.c
+ * generic/tixDItem.c, generic/tixDef.h, generic/tixDiITxt.c
+ * generic/tixDiImg.c, generic/tixDiStyle.c, generic/tixDiText.c
+ * generic/tixDiWin.c, generic/tixError.c, generic/tixForm.c
+ * generic/tixForm.h, generic/tixFormMisc.c, generic/tixGeometry.c
+ * generic/tixGrData.c, generic/tixGrFmt.c, generic/tixGrRC.c
+ * generic/tixGrSel.c, generic/tixGrSort.c, generic/tixGrUtl.c
+ * generic/tixGrid.c, generic/tixGrid.h, generic/tixHLCol.c
+ * generic/tixHLHdr.c, generic/tixHLInd.c, generic/tixHList.c
+ * generic/tixHList.h, generic/tixImgCmp.c, generic/tixImgXpm.c
+ * generic/tixInit.c, generic/tixInitScript.h, generic/tixInputO.c
+ * generic/tixInt.h, generic/tixMethod.c, generic/tixNBFrame.c
+ * generic/tixOption.c, generic/tixPort.h, generic/tixScroll.c
+ * generic/tixTList.c, generic/tixUtils.c, generic/tixWidget.c
+ * unix/tixUnixDraw.c, unix/tixUnixXpm.c
+ * win/tixWCmpt.c, win/tixWinDraw.c, win/tixWinPort.h
+ * win/tixWinXpm.c:
+ rewrite for proper CONST-ification and various code cleanup.
+
+ * library/Balloon.tcl, library/ChkList.tcl, library/ComboBox.tcl
+ * library/Compat.tcl, library/Control.tcl, library/DialogS.tcl
+ * library/DirBox.tcl, library/DirList.tcl, library/DirTree.tcl
+ * library/EFileBox.tcl, library/Event.tcl, library/FileBox.tcl
+ * library/FileCbx.tcl, library/FileEnt.tcl, library/FloatEnt.tcl
+ * library/Grid.tcl, library/HList.tcl, library/Init.tcl
+ * library/LabEntry.tcl, library/ListNBk.tcl, library/NoteBook.tcl
+ * library/OldUtil.tcl, library/PanedWin.tcl, library/PopMenu.tcl
+ * library/Primitiv.tcl, library/SHList.tcl, library/SListBox.tcl
+ * library/StackWin.tcl, library/Tix.tcl, library/Utils.tcl
+ * library/VResize.tcl, library/VStack.tcl, library/VTree.tcl
+ * library/fs.tcl, library/pkgIndex.tcl, library/pref/WmDefault.tcl:
+ Code cleanup to use newer Tcl 8.4 code features.
+ Rewrite of FS handling routines using Tcl core features.
+
+ * library/FileCmpt.tcl (removed): removed or consolidated cruft.
+ * library/FileUtil.tcl (removed):
+ * library/TAGS (removed):
+ * library/UnixFile.tcl (removed):
+ * library/Verify.tcl (removed):
+ * library/Version.tcl (removed):
+ * library/WinFile.tcl (removed):
+ * library/tclIndex (removed):
+
+ * demos/MkChoose.tcl:
+ * demos/MkDirLis.tcl:
+ * demos/tixwidgets.tcl:
+ * demos/samples/STList3.tcl: minor demo updates
+
+ * docs/Files.txt: note FS docs are out of date.
+
+ * tests/basic.test: minor changes. The tests likely don't
+ * tests/general/dirbox.tcl: work right now as they have references
+ * tests/general/fs.tcl: to a lot of old FS routines.
+ * tests/hlist/DirList.tcl:
+ * tests/library/CaseData.tcl:
+ * tests/library/TestLib.tcl:
+
+ *** Start of major revision to Tix ***
+ *** Tcl/Tk 8.4+ compatible from here on ***
+ *** Use older versions for earlier Tcl/Tk ***
+
+2002-01-25 Mike Clarkson <mikeclarkson at users.sourceforge.net>
+
+ * win/: Fixed Windows makefile.vc and rc/tixwish.rc
+
+ * Released as tix-8.2.0b3
+
+2002-01-23 Mike Clarkson <mikeclarkson at users.sourceforge.net>
+
+ * unix/: Fixed unix configure, configure.in and Makefile.in
+
+ * Released as tix-8.2.0b2
+
+2001-12-01 Mike Clarkson <mikeclarkson at users.sourceforge.net>
+
+ * library/Tix.tcl: Restored fontsets and schemes that were
+ missing from 8.2.0EA. Defaults to WmDefault like 8.1.3.
+
+ * tests/general/samples.tcl: Restored the 8.1.x widgets demo
+ missing from 8.2.0EA and renamed them to tixwidgets.tcl -
+ they give a more visual overview and are used by the test suite.
+
+2001-11-21 Mike Clarkson <mikeclarkson at users.sourceforge.net>
+
+ * library/pref/: Added WmDefault.* files, a Package for making Tix
+ apps use the CDE/GNOME/KDE/Windows scheme.
+ * library/: Many minor bug fixes to the library files.
+ * demo/samples/: Removed font and color overrides from the demos,
+ so that the native look and feel would be preserved.
+ * On Windows, initialize the console even if there is no script.
+ See the release notes for details of the $TIX_CONSOLE
+ * A site wide initialization file tixwishrc.tcl is now used.
+ See the release notes for details of the tixwishrc.tcl file.
+ * Removed the patches to Tkinter.py as it is now standard in Python.
+ * Released as 8.1.2.
+
+2001-01-21 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * Added new tools/tix-man2html.tcl for generating HTML version
+ of the Tix man pages.
+ * Files in man/*.html are now auto-generated (with
+ GNUmakefile) so they are no longer kept in the CVS tree.
+ * Renamed the man pages like HList.n to tixHList.n so that
+ they can be easily picked up by the Unix man command (e.g.,
+ man tixHList).
+
+2001-01-14 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * The DItem API has been changed to better separate the DItem
+ rendering from the host widgets. Now background, highlight
+ and anchor line rendering are all done by the DItems
+ themselves.
+
+2001-01-11 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * Removed old4176.zip. There has been many incompatible changes
+ that made building Tix with pre-8.0 Tcl very difficult.
+
+2001-01-08 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * Tix_LoadTclLibrary() is removed. Use tcl_findLibrary instead.
+
+2001-01-07 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * SAM support for the Tix library itself has been restored
+ (unix only). You can use the --enable-sam option for
+ unix/configure to include all the Tix script files in
+ libtix.{a,so}.
+
+ There is no SAM support for building the TCL and TK
+ libraries, though.
+
+ Also, there is no libtixsam.{a,so} anymore. The Tix scripts
+ are linked into libtix.{a,so} directly if SAM is enabled.
+----------------------------------------------------------------------
+2001-01-05 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * Tix 8.2.0 EA released.
+----------------------------------------------------------------------
+2001-01-04 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * New file win/makefile.gnu for building Tix with the free
+ Cygwin tools instead of VC++.
+
+2001-01-03 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * Tix version changed to Tix 8.2.0.
+
+2000-12-29 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * New "HTML-like" widget demo front-end "demos/widget", copied
+ from Tk 8.x.
+
+2000-12-28 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * Windows build is updated to the standard procedure defined in
+ the Tcl Extension Architecture (TEA). Only VC++ makefile
+ is supported in the moment.
+ * New win32 executable tixwishc81.exe uses the "DOS" console
+ instead of the GUI TK console. This is usually better for
+ debugging purposes during Tix core development. The old
+ tixwish81.exe remains, without change, for end-user apps.
+ * Support for ET (Embedded Tk) is now officially removed. See
+ notes about Stand-Alone Module (SAM) below.
+
+2000-12-26 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * !!! FEATURE REMOVED !!!
+ The Stand-Alone Module (SAM) feature is now dropped from
+ Tix. If you wish to package scripts inside an executable
+ binary, use one of the "wrap" extensions (such as ProWrap)
+ instead. The following files are removed from the
+ repository:
+ unix/tixUnixSam.c
+ unix/samAppInit.c
+ * Namespace handling code has been updated to the Tcl 8.0+
+ API. Therefore, the old special handling code for Itcl is no
+ longer necessary. The following files are removed from the
+ repository:
+ generic/tixItcl.h
+ generic/tixItcl.c
+ * Unix build is updated to the standard procedure defined in
+ the Tcl Extension Architecture (TEA). Now there is a single
+ configure script that builds Tix for different versions of
+ Tcl 8.x. All the old build subdirectories such as unix/tk8.3
+ are now removed.
+
+ This new build procedure also uses the "Stubs" interface to
+ link to Tcl and Tk. This way, the same libtix.so can be
+ loaded into any version of wish that supports stubs.
+
+2000-12-23 Ioi K. Lam <ioilam at users.sourceforge.net>
+ * New option -usetkdialog for tixFileEntry widget.
+ * !!! INCOMPATIBILITY !!! -scheme and -fontset options are now
+ silently ignored in the [tix] command. This is done to achieve
+ better native look-and-feel. Support for the -fontset and
+ -scheme options will be reimplemented in a future version.
+
+2000-12-16 Ioi K. Lam <ioilam at users.sourceforge.net>
+ !!! INCOMPATIBILITY !!!
+ * [tixWidgetClass] behavior has changed in incompatible ways:
+ (1) Tcl-style comments (prefixed by #) are no longer allowed.
+ The second argument to [tixWidgetClass] is treated strictly
+ as a list accepted by Tcl_SplitList().
+ (2) the [subst] command is no longer applied on certained
+ entries in the second argument to [tixWidgetClass]. If you
+ want substitution to happen, use [tixWidgetClassEx] instead.
+
+======================================================================
+Log started 2000-12-16
+======================================================================
Added: external/tix-8.4.2.x/Makefile.in
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Makefile.in Tue Mar 18 19:38:59 2008
@@ -0,0 +1,456 @@
+# Makefile.in --
+#
+# This file is a Makefile for Sample TEA Extension. If it has the name
+# "Makefile.in" then it is a template for a Makefile; to generate the
+# actual Makefile, run "./configure", which is a configuration script
+# generated by the "autoconf" program (constructs like "@foo@" will get
+# replaced in the actual Makefile.
+#
+# Copyright (c) 1999 Scriptics Corporation.
+# Copyright 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id: Makefile.in,v 1.5 2006/11/16 22:33:42 hobbs Exp $
+
+#========================================================================
+# Nothing of the variables below this line need to be changed. Please
+# check the TARGETS section below to make sure the make targets are
+# correct.
+#========================================================================
+
+#========================================================================
+# The names of the source files is defined in the configure script.
+# The object files are used for linking into the final library.
+# This will be used when a dist target is added to the Makefile.
+# It is not important to specify the directory, as long as it is the
+# $(srcdir) or in the generic, win or unix subdirectory.
+#========================================================================
+
+PKG_SOURCES = @PKG_SOURCES@
+PKG_OBJECTS = @PKG_OBJECTS@
+
+#========================================================================
+# PKG_TCL_SOURCES identifies Tcl runtime files that are associated with
+# this package that need to be installed, if any.
+#========================================================================
+
+PKG_TCL_SOURCES = \
+ library/Init.tcl library/Balloon.tcl library/BtnBox.tcl \
+ library/CObjView.tcl library/ChkList.tcl library/ComboBox.tcl \
+ library/Compat.tcl library/Console.tcl library/Control.tcl \
+ library/DefSchm.tcl library/DialogS.tcl library/DirBox.tcl \
+ library/DirDlg.tcl library/DirList.tcl library/DirTree.tcl \
+ library/DragDrop.tcl library/DtlList.tcl library/EFileBox.tcl \
+ library/EFileDlg.tcl library/Event.tcl library/FileBox.tcl \
+ library/FileCbx.tcl library/FileDlg.tcl \
+ library/FileEnt.tcl library/FloatEnt.tcl library/Grid.tcl \
+ library/HList.tcl library/HListDD.tcl library/IconView.tcl \
+ library/LabEntry.tcl library/LabFrame.tcl library/LabWidg.tcl \
+ library/ListNBk.tcl library/Meter.tcl library/MultView.tcl \
+ library/NoteBook.tcl library/OldUtil.tcl library/OptMenu.tcl \
+ library/PanedWin.tcl library/PopMenu.tcl library/Primitiv.tcl \
+ library/ResizeH.tcl library/SGrid.tcl library/SHList.tcl \
+ library/SListBox.tcl library/STList.tcl library/SText.tcl \
+ library/SWidget.tcl library/SWindow.tcl library/Select.tcl \
+ library/Shell.tcl library/SimpDlg.tcl library/StackWin.tcl \
+ library/StatBar.tcl library/StdBBox.tcl library/StdShell.tcl \
+ library/TList.tcl library/Tix.tcl library/Tree.tcl \
+ library/Utils.tcl library/VResize.tcl library/VStack.tcl \
+ library/VTree.tcl library/Variable.tcl \
+ library/WInfo.tcl library/fs.tcl
+
+#========================================================================
+# This is a list of public header files to be installed, if any.
+#========================================================================
+
+PKG_HEADERS = @PKG_HEADERS@
+
+PKG_EXTRA_FILES = license.terms README.txt
+
+PKG_MAN_PAGES =
+
+#========================================================================
+# "PKG_LIB_FILE" refers to the library (dynamic or static as per
+# configuration options) composed of the named objects.
+#========================================================================
+
+PKG_LIB_FILE = @PKG_LIB_FILE@
+PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
+
+lib_BINARIES = $(PKG_LIB_FILE)
+BINARIES = $(lib_BINARIES)
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+datadir = @datadir@
+mandir = @mandir@
+includedir = @includedir@
+
+DESTDIR =
+
+PKG_DIR = $(PACKAGE_NAME)$(PACKAGE_VERSION)
+pkgdatadir = $(datadir)/$(PKG_DIR)
+pkglibdir = $(libdir)/$(PKG_DIR)
+pkgincludedir = $(includedir)/$(PKG_DIR)
+
+top_builddir = .
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+CC = @CC@
+CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
+CFLAGS_WARNING = @CFLAGS_WARNING@
+CLEANFILES = @CLEANFILES@
+EXEEXT = @EXEEXT@
+LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
+MAKE_LIB = @MAKE_LIB@
+MAKE_SHARED_LIB = @MAKE_SHARED_LIB@
+MAKE_STATIC_LIB = @MAKE_STATIC_LIB@
+MAKE_STUB_LIB = @MAKE_STUB_LIB@
+OBJEXT = @OBJEXT@
+RANLIB = @RANLIB@
+RANLIB_STUB = @RANLIB_STUB@
+SHLIB_CFLAGS = @SHLIB_CFLAGS@
+SHLIB_LD = @SHLIB_LD@
+SHLIB_LD_FLAGS = @SHLIB_LD_FLAGS@
+SHLIB_LD_LIBS = @SHLIB_LD_LIBS@
+STLIB_LD = @STLIB_LD@
+TCL_DEFS = @TCL_DEFS@
+TCL_SRC_DIR = @TCL_SRC_DIR@
+TCL_BIN_DIR = @TCL_BIN_DIR@
+TK_SRC_DIR = @TK_SRC_DIR@
+TK_BIN_DIR = @TK_BIN_DIR@
+
+# Not used by sample, but retained for reference of what Tcl required
+TCL_LIBS = @TCL_LIBS@
+TK_LIBS = @TK_LIBS@
+
+#========================================================================
+# TCLLIBPATH seeds the auto_path in Tcl's init.tcl so we can test our
+# package without installing. The other environment variables allow us
+# to test against an uninstalled Tcl. Add special env vars that you
+# require for testing here (like TCLX_LIBRARY).
+#========================================================================
+
+EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
+TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
+ TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library` \
+ TIX_LIBRARY=`@CYGPATH@ $(srcdir)/library` \
+ @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
+ PATH="$(EXTRA_PATH):$(PATH)" \
+ TCLLIBPATH="$(top_builddir)"
+TCLSH_PROG = @TCLSH_PROG@
+WISH_PROG = @WISH_PROG@
+TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)
+WISH = $(TCLSH_ENV) $(WISH_PROG)
+
+# The local includes must come first, because the TK_XINCLUDES can be
+# just a comment
+INCLUDES = @PKG_INCLUDES@ \
+ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@
+
+PKG_CFLAGS = @PKG_CFLAGS@
+
+DEFS = @DEFS@ $(PKG_CFLAGS)
+
+CONFIG_CLEAN_FILES = Makefile
+
+CPPFLAGS = @CPPFLAGS@
+LIBS = @PKG_LIBS@ @LIBS@
+AR = ar
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+#========================================================================
+# Start of user-definable TARGETS section
+#========================================================================
+
+#========================================================================
+# TEA TARGETS. Please note that the "libraries:" target refers to platform
+# independent files, and the "binaries:" target inclues executable programs and
+# platform-dependent libraries. Modify these targets so that they install
+# the various pieces of your package. The make and install rules
+# for the BINARIES that you specified above have already been done.
+#========================================================================
+
+all: binaries libraries doc
+
+#========================================================================
+# The binaries target builds executable programs, Windows .dll's, unix
+# shared/static libraries, and any other platform-dependent files.
+# The list of targets to build for "binaries:" is specified at the top
+# of the Makefile, in the "BINARIES" variable.
+#========================================================================
+
+binaries: $(BINARIES) pkgIndex.tcl
+
+libraries:
+
+doc:
+
+install: all install-binaries install-libraries install-doc
+
+install-binaries: binaries install-lib-binaries install-bin-binaries
+ @mkdir -p $(DESTDIR)$(pkglibdir)
+ $(INSTALL_DATA) pkgIndex.tcl $(DESTDIR)$(pkglibdir)
+ @list='$(PKG_EXTRA_FILES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
+ echo " Install $$destp $(DESTDIR)$(pkglibdir)/$$destp"; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
+ fi; \
+ done
+
+#========================================================================
+# This rule installs platform-independent files, such as header files.
+#========================================================================
+
+install-libraries: libraries
+
+#========================================================================
+# Install documentation. Unix manpages should go in the $(mandir)
+# directory.
+#========================================================================
+
+install-doc: doc
+ @mkdir -p $(DESTDIR)$(pkglibdir)/html
+ @list='$(PKG_MAN_PAGES)'; for p in $$list; do \
+ html=`basename $$p|sed -e 's/.[^.]*$$//'`.html; \
+ $(INSTALL_DATA) $(srcdir)/doc/$$html $(DESTDIR)$(pkglibdir)/html/; \
+ done
+
+html:
+ @cd $(srcdir)/doc; \
+ list='$(PKG_MAN_PAGES)'; for p in $$list; do \
+ html=`basename $$p|sed -e 's/.[^.]*$$//'`.html; \
+ echo "Creating \"$$html\" from \"$$p\""; \
+ rm -f $$html; \
+ nroff -man $$p | rman -f HTML > $$html; \
+ done
+
+# Piping to cat is necessary on Windows to see the output, and
+# harmless on Unix
+test: binaries libraries
+ $(WISH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS) | cat
+
+shell: binaries libraries
+ @$(WISH) $(SCRIPT)
+
+demo: binaries libraries
+ $(WISH) `@CYGPATH@ $(srcdir)/demos/tixwidgets.tcl` $(TESTFLAGS) | cat
+
+gdb:
+ $(TCLSH_ENV) gdb $(WISH_PROG) $(SCRIPT)
+
+depend:
+
+#========================================================================
+# $(PKG_LIB_FILE) should be listed as part of the BINARIES variable
+# mentioned above. That will ensure that this target is built when you
+# run "make binaries".
+#
+# The $(PKG_OBJECTS) objects are created and linked into the final
+# library. In most cases these object files will correspond to the
+# source files above.
+#========================================================================
+
+$(PKG_LIB_FILE): $(PKG_OBJECTS)
+ -rm -f $(PKG_LIB_FILE)
+ ${MAKE_LIB}
+ $(RANLIB) $(PKG_LIB_FILE)
+
+#========================================================================
+# In the following lines, $(srcdir) refers to the toplevel directory
+# containing your extension. If your sources are in a subdirectory,
+# you will have to modify the paths to reflect this:
+#
+# tkpkg.$(OBJEXT): $(srcdir)/src/win/tkpkg.c
+# $(COMPILE) -c `@CYGPATH@ $(srcdir)/generic/tkpkg.c` -o $@
+#
+# Setting the VPATH variable to a list of paths will cause the
+# makefile to look into these paths when resolving .c to .obj
+# dependencies.
+#========================================================================
+
+VPATH = $(srcdir):$(srcdir)/generic:$(srcdir)/unix:$(srcdir)/win
+
+.SUFFIXES: .c .$(OBJEXT)
+
+.c. at OBJEXT@:
+ $(COMPILE) -c `@CYGPATH@ $<`
+
+pkgIndex.tcl:
+ (\
+ echo 'if {[catch {package require Tcl 8.4}]} return';\
+ echo 'package ifneeded $(PACKAGE_NAME) $(PACKAGE_VERSION) \
+ [list load [file join $$dir $(PKG_LIB_FILE)] $(PACKAGE_NAME)]'\
+ ) > pkgIndex.tcl
+
+#========================================================================
+# End of user-definable section
+#========================================================================
+
+#========================================================================
+# Don't modify the file to clean here. Instead, set the "CLEANFILES"
+# variable in configure.in
+#========================================================================
+
+clean:
+ -test -z "$(BINARIES)" || rm -f $(BINARIES)
+ -rm -f *.$(OBJEXT) core *.core
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean: clean
+ -rm -f *.tab.c
+ -rm -f $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log config.status
+
+#========================================================================
+# Install binary object libraries. On Windows this includes both .dll and
+# .lib files. Because the .lib files are not explicitly listed anywhere,
+# we need to deduce their existence from the .dll file of the same name.
+#
+# You should not have to modify this target.
+#========================================================================
+
+install-lib-binaries:
+ @mkdir -p $(DESTDIR)$(pkglibdir)
+ @list='$(lib_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
+ echo " $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p"; \
+ $(RANLIB) $(DESTDIR)$(pkglibdir)/$$p; \
+ ext=`echo $$p|sed -e "s/.*\.//"`; \
+ if test "x$$ext" = "xdll"; then \
+ lib=`basename $$p|sed -e 's/.[^.]*$$//'`.lib; \
+ if test -f $$lib; then \
+ echo " $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib"; \
+ $(INSTALL_DATA) $$lib $(DESTDIR)$(pkglibdir)/$$lib; \
+ fi; \
+ fi; \
+ fi; \
+ done
+ @echo "Installing library files to $(DESTDIR)$(pkglibdir)/$$destp";
+ @list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ if test -f $(srcdir)/$$p; then \
+ destp=`basename $$p`; \
+ $(INSTALL_DATA) $(srcdir)/$$p $(DESTDIR)$(pkglibdir)/$$destp; \
+ fi; \
+ done
+ @echo "Installing preference sets to $(DESTDIR)$(pkglibdir)/pref"
+ @mkdir -p $(DESTDIR)$(pkglibdir)/pref
+ @cp -p $(srcdir)/library/pref/*.* $(DESTDIR)$(pkglibdir)/pref/
+ @echo "Installing bitmaps to $(DESTDIR)$(pkglibdir)/bitmaps"
+ @mkdir -p $(DESTDIR)$(pkglibdir)/bitmaps
+ @cp -p $(srcdir)/library/bitmaps/*.* $(DESTDIR)$(pkglibdir)/bitmaps/
+
+#========================================================================
+# Install binary executables (e.g. .exe files)
+#
+# You should not have to modify this target.
+#========================================================================
+
+install-bin-binaries:
+ @mkdir -p $(DESTDIR)$(bindir)
+ @list='$(bin_BINARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p"; \
+ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
+ fi; \
+ done
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) \
+ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+uninstall-binaries:
+ list='$(lib_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(PKG_TCL_SOURCES)'; for p in $$list; do \
+ p=`basename $$p`; \
+ rm -f $(DESTDIR)$(pkglibdir)/$$p; \
+ done
+ list='$(bin_BINARIES)'; for p in $$list; do \
+ rm -f $(DESTDIR)$(bindir)/$$p; \
+ done
+
+#========================================================================
+# Starkit creation - requires ActiveTcl or compatible tclsh
+# You should not have to modify this target.
+#========================================================================
+
+STARKIT_EXT = .kit.tcl
+STARKIT_TCLSH = $(TCLSH)
+STARKIT_BASE = tclsh
+STARKIT = $(PACKAGE_NAME)$(STARKIT_EXT)
+
+starkit-clean:
+ rm -f $(STARKIT)
+
+starkit: starkit-clean
+ @echo "Building $(STARKIT)"
+ (\
+ echo 'package require vfs'; \
+ echo 'package require Mk4tcl'; \
+ echo ''; \
+ echo 'set HEADER {#!/bin/sh';\
+ echo '# \\'; \
+ echo 'exec %1s "$$0" $${1+"$$@"}'; \
+ echo 'package require starkit'; \
+ echo 'starkit::header mk4 -readonly}'; \
+ echo ''; \
+ echo 'set HEADER [format "$$HEADER\n%c" [file tail [info nameofexe]] 0x1a]'; \
+ echo 'set file "$(STARKIT)"'; \
+ echo 'set fid [open $$file w]'; \
+ echo 'puts $$fid $$HEADER'; \
+ echo 'close $$fid'; \
+ echo ''; \
+ echo 'vfs::mk4::Mount $$file $$file'; \
+ echo 'file copy $(PKG_LIB_FILE) $$file/'; \
+ echo 'vfs::unmount $$file'; \
+ ) | $(STARKIT_TCLSH)
+
+#========================================================================
+# Distribution creation
+# You should not have to modify this target.
+#========================================================================
+
+TAR = tar
+#COMPRESS = $(TAR) cvf $(PKG_DIR)-src.tar $(PKG_DIR); compress $(PKG_DIR).tar
+COMPRESS = $(TAR) zcvf $(PKG_DIR)-src.tar.gz $(PKG_DIR)
+DIST_ROOT = /tmp/dist
+DIST_DIR = $(DIST_ROOT)/$(PKG_DIR)
+
+dist-clean:
+ rm -rf $(DIST_DIR) $(DIST_ROOT)/$(PKG_DIR)-src.tar.*
+
+dist: dist-clean
+ mkdir -p $(DIST_DIR)
+ cp -pr $(srcdir)/* $(DIST_DIR)/
+ chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
+ chmod 775 $(DIST_DIR)/configure $(DIST_DIR)/configure.in
+
+ find $(DIST_DIR) -type d -name CVS | xargs rm -rf
+
+ (cd $(DIST_ROOT); $(COMPRESS);)
+
+.PHONY: all binaries clean depend distclean doc install libraries test
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Added: external/tix-8.4.2.x/PyTix-2.0/2.0/Tkinter.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/2.0/Tkinter.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,3142 @@
+"""Wrapper functions for Tcl/Tk.
+
+Tkinter provides classes which allow the display, positioning and
+control of widgets. Toplevel widgets are Tk and Toplevel. Other
+widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton,
+Checkbutton, Scale, Listbox, Scrollbar, OptionMenu. Properties of the widgets are
+specified with keyword arguments. Keyword arguments have the same
+name as the corresponding resource under Tk.
+
+Widgets are positioned with one of the geometry managers Place, Pack
+or Grid. These managers can be called with methods place, pack, grid
+available in every Widget.
+
+Actions are bound to events by resources (e.g. keyword argument command) or
+with the method bind.
+
+Example (Hello, World):
+import Tkinter
+from Tkconstants import *
+tk = Tkinter.Tk()
+frame = Tkinter.Frame(tk, relief=RIDGE, borderwidth=2)
+frame.pack(fill=BOTH,expand=1)
+label = Tkinter.Label(frame, text="Hello, World")
+label.pack(fill=X, expand=1)
+button = Tkinter.Button(frame,text="Exit",command=tk.destroy)
+button.pack(side=BOTTOM)
+tk.mainloop()
+"""
+
+__version__ = "$Revision: 1.2 $"
+
+import sys
+if sys.platform == "win32":
+ import FixTk # Attempt to configure Tcl/Tk without requiring PATH
+import _tkinter # If this fails your Python may not be configured for Tk
+tkinter = _tkinter # b/w compat for export
+TclError = _tkinter.TclError
+from types import *
+from Tkconstants import *
+import string; _string = string; del string
+try:
+ import MacOS; _MacOS = MacOS; del MacOS
+except ImportError:
+ _MacOS = None
+
+TkVersion = _string.atof(_tkinter.TK_VERSION)
+TclVersion = _string.atof(_tkinter.TCL_VERSION)
+try: TixVersion = _string.atof(_tkinter.TIX_VERSION)
+except AttributeError: TixVersion = None
+
+READABLE = _tkinter.READABLE
+WRITABLE = _tkinter.WRITABLE
+EXCEPTION = _tkinter.EXCEPTION
+
+# These are not always defined, e.g. not on Win32 with Tk 8.0 :-(
+try: _tkinter.createfilehandler
+except AttributeError: _tkinter.createfilehandler = None
+try: _tkinter.deletefilehandler
+except AttributeError: _tkinter.deletefilehandler = None
+
+
+def _flatten(tuple):
+ """Internal function."""
+ res = ()
+ for item in tuple:
+ if type(item) in (TupleType, ListType):
+ res = res + _flatten(item)
+ elif item is not None:
+ res = res + (item,)
+ return res
+
+try: _flatten = _tkinter._flatten
+except AttributeError: pass
+
+def _cnfmerge(cnfs):
+ """Internal function."""
+ if type(cnfs) is DictionaryType:
+ return cnfs
+ elif type(cnfs) in (NoneType, StringType):
+ return cnfs
+ else:
+ cnf = {}
+ for c in _flatten(cnfs):
+ try:
+ cnf.update(c)
+ except (AttributeError, TypeError), msg:
+ print "_cnfmerge: fallback due to:", msg
+ for k, v in c.items():
+ cnf[k] = v
+ return cnf
+
+try: _cnfmerge = _tkinter._cnfmerge
+except AttributeError: pass
+
+class Event:
+ """Container for the properties of an event.
+
+ Instances of this type are generated if one of the following events occurs:
+
+ KeyPress, KeyRelease - for keyboard events
+ ButtonPress, ButtonRelease, Motion, Enter, Leave, MouseWheel - for mouse events
+ Visibility, Unmap, Map, Expose, FocusIn, FocusOut, Circulate,
+ Colormap, Gravity, Reparent, Property, Destroy, Activate,
+ Deactivate - for window events.
+
+ If a callback function for one of these events is registered
+ using bind, bind_all, bind_class, or tag_bind, the callback is
+ called with an Event as first argument. It will have the
+ following attributes (in braces are the event types for which
+ the attribute is valid):
+
+ serial - serial number of event
+ num - mouse button pressed (ButtonPress, ButtonRelease)
+ focus - whether the window has the focus (Enter, Leave)
+ height - height of the exposed window (Configure, Expose)
+ width - width of the exposed window (Configure, Expose)
+ keycode - keycode of the pressed key (KeyPress, KeyRelease)
+ state - state of the event as a number (ButtonPress, ButtonRelease,
+ Enter, KeyPress, KeyRelease,
+ Leave, Motion)
+ state - state as a string (Visibility)
+ time - when the event occurred
+ x - x-position of the mouse
+ y - y-position of the mouse
+ x_root - x-position of the mouse on the screen
+ (ButtonPress, ButtonRelease, KeyPress, KeyRelease, Motion)
+ y_root - y-position of the mouse on the screen
+ (ButtonPress, ButtonRelease, KeyPress, KeyRelease, Motion)
+ char - pressed character (KeyPress, KeyRelease)
+ send_event - see X/Windows documentation
+ keysym - keysym of the the event as a string (KeyPress, KeyRelease)
+ keysym_num - keysym of the event as a number (KeyPress, KeyRelease)
+ type - type of the event as a number
+ widget - widget in which the event occurred
+ delta - delta of wheel movement (MouseWheel)
+ """
+ pass
+
+_support_default_root = 1
+_default_root = None
+
+def NoDefaultRoot():
+ """Inhibit setting of default root window.
+
+ Call this function to inhibit that the first instance of
+ Tk is used for windows without an explicit parent window.
+ """
+ global _support_default_root
+ _support_default_root = 0
+ global _default_root
+ _default_root = None
+ del _default_root
+
+def _tkerror(err):
+ """Internal function."""
+ pass
+
+def _exit(code='0'):
+ """Internal function. Calling it will throw the exception SystemExit."""
+ raise SystemExit, code
+
+_varnum = 0
+class Variable:
+ """Internal class. Base class to define value holders for e.g. buttons."""
+ _default = ""
+ def __init__(self, master=None):
+ """Construct a variable with an optional MASTER as master widget.
+ The variable is named PY_VAR_number in Tcl.
+ """
+ global _varnum
+ if not master:
+ master = _default_root
+ self._master = master
+ self._tk = master.tk
+ self._name = 'PY_VAR' + `_varnum`
+ _varnum = _varnum + 1
+ self.set(self._default)
+ def __del__(self):
+ """Unset the variable in Tcl."""
+ self._tk.globalunsetvar(self._name)
+ def __str__(self):
+ """Return the name of the variable in Tcl."""
+ return self._name
+ def set(self, value):
+ """Set the variable to VALUE."""
+ return self._tk.globalsetvar(self._name, value)
+ def trace_variable(self, mode, callback):
+ """Define a trace callback for the variable.
+
+ MODE is one of "r", "w", "u" for read, write, undefine.
+ CALLBACK must be a function which is called when
+ the variable is read, written or undefined.
+
+ Return the name of the callback.
+ """
+ cbname = self._master._register(callback)
+ self._tk.call("trace", "variable", self._name, mode, cbname)
+ return cbname
+ trace = trace_variable
+ def trace_vdelete(self, mode, cbname):
+ """Delete the trace callback for a variable.
+
+ MODE is one of "r", "w", "u" for read, write, undefine.
+ CBNAME is the name of the callback returned from trace_variable or trace.
+ """
+ self._tk.call("trace", "vdelete", self._name, mode, cbname)
+ self._master.deletecommand(cbname)
+ def trace_vinfo(self):
+ """Return all trace callback information."""
+ return map(self._tk.split, self._tk.splitlist(
+ self._tk.call("trace", "vinfo", self._name)))
+
+class StringVar(Variable):
+ """Value holder for strings variables."""
+ _default = ""
+ def __init__(self, master=None):
+ """Construct a string variable.
+
+ MASTER can be given as master widget."""
+ Variable.__init__(self, master)
+
+ def get(self):
+ """Return value of variable as string."""
+ return self._tk.globalgetvar(self._name)
+
+class IntVar(Variable):
+ """Value holder for integer variables."""
+ _default = 0
+ def __init__(self, master=None):
+ """Construct an integer variable.
+
+ MASTER can be given as master widget."""
+ Variable.__init__(self, master)
+
+ def get(self):
+ """Return the value of the variable as an integer."""
+ return getint(self._tk.globalgetvar(self._name))
+
+class DoubleVar(Variable):
+ """Value holder for float variables."""
+ _default = 0.0
+ def __init__(self, master=None):
+ """Construct a float variable.
+
+ MASTER can be given as a master widget."""
+ Variable.__init__(self, master)
+
+ def get(self):
+ """Return the value of the variable as a float."""
+ return getdouble(self._tk.globalgetvar(self._name))
+
+class BooleanVar(Variable):
+ """Value holder for boolean variables."""
+ _default = "false"
+ def __init__(self, master=None):
+ """Construct a boolean variable.
+
+ MASTER can be given as a master widget."""
+ Variable.__init__(self, master)
+
+ def get(self):
+ """Return the value of the variable as 0 or 1."""
+ return self._tk.getboolean(self._tk.globalgetvar(self._name))
+
+def mainloop(n=0):
+ """Run the main loop of Tcl."""
+ _default_root.tk.mainloop(n)
+
+getint = int
+
+getdouble = float
+
+def getboolean(s):
+ """Convert true and false to integer values 1 and 0."""
+ return _default_root.tk.getboolean(s)
+
+# Methods defined on both toplevel and interior widgets
+class Misc:
+ """Internal class.
+
+ Base class which defines methods common for interior widgets."""
+
+ # XXX font command?
+ _tclCommands = None
+ def destroy(self):
+ """Internal function.
+
+ Delete all Tcl commands created for
+ this widget in the Tcl interpreter."""
+ if self._tclCommands is not None:
+ for name in self._tclCommands:
+ #print '- Tkinter: deleted command', name
+ self.tk.deletecommand(name)
+ self._tclCommands = None
+ def deletecommand(self, name):
+ """Internal function.
+
+ Delete the Tcl command provided in NAME."""
+ #print '- Tkinter: deleted command', name
+ self.tk.deletecommand(name)
+ try:
+ self._tclCommands.remove(name)
+ except ValueError:
+ pass
+ def tk_strictMotif(self, boolean=None):
+ """Set Tcl internal variable, whether the look and feel
+ should adhere to Motif.
+
+ A parameter of 1 means adhere to Motif (e.g. no color
+ change if mouse passes over slider).
+ Returns the set value."""
+ return self.tk.getboolean(self.tk.call(
+ 'set', 'tk_strictMotif', boolean))
+ def tk_bisque(self):
+ """Change the color scheme to light brown as used in Tk 3.6 and before."""
+ self.tk.call('tk_bisque')
+ def tk_setPalette(self, *args, **kw):
+ """Set a new color scheme for all widget elements.
+
+ A single color as argument will cause that all colors of Tk
+ widget elements are derived from this.
+ Alternatively several keyword parameters and its associated
+ colors can be given. The following keywords are valid:
+ activeBackground, foreground, selectColor,
+ activeForeground, highlightBackground, selectBackground,
+ background, highlightColor, selectForeground,
+ disabledForeground, insertBackground, troughColor."""
+ self.tk.call(('tk_setPalette',)
+ + _flatten(args) + _flatten(kw.items()))
+ def tk_menuBar(self, *args):
+ """Do not use. Needed in Tk 3.6 and earlier."""
+ pass # obsolete since Tk 4.0
+ def wait_variable(self, name='PY_VAR'):
+ """Wait until the variable is modified.
+
+ A parameter of type IntVar, StringVar, DoubleVar or
+ BooleanVar must be given."""
+ self.tk.call('tkwait', 'variable', name)
+ waitvar = wait_variable # XXX b/w compat
+ def wait_window(self, window=None):
+ """Wait until a WIDGET is destroyed.
+
+ If no parameter is given self is used."""
+ if window == None:
+ window = self
+ self.tk.call('tkwait', 'window', window._w)
+ def wait_visibility(self, window=None):
+ """Wait until the visibility of a WIDGET changes
+ (e.g. it appears).
+
+ If no parameter is given self is used."""
+ if window == None:
+ window = self
+ self.tk.call('tkwait', 'visibility', window._w)
+ def setvar(self, name='PY_VAR', value='1'):
+ """Set Tcl variable NAME to VALUE."""
+ self.tk.setvar(name, value)
+ def getvar(self, name='PY_VAR'):
+ """Return value of Tcl variable NAME."""
+ return self.tk.getvar(name)
+ getint = int
+ getdouble = float
+ def getboolean(self, s):
+ """Return 0 or 1 for Tcl boolean values true and false given as parameter."""
+ return self.tk.getboolean(s)
+ def focus_set(self):
+ """Direct input focus to this widget.
+
+ If the application currently does not have the focus
+ this widget will get the focus if the application gets
+ the focus through the window manager."""
+ self.tk.call('focus', self._w)
+ focus = focus_set # XXX b/w compat?
+ def focus_force(self):
+ """Direct input focus to this widget even if the
+ application does not have the focus. Use with
+ caution!"""
+ self.tk.call('focus', '-force', self._w)
+ def focus_get(self):
+ """Return the widget which has currently the focus in the
+ application.
+
+ Use focus_displayof to allow working with several
+ displays. Return None if application does not have
+ the focus."""
+ name = self.tk.call('focus')
+ if name == 'none' or not name: return None
+ return self._nametowidget(name)
+ def focus_displayof(self):
+ """Return the widget which has currently the focus on the
+ display where this widget is located.
+
+ Return None if the application does not have the focus."""
+ name = self.tk.call('focus', '-displayof', self._w)
+ if name == 'none' or not name: return None
+ return self._nametowidget(name)
+ def focus_lastfor(self):
+ """Return the widget which would have the focus if top level
+ for this widget gets the focus from the window manager."""
+ name = self.tk.call('focus', '-lastfor', self._w)
+ if name == 'none' or not name: return None
+ return self._nametowidget(name)
+ def tk_focusFollowsMouse(self):
+ """The widget under mouse will get automatically focus. Can not
+ be disabled easily."""
+ self.tk.call('tk_focusFollowsMouse')
+ def tk_focusNext(self):
+ """Return the next widget in the focus order which follows
+ widget which has currently the focus.
+
+ The focus order first goes to the next child, then to
+ the children of the child recursively and then to the
+ next sibling which is higher in the stacking order. A
+ widget is omitted if it has the takefocus resource set
+ to 0."""
+ name = self.tk.call('tk_focusNext', self._w)
+ if not name: return None
+ return self._nametowidget(name)
+ def tk_focusPrev(self):
+ """Return previous widget in the focus order. See tk_focusNext for details."""
+ name = self.tk.call('tk_focusPrev', self._w)
+ if not name: return None
+ return self._nametowidget(name)
+ def after(self, ms, func=None, *args):
+ """Call function once after given time.
+
+ MS specifies the time in milliseconds. FUNC gives the
+ function which shall be called. Additional parameters
+ are given as parameters to the function call. Return
+ identifier to cancel scheduling with after_cancel."""
+ if not func:
+ # I'd rather use time.sleep(ms*0.001)
+ self.tk.call('after', ms)
+ else:
+ # XXX Disgusting hack to clean up after calling func
+ tmp = []
+ def callit(func=func, args=args, self=self, tmp=tmp):
+ try:
+ apply(func, args)
+ finally:
+ try:
+ self.deletecommand(tmp[0])
+ except TclError:
+ pass
+ name = self._register(callit)
+ tmp.append(name)
+ return self.tk.call('after', ms, name)
+ def after_idle(self, func, *args):
+ """Call FUNC once if the Tcl main loop has no event to
+ process.
+
+ Return an identifier to cancel the scheduling with
+ after_cancel."""
+ return apply(self.after, ('idle', func) + args)
+ def after_cancel(self, id):
+ """Cancel scheduling of function identified with ID.
+
+ Identifier returned by after or after_idle must be
+ given as first parameter."""
+ self.tk.call('after', 'cancel', id)
+ def bell(self, displayof=0):
+ """Ring a display's bell."""
+ self.tk.call(('bell',) + self._displayof(displayof))
+ # Clipboard handling:
+ def clipboard_clear(self, **kw):
+ """Clear the data in the Tk clipboard.
+
+ A widget specified for the optional displayof keyword
+ argument specifies the target display."""
+ if not kw.has_key('displayof'): kw['displayof'] = self._w
+ self.tk.call(('clipboard', 'clear') + self._options(kw))
+ def clipboard_append(self, string, **kw):
+ """Append STRING to the Tk clipboard.
+
+ A widget specified at the optional displayof keyword
+ argument specifies the target display. The clipboard
+ can be retrieved with selection_get."""
+ if not kw.has_key('displayof'): kw['displayof'] = self._w
+ self.tk.call(('clipboard', 'append') + self._options(kw)
+ + ('--', string))
+ # XXX grab current w/o window argument
+ def grab_current(self):
+ """Return widget which has currently the grab in this application
+ or None."""
+ name = self.tk.call('grab', 'current', self._w)
+ if not name: return None
+ return self._nametowidget(name)
+ def grab_release(self):
+ """Release grab for this widget if currently set."""
+ self.tk.call('grab', 'release', self._w)
+ def grab_set(self):
+ """Set grab for this widget.
+
+ A grab directs all events to this and descendant
+ widgets in the application."""
+ self.tk.call('grab', 'set', self._w)
+ def grab_set_global(self):
+ """Set global grab for this widget.
+
+ A global grab directs all events to this and
+ descendant widgets on the display. Use with caution -
+ other applications do not get events anymore."""
+ self.tk.call('grab', 'set', '-global', self._w)
+ def grab_status(self):
+ """Return None, "local" or "global" if this widget has
+ no, a local or a global grab."""
+ status = self.tk.call('grab', 'status', self._w)
+ if status == 'none': status = None
+ return status
+ def lower(self, belowThis=None):
+ """Lower this widget in the stacking order."""
+ self.tk.call('lower', self._w, belowThis)
+ def option_add(self, pattern, value, priority = None):
+ """Set a VALUE (second parameter) for an option
+ PATTERN (first parameter).
+
+ An optional third parameter gives the numeric priority
+ (defaults to 80)."""
+ self.tk.call('option', 'add', pattern, value, priority)
+ def option_clear(self):
+ """Clear the option database.
+
+ It will be reloaded if option_add is called."""
+ self.tk.call('option', 'clear')
+ def option_get(self, name, className):
+ """Return the value for an option NAME for this widget
+ with CLASSNAME.
+
+ Values with higher priority override lower values."""
+ return self.tk.call('option', 'get', self._w, name, className)
+ def option_readfile(self, fileName, priority = None):
+ """Read file FILENAME into the option database.
+
+ An optional second parameter gives the numeric
+ priority."""
+ self.tk.call('option', 'readfile', fileName, priority)
+ def selection_clear(self, **kw):
+ """Clear the current X selection."""
+ if not kw.has_key('displayof'): kw['displayof'] = self._w
+ self.tk.call(('selection', 'clear') + self._options(kw))
+ def selection_get(self, **kw):
+ """Return the contents of the current X selection.
+
+ A keyword parameter selection specifies the name of
+ the selection and defaults to PRIMARY. A keyword
+ parameter displayof specifies a widget on the display
+ to use."""
+ if not kw.has_key('displayof'): kw['displayof'] = self._w
+ return self.tk.call(('selection', 'get') + self._options(kw))
+ def selection_handle(self, command, **kw):
+ """Specify a function COMMAND to call if the X
+ selection owned by this widget is queried by another
+ application.
+
+ This function must return the contents of the
+ selection. The function will be called with the
+ arguments OFFSET and LENGTH which allows the chunking
+ of very long selections. The following keyword
+ parameters can be provided:
+ selection - name of the selection (default PRIMARY),
+ type - type of the selection (e.g. STRING, FILE_NAME)."""
+ name = self._register(command)
+ self.tk.call(('selection', 'handle') + self._options(kw)
+ + (self._w, name))
+ def selection_own(self, **kw):
+ """Become owner of X selection.
+
+ A keyword parameter selection specifies the name of
+ the selection (default PRIMARY)."""
+ self.tk.call(('selection', 'own') +
+ self._options(kw) + (self._w,))
+ def selection_own_get(self, **kw):
+ """Return owner of X selection.
+
+ The following keyword parameter can
+ be provided:
+ selection - name of the selection (default PRIMARY),
+ type - type of the selection (e.g. STRING, FILE_NAME)."""
+ if not kw.has_key('displayof'): kw['displayof'] = self._w
+ name = self.tk.call(('selection', 'own') + self._options(kw))
+ if not name: return None
+ return self._nametowidget(name)
+ def send(self, interp, cmd, *args):
+ """Send Tcl command CMD to different interpreter INTERP to be executed."""
+ return self.tk.call(('send', interp, cmd) + args)
+ def lower(self, belowThis=None):
+ """Lower this widget in the stacking order."""
+ self.tk.call('lower', self._w, belowThis)
+ def tkraise(self, aboveThis=None):
+ """Raise this widget in the stacking order."""
+ self.tk.call('raise', self._w, aboveThis)
+ lift = tkraise
+ def colormodel(self, value=None):
+ """Useless. Not implemented in Tk."""
+ return self.tk.call('tk', 'colormodel', self._w, value)
+ def winfo_atom(self, name, displayof=0):
+ """Return integer which represents atom NAME."""
+ args = ('winfo', 'atom') + self._displayof(displayof) + (name,)
+ return getint(self.tk.call(args))
+ def winfo_atomname(self, id, displayof=0):
+ """Return name of atom with identifier ID."""
+ args = ('winfo', 'atomname') \
+ + self._displayof(displayof) + (id,)
+ return self.tk.call(args)
+ def winfo_cells(self):
+ """Return number of cells in the colormap for this widget."""
+ return getint(
+ self.tk.call('winfo', 'cells', self._w))
+ def winfo_children(self):
+ """Return a list of all widgets which are children of this widget."""
+ return map(self._nametowidget,
+ self.tk.splitlist(self.tk.call(
+ 'winfo', 'children', self._w)))
+ def winfo_class(self):
+ """Return window class name of this widget."""
+ return self.tk.call('winfo', 'class', self._w)
+ def winfo_colormapfull(self):
+ """Return true if at the last color request the colormap was full."""
+ return self.tk.getboolean(
+ self.tk.call('winfo', 'colormapfull', self._w))
+ def winfo_containing(self, rootX, rootY, displayof=0):
+ """Return the widget which is at the root coordinates ROOTX, ROOTY."""
+ args = ('winfo', 'containing') \
+ + self._displayof(displayof) + (rootX, rootY)
+ name = self.tk.call(args)
+ if not name: return None
+ return self._nametowidget(name)
+ def winfo_depth(self):
+ """Return the number of bits per pixel."""
+ return getint(self.tk.call('winfo', 'depth', self._w))
+ def winfo_exists(self):
+ """Return true if this widget exists."""
+ return getint(
+ self.tk.call('winfo', 'exists', self._w))
+ def winfo_fpixels(self, number):
+ """Return the number of pixels for the given distance NUMBER
+ (e.g. "3c") as float."""
+ return getdouble(self.tk.call(
+ 'winfo', 'fpixels', self._w, number))
+ def winfo_geometry(self):
+ """Return geometry string for this widget in the form "widthxheight+X+Y"."""
+ return self.tk.call('winfo', 'geometry', self._w)
+ def winfo_height(self):
+ """Return height of this widget."""
+ return getint(
+ self.tk.call('winfo', 'height', self._w))
+ def winfo_id(self):
+ """Return identifier ID for this widget."""
+ return self.tk.getint(
+ self.tk.call('winfo', 'id', self._w))
+ def winfo_interps(self, displayof=0):
+ """Return the name of all Tcl interpreters for this display."""
+ args = ('winfo', 'interps') + self._displayof(displayof)
+ return self.tk.splitlist(self.tk.call(args))
+ def winfo_ismapped(self):
+ """Return true if this widget is mapped."""
+ return getint(
+ self.tk.call('winfo', 'ismapped', self._w))
+ def winfo_manager(self):
+ """Return the window mananger name for this widget."""
+ return self.tk.call('winfo', 'manager', self._w)
+ def winfo_name(self):
+ """Return the name of this widget."""
+ return self.tk.call('winfo', 'name', self._w)
+ def winfo_parent(self):
+ """Return the name of the parent of this widget."""
+ return self.tk.call('winfo', 'parent', self._w)
+ def winfo_pathname(self, id, displayof=0):
+ """Return the pathname of the widget given by ID."""
+ args = ('winfo', 'pathname') \
+ + self._displayof(displayof) + (id,)
+ return self.tk.call(args)
+ def winfo_pixels(self, number):
+ """Rounded integer value of winfo_fpixels."""
+ return getint(
+ self.tk.call('winfo', 'pixels', self._w, number))
+ def winfo_pointerx(self):
+ """Return the x coordinate of the pointer on the root window."""
+ return getint(
+ self.tk.call('winfo', 'pointerx', self._w))
+ def winfo_pointerxy(self):
+ """Return a tuple of x and y coordinates of the pointer on the root window."""
+ return self._getints(
+ self.tk.call('winfo', 'pointerxy', self._w))
+ def winfo_pointery(self):
+ """Return the y coordinate of the pointer on the root window."""
+ return getint(
+ self.tk.call('winfo', 'pointery', self._w))
+ def winfo_reqheight(self):
+ """Return requested height of this widget."""
+ return getint(
+ self.tk.call('winfo', 'reqheight', self._w))
+ def winfo_reqwidth(self):
+ """Return requested width of this widget."""
+ return getint(
+ self.tk.call('winfo', 'reqwidth', self._w))
+ def winfo_rgb(self, color):
+ """Return tuple of decimal values for red, green, blue for
+ COLOR in this widget."""
+ return self._getints(
+ self.tk.call('winfo', 'rgb', self._w, color))
+ def winfo_rootx(self):
+ """Return x coordinate of upper left corner of this widget on the
+ root window."""
+ return getint(
+ self.tk.call('winfo', 'rootx', self._w))
+ def winfo_rooty(self):
+ """Return y coordinate of upper left corner of this widget on the
+ root window."""
+ return getint(
+ self.tk.call('winfo', 'rooty', self._w))
+ def winfo_screen(self):
+ """Return the screen name of this widget."""
+ return self.tk.call('winfo', 'screen', self._w)
+ def winfo_screencells(self):
+ """Return the number of the cells in the colormap of the screen
+ of this widget."""
+ return getint(
+ self.tk.call('winfo', 'screencells', self._w))
+ def winfo_screendepth(self):
+ """Return the number of bits per pixel of the root window of the
+ screen of this widget."""
+ return getint(
+ self.tk.call('winfo', 'screendepth', self._w))
+ def winfo_screenheight(self):
+ """Return the number of pixels of the height of the screen of this widget
+ in pixel."""
+ return getint(
+ self.tk.call('winfo', 'screenheight', self._w))
+ def winfo_screenmmheight(self):
+ """Return the number of pixels of the height of the screen of
+ this widget in mm."""
+ return getint(
+ self.tk.call('winfo', 'screenmmheight', self._w))
+ def winfo_screenmmwidth(self):
+ """Return the number of pixels of the width of the screen of
+ this widget in mm."""
+ return getint(
+ self.tk.call('winfo', 'screenmmwidth', self._w))
+ def winfo_screenvisual(self):
+ """Return one of the strings directcolor, grayscale, pseudocolor,
+ staticcolor, staticgray, or truecolor for the default
+ colormodel of this screen."""
+ return self.tk.call('winfo', 'screenvisual', self._w)
+ def winfo_screenwidth(self):
+ """Return the number of pixels of the width of the screen of
+ this widget in pixel."""
+ return getint(
+ self.tk.call('winfo', 'screenwidth', self._w))
+ def winfo_server(self):
+ """Return information of the X-Server of the screen of this widget in
+ the form "XmajorRminor vendor vendorVersion"."""
+ return self.tk.call('winfo', 'server', self._w)
+ def winfo_toplevel(self):
+ """Return the toplevel widget of this widget."""
+ return self._nametowidget(self.tk.call(
+ 'winfo', 'toplevel', self._w))
+ def winfo_viewable(self):
+ """Return true if the widget and all its higher ancestors are mapped."""
+ return getint(
+ self.tk.call('winfo', 'viewable', self._w))
+ def winfo_visual(self):
+ """Return one of the strings directcolor, grayscale, pseudocolor,
+ staticcolor, staticgray, or truecolor for the
+ colormodel of this widget."""
+ return self.tk.call('winfo', 'visual', self._w)
+ def winfo_visualid(self):
+ """Return the X identifier for the visual for this widget."""
+ return self.tk.call('winfo', 'visualid', self._w)
+ def winfo_visualsavailable(self, includeids=0):
+ """Return a list of all visuals available for the screen
+ of this widget.
+
+ Each item in the list consists of a visual name (see winfo_visual), a
+ depth and if INCLUDEIDS=1 is given also the X identifier."""
+ data = self.tk.split(
+ self.tk.call('winfo', 'visualsavailable', self._w,
+ includeids and 'includeids' or None))
+ if type(data) is StringType:
+ data = [self.tk.split(data)]
+ return map(self.__winfo_parseitem, data)
+ def __winfo_parseitem(self, t):
+ """Internal function."""
+ return t[:1] + tuple(map(self.__winfo_getint, t[1:]))
+ def __winfo_getint(self, x):
+ """Internal function."""
+ return _string.atoi(x, 0)
+ def winfo_vrootheight(self):
+ """Return the height of the virtual root window associated with this
+ widget in pixels. If there is no virtual root window return the
+ height of the screen."""
+ return getint(
+ self.tk.call('winfo', 'vrootheight', self._w))
+ def winfo_vrootwidth(self):
+ """Return the width of the virtual root window associated with this
+ widget in pixel. If there is no virtual root window return the
+ width of the screen."""
+ return getint(
+ self.tk.call('winfo', 'vrootwidth', self._w))
+ def winfo_vrootx(self):
+ """Return the x offset of the virtual root relative to the root
+ window of the screen of this widget."""
+ return getint(
+ self.tk.call('winfo', 'vrootx', self._w))
+ def winfo_vrooty(self):
+ """Return the y offset of the virtual root relative to the root
+ window of the screen of this widget."""
+ return getint(
+ self.tk.call('winfo', 'vrooty', self._w))
+ def winfo_width(self):
+ """Return the width of this widget."""
+ return getint(
+ self.tk.call('winfo', 'width', self._w))
+ def winfo_x(self):
+ """Return the x coordinate of the upper left corner of this widget
+ in the parent."""
+ return getint(
+ self.tk.call('winfo', 'x', self._w))
+ def winfo_y(self):
+ """Return the y coordinate of the upper left corner of this widget
+ in the parent."""
+ return getint(
+ self.tk.call('winfo', 'y', self._w))
+ def update(self):
+ """Enter event loop until all pending events have been processed by Tcl."""
+ self.tk.call('update')
+ def update_idletasks(self):
+ """Enter event loop until all idle callbacks have been called. This
+ will update the display of windows but not process events caused by
+ the user."""
+ self.tk.call('update', 'idletasks')
+ def bindtags(self, tagList=None):
+ """Set or get the list of bindtags for this widget.
+
+ With no argument return the list of all bindtags associated with
+ this widget. With a list of strings as argument the bindtags are
+ set to this list. The bindtags determine in which order events are
+ processed (see bind)."""
+ if tagList is None:
+ return self.tk.splitlist(
+ self.tk.call('bindtags', self._w))
+ else:
+ self.tk.call('bindtags', self._w, tagList)
+ def _bind(self, what, sequence, func, add, needcleanup=1):
+ """Internal function."""
+ if type(func) is StringType:
+ self.tk.call(what + (sequence, func))
+ elif func:
+ funcid = self._register(func, self._substitute,
+ needcleanup)
+ cmd = ('%sif {"[%s %s]" == "break"} break\n'
+ %
+ (add and '+' or '',
+ funcid,
+ _string.join(self._subst_format)))
+ self.tk.call(what + (sequence, cmd))
+ return funcid
+ elif sequence:
+ return self.tk.call(what + (sequence,))
+ else:
+ return self.tk.splitlist(self.tk.call(what))
+ def bind(self, sequence=None, func=None, add=None):
+ """Bind to this widget at event SEQUENCE a call to function FUNC.
+
+ SEQUENCE is a string of concatenated event
+ patterns. An event pattern is of the form
+ <MODIFIER-MODIFIER-TYPE-DETAIL> where MODIFIER is one
+ of 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. TYPE is one of Activate, Enter, Map,
+ ButtonPress, Button, Expose, Motion, ButtonRelease
+ FocusIn, MouseWheel, Circulate, FocusOut, Property,
+ Colormap, Gravity Reparent, Configure, KeyPress, Key,
+ Unmap, Deactivate, KeyRelease Visibility, Destroy,
+ Leave and DETAIL is the button number for ButtonPress,
+ ButtonRelease and DETAIL is the Keysym for KeyPress and
+ KeyRelease. Examples are
+ <Control-Button-1> for pressing Control and mouse button 1 or
+ <Alt-A> for pressing A and the Alt key (KeyPress can be omitted).
+ An event pattern can also be a virtual event of the form
+ <<AString>> where AString can be arbitrary. This
+ event can be generated by event_generate.
+ If events are concatenated they must appear shortly
+ after each other.
+
+ FUNC will be called if the event sequence occurs with an
+ instance of Event as argument. If the return value of FUNC is
+ "break" no further bound function is invoked.
+
+ An additional boolean parameter ADD specifies whether FUNC will
+ be called additionally to the other bound function or whether
+ it will replace the previous function.
+
+ Bind will return an identifier to allow deletion of the bound function with
+ unbind without memory leak.
+
+ If FUNC or SEQUENCE is omitted the bound function or list
+ of bound events are returned."""
+
+ return self._bind(('bind', self._w), sequence, func, add)
+ def unbind(self, sequence, funcid=None):
+ """Unbind for this widget for event SEQUENCE the
+ function identified with FUNCID."""
+ self.tk.call('bind', self._w, sequence, '')
+ if funcid:
+ self.deletecommand(funcid)
+ def bind_all(self, sequence=None, func=None, add=None):
+ """Bind to all widgets at an event SEQUENCE a call to function FUNC.
+ An additional boolean parameter ADD specifies whether FUNC will
+ be called additionally to the other bound function or whether
+ it will replace the previous function. See bind for the return value."""
+ return self._bind(('bind', 'all'), sequence, func, add, 0)
+ def unbind_all(self, sequence):
+ """Unbind for all widgets for event SEQUENCE all functions."""
+ self.tk.call('bind', 'all' , sequence, '')
+ def bind_class(self, className, sequence=None, func=None, add=None):
+
+ """Bind to widgets with bindtag CLASSNAME at event
+ SEQUENCE a call of function FUNC. An additional
+ boolean parameter ADD specifies whether FUNC will be
+ called additionally to the other bound function or
+ whether it will replace the previous function. See bind for
+ the return value."""
+
+ return self._bind(('bind', className), sequence, func, add, 0)
+ def unbind_class(self, className, sequence):
+ """Unbind for a all widgets with bindtag CLASSNAME for event SEQUENCE
+ all functions."""
+ self.tk.call('bind', className , sequence, '')
+ def mainloop(self, n=0):
+ """Call the mainloop of Tk."""
+ self.tk.mainloop(n)
+ def quit(self):
+ """Quit the Tcl interpreter. All widgets will be destroyed."""
+ self.tk.quit()
+ def _getints(self, string):
+ """Internal function."""
+ if string:
+ return tuple(map(getint, self.tk.splitlist(string)))
+ def _getdoubles(self, string):
+ """Internal function."""
+ if string:
+ return tuple(map(getdouble, self.tk.splitlist(string)))
+ def _getboolean(self, string):
+ """Internal function."""
+ if string:
+ return self.tk.getboolean(string)
+ def _displayof(self, displayof):
+ """Internal function."""
+ if displayof:
+ return ('-displayof', displayof)
+ if displayof is None:
+ return ('-displayof', self._w)
+ return ()
+ def _options(self, cnf, kw = None):
+ """Internal function."""
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ else:
+ cnf = _cnfmerge(cnf)
+ res = ()
+ for k, v in cnf.items():
+ if v is not None:
+ if k[-1] == '_': k = k[:-1]
+ if callable(v):
+ v = self._register(v)
+ res = res + ('-'+k, v)
+ return res
+ def nametowidget(self, name):
+ """Return the Tkinter instance of a widget identified by
+ its Tcl name NAME."""
+ w = self
+ if name[0] == '.':
+ w = w._root()
+ name = name[1:]
+ find = _string.find
+ while name:
+ i = find(name, '.')
+ if i >= 0:
+ name, tail = name[:i], name[i+1:]
+ else:
+ tail = ''
+ w = w.children[name]
+ name = tail
+ return w
+ _nametowidget = nametowidget
+ def _register(self, func, subst=None, needcleanup=1):
+ """Return a newly created Tcl function. If this
+ function is called, the Python function FUNC will
+ be executed. An optional function SUBST can
+ be given which will be executed before FUNC."""
+ f = CallWrapper(func, subst, self).__call__
+ name = `id(f)`
+ try:
+ func = func.im_func
+ except AttributeError:
+ pass
+ try:
+ name = name + func.__name__
+ except AttributeError:
+ pass
+ self.tk.createcommand(name, f)
+ if needcleanup:
+ if self._tclCommands is None:
+ self._tclCommands = []
+ self._tclCommands.append(name)
+ #print '+ Tkinter created command', name
+ return name
+ register = _register
+ def _root(self):
+ """Internal function."""
+ w = self
+ while w.master: w = w.master
+ return w
+ _subst_format = ('%#', '%b', '%f', '%h', '%k',
+ '%s', '%t', '%w', '%x', '%y',
+ '%A', '%E', '%K', '%N', '%W', '%T', '%X', '%Y', '%D')
+ def _substitute(self, *args):
+ """Internal function."""
+ if len(args) != len(self._subst_format): return args
+ getboolean = self.tk.getboolean
+ getint = int
+ nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args
+ # Missing: (a, c, d, m, o, v, B, R)
+ e = Event()
+ e.serial = getint(nsign)
+ e.num = getint(b)
+ try: e.focus = getboolean(f)
+ except TclError: pass
+ e.height = getint(h)
+ e.keycode = getint(k)
+ # For Visibility events, event state is a string and
+ # not an integer:
+ try:
+ e.state = getint(s)
+ except ValueError:
+ e.state = s
+ e.time = getint(t)
+ e.width = getint(w)
+ e.x = getint(x)
+ e.y = getint(y)
+ e.char = A
+ try: e.send_event = getboolean(E)
+ except TclError: pass
+ e.keysym = K
+ e.keysym_num = getint(N)
+ e.type = T
+ try:
+ e.widget = self._nametowidget(W)
+ except KeyError:
+ e.widget = W
+ e.x_root = getint(X)
+ e.y_root = getint(Y)
+ try:
+ e.delta = getint(D)
+ except ValueError:
+ e.delta = 0
+ return (e,)
+ def _report_exception(self):
+ """Internal function."""
+ import sys
+ exc, val, tb = sys.exc_type, sys.exc_value, sys.exc_traceback
+ root = self._root()
+ root.report_callback_exception(exc, val, tb)
+ # These used to be defined in Widget:
+ def configure(self, cnf=None, **kw):
+ """Configure resources of a widget.
+
+ The values for resources are specified as keyword
+ arguments. To get an overview about
+ the allowed keyword arguments call the method keys.
+ """
+ # XXX ought to generalize this so tag_config etc. can use it
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ elif cnf:
+ cnf = _cnfmerge(cnf)
+ if cnf is None:
+ cnf = {}
+ for x in self.tk.split(
+ self.tk.call(self._w, 'configure')):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+ if type(cnf) is StringType:
+ x = self.tk.split(self.tk.call(
+ self._w, 'configure', '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ self.tk.call((self._w, 'configure')
+ + self._options(cnf))
+ config = configure
+ def cget(self, key):
+ """Return the resource value for a KEY given as string."""
+ return self.tk.call(self._w, 'cget', '-' + key)
+ __getitem__ = cget
+ def __setitem__(self, key, value):
+ self.configure({key: value})
+ def keys(self):
+ """Return a list of all resource names of this widget."""
+ return map(lambda x: x[0][1:],
+ self.tk.split(self.tk.call(self._w, 'configure')))
+ def __str__(self):
+ """Return the window path name of this widget."""
+ return self._w
+ # Pack methods that apply to the master
+ _noarg_ = ['_noarg_']
+ def pack_propagate(self, flag=_noarg_):
+ """Set or get the status for propagation of geometry information.
+
+ A boolean argument specifies whether the geometry information
+ of the slaves will determine the size of this widget. If no argument
+ is given the current setting will be returned.
+ """
+ if flag is Misc._noarg_:
+ return self._getboolean(self.tk.call(
+ 'pack', 'propagate', self._w))
+ else:
+ self.tk.call('pack', 'propagate', self._w, flag)
+ propagate = pack_propagate
+ def pack_slaves(self):
+ """Return a list of all slaves of this widget
+ in its packing order."""
+ return map(self._nametowidget,
+ self.tk.splitlist(
+ self.tk.call('pack', 'slaves', self._w)))
+ slaves = pack_slaves
+ # Place method that applies to the master
+ def place_slaves(self):
+ """Return a list of all slaves of this widget
+ in its packing order."""
+ return map(self._nametowidget,
+ self.tk.splitlist(
+ self.tk.call(
+ 'place', 'slaves', self._w)))
+ # Grid methods that apply to the master
+ def grid_bbox(self, column=None, row=None, col2=None, row2=None):
+ """Return a tuple of integer coordinates for the bounding
+ box of this widget controlled by the geometry manager grid.
+
+ If COLUMN, ROW is given the bounding box applies from
+ the cell with row and column 0 to the specified
+ cell. If COL2 and ROW2 are given the bounding box
+ starts at that cell.
+
+ The returned integers specify the offset of the upper left
+ corner in the master widget and the width and height.
+ """
+ args = ('grid', 'bbox', self._w)
+ if column is not None and row is not None:
+ args = args + (column, row)
+ if col2 is not None and row2 is not None:
+ args = args + (col2, row2)
+ return self._getints(apply(self.tk.call, args)) or None
+
+ bbox = grid_bbox
+ def _grid_configure(self, command, index, cnf, kw):
+ """Internal function."""
+ if type(cnf) is StringType and not kw:
+ if cnf[-1:] == '_':
+ cnf = cnf[:-1]
+ if cnf[:1] != '-':
+ cnf = '-'+cnf
+ options = (cnf,)
+ else:
+ options = self._options(cnf, kw)
+ if not options:
+ res = self.tk.call('grid',
+ command, self._w, index)
+ words = self.tk.splitlist(res)
+ dict = {}
+ for i in range(0, len(words), 2):
+ key = words[i][1:]
+ value = words[i+1]
+ if not value:
+ value = None
+ elif '.' in value:
+ value = getdouble(value)
+ else:
+ value = getint(value)
+ dict[key] = value
+ return dict
+ res = self.tk.call(
+ ('grid', command, self._w, index)
+ + options)
+ if len(options) == 1:
+ if not res: return None
+ # In Tk 7.5, -width can be a float
+ if '.' in res: return getdouble(res)
+ return getint(res)
+ def grid_columnconfigure(self, index, cnf={}, **kw):
+ """Configure column INDEX of a grid.
+
+ Valid resources are minsize (minimum size of the column),
+ weight (how much does additional space propagate to this column)
+ and pad (how much space to let additionally)."""
+ return self._grid_configure('columnconfigure', index, cnf, kw)
+ columnconfigure = grid_columnconfigure
+ def grid_propagate(self, flag=_noarg_):
+ """Set or get the status for propagation of geometry information.
+
+ A boolean argument specifies whether the geometry information
+ of the slaves will determine the size of this widget. If no argument
+ is given, the current setting will be returned.
+ """
+ if flag is Misc._noarg_:
+ return self._getboolean(self.tk.call(
+ 'grid', 'propagate', self._w))
+ else:
+ self.tk.call('grid', 'propagate', self._w, flag)
+ def grid_rowconfigure(self, index, cnf={}, **kw):
+ """Configure row INDEX of a grid.
+
+ Valid resources are minsize (minimum size of the row),
+ weight (how much does additional space propagate to this row)
+ and pad (how much space to let additionally)."""
+ return self._grid_configure('rowconfigure', index, cnf, kw)
+ rowconfigure = grid_rowconfigure
+ def grid_size(self):
+ """Return a tuple of the number of column and rows in the grid."""
+ return self._getints(
+ self.tk.call('grid', 'size', self._w)) or None
+ size = grid_size
+ def grid_slaves(self, row=None, column=None):
+ """Return a list of all slaves of this widget
+ in its packing order."""
+ args = ()
+ if row is not None:
+ args = args + ('-row', row)
+ if column is not None:
+ args = args + ('-column', column)
+ return map(self._nametowidget,
+ self.tk.splitlist(self.tk.call(
+ ('grid', 'slaves', self._w) + args)))
+
+ # Support for the "event" command, new in Tk 4.2.
+ # By Case Roole.
+
+ def event_add(self, virtual, *sequences):
+ """Bind a virtual event VIRTUAL (of the form <<Name>>)
+ to an event SEQUENCE such that the virtual event is triggered
+ whenever SEQUENCE occurs."""
+ args = ('event', 'add', virtual) + sequences
+ self.tk.call(args)
+
+ def event_delete(self, virtual, *sequences):
+ """Unbind a virtual event VIRTUAL from SEQUENCE."""
+ args = ('event', 'delete', virtual) + sequences
+ self.tk.call(args)
+
+ def event_generate(self, sequence, **kw):
+ """Generate an event SEQUENCE. Additional
+ keyword arguments specify parameter of the event
+ (e.g. x, y, rootx, rooty)."""
+ args = ('event', 'generate', self._w, sequence)
+ for k, v in kw.items():
+ args = args + ('-%s' % k, str(v))
+ self.tk.call(args)
+
+ def event_info(self, virtual=None):
+ """Return a list of all virtual events or the information
+ about the SEQUENCE bound to the virtual event VIRTUAL."""
+ return self.tk.splitlist(
+ self.tk.call('event', 'info', virtual))
+
+ # Image related commands
+
+ def image_names(self):
+ """Return a list of all existing image names."""
+ return self.tk.call('image', 'names')
+
+ def image_types(self):
+ """Return a list of all available image types (e.g. phote bitmap)."""
+ return self.tk.call('image', 'types')
+
+
+class CallWrapper:
+ """Internal class. Stores function to call when some user
+ defined Tcl function is called e.g. after an event occurred."""
+ def __init__(self, func, subst, widget):
+ """Store FUNC, SUBST and WIDGET as members."""
+ self.func = func
+ self.subst = subst
+ self.widget = widget
+ def __call__(self, *args):
+ """Apply first function SUBST to arguments, than FUNC."""
+ try:
+ if self.subst:
+ args = apply(self.subst, args)
+ return apply(self.func, args)
+ except SystemExit, msg:
+ raise SystemExit, msg
+ except:
+ self.widget._report_exception()
+
+
+class Wm:
+ """Provides functions for the communication with the window manager."""
+ def wm_aspect(self,
+ minNumer=None, minDenom=None,
+ maxNumer=None, maxDenom=None):
+ """Instruct the window manager to set the aspect ratio (width/height)
+ of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM. Return a tuple
+ of the actual values if no argument is given."""
+ return self._getints(
+ self.tk.call('wm', 'aspect', self._w,
+ minNumer, minDenom,
+ maxNumer, maxDenom))
+ aspect = wm_aspect
+ def wm_client(self, name=None):
+ """Store NAME in WM_CLIENT_MACHINE property of this widget. Return
+ current value."""
+ return self.tk.call('wm', 'client', self._w, name)
+ client = wm_client
+ def wm_colormapwindows(self, *wlist):
+ """Store list of window names (WLIST) into WM_COLORMAPWINDOWS property
+ of this widget. This list contains windows whose colormaps differ from their
+ parents. Return current list of widgets if WLIST is empty."""
+ if len(wlist) > 1:
+ wlist = (wlist,) # Tk needs a list of windows here
+ args = ('wm', 'colormapwindows', self._w) + wlist
+ return map(self._nametowidget, self.tk.call(args))
+ colormapwindows = wm_colormapwindows
+ def wm_command(self, value=None):
+ """Store VALUE in WM_COMMAND property. It is the command
+ which shall be used to invoke the application. Return current
+ command if VALUE is None."""
+ return self.tk.call('wm', 'command', self._w, value)
+ command = wm_command
+ def wm_deiconify(self):
+ """Deiconify this widget. If it was never mapped it will not be mapped.
+ On Windows it will raise this widget and give it the focus."""
+ return self.tk.call('wm', 'deiconify', self._w)
+ deiconify = wm_deiconify
+ def wm_focusmodel(self, model=None):
+ """Set focus model to MODEL. "active" means that this widget will claim
+ the focus itself, "passive" means that the window manager shall give
+ the focus. Return current focus model if MODEL is None."""
+ return self.tk.call('wm', 'focusmodel', self._w, model)
+ focusmodel = wm_focusmodel
+ def wm_frame(self):
+ """Return identifier for decorative frame of this widget if present."""
+ return self.tk.call('wm', 'frame', self._w)
+ frame = wm_frame
+ def wm_geometry(self, newGeometry=None):
+ """Set geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return
+ current value if None is given."""
+ return self.tk.call('wm', 'geometry', self._w, newGeometry)
+ geometry = wm_geometry
+ def wm_grid(self,
+ baseWidth=None, baseHeight=None,
+ widthInc=None, heightInc=None):
+ """Instruct the window manager that this widget shall only be
+ resized on grid boundaries. WIDTHINC and HEIGHTINC are the width and
+ height of a grid unit in pixels. BASEWIDTH and BASEHEIGHT are the
+ number of grid units requested in Tk_GeometryRequest."""
+ return self._getints(self.tk.call(
+ 'wm', 'grid', self._w,
+ baseWidth, baseHeight, widthInc, heightInc))
+ grid = wm_grid
+ def wm_group(self, pathName=None):
+ """Set the group leader widgets for related widgets to PATHNAME. Return
+ the group leader of this widget if None is given."""
+ return self.tk.call('wm', 'group', self._w, pathName)
+ group = wm_group
+ def wm_iconbitmap(self, bitmap=None):
+ """Set bitmap for the iconified widget to BITMAP. Return
+ the bitmap if None is given."""
+ return self.tk.call('wm', 'iconbitmap', self._w, bitmap)
+ iconbitmap = wm_iconbitmap
+ def wm_iconify(self):
+ """Display widget as icon."""
+ return self.tk.call('wm', 'iconify', self._w)
+ iconify = wm_iconify
+ def wm_iconmask(self, bitmap=None):
+ """Set mask for the icon bitmap of this widget. Return the
+ mask if None is given."""
+ return self.tk.call('wm', 'iconmask', self._w, bitmap)
+ iconmask = wm_iconmask
+ def wm_iconname(self, newName=None):
+ """Set the name of the icon for this widget. Return the name if
+ None is given."""
+ return self.tk.call('wm', 'iconname', self._w, newName)
+ iconname = wm_iconname
+ def wm_iconposition(self, x=None, y=None):
+ """Set the position of the icon of this widget to X and Y. Return
+ a tuple of the current values of X and X if None is given."""
+ return self._getints(self.tk.call(
+ 'wm', 'iconposition', self._w, x, y))
+ iconposition = wm_iconposition
+ def wm_iconwindow(self, pathName=None):
+ """Set widget PATHNAME to be displayed instead of icon. Return the current
+ value if None is given."""
+ return self.tk.call('wm', 'iconwindow', self._w, pathName)
+ iconwindow = wm_iconwindow
+ def wm_maxsize(self, width=None, height=None):
+ """Set max WIDTH and HEIGHT for this widget. If the window is gridded
+ the values are given in grid units. Return the current values if None
+ is given."""
+ return self._getints(self.tk.call(
+ 'wm', 'maxsize', self._w, width, height))
+ maxsize = wm_maxsize
+ def wm_minsize(self, width=None, height=None):
+ """Set min WIDTH and HEIGHT for this widget. If the window is gridded
+ the values are given in grid units. Return the current values if None
+ is given."""
+ return self._getints(self.tk.call(
+ 'wm', 'minsize', self._w, width, height))
+ minsize = wm_minsize
+ def wm_overrideredirect(self, boolean=None):
+ """Instruct the window manager to ignore this widget
+ if BOOLEAN is given with 1. Return the current value if None
+ is given."""
+ return self._getboolean(self.tk.call(
+ 'wm', 'overrideredirect', self._w, boolean))
+ overrideredirect = wm_overrideredirect
+ def wm_positionfrom(self, who=None):
+ """Instruct the window manager that the position of this widget shall
+ be defined by the user if WHO is "user", and by its own policy if WHO is
+ "program"."""
+ return self.tk.call('wm', 'positionfrom', self._w, who)
+ positionfrom = wm_positionfrom
+ def wm_protocol(self, name=None, func=None):
+ """Bind function FUNC to command NAME for this widget.
+ Return the function bound to NAME if None is given. NAME could be
+ e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW"."""
+ if callable(func):
+ command = self._register(func)
+ else:
+ command = func
+ return self.tk.call(
+ 'wm', 'protocol', self._w, name, command)
+ protocol = wm_protocol
+ def wm_resizable(self, width=None, height=None):
+ """Instruct the window manager whether this width can be resized
+ in WIDTH or HEIGHT. Both values are boolean values."""
+ return self.tk.call('wm', 'resizable', self._w, width, height)
+ resizable = wm_resizable
+ def wm_sizefrom(self, who=None):
+ """Instruct the window manager that the size of this widget shall
+ be defined by the user if WHO is "user", and by its own policy if WHO is
+ "program"."""
+ return self.tk.call('wm', 'sizefrom', self._w, who)
+ sizefrom = wm_sizefrom
+ def wm_state(self, newstate=None):
+ """Query or set the state of this widget as one of normal, icon,
+ iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only)."""
+ return self.tk.call('wm', 'state', self._w, newstate)
+ state = wm_state
+ def wm_title(self, string=None):
+ """Set the title of this widget."""
+ return self.tk.call('wm', 'title', self._w, string)
+ title = wm_title
+ def wm_transient(self, master=None):
+ """Instruct the window manager that this widget is transient
+ with regard to widget MASTER."""
+ return self.tk.call('wm', 'transient', self._w, master)
+ transient = wm_transient
+ def wm_withdraw(self):
+ """Withdraw this widget from the screen such that it is unmapped
+ and forgotten by the window manager. Re-draw it with wm_deiconify."""
+ return self.tk.call('wm', 'withdraw', self._w)
+ withdraw = wm_withdraw
+
+
+class Tk(Misc, Wm):
+ """Toplevel widget of Tk which represents mostly the main window
+ of an appliation. It has an associated Tcl interpreter."""
+ _w = '.'
+ def __init__(self, screenName=None, baseName=None, className='Tk'):
+ """Return a new Toplevel widget on screen SCREENNAME. A new Tcl interpreter will
+ be created. BASENAME will be used for the identification of the profile file (see
+ readprofile).
+ It is constructed from sys.argv[0] without extensions if None is given. CLASSNAME
+ is the name of the widget class."""
+ global _default_root
+ self.master = None
+ self.children = {}
+ if baseName is None:
+ import sys, os
+ baseName = os.path.basename(sys.argv[0])
+ baseName, ext = os.path.splitext(baseName)
+ if ext not in ('.py', '.pyc', '.pyo'):
+ baseName = baseName + ext
+ self.tk = _tkinter.create(screenName, baseName, className)
+ if _MacOS:
+ # Disable event scanning except for Command-Period
+ _MacOS.SchedParams(1, 0)
+ # Work around nasty MacTk bug
+ # XXX Is this one still needed?
+ self.update()
+ # Version sanity checks
+ tk_version = self.tk.getvar('tk_version')
+ if tk_version != _tkinter.TK_VERSION:
+ raise RuntimeError, \
+ "tk.h version (%s) doesn't match libtk.a version (%s)" \
+ % (_tkinter.TK_VERSION, tk_version)
+ tcl_version = self.tk.getvar('tcl_version')
+ if tcl_version != _tkinter.TCL_VERSION:
+ raise RuntimeError, \
+ "tcl.h version (%s) doesn't match libtcl.a version (%s)" \
+ % (_tkinter.TCL_VERSION, tcl_version)
+ if TkVersion < 4.0:
+ raise RuntimeError, \
+ "Tk 4.0 or higher is required; found Tk %s" \
+ % str(TkVersion)
+ self.tk.createcommand('tkerror', _tkerror)
+ self.tk.createcommand('exit', _exit)
+ self.readprofile(baseName, className)
+ if _support_default_root and not _default_root:
+ _default_root = self
+ self.protocol("WM_DELETE_WINDOW", self.destroy)
+ def destroy(self):
+ """Destroy this and all descendants widgets. This will
+ end the application of this Tcl interpreter."""
+ for c in self.children.values(): c.destroy()
+ self.tk.call('destroy', self._w)
+ Misc.destroy(self)
+ global _default_root
+ if _support_default_root and _default_root is self:
+ _default_root = None
+ def readprofile(self, baseName, className):
+ """Internal function. It reads BASENAME.tcl and CLASSNAME.tcl into
+ the Tcl Interpreter and calls execfile on BASENAME.py and CLASSNAME.py if
+ such a file exists in the home directory."""
+ import os
+ if os.environ.has_key('HOME'): home = os.environ['HOME']
+ else: home = os.curdir
+ class_tcl = os.path.join(home, '.%s.tcl' % className)
+ class_py = os.path.join(home, '.%s.py' % className)
+ base_tcl = os.path.join(home, '.%s.tcl' % baseName)
+ base_py = os.path.join(home, '.%s.py' % baseName)
+ dir = {'self': self}
+ exec 'from Tkinter import *' in dir
+ if os.path.isfile(class_tcl):
+ self.tk.call('source', class_tcl)
+ if os.path.isfile(class_py):
+ execfile(class_py, dir)
+ if os.path.isfile(base_tcl):
+ self.tk.call('source', base_tcl)
+ if os.path.isfile(base_py):
+ execfile(base_py, dir)
+ def report_callback_exception(self, exc, val, tb):
+ """Internal function. It reports exception on sys.stderr."""
+ import traceback, sys
+ sys.stderr.write("Exception in Tkinter callback\n")
+ sys.last_type = exc
+ sys.last_value = val
+ sys.last_traceback = tb
+ traceback.print_exception(exc, val, tb)
+
+# Ideally, the classes Pack, Place and Grid disappear, the
+# pack/place/grid methods are defined on the Widget class, and
+# everybody uses w.pack_whatever(...) instead of Pack.whatever(w,
+# ...), with pack(), place() and grid() being short for
+# pack_configure(), place_configure() and grid_columnconfigure(), and
+# forget() being short for pack_forget(). As a practical matter, I'm
+# afraid that there is too much code out there that may be using the
+# Pack, Place or Grid class, so I leave them intact -- but only as
+# backwards compatibility features. Also note that those methods that
+# take a master as argument (e.g. pack_propagate) have been moved to
+# the Misc class (which now incorporates all methods common between
+# toplevel and interior widgets). Again, for compatibility, these are
+# copied into the Pack, Place or Grid class.
+
+class Pack:
+ """Geometry manager Pack.
+
+ Base class to use the methods pack_* in every widget."""
+ def pack_configure(self, cnf={}, **kw):
+ """Pack a widget in the parent widget. Use as options:
+ after=widget - pack it after you have packed widget
+ anchor=NSEW (or subset) - position widget according to
+ given direction
+ before=widget - pack it before you will pack widget
+ expand=1 or 0 - expand widget if parent size grows
+ fill=NONE or X or Y or BOTH - fill widget if widget grows
+ in=master - use master to contain this widget
+ ipadx=amount - add internal padding in x direction
+ ipady=amount - add internal padding in y direction
+ padx=amount - add padding in x direction
+ pady=amount - add padding in y direction
+ side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget.
+ """
+ self.tk.call(
+ ('pack', 'configure', self._w)
+ + self._options(cnf, kw))
+ pack = configure = config = pack_configure
+ def pack_forget(self):
+ """Unmap this widget and do not use it for the packing order."""
+ self.tk.call('pack', 'forget', self._w)
+ forget = pack_forget
+ def pack_info(self):
+ """Return information about the packing options
+ for this widget."""
+ words = self.tk.splitlist(
+ self.tk.call('pack', 'info', self._w))
+ dict = {}
+ for i in range(0, len(words), 2):
+ key = words[i][1:]
+ value = words[i+1]
+ if value[:1] == '.':
+ value = self._nametowidget(value)
+ dict[key] = value
+ return dict
+ info = pack_info
+ propagate = pack_propagate = Misc.pack_propagate
+ slaves = pack_slaves = Misc.pack_slaves
+
+class Place:
+ """Geometry manager Place.
+
+ Base class to use the methods place_* in every widget."""
+ def place_configure(self, cnf={}, **kw):
+ """Place a widget in the parent widget. Use as options:
+ in=master - master relative to which the widget is placed.
+ x=amount - locate anchor of this widget at position x of master
+ y=amount - locate anchor of this widget at position y of master
+ relx=amount - locate anchor of this widget between 0.0 and 1.0
+ relative to width of master (1.0 is right edge)
+ rely=amount - locate anchor of this widget between 0.0 and 1.0
+ relative to height of master (1.0 is bottom edge)
+ anchor=NSEW (or subset) - position anchor according to given direction
+ width=amount - width of this widget in pixel
+ height=amount - height of this widget in pixel
+ relwidth=amount - width of this widget between 0.0 and 1.0
+ relative to width of master (1.0 is the same width
+ as the master)
+ relheight=amount - height of this widget between 0.0 and 1.0
+ relative to height of master (1.0 is the same
+ height as the master)
+ bordermode="inside" or "outside" - whether to take border width of master widget
+ into account
+ """
+ for k in ['in_']:
+ if kw.has_key(k):
+ kw[k[:-1]] = kw[k]
+ del kw[k]
+ self.tk.call(
+ ('place', 'configure', self._w)
+ + self._options(cnf, kw))
+ place = configure = config = place_configure
+ def place_forget(self):
+ """Unmap this widget."""
+ self.tk.call('place', 'forget', self._w)
+ forget = place_forget
+ def place_info(self):
+ """Return information about the placing options
+ for this widget."""
+ words = self.tk.splitlist(
+ self.tk.call('place', 'info', self._w))
+ dict = {}
+ for i in range(0, len(words), 2):
+ key = words[i][1:]
+ value = words[i+1]
+ if value[:1] == '.':
+ value = self._nametowidget(value)
+ dict[key] = value
+ return dict
+ info = place_info
+ slaves = place_slaves = Misc.place_slaves
+
+class Grid:
+ """Geometry manager Grid.
+
+ Base class to use the methods grid_* in every widget."""
+ # Thanks to Masazumi Yoshikawa (yosikawa at isi.edu)
+ def grid_configure(self, cnf={}, **kw):
+ """Position a widget in the parent widget in a grid. Use as options:
+ column=number - use cell identified with given column (starting with 0)
+ columnspan=number - this widget will span several columns
+ in=master - use master to contain this widget
+ ipadx=amount - add internal padding in x direction
+ ipady=amount - add internal padding in y direction
+ padx=amount - add padding in x direction
+ pady=amount - add padding in y direction
+ row=number - use cell identified with given row (starting with 0)
+ rowspan=number - this widget will span several rows
+ sticky=NSEW - if cell is larger on which sides will this
+ widget stick to the cell boundary
+ """
+ self.tk.call(
+ ('grid', 'configure', self._w)
+ + self._options(cnf, kw))
+ grid = configure = config = grid_configure
+ bbox = grid_bbox = Misc.grid_bbox
+ columnconfigure = grid_columnconfigure = Misc.grid_columnconfigure
+ def grid_forget(self):
+ """Unmap this widget."""
+ self.tk.call('grid', 'forget', self._w)
+ forget = grid_forget
+ def grid_remove(self):
+ """Unmap this widget but remember the grid options."""
+ self.tk.call('grid', 'remove', self._w)
+ def grid_info(self):
+ """Return information about the options
+ for positioning this widget in a grid."""
+ words = self.tk.splitlist(
+ self.tk.call('grid', 'info', self._w))
+ dict = {}
+ for i in range(0, len(words), 2):
+ key = words[i][1:]
+ value = words[i+1]
+ if value[:1] == '.':
+ value = self._nametowidget(value)
+ dict[key] = value
+ return dict
+ info = grid_info
+ def grid_location(self, x, y):
+ """Return a tuple of column and row which identify the cell
+ at which the pixel at position X and Y inside the master
+ widget is located."""
+ return self._getints(
+ self.tk.call(
+ 'grid', 'location', self._w, x, y)) or None
+ location = grid_location
+ propagate = grid_propagate = Misc.grid_propagate
+ rowconfigure = grid_rowconfigure = Misc.grid_rowconfigure
+ size = grid_size = Misc.grid_size
+ slaves = grid_slaves = Misc.grid_slaves
+
+class BaseWidget(Misc):
+ """Internal class."""
+ def _setup(self, master, cnf):
+ """Internal function. Sets up information about children."""
+ if _support_default_root:
+ global _default_root
+ if not master:
+ if not _default_root:
+ _default_root = Tk()
+ master = _default_root
+ self.master = master
+ self.tk = master.tk
+ name = None
+ if cnf.has_key('name'):
+ name = cnf['name']
+ del cnf['name']
+ if not name:
+ name = `id(self)`
+ self._name = name
+ if master._w=='.':
+ self._w = '.' + name
+ else:
+ self._w = master._w + '.' + name
+ self.children = {}
+ if self.master.children.has_key(self._name):
+ self.master.children[self._name].destroy()
+ self.master.children[self._name] = self
+ def __init__(self, master, widgetName, cnf={}, kw={}, extra=()):
+ """Construct a widget with the parent widget MASTER, a name WIDGETNAME
+ and appropriate options."""
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ self.widgetName = widgetName
+ BaseWidget._setup(self, master, cnf)
+ classes = []
+ for k in cnf.keys():
+ if type(k) is ClassType:
+ classes.append((k, cnf[k]))
+ del cnf[k]
+ self.tk.call(
+ (widgetName, self._w) + extra + self._options(cnf))
+ for k, v in classes:
+ k.configure(self, v)
+ def destroy(self):
+ """Destroy this and all descendants widgets."""
+ for c in self.children.values(): c.destroy()
+ if self.master.children.has_key(self._name):
+ del self.master.children[self._name]
+ self.tk.call('destroy', self._w)
+ Misc.destroy(self)
+ def _do(self, name, args=()):
+ # XXX Obsolete -- better use self.tk.call directly!
+ return self.tk.call((self._w, name) + args)
+
+if TixVersion:
+ # The Tix 'tixForm' geometry manager
+ class Form:
+ """The Tix Form geometry manager
+
+ Widgets can be arranged by specifying attachments to other widgets.
+ See Tix documentation for complete details"""
+
+ def config(self, cnf={}, **kw):
+ apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
+ form = config
+
+ def __setitem__(self, key, value):
+ Form.form({key: value})
+
+ def check(self):
+ return self.tk.call('tixForm', 'check', self._w)
+
+ def forget(self):
+ self.tk.call('tixForm', 'forget', self._w)
+
+ def grid(self, xsize=0, ysize=0):
+ if (not xsize) and (not ysize):
+ x = self.tk.call('tixForm', 'grid', self._w)
+ y = self.tk.splitlist(x)
+ z = ()
+ for x in y:
+ z = z + (self.tk.getint(x),)
+ return z
+ self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
+
+ def info(self, option=None):
+ if not option:
+ return self.tk.call('tixForm', 'info', self._w)
+ if option[0] != '-':
+ option = '-' + option
+ return self.tk.call('tixForm', 'info', self._w, option)
+
+ def slaves(self):
+ return map(self._nametowidget,
+ self.tk.splitlist(
+ self.tk.call(
+ 'tixForm', 'slaves', self._w)))
+
+ class Widget(BaseWidget, Pack, Place, Grid, Form):
+ """Internal class.
+
+ Base class for a widget which can be positioned with the geometry managers
+ Pack, Place, Grid or Form."""
+ pass
+else:
+ class Widget(BaseWidget, Pack, Place, Grid):
+ """Internal class.
+
+ Base class for a widget which can be positioned with the geometry managers
+ Pack, Place or Grid."""
+ pass
+
+class Toplevel(BaseWidget, Wm):
+ """Toplevel widget, e.g. for dialogs."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a toplevel widget with the parent MASTER.
+
+ Valid resource names: background, bd, bg, borderwidth, class,
+ colormap, container, cursor, height, highlightbackground,
+ highlightcolor, highlightthickness, menu, relief, screen, takefocus,
+ use, visual, width."""
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ extra = ()
+ for wmkey in ['screen', 'class_', 'class', 'visual',
+ 'colormap']:
+ if cnf.has_key(wmkey):
+ val = cnf[wmkey]
+ # TBD: a hack needed because some keys
+ # are not valid as keyword arguments
+ if wmkey[-1] == '_': opt = '-'+wmkey[:-1]
+ else: opt = '-'+wmkey
+ extra = extra + (opt, val)
+ del cnf[wmkey]
+ BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra)
+ root = self._root()
+ self.iconname(root.iconname())
+ self.title(root.title())
+ self.protocol("WM_DELETE_WINDOW", self.destroy)
+
+class Button(Widget):
+ """Button widget."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a button widget with the parent MASTER.
+
+ Valid resource names: activebackground, activeforeground, anchor,
+ background, bd, bg, bitmap, borderwidth, command, cursor, default,
+ disabledforeground, fg, font, foreground, height,
+ highlightbackground, highlightcolor, highlightthickness, image,
+ justify, padx, pady, relief, state, takefocus, text, textvariable,
+ underline, width, wraplength."""
+ Widget.__init__(self, master, 'button', cnf, kw)
+ def tkButtonEnter(self, *dummy):
+ self.tk.call('tkButtonEnter', self._w)
+ def tkButtonLeave(self, *dummy):
+ self.tk.call('tkButtonLeave', self._w)
+ def tkButtonDown(self, *dummy):
+ self.tk.call('tkButtonDown', self._w)
+ def tkButtonUp(self, *dummy):
+ self.tk.call('tkButtonUp', self._w)
+ def tkButtonInvoke(self, *dummy):
+ self.tk.call('tkButtonInvoke', self._w)
+ def flash(self):
+ self.tk.call(self._w, 'flash')
+ def invoke(self):
+ return self.tk.call(self._w, 'invoke')
+
+# Indices:
+# XXX I don't like these -- take them away
+def AtEnd():
+ return 'end'
+def AtInsert(*args):
+ s = 'insert'
+ for a in args:
+ if a: s = s + (' ' + a)
+ return s
+def AtSelFirst():
+ return 'sel.first'
+def AtSelLast():
+ return 'sel.last'
+def At(x, y=None):
+ if y is None:
+ return '@' + `x`
+ else:
+ return '@' + `x` + ',' + `y`
+
+class Canvas(Widget):
+ """Canvas widget to display graphical elements like lines or text."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a canvas widget with the parent MASTER.
+
+ Valid resource names: background, bd, bg, borderwidth, closeenough,
+ confine, cursor, height, highlightbackground, highlightcolor,
+ highlightthickness, insertbackground, insertborderwidth,
+ insertofftime, insertontime, insertwidth, offset, relief,
+ scrollregion, selectbackground, selectborderwidth, selectforeground,
+ state, takefocus, width, xscrollcommand, xscrollincrement,
+ yscrollcommand, yscrollincrement."""
+ Widget.__init__(self, master, 'canvas', cnf, kw)
+ def addtag(self, *args):
+ """Internal function."""
+ self.tk.call((self._w, 'addtag') + args)
+ def addtag_above(self, newtag, tagOrId):
+ """Add tag NEWTAG to all items above TAGORID."""
+ self.addtag(newtag, 'above', tagOrId)
+ def addtag_all(self, newtag):
+ """Add tag NEWTAG to all items."""
+ self.addtag(newtag, 'all')
+ def addtag_below(self, newtag, tagOrId):
+ """Add tag NEWTAG to all items below TAGORID."""
+ self.addtag(newtag, 'below', tagOrId)
+ def addtag_closest(self, newtag, x, y, halo=None, start=None):
+ """Add tag NEWTAG to item which is closest to pixel at X, Y.
+ If several match take the top-most.
+ All items closer than HALO are considered overlapping (all are
+ closests). If START is specified the next below this tag is taken."""
+ self.addtag(newtag, 'closest', x, y, halo, start)
+ def addtag_enclosed(self, newtag, x1, y1, x2, y2):
+ """Add tag NEWTAG to all items in the rectangle defined
+ by X1,Y1,X2,Y2."""
+ self.addtag(newtag, 'enclosed', x1, y1, x2, y2)
+ def addtag_overlapping(self, newtag, x1, y1, x2, y2):
+ """Add tag NEWTAG to all items which overlap the rectangle
+ defined by X1,Y1,X2,Y2."""
+ self.addtag(newtag, 'overlapping', x1, y1, x2, y2)
+ def addtag_withtag(self, newtag, tagOrId):
+ """Add tag NEWTAG to all items with TAGORID."""
+ self.addtag(newtag, 'withtag', tagOrId)
+ def bbox(self, *args):
+ """Return a tuple of X1,Y1,X2,Y2 coordinates for a rectangle
+ which encloses all items with tags specified as arguments."""
+ return self._getints(
+ self.tk.call((self._w, 'bbox') + args)) or None
+ def tag_unbind(self, tagOrId, sequence, funcid=None):
+ """Unbind for all items with TAGORID for event SEQUENCE the
+ function identified with FUNCID."""
+ self.tk.call(self._w, 'bind', tagOrId, sequence, '')
+ if funcid:
+ self.deletecommand(funcid)
+ def tag_bind(self, tagOrId, sequence=None, func=None, add=None):
+ """Bind to all items with TAGORID at event SEQUENCE a call to function FUNC.
+
+ An additional boolean parameter ADD specifies whether FUNC will be
+ called additionally to the other bound function or whether it will
+ replace the previous function. See bind for the return value."""
+ return self._bind((self._w, 'bind', tagOrId),
+ sequence, func, add)
+ def canvasx(self, screenx, gridspacing=None):
+ """Return the canvas x coordinate of pixel position SCREENX rounded
+ to nearest multiple of GRIDSPACING units."""
+ return getdouble(self.tk.call(
+ self._w, 'canvasx', screenx, gridspacing))
+ def canvasy(self, screeny, gridspacing=None):
+ """Return the canvas y coordinate of pixel position SCREENY rounded
+ to nearest multiple of GRIDSPACING units."""
+ return getdouble(self.tk.call(
+ self._w, 'canvasy', screeny, gridspacing))
+ def coords(self, *args):
+ """Return a list of coordinates for the item given in ARGS."""
+ # XXX Should use _flatten on args
+ return map(getdouble,
+ self.tk.splitlist(
+ self.tk.call((self._w, 'coords') + args)))
+ def _create(self, itemType, args, kw): # Args: (val, val, ..., cnf={})
+ """Internal function."""
+ args = _flatten(args)
+ cnf = args[-1]
+ if type(cnf) in (DictionaryType, TupleType):
+ args = args[:-1]
+ else:
+ cnf = {}
+ return getint(apply(
+ self.tk.call,
+ (self._w, 'create', itemType)
+ + args + self._options(cnf, kw)))
+ def create_arc(self, *args, **kw):
+ """Create arc shaped region with coordinates x1,y1,x2,y2."""
+ return self._create('arc', args, kw)
+ def create_bitmap(self, *args, **kw):
+ """Create bitmap with coordinates x1,y1."""
+ return self._create('bitmap', args, kw)
+ def create_image(self, *args, **kw):
+ """Create image item with coordinates x1,y1."""
+ return self._create('image', args, kw)
+ def create_line(self, *args, **kw):
+ """Create line with coordinates x1,y1,...,xn,yn."""
+ return self._create('line', args, kw)
+ def create_oval(self, *args, **kw):
+ """Create oval with coordinates x1,y1,x2,y2."""
+ return self._create('oval', args, kw)
+ def create_polygon(self, *args, **kw):
+ """Create polygon with coordinates x1,y1,...,xn,yn."""
+ return self._create('polygon', args, kw)
+ def create_rectangle(self, *args, **kw):
+ """Create rectangle with coordinates x1,y1,x2,y2."""
+ return self._create('rectangle', args, kw)
+ def create_text(self, *args, **kw):
+ """Create text with coordinates x1,y1."""
+ return self._create('text', args, kw)
+ def create_window(self, *args, **kw):
+ """Create window with coordinates x1,y1,x2,y2."""
+ return self._create('window', args, kw)
+ def dchars(self, *args):
+ """Delete characters of text items identified by tag or id in ARGS (possibly
+ several times) from FIRST to LAST character (including)."""
+ self.tk.call((self._w, 'dchars') + args)
+ def delete(self, *args):
+ """Delete items identified by all tag or ids contained in ARGS."""
+ self.tk.call((self._w, 'delete') + args)
+ def dtag(self, *args):
+ """Delete tag or id given as last arguments in ARGS from items
+ identified by first argument in ARGS."""
+ self.tk.call((self._w, 'dtag') + args)
+ def find(self, *args):
+ """Internal function."""
+ return self._getints(
+ self.tk.call((self._w, 'find') + args)) or ()
+ def find_above(self, tagOrId):
+ """Return items above TAGORID."""
+ return self.find('above', tagOrId)
+ def find_all(self):
+ """Return all items."""
+ return self.find('all')
+ def find_below(self, tagOrId):
+ """Return all items below TAGORID."""
+ return self.find('below', tagOrId)
+ def find_closest(self, x, y, halo=None, start=None):
+ """Return item which is closest to pixel at X, Y.
+ If several match take the top-most.
+ All items closer than HALO are considered overlapping (all are
+ closests). If START is specified the next below this tag is taken."""
+ return self.find('closest', x, y, halo, start)
+ def find_enclosed(self, x1, y1, x2, y2):
+ """Return all items in rectangle defined
+ by X1,Y1,X2,Y2."""
+ return self.find('enclosed', x1, y1, x2, y2)
+ def find_overlapping(self, x1, y1, x2, y2):
+ """Return all items which overlap the rectangle
+ defined by X1,Y1,X2,Y2."""
+ return self.find('overlapping', x1, y1, x2, y2)
+ def find_withtag(self, tagOrId):
+ """Return all items with TAGORID."""
+ return self.find('withtag', tagOrId)
+ def focus(self, *args):
+ """Set focus to the first item specified in ARGS."""
+ return self.tk.call((self._w, 'focus') + args)
+ def gettags(self, *args):
+ """Return tags associated with the first item specified in ARGS."""
+ return self.tk.splitlist(
+ self.tk.call((self._w, 'gettags') + args))
+ def icursor(self, *args):
+ """Set cursor at position POS in the item identified by TAGORID.
+ In ARGS TAGORID must be first."""
+ self.tk.call((self._w, 'icursor') + args)
+ def index(self, *args):
+ """Return position of cursor as integer in item specified in ARGS."""
+ return getint(self.tk.call((self._w, 'index') + args))
+ def insert(self, *args):
+ """Insert TEXT in item TAGORID at position POS. ARGS must
+ be TAGORID POS TEXT."""
+ self.tk.call((self._w, 'insert') + args)
+ def itemcget(self, tagOrId, option):
+ """Return the resource value for an OPTION for item TAGORID."""
+ return self.tk.call(
+ (self._w, 'itemcget') + (tagOrId, '-'+option))
+ def itemconfigure(self, tagOrId, cnf=None, **kw):
+ """Configure resources of an item TAGORID.
+
+ The values for resources are specified as keyword
+ arguments. To get an overview about
+ the allowed keyword arguments call the method without arguments.
+ """
+ if cnf is None and not kw:
+ cnf = {}
+ for x in self.tk.split(
+ self.tk.call(self._w,
+ 'itemconfigure', tagOrId)):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+ if type(cnf) == StringType and not kw:
+ x = self.tk.split(self.tk.call(
+ self._w, 'itemconfigure', tagOrId, '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ self.tk.call((self._w, 'itemconfigure', tagOrId) +
+ self._options(cnf, kw))
+ itemconfig = itemconfigure
+ # lower, tkraise/lift hide Misc.lower, Misc.tkraise/lift,
+ # so the preferred name for them is tag_lower, tag_raise
+ # (similar to tag_bind, and similar to the Text widget);
+ # unfortunately can't delete the old ones yet (maybe in 1.6)
+ def tag_lower(self, *args):
+ """Lower an item TAGORID given in ARGS
+ (optional below another item)."""
+ self.tk.call((self._w, 'lower') + args)
+ lower = tag_lower
+ def move(self, *args):
+ """Move an item TAGORID given in ARGS."""
+ self.tk.call((self._w, 'move') + args)
+ def postscript(self, cnf={}, **kw):
+ """Print the contents of the canvas to a postscript
+ file. Valid options: colormap, colormode, file, fontmap,
+ height, pageanchor, pageheight, pagewidth, pagex, pagey,
+ rotate, witdh, x, y."""
+ return self.tk.call((self._w, 'postscript') +
+ self._options(cnf, kw))
+ def tag_raise(self, *args):
+ """Raise an item TAGORID given in ARGS
+ (optional above another item)."""
+ self.tk.call((self._w, 'raise') + args)
+ lift = tkraise = tag_raise
+ def scale(self, *args):
+ """Scale item TAGORID with XORIGIN, YORIGIN, XSCALE, YSCALE."""
+ self.tk.call((self._w, 'scale') + args)
+ def scan_mark(self, x, y):
+ """Remember the current X, Y coordinates."""
+ self.tk.call(self._w, 'scan', 'mark', x, y)
+ def scan_dragto(self, x, y):
+ """Adjust the view of the canvas to 10 times the
+ difference between X and Y and the coordinates given in
+ scan_mark."""
+ self.tk.call(self._w, 'scan', 'dragto', x, y)
+ def select_adjust(self, tagOrId, index):
+ """Adjust the end of the selection near the cursor of an item TAGORID to index."""
+ self.tk.call(self._w, 'select', 'adjust', tagOrId, index)
+ def select_clear(self):
+ """Clear the selection if it is in this widget."""
+ self.tk.call(self._w, 'select', 'clear')
+ def select_from(self, tagOrId, index):
+ """Set the fixed end of a selection in item TAGORID to INDEX."""
+ self.tk.call(self._w, 'select', 'from', tagOrId, index)
+ def select_item(self):
+ """Return the item which has the selection."""
+ self.tk.call(self._w, 'select', 'item')
+ def select_to(self, tagOrId, index):
+ """Set the variable end of a selection in item TAGORID to INDEX."""
+ self.tk.call(self._w, 'select', 'to', tagOrId, index)
+ def type(self, tagOrId):
+ """Return the type of the item TAGORID."""
+ return self.tk.call(self._w, 'type', tagOrId) or None
+ def xview(self, *args):
+ """Query and change horizontal position of the view."""
+ if not args:
+ return self._getdoubles(self.tk.call(self._w, 'xview'))
+ self.tk.call((self._w, 'xview') + args)
+ def xview_moveto(self, fraction):
+ """Adjusts the view in the window so that FRACTION of the
+ total width of the canvas is off-screen to the left."""
+ self.tk.call(self._w, 'xview', 'moveto', fraction)
+ def xview_scroll(self, number, what):
+ """Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'xview', 'scroll', number, what)
+ def yview(self, *args):
+ """Query and change vertical position of the view."""
+ if not args:
+ return self._getdoubles(self.tk.call(self._w, 'yview'))
+ self.tk.call((self._w, 'yview') + args)
+ def yview_moveto(self, fraction):
+ """Adjusts the view in the window so that FRACTION of the
+ total height of the canvas is off-screen to the top."""
+ self.tk.call(self._w, 'yview', 'moveto', fraction)
+ def yview_scroll(self, number, what):
+ """Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'yview', 'scroll', number, what)
+
+class Checkbutton(Widget):
+ """Checkbutton widget which is either in on- or off-state."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a checkbutton widget with the parent MASTER.
+
+ Valid resource names: activebackground, activeforeground, anchor,
+ background, bd, bg, bitmap, borderwidth, command, cursor,
+ disabledforeground, fg, font, foreground, height,
+ highlightbackground, highlightcolor, highlightthickness, image,
+ indicatoron, justify, offvalue, onvalue, padx, pady, relief,
+ selectcolor, selectimage, state, takefocus, text, textvariable,
+ underline, variable, width, wraplength."""
+ Widget.__init__(self, master, 'checkbutton', cnf, kw)
+ def deselect(self):
+ """Put the button in off-state."""
+ self.tk.call(self._w, 'deselect')
+ def flash(self):
+ """Flash the button."""
+ self.tk.call(self._w, 'flash')
+ def invoke(self):
+ """Toggle the button and invoke a command if given as resource."""
+ return self.tk.call(self._w, 'invoke')
+ def select(self):
+ """Put the button in on-state."""
+ self.tk.call(self._w, 'select')
+ def toggle(self):
+ """Toggle the button."""
+ self.tk.call(self._w, 'toggle')
+
+class Entry(Widget):
+ """Entry widget which allows to display simple text."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct an entry widget with the parent MASTER.
+
+ Valid resource names: background, bd, bg, borderwidth, cursor,
+ exportselection, fg, font, foreground, highlightbackground,
+ highlightcolor, highlightthickness, insertbackground,
+ insertborderwidth, insertofftime, insertontime, insertwidth,
+ invalidcommand, invcmd, justify, relief, selectbackground,
+ selectborderwidth, selectforeground, show, state, takefocus,
+ textvariable, validate, validatecommand, vcmd, width,
+ xscrollcommand."""
+ Widget.__init__(self, master, 'entry', cnf, kw)
+ def delete(self, first, last=None):
+ """Delete text from FIRST to LAST (not included)."""
+ self.tk.call(self._w, 'delete', first, last)
+ def get(self):
+ """Return the text."""
+ return self.tk.call(self._w, 'get')
+ def icursor(self, index):
+ """Insert cursor at INDEX."""
+ self.tk.call(self._w, 'icursor', index)
+ def index(self, index):
+ """Return position of cursor."""
+ return getint(self.tk.call(
+ self._w, 'index', index))
+ def insert(self, index, string):
+ """Insert STRING at INDEX."""
+ self.tk.call(self._w, 'insert', index, string)
+ def scan_mark(self, x):
+ """Remember the current X, Y coordinates."""
+ self.tk.call(self._w, 'scan', 'mark', x)
+ def scan_dragto(self, x):
+ """Adjust the view of the canvas to 10 times the
+ difference between X and Y and the coordinates given in
+ scan_mark."""
+ self.tk.call(self._w, 'scan', 'dragto', x)
+ def selection_adjust(self, index):
+ """Adjust the end of the selection near the cursor to INDEX."""
+ self.tk.call(self._w, 'selection', 'adjust', index)
+ select_adjust = selection_adjust
+ def selection_clear(self):
+ """Clear the selection if it is in this widget."""
+ self.tk.call(self._w, 'selection', 'clear')
+ select_clear = selection_clear
+ def selection_from(self, index):
+ """Set the fixed end of a selection to INDEX."""
+ self.tk.call(self._w, 'selection', 'from', index)
+ select_from = selection_from
+ def selection_present(self):
+ """Return whether the widget has the selection."""
+ return self.tk.getboolean(
+ self.tk.call(self._w, 'selection', 'present'))
+ select_present = selection_present
+ def selection_range(self, start, end):
+ """Set the selection from START to END (not included)."""
+ self.tk.call(self._w, 'selection', 'range', start, end)
+ select_range = selection_range
+ def selection_to(self, index):
+ """Set the variable end of a selection to INDEX."""
+ self.tk.call(self._w, 'selection', 'to', index)
+ select_to = selection_to
+ def xview(self, index):
+ """Query and change horizontal position of the view."""
+ self.tk.call(self._w, 'xview', index)
+ def xview_moveto(self, fraction):
+ """Adjust the view in the window so that FRACTION of the
+ total width of the entry is off-screen to the left."""
+ self.tk.call(self._w, 'xview', 'moveto', fraction)
+ def xview_scroll(self, number, what):
+ """Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'xview', 'scroll', number, what)
+
+class Frame(Widget):
+ """Frame widget which may contain other widgets and can have a 3D border."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a frame widget with the parent MASTER.
+
+ Valid resource names: background, bd, bg, borderwidth, class,
+ colormap, container, cursor, height, highlightbackground,
+ highlightcolor, highlightthickness, relief, takefocus, visual, width."""
+ cnf = _cnfmerge((cnf, kw))
+ extra = ()
+ if cnf.has_key('class_'):
+ extra = ('-class', cnf['class_'])
+ del cnf['class_']
+ elif cnf.has_key('class'):
+ extra = ('-class', cnf['class'])
+ del cnf['class']
+ Widget.__init__(self, master, 'frame', cnf, {}, extra)
+
+class Label(Widget):
+ """Label widget which can display text and bitmaps."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a label widget with the parent MASTER.
+
+ Valid resource names: anchor, background, bd, bg, bitmap,
+ borderwidth, cursor, fg, font, foreground, height,
+ highlightbackground, highlightcolor, highlightthickness, image,
+ justify, padx, pady, relief, takefocus, text, textvariable,
+ underline, width, wraplength."""
+ Widget.__init__(self, master, 'label', cnf, kw)
+
+class Listbox(Widget):
+ """Listbox widget which can display a list of strings."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a listbox widget with the parent MASTER.
+
+ Valid resource names: background, bd, bg, borderwidth, cursor,
+ exportselection, fg, font, foreground, height, highlightbackground,
+ highlightcolor, highlightthickness, relief, selectbackground,
+ selectborderwidth, selectforeground, selectmode, setgrid, takefocus,
+ width, xscrollcommand, yscrollcommand, listvariable."""
+ Widget.__init__(self, master, 'listbox', cnf, kw)
+ def activate(self, index):
+ """Activate item identified by INDEX."""
+ self.tk.call(self._w, 'activate', index)
+ def bbox(self, *args):
+ """Return a tuple of X1,Y1,X2,Y2 coordinates for a rectangle
+ which encloses the item identified by index in ARGS."""
+ return self._getints(
+ self.tk.call((self._w, 'bbox') + args)) or None
+ def curselection(self):
+ """Return list of indices of currently selected item."""
+ # XXX Ought to apply self._getints()...
+ return self.tk.splitlist(self.tk.call(
+ self._w, 'curselection'))
+ def delete(self, first, last=None):
+ """Delete items from FIRST to LAST (not included)."""
+ self.tk.call(self._w, 'delete', first, last)
+ def get(self, first, last=None):
+ """Get list of items from FIRST to LAST (not included)."""
+ if last:
+ return self.tk.splitlist(self.tk.call(
+ self._w, 'get', first, last))
+ else:
+ return self.tk.call(self._w, 'get', first)
+ def index(self, index):
+ """Return index of item identified with INDEX."""
+ i = self.tk.call(self._w, 'index', index)
+ if i == 'none': return None
+ return getint(i)
+ def insert(self, index, *elements):
+ """Insert ELEMENTS at INDEX."""
+ self.tk.call((self._w, 'insert', index) + elements)
+ def nearest(self, y):
+ """Get index of item which is nearest to y coordinate Y."""
+ return getint(self.tk.call(
+ self._w, 'nearest', y))
+ def scan_mark(self, x, y):
+ """Remember the current X, Y coordinates."""
+ self.tk.call(self._w, 'scan', 'mark', x, y)
+ def scan_dragto(self, x, y):
+ """Adjust the view of the listbox to 10 times the
+ difference between X and Y and the coordinates given in
+ scan_mark."""
+ self.tk.call(self._w, 'scan', 'dragto', x, y)
+ def see(self, index):
+ """Scroll such that INDEX is visible."""
+ self.tk.call(self._w, 'see', index)
+ def selection_anchor(self, index):
+ """Set the fixed end oft the selection to INDEX."""
+ self.tk.call(self._w, 'selection', 'anchor', index)
+ select_anchor = selection_anchor
+ def selection_clear(self, first, last=None):
+ """Clear the selection from FIRST to LAST (not included)."""
+ self.tk.call(self._w,
+ 'selection', 'clear', first, last)
+ select_clear = selection_clear
+ def selection_includes(self, index):
+ """Return 1 if INDEX is part of the selection."""
+ return self.tk.getboolean(self.tk.call(
+ self._w, 'selection', 'includes', index))
+ select_includes = selection_includes
+ def selection_set(self, first, last=None):
+ """Set the selection from FIRST to LAST (not included) without
+ changing the currently selected elements."""
+ self.tk.call(self._w, 'selection', 'set', first, last)
+ select_set = selection_set
+ def size(self):
+ """Return the number of elements in the listbox."""
+ return getint(self.tk.call(self._w, 'size'))
+ def xview(self, *what):
+ """Query and change horizontal position of the view."""
+ if not what:
+ return self._getdoubles(self.tk.call(self._w, 'xview'))
+ self.tk.call((self._w, 'xview') + what)
+ def xview_moveto(self, fraction):
+ """Adjust the view in the window so that FRACTION of the
+ total width of the entry is off-screen to the left."""
+ self.tk.call(self._w, 'xview', 'moveto', fraction)
+ def xview_scroll(self, number, what):
+ """Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'xview', 'scroll', number, what)
+ def yview(self, *what):
+ """Query and change vertical position of the view."""
+ if not what:
+ return self._getdoubles(self.tk.call(self._w, 'yview'))
+ self.tk.call((self._w, 'yview') + what)
+ def yview_moveto(self, fraction):
+ """Adjust the view in the window so that FRACTION of the
+ total width of the entry is off-screen to the top."""
+ self.tk.call(self._w, 'yview', 'moveto', fraction)
+ def yview_scroll(self, number, what):
+ """Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'yview', 'scroll', number, what)
+
+class Menu(Widget):
+ """Menu widget which allows to display menu bars, pull-down menus and pop-up menus."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct menu widget with the parent MASTER.
+
+ Valid resource names: activebackground, activeborderwidth,
+ activeforeground, background, bd, bg, borderwidth, cursor,
+ disabledforeground, fg, font, foreground, postcommand, relief,
+ selectcolor, takefocus, tearoff, tearoffcommand, title, type."""
+ Widget.__init__(self, master, 'menu', cnf, kw)
+ def tk_bindForTraversal(self):
+ pass # obsolete since Tk 4.0
+ def tk_mbPost(self):
+ self.tk.call('tk_mbPost', self._w)
+ def tk_mbUnpost(self):
+ self.tk.call('tk_mbUnpost')
+ def tk_traverseToMenu(self, char):
+ self.tk.call('tk_traverseToMenu', self._w, char)
+ def tk_traverseWithinMenu(self, char):
+ self.tk.call('tk_traverseWithinMenu', self._w, char)
+ def tk_getMenuButtons(self):
+ return self.tk.call('tk_getMenuButtons', self._w)
+ def tk_nextMenu(self, count):
+ self.tk.call('tk_nextMenu', count)
+ def tk_nextMenuEntry(self, count):
+ self.tk.call('tk_nextMenuEntry', count)
+ def tk_invokeMenu(self):
+ self.tk.call('tk_invokeMenu', self._w)
+ def tk_firstMenu(self):
+ self.tk.call('tk_firstMenu', self._w)
+ def tk_mbButtonDown(self):
+ self.tk.call('tk_mbButtonDown', self._w)
+ def tk_popup(self, x, y, entry=""):
+ """Post the menu at position X,Y with entry ENTRY."""
+ self.tk.call('tk_popup', self._w, x, y, entry)
+ def activate(self, index):
+ """Activate entry at INDEX."""
+ self.tk.call(self._w, 'activate', index)
+ def add(self, itemType, cnf={}, **kw):
+ """Internal function."""
+ self.tk.call((self._w, 'add', itemType) +
+ self._options(cnf, kw))
+ def add_cascade(self, cnf={}, **kw):
+ """Add hierarchical menu item."""
+ self.add('cascade', cnf or kw)
+ def add_checkbutton(self, cnf={}, **kw):
+ """Add checkbutton menu item."""
+ self.add('checkbutton', cnf or kw)
+ def add_command(self, cnf={}, **kw):
+ """Add command menu item."""
+ self.add('command', cnf or kw)
+ def add_radiobutton(self, cnf={}, **kw):
+ """Addd radio menu item."""
+ self.add('radiobutton', cnf or kw)
+ def add_separator(self, cnf={}, **kw):
+ """Add separator."""
+ self.add('separator', cnf or kw)
+ def insert(self, index, itemType, cnf={}, **kw):
+ """Internal function."""
+ self.tk.call((self._w, 'insert', index, itemType) +
+ self._options(cnf, kw))
+ def insert_cascade(self, index, cnf={}, **kw):
+ """Add hierarchical menu item at INDEX."""
+ self.insert(index, 'cascade', cnf or kw)
+ def insert_checkbutton(self, index, cnf={}, **kw):
+ """Add checkbutton menu item at INDEX."""
+ self.insert(index, 'checkbutton', cnf or kw)
+ def insert_command(self, index, cnf={}, **kw):
+ """Add command menu item at INDEX."""
+ self.insert(index, 'command', cnf or kw)
+ def insert_radiobutton(self, index, cnf={}, **kw):
+ """Addd radio menu item at INDEX."""
+ self.insert(index, 'radiobutton', cnf or kw)
+ def insert_separator(self, index, cnf={}, **kw):
+ """Add separator at INDEX."""
+ self.insert(index, 'separator', cnf or kw)
+ def delete(self, index1, index2=None):
+ """Delete menu items between INDEX1 and INDEX2 (not included)."""
+ self.tk.call(self._w, 'delete', index1, index2)
+ def entrycget(self, index, option):
+ """Return the resource value of an menu item for OPTION at INDEX."""
+ return self.tk.call(self._w, 'entrycget', index, '-' + option)
+ def entryconfigure(self, index, cnf=None, **kw):
+ """Configure a menu item at INDEX."""
+ if cnf is None and not kw:
+ cnf = {}
+ for x in self.tk.split(self.tk.call(
+ (self._w, 'entryconfigure', index))):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+ if type(cnf) == StringType and not kw:
+ x = self.tk.split(self.tk.call(
+ (self._w, 'entryconfigure', index, '-'+cnf)))
+ return (x[0][1:],) + x[1:]
+ self.tk.call((self._w, 'entryconfigure', index)
+ + self._options(cnf, kw))
+ entryconfig = entryconfigure
+ def index(self, index):
+ """Return the index of a menu item identified by INDEX."""
+ i = self.tk.call(self._w, 'index', index)
+ if i == 'none': return None
+ return getint(i)
+ def invoke(self, index):
+ """Invoke a menu item identified by INDEX and execute
+ the associated command."""
+ return self.tk.call(self._w, 'invoke', index)
+ def post(self, x, y):
+ """Display a menu at position X,Y."""
+ self.tk.call(self._w, 'post', x, y)
+ def type(self, index):
+ """Return the type of the menu item at INDEX."""
+ return self.tk.call(self._w, 'type', index)
+ def unpost(self):
+ """Unmap a menu."""
+ self.tk.call(self._w, 'unpost')
+ def yposition(self, index):
+ """Return the y-position of the topmost pixel of the menu item at INDEX."""
+ return getint(self.tk.call(
+ self._w, 'yposition', index))
+
+class Menubutton(Widget):
+ """Menubutton widget, obsolete since Tk8.0."""
+ def __init__(self, master=None, cnf={}, **kw):
+ Widget.__init__(self, master, 'menubutton', cnf, kw)
+
+class Message(Widget):
+ """Message widget to display multiline text. Obsolete since Label does it too."""
+ def __init__(self, master=None, cnf={}, **kw):
+ Widget.__init__(self, master, 'message', cnf, kw)
+
+class Radiobutton(Widget):
+ """Radiobutton widget which shows only one of several buttons in on-state."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a radiobutton widget with the parent MASTER.
+
+ Valid resource names: activebackground, activeforeground, anchor,
+ background, bd, bg, bitmap, borderwidth, command, cursor,
+ disabledforeground, fg, font, foreground, height,
+ highlightbackground, highlightcolor, highlightthickness, image,
+ indicatoron, justify, padx, pady, relief, selectcolor, selectimage,
+ state, takefocus, text, textvariable, underline, value, variable,
+ width, wraplength."""
+ Widget.__init__(self, master, 'radiobutton', cnf, kw)
+ def deselect(self):
+ """Put the button in off-state."""
+
+ self.tk.call(self._w, 'deselect')
+ def flash(self):
+ """Flash the button."""
+ self.tk.call(self._w, 'flash')
+ def invoke(self):
+ """Toggle the button and invoke a command if given as resource."""
+ return self.tk.call(self._w, 'invoke')
+ def select(self):
+ """Put the button in on-state."""
+ self.tk.call(self._w, 'select')
+
+class Scale(Widget):
+ """Scale widget which can display a numerical scale."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a scale widget with the parent MASTER.
+
+ Valid resource names: activebackground, background, bigincrement, bd,
+ bg, borderwidth, command, cursor, digits, fg, font, foreground, from,
+ highlightbackground, highlightcolor, highlightthickness, label,
+ length, orient, relief, repeatdelay, repeatinterval, resolution,
+ showvalue, sliderlength, sliderrelief, state, takefocus,
+ tickinterval, to, troughcolor, variable, width."""
+ Widget.__init__(self, master, 'scale', cnf, kw)
+ def get(self):
+ """Get the current value as integer or float."""
+ value = self.tk.call(self._w, 'get')
+ try:
+ return getint(value)
+ except ValueError:
+ return getdouble(value)
+ def set(self, value):
+ """Set the value to VALUE."""
+ self.tk.call(self._w, 'set', value)
+ def coords(self, value=None):
+ """Return a tuple (X,Y) of the point along the centerline of the
+ trough that corresponds to VALUE or the current value if None is
+ given."""
+
+ return self._getints(self.tk.call(self._w, 'coords', value))
+ def identify(self, x, y):
+ """Return where the point X,Y lies. Valid return values are "slider",
+ "though1" and "though2"."""
+ return self.tk.call(self._w, 'identify', x, y)
+
+class Scrollbar(Widget):
+ """Scrollbar widget which displays a slider at a certain position."""
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a scrollbar widget with the parent MASTER.
+
+ Valid resource names: activebackground, activerelief,
+ background, bd, bg, borderwidth, command, cursor,
+ elementborderwidth, highlightbackground,
+ highlightcolor, highlightthickness, jump, orient,
+ relief, repeatdelay, repeatinterval, takefocus,
+ troughcolor, width."""
+ Widget.__init__(self, master, 'scrollbar', cnf, kw)
+ def activate(self, index):
+ """Display the element at INDEX with activebackground and activerelief.
+ INDEX can be "arrow1","slider" or "arrow2"."""
+ self.tk.call(self._w, 'activate', index)
+ def delta(self, deltax, deltay):
+ """Return the fractional change of the scrollbar setting if it
+ would be moved by DELTAX or DELTAY pixels."""
+ return getdouble(
+ self.tk.call(self._w, 'delta', deltax, deltay))
+ def fraction(self, x, y):
+ """Return the fractional value which corresponds to a slider
+ position of X,Y."""
+ return getdouble(self.tk.call(self._w, 'fraction', x, y))
+ def identify(self, x, y):
+ """Return the element under position X,Y as one of
+ "arrow1","slider","arrow2" or ""."""
+ return self.tk.call(self._w, 'identify', x, y)
+ def get(self):
+ """Return the current fractional values (upper and lower end)
+ of the slider position."""
+ return self._getdoubles(self.tk.call(self._w, 'get'))
+ def set(self, *args):
+ """Set the fractional values of the slider position (upper and
+ lower ends as value between 0 and 1)."""
+ self.tk.call((self._w, 'set') + args)
+
+class Text(Widget):
+ """Text widget which can display text in various forms."""
+ # XXX Add dump()
+ def __init__(self, master=None, cnf={}, **kw):
+ """Construct a text widget with the parent MASTER.
+
+ Valid resource names: background, bd, bg, borderwidth, cursor,
+ exportselection, fg, font, foreground, height,
+ highlightbackground, highlightcolor, highlightthickness,
+ insertbackground, insertborderwidth, insertofftime,
+ insertontime, insertwidth, padx, pady, relief,
+ selectbackground, selectborderwidth, selectforeground,
+ setgrid, spacing1, spacing2, spacing3, state, tabs, takefocus,
+ width, wrap, xscrollcommand, yscrollcommand."""
+ Widget.__init__(self, master, 'text', cnf, kw)
+ def bbox(self, *args):
+ """Return a tuple of (x,y,width,height) which gives the bounding
+ box of the visible part of the character at the index in ARGS."""
+ return self._getints(
+ self.tk.call((self._w, 'bbox') + args)) or None
+ def tk_textSelectTo(self, index):
+ self.tk.call('tk_textSelectTo', self._w, index)
+ def tk_textBackspace(self):
+ self.tk.call('tk_textBackspace', self._w)
+ def tk_textIndexCloser(self, a, b, c):
+ self.tk.call('tk_textIndexCloser', self._w, a, b, c)
+ def tk_textResetAnchor(self, index):
+ self.tk.call('tk_textResetAnchor', self._w, index)
+ def compare(self, index1, op, index2):
+ """Return whether between index INDEX1 and index INDEX2 the
+ relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=."""
+ return self.tk.getboolean(self.tk.call(
+ self._w, 'compare', index1, op, index2))
+ def debug(self, boolean=None):
+ """Turn on the internal consistency checks of the B-Tree inside the text
+ widget according to BOOLEAN."""
+ return self.tk.getboolean(self.tk.call(
+ self._w, 'debug', boolean))
+ def delete(self, index1, index2=None):
+ """Delete the characters between INDEX1 and INDEX2 (not included)."""
+ self.tk.call(self._w, 'delete', index1, index2)
+ def dlineinfo(self, index):
+ """Return tuple (x,y,width,height,baseline) giving the bounding box
+ and baseline position of the visible part of the line containing
+ the character at INDEX."""
+ return self._getints(self.tk.call(self._w, 'dlineinfo', index))
+ def get(self, index1, index2=None):
+ """Return the text from INDEX1 to INDEX2 (not included)."""
+ return self.tk.call(self._w, 'get', index1, index2)
+ # (Image commands are new in 8.0)
+ def image_cget(self, index, option):
+ """Return the value of OPTION of an embedded image at INDEX."""
+ if option[:1] != "-":
+ option = "-" + option
+ if option[-1:] == "_":
+ option = option[:-1]
+ return self.tk.call(self._w, "image", "cget", index, option)
+ def image_configure(self, index, cnf={}, **kw):
+ """Configure an embedded image at INDEX."""
+ if not cnf and not kw:
+ cnf = {}
+ for x in self.tk.split(
+ self.tk.call(
+ self._w, "image", "configure", index)):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+ apply(self.tk.call,
+ (self._w, "image", "configure", index)
+ + self._options(cnf, kw))
+ def image_create(self, index, cnf={}, **kw):
+ """Create an embedded image at INDEX."""
+ return apply(self.tk.call,
+ (self._w, "image", "create", index)
+ + self._options(cnf, kw))
+ def image_names(self):
+ """Return all names of embedded images in this widget."""
+ return self.tk.call(self._w, "image", "names")
+ def index(self, index):
+ """Return the index in the form line.char for INDEX."""
+ return self.tk.call(self._w, 'index', index)
+ def insert(self, index, chars, *args):
+ """Insert CHARS before the characters at INDEX. An additional
+ tag can be given in ARGS. Additional CHARS and tags can follow in ARGS."""
+ self.tk.call((self._w, 'insert', index, chars) + args)
+ def mark_gravity(self, markName, direction=None):
+ """Change the gravity of a mark MARKNAME to DIRECTION (LEFT or RIGHT).
+ Return the current value if None is given for DIRECTION."""
+ return self.tk.call(
+ (self._w, 'mark', 'gravity', markName, direction))
+ def mark_names(self):
+ """Return all mark names."""
+ return self.tk.splitlist(self.tk.call(
+ self._w, 'mark', 'names'))
+ def mark_set(self, markName, index):
+ """Set mark MARKNAME before the character at INDEX."""
+ self.tk.call(self._w, 'mark', 'set', markName, index)
+ def mark_unset(self, *markNames):
+ """Delete all marks in MARKNAMES."""
+ self.tk.call((self._w, 'mark', 'unset') + markNames)
+ def mark_next(self, index):
+ """Return the name of the next mark after INDEX."""
+ return self.tk.call(self._w, 'mark', 'next', index) or None
+ def mark_previous(self, index):
+ """Return the name of the previous mark before INDEX."""
+ return self.tk.call(self._w, 'mark', 'previous', index) or None
+ def scan_mark(self, x, y):
+ """Remember the current X, Y coordinates."""
+ self.tk.call(self._w, 'scan', 'mark', x, y)
+ def scan_dragto(self, x, y):
+ """Adjust the view of the text to 10 times the
+ difference between X and Y and the coordinates given in
+ scan_mark."""
+ self.tk.call(self._w, 'scan', 'dragto', x, y)
+ def search(self, pattern, index, stopindex=None,
+ forwards=None, backwards=None, exact=None,
+ regexp=None, nocase=None, count=None):
+ """Search PATTERN beginning from INDEX until STOPINDEX.
+ Return the index of the first character of a match or an empty string."""
+ args = [self._w, 'search']
+ if forwards: args.append('-forwards')
+ if backwards: args.append('-backwards')
+ if exact: args.append('-exact')
+ if regexp: args.append('-regexp')
+ if nocase: args.append('-nocase')
+ if count: args.append('-count'); args.append(count)
+ if pattern[0] == '-': args.append('--')
+ args.append(pattern)
+ args.append(index)
+ if stopindex: args.append(stopindex)
+ return self.tk.call(tuple(args))
+ def see(self, index):
+ """Scroll such that the character at INDEX is visible."""
+ self.tk.call(self._w, 'see', index)
+ def tag_add(self, tagName, index1, *args):
+ """Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS.
+ Additional pairs of indices may follow in ARGS."""
+ self.tk.call(
+ (self._w, 'tag', 'add', tagName, index1) + args)
+ def tag_unbind(self, tagName, sequence, funcid=None):
+ """Unbind for all characters with TAGNAME for event SEQUENCE the
+ function identified with FUNCID."""
+ self.tk.call(self._w, 'tag', 'bind', tagName, sequence, '')
+ if funcid:
+ self.deletecommand(funcid)
+ def tag_bind(self, tagName, sequence, func, add=None):
+ """Bind to all characters with TAGNAME at event SEQUENCE a call to function FUNC.
+
+ An additional boolean parameter ADD specifies whether FUNC will be
+ called additionally to the other bound function or whether it will
+ replace the previous function. See bind for the return value."""
+ return self._bind((self._w, 'tag', 'bind', tagName),
+ sequence, func, add)
+ def tag_cget(self, tagName, option):
+ """Return the value of OPTION for tag TAGNAME."""
+ if option[:1] != '-':
+ option = '-' + option
+ if option[-1:] == '_':
+ option = option[:-1]
+ return self.tk.call(self._w, 'tag', 'cget', tagName, option)
+ def tag_configure(self, tagName, cnf={}, **kw):
+ """Configure a tag TAGNAME."""
+ if type(cnf) == StringType:
+ x = self.tk.split(self.tk.call(
+ self._w, 'tag', 'configure', tagName, '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ self.tk.call(
+ (self._w, 'tag', 'configure', tagName)
+ + self._options(cnf, kw))
+ tag_config = tag_configure
+ def tag_delete(self, *tagNames):
+ """Delete all tags in TAGNAMES."""
+ self.tk.call((self._w, 'tag', 'delete') + tagNames)
+ def tag_lower(self, tagName, belowThis=None):
+ """Change the priority of tag TAGNAME such that it is lower
+ than the priority of BELOWTHIS."""
+ self.tk.call(self._w, 'tag', 'lower', tagName, belowThis)
+ def tag_names(self, index=None):
+ """Return a list of all tag names."""
+ return self.tk.splitlist(
+ self.tk.call(self._w, 'tag', 'names', index))
+ def tag_nextrange(self, tagName, index1, index2=None):
+ """Return a list of start and end index for the first sequence of
+ characters between INDEX1 and INDEX2 which all have tag TAGNAME.
+ The text is searched forward from INDEX1."""
+ return self.tk.splitlist(self.tk.call(
+ self._w, 'tag', 'nextrange', tagName, index1, index2))
+ def tag_prevrange(self, tagName, index1, index2=None):
+ """Return a list of start and end index for the first sequence of
+ characters between INDEX1 and INDEX2 which all have tag TAGNAME.
+ The text is searched backwards from INDEX1."""
+ return self.tk.splitlist(self.tk.call(
+ self._w, 'tag', 'prevrange', tagName, index1, index2))
+ def tag_raise(self, tagName, aboveThis=None):
+ """Change the priority of tag TAGNAME such that it is higher
+ than the priority of ABOVETHIS."""
+ self.tk.call(
+ self._w, 'tag', 'raise', tagName, aboveThis)
+ def tag_ranges(self, tagName):
+ """Return a list of ranges of text which have tag TAGNAME."""
+ return self.tk.splitlist(self.tk.call(
+ self._w, 'tag', 'ranges', tagName))
+ def tag_remove(self, tagName, index1, index2=None):
+ """Remove tag TAGNAME from all characters between INDEX1 and INDEX2."""
+ self.tk.call(
+ self._w, 'tag', 'remove', tagName, index1, index2)
+ def window_cget(self, index, option):
+ """Return the value of OPTION of an embedded window at INDEX."""
+ if option[:1] != '-':
+ option = '-' + option
+ if option[-1:] == '_':
+ option = option[:-1]
+ return self.tk.call(self._w, 'window', 'cget', index, option)
+ def window_configure(self, index, cnf={}, **kw):
+ """Configure an embedded window at INDEX."""
+ if type(cnf) == StringType:
+ x = self.tk.split(self.tk.call(
+ self._w, 'window', 'configure',
+ index, '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ self.tk.call(
+ (self._w, 'window', 'configure', index)
+ + self._options(cnf, kw))
+ window_config = window_configure
+ def window_create(self, index, cnf={}, **kw):
+ """Create a window at INDEX."""
+ self.tk.call(
+ (self._w, 'window', 'create', index)
+ + self._options(cnf, kw))
+ def window_names(self):
+ """Return all names of embedded windows in this widget."""
+ return self.tk.splitlist(
+ self.tk.call(self._w, 'window', 'names'))
+ def xview(self, *what):
+ """Query and change horizontal position of the view."""
+ if not what:
+ return self._getdoubles(self.tk.call(self._w, 'xview'))
+ self.tk.call((self._w, 'xview') + what)
+ def xview_moveto(self, fraction):
+ """Adjusts the view in the window so that FRACTION of the
+ total width of the canvas is off-screen to the left."""
+ self.tk.call(self._w, 'xview', 'moveto', fraction)
+ def xview_scroll(self, number, what):
+ """Shift the x-view according to NUMBER which is measured
+ in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'xview', 'scroll', number, what)
+ def yview(self, *what):
+ """Query and change vertical position of the view."""
+ if not what:
+ return self._getdoubles(self.tk.call(self._w, 'yview'))
+ self.tk.call((self._w, 'yview') + what)
+ def yview_moveto(self, fraction):
+ """Adjusts the view in the window so that FRACTION of the
+ total height of the canvas is off-screen to the top."""
+ self.tk.call(self._w, 'yview', 'moveto', fraction)
+ def yview_scroll(self, number, what):
+ """Shift the y-view according to NUMBER which is measured
+ in "units" or "pages" (WHAT)."""
+ self.tk.call(self._w, 'yview', 'scroll', number, what)
+ def yview_pickplace(self, *what):
+ """Obsolete function, use see."""
+ self.tk.call((self._w, 'yview', '-pickplace') + what)
+
+class _setit:
+ """Internal class. It wraps the command in the widget OptionMenu."""
+ def __init__(self, var, value, callback=None):
+ self.__value = value
+ self.__var = var
+ self.__callback = callback
+ def __call__(self, *args):
+ self.__var.set(self.__value)
+ if self.__callback:
+ apply(self.__callback, (self.__value,)+args)
+
+class OptionMenu(Menubutton):
+ """OptionMenu which allows the user to select a value from a menu."""
+ def __init__(self, master, variable, value, *values, **kwargs):
+ """Construct an optionmenu widget with the parent MASTER, with
+ the resource textvariable set to VARIABLE, the initially selected
+ value VALUE, the other menu values VALUES and an additional
+ keyword argument command."""
+ kw = {"borderwidth": 2, "textvariable": variable,
+ "indicatoron": 1, "relief": RAISED, "anchor": "c",
+ "highlightthickness": 2}
+ Widget.__init__(self, master, "menubutton", kw)
+ self.widgetName = 'tk_optionMenu'
+ menu = self.__menu = Menu(self, name="menu", tearoff=0)
+ self.menuname = menu._w
+ # 'command' is the only supported keyword
+ callback = kwargs.get('command')
+ if kwargs.has_key('command'):
+ del kwargs['command']
+ if kwargs:
+ raise TclError, 'unknown option -'+kwargs.keys()[0]
+ menu.add_command(label=value,
+ command=_setit(variable, value, callback))
+ for v in values:
+ menu.add_command(label=v,
+ command=_setit(variable, v, callback))
+ self["menu"] = menu
+
+ def __getitem__(self, name):
+ if name == 'menu':
+ return self.__menu
+ return Widget.__getitem__(self, name)
+
+ def destroy(self):
+ """Destroy this widget and the associated menu."""
+ Menubutton.destroy(self)
+ self.__menu = None
+
+class Image:
+ """Base class for images."""
+ _last_id = 0
+ def __init__(self, imgtype, name=None, cnf={}, master=None, **kw):
+ self.name = None
+ if not master:
+ master = _default_root
+ if not master:
+ raise RuntimeError, 'Too early to create image'
+ self.tk = master.tk
+ if not name:
+ Image._last_id += 1
+ name = "pyimage" +`Image._last_id` # tk itself would use image<x>
+ # The following is needed for systems where id(x)
+ # can return a negative number, such as Linux/m68k:
+ if name[0] == '-': name = '_' + name[1:]
+ if kw and cnf: cnf = _cnfmerge((cnf, kw))
+ elif kw: cnf = kw
+ options = ()
+ for k, v in cnf.items():
+ if callable(v):
+ v = self._register(v)
+ options = options + ('-'+k, v)
+ self.tk.call(('image', 'create', imgtype, name,) + options)
+ self.name = name
+ def __str__(self): return self.name
+ def __del__(self):
+ if self.name:
+ try:
+ self.tk.call('image', 'delete', self.name)
+ except TclError:
+ # May happen if the root was destroyed
+ pass
+ def __setitem__(self, key, value):
+ self.tk.call(self.name, 'configure', '-'+key, value)
+ def __getitem__(self, key):
+ return self.tk.call(self.name, 'configure', '-'+key)
+ def configure(self, **kw):
+ """Configure the image."""
+ res = ()
+ for k, v in _cnfmerge(kw).items():
+ if v is not None:
+ if k[-1] == '_': k = k[:-1]
+ if callable(v):
+ v = self._register(v)
+ res = res + ('-'+k, v)
+ self.tk.call((self.name, 'config') + res)
+ config = configure
+ def height(self):
+ """Return the height of the image."""
+ return getint(
+ self.tk.call('image', 'height', self.name))
+ def type(self):
+ """Return the type of the imgage, e.g. "photo" or "bitmap"."""
+ return self.tk.call('image', 'type', self.name)
+ def width(self):
+ """Return the width of the image."""
+ return getint(
+ self.tk.call('image', 'width', self.name))
+
+class PhotoImage(Image):
+ """Widget which can display colored images in GIF, PPM/PGM format."""
+ def __init__(self, name=None, cnf={}, master=None, **kw):
+ """Create an image with NAME.
+
+ Valid resource names: data, format, file, gamma, height, palette,
+ width."""
+ apply(Image.__init__, (self, 'photo', name, cnf, master), kw)
+ def blank(self):
+ """Display a transparent image."""
+ self.tk.call(self.name, 'blank')
+ def cget(self, option):
+ """Return the value of OPTION."""
+ return self.tk.call(self.name, 'cget', '-' + option)
+ # XXX config
+ def __getitem__(self, key):
+ return self.tk.call(self.name, 'cget', '-' + key)
+ # XXX copy -from, -to, ...?
+ def copy(self):
+ """Return a new PhotoImage with the same image as this widget."""
+ destImage = PhotoImage()
+ self.tk.call(destImage, 'copy', self.name)
+ return destImage
+ def zoom(self,x,y=''):
+ """Return a new PhotoImage with the same image as this widget
+ but zoom it with X and Y."""
+ destImage = PhotoImage()
+ if y=='': y=x
+ self.tk.call(destImage, 'copy', self.name, '-zoom',x,y)
+ return destImage
+ def subsample(self,x,y=''):
+ """Return a new PhotoImage based on the same image as this widget
+ but use only every Xth or Yth pixel."""
+ destImage = PhotoImage()
+ if y=='': y=x
+ self.tk.call(destImage, 'copy', self.name, '-subsample',x,y)
+ return destImage
+ def get(self, x, y):
+ """Return the color (red, green, blue) of the pixel at X,Y."""
+ return self.tk.call(self.name, 'get', x, y)
+ def put(self, data, to=None):
+ """Put row formated colors to image starting from
+ position TO, e.g. image.put("{red green} {blue yellow}", to=(4,6))"""
+ args = (self.name, 'put', data)
+ if to:
+ if to[0] == '-to':
+ to = to[1:]
+ args = args + ('-to',) + tuple(to)
+ self.tk.call(args)
+ # XXX read
+ def write(self, filename, format=None, from_coords=None):
+ """Write image to file FILENAME in FORMAT starting from
+ position FROM_COORDS."""
+ args = (self.name, 'write', filename)
+ if format:
+ args = args + ('-format', format)
+ if from_coords:
+ args = args + ('-from',) + tuple(from_coords)
+ self.tk.call(args)
+
+class BitmapImage(Image):
+ """Widget which can display a bitmap."""
+ def __init__(self, name=None, cnf={}, master=None, **kw):
+ """Create a bitmap with NAME.
+
+ Valid resource names: background, data, file, foreground, maskdata, maskfile."""
+ apply(Image.__init__, (self, 'bitmap', name, cnf, master), kw)
+
+def image_names(): return _default_root.tk.call('image', 'names')
+def image_types(): return _default_root.tk.call('image', 'types')
+
+######################################################################
+# Extensions:
+
+class Studbutton(Button):
+ def __init__(self, master=None, cnf={}, **kw):
+ Widget.__init__(self, master, 'studbutton', cnf, kw)
+ self.bind('<Any-Enter>', self.tkButtonEnter)
+ self.bind('<Any-Leave>', self.tkButtonLeave)
+ self.bind('<1>', self.tkButtonDown)
+ self.bind('<ButtonRelease-1>', self.tkButtonUp)
+
+class Tributton(Button):
+ def __init__(self, master=None, cnf={}, **kw):
+ Widget.__init__(self, master, 'tributton', cnf, kw)
+ self.bind('<Any-Enter>', self.tkButtonEnter)
+ self.bind('<Any-Leave>', self.tkButtonLeave)
+ self.bind('<1>', self.tkButtonDown)
+ self.bind('<ButtonRelease-1>', self.tkButtonUp)
+ self['fg'] = self['bg']
+ self['activebackground'] = self['bg']
+
+######################################################################
+# Test:
+
+def _test():
+ root = Tk()
+ text = "This is Tcl/Tk version %s" % TclVersion
+ if TclVersion >= 8.1:
+ try:
+ text = text + unicode("\nThis should be a cedilla: \347",
+ "iso-8859-1")
+ except NameError:
+ pass # no unicode support
+ label = Label(root, text=text)
+ label.pack()
+ test = Button(root, text="Click me!",
+ command=lambda root=root: root.test.configure(
+ text="[%s]" % root.test['text']))
+ test.pack()
+ root.test = test
+ quit = Button(root, text="QUIT", command=root.destroy)
+ quit.pack()
+ # The following three commands are needed so the window pops
+ # up on top on Windows...
+ root.iconify()
+ root.update()
+ root.deiconify()
+ root.mainloop()
+
+if __name__ == '__main__':
+ _test()
+
Added: external/tix-8.4.2.x/PyTix-2.0/2.0/Tkinter.py.diff
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/2.0/Tkinter.py.diff Tue Mar 18 19:38:59 2008
@@ -0,0 +1,99 @@
+*** Tkinter.py.dist Mon Oct 16 14:49:40 2000
+--- Tkinter.py Wed Nov 22 01:56:28 2000
+***************
+*** 45,51 ****
+
+ TkVersion = _string.atof(_tkinter.TK_VERSION)
+ TclVersion = _string.atof(_tkinter.TCL_VERSION)
+!
+ READABLE = _tkinter.READABLE
+ WRITABLE = _tkinter.WRITABLE
+ EXCEPTION = _tkinter.EXCEPTION
+--- 45,53 ----
+
+ TkVersion = _string.atof(_tkinter.TK_VERSION)
+ TclVersion = _string.atof(_tkinter.TCL_VERSION)
+! try: TixVersion = _string.atof(_tkinter.TIX_VERSION)
+! except AttributeError: TixVersion = None
+!
+ READABLE = _tkinter.READABLE
+ WRITABLE = _tkinter.WRITABLE
+ EXCEPTION = _tkinter.EXCEPTION
+***************
+*** 1770,1781 ****
+ # XXX Obsolete -- better use self.tk.call directly!
+ return self.tk.call((self._w, name) + args)
+
+! class Widget(BaseWidget, Pack, Place, Grid):
+! """Internal class.
+!
+! Base class for a widget which can be positioned with the geometry managers
+! Pack, Place or Grid."""
+! pass
+
+ class Toplevel(BaseWidget, Wm):
+ """Toplevel widget, e.g. for dialogs."""
+--- 1772,1834 ----
+ # XXX Obsolete -- better use self.tk.call directly!
+ return self.tk.call((self._w, name) + args)
+
+! if TixVersion:
+! # The Tix 'tixForm' geometry manager
+! class Form:
+! """The Tix Form geometry manager
+!
+! Widgets can be arranged by specifying attachments to other widgets.
+! See Tix documentation for complete details"""
+!
+! def config(self, cnf={}, **kw):
+! apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
+! form = config
+!
+! def __setitem__(self, key, value):
+! Form.form({key: value})
+!
+! def check(self):
+! return self.tk.call('tixForm', 'check', self._w)
+!
+! def forget(self):
+! self.tk.call('tixForm', 'forget', self._w)
+!
+! def grid(self, xsize=0, ysize=0):
+! if (not xsize) and (not ysize):
+! x = self.tk.call('tixForm', 'grid', self._w)
+! y = self.tk.splitlist(x)
+! z = ()
+! for x in y:
+! z = z + (self.tk.getint(x),)
+! return z
+! self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
+!
+! def info(self, option=None):
+! if not option:
+! return self.tk.call('tixForm', 'info', self._w)
+! if option[0] != '-':
+! option = '-' + option
+! return self.tk.call('tixForm', 'info', self._w, option)
+!
+! def slaves(self):
+! return map(self._nametowidget,
+! self.tk.splitlist(
+! self.tk.call(
+! 'tixForm', 'slaves', self._w)))
+!
+! class Widget(BaseWidget, Pack, Place, Grid, Form):
+! """Internal class.
+!
+! Base class for a widget which can be positioned with the geometry managers
+! Pack, Place, Grid or Form."""
+! pass
+! else:
+! class Widget(BaseWidget, Pack, Place, Grid):
+! """Internal class.
+!
+! Base class for a widget which can be positioned with the geometry managers
+! Pack, Place or Grid."""
+! pass
+
+ class Toplevel(BaseWidget, Wm):
+ """Toplevel widget, e.g. for dialogs."""
Added: external/tix-8.4.2.x/PyTix-2.0/2.0/_tkinter.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/2.0/_tkinter.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,2264 @@
+/***********************************************************
+Copyright (C) 1994 Steen Lumholt.
+
+ All Rights Reserved
+
+******************************************************************/
+
+/* _tkinter.c -- Interface to libtk.a and libtcl.a. */
+
+/* TCL/TK VERSION INFO:
+
+ Only Tcl/Tk 8.0 and later are supported. Older versions are not
+ supported. (Use Python 1.5.2 if you cannot upgrade your Tcl/Tk
+ libraries.)
+*/
+
+/* XXX Further speed-up ideas, involving Tcl 8.0 features:
+
+ - In Tcl_Call(), create Tcl objects from the arguments, possibly using
+ intelligent mappings between Python objects and Tcl objects (e.g. ints,
+ floats and Tcl window pointers could be handled specially).
+
+ - Register a new Tcl type, "Python callable", which can be called more
+ efficiently and passed to Tcl_EvalObj() directly (if this is possible).
+
+*/
+
+
+#include "Python.h"
+#include <ctype.h>
+
+#ifdef WITH_THREAD
+#include "pythread.h"
+#endif
+
+#ifdef MS_WINDOWS
+#include <windows.h>
+#endif
+
+#ifdef macintosh
+#define MAC_TCL
+#endif
+
+#include <tcl.h>
+#include <tk.h>
+#ifdef WITH_TIX
+#include <tix.h>
+#endif
+
+#define TKMAJORMINOR (TK_MAJOR_VERSION*1000 + TK_MINOR_VERSION)
+
+#if TKMAJORMINOR < 8000
+#error "Tk older than 8.0 not supported"
+#endif
+
+#if defined(macintosh)
+/* Sigh, we have to include this to get at the tcl qd pointer */
+#include <tkMac.h>
+/* And this one we need to clear the menu bar */
+#include <Menus.h>
+#endif
+
+#if !(defined(MS_WINDOWS) || defined(__CYGWIN__))
+#define HAVE_CREATEFILEHANDLER
+#endif
+
+#ifdef HAVE_CREATEFILEHANDLER
+
+/* Tcl_CreateFileHandler() changed several times; these macros deal with the
+ messiness. In Tcl 8.0 and later, it is not available on Windows (and on
+ Unix, only because Jack added it back); when available on Windows, it only
+ applies to sockets. */
+
+#ifdef MS_WINDOWS
+#define FHANDLETYPE TCL_WIN_SOCKET
+#else
+#define FHANDLETYPE TCL_UNIX_FD
+#endif
+
+/* If Tcl can wait for a Unix file descriptor, define the EventHook() routine
+ which uses this to handle Tcl events while the user is typing commands. */
+
+#if FHANDLETYPE == TCL_UNIX_FD
+#define WAIT_FOR_STDIN
+#endif
+
+#endif /* HAVE_CREATEFILEHANDLER */
+
+#ifdef MS_WINDOWS
+#include <conio.h>
+#define WAIT_FOR_STDIN
+#endif
+
+#ifdef WITH_THREAD
+
+/* The threading situation is complicated. Tcl is not thread-safe, except for
+ Tcl 8.1, which will probably remain in alpha status for another 6 months
+ (and the README says that Tk will probably remain thread-unsafe forever).
+ So we need to use a lock around all uses of Tcl. Previously, the Python
+ interpreter lock was used for this. However, this causes problems when
+ other Python threads need to run while Tcl is blocked waiting for events.
+
+ To solve this problem, a separate lock for Tcl is introduced. Holding it
+ is incompatible with holding Python's interpreter lock. The following four
+ macros manipulate both locks together.
+
+ ENTER_TCL and LEAVE_TCL are brackets, just like Py_BEGIN_ALLOW_THREADS and
+ Py_END_ALLOW_THREADS. They should be used whenever a call into Tcl is made
+ that could call an event handler, or otherwise affect the state of a Tcl
+ interpreter. These assume that the surrounding code has the Python
+ interpreter lock; inside the brackets, the Python interpreter lock has been
+ released and the lock for Tcl has been acquired.
+
+ Sometimes, it is necessary to have both the Python lock and the Tcl lock.
+ (For example, when transferring data from the Tcl interpreter result to a
+ Python string object.) This can be done by using different macros to close
+ the ENTER_TCL block: ENTER_OVERLAP reacquires the Python lock (and restores
+ the thread state) but doesn't release the Tcl lock; LEAVE_OVERLAP_TCL
+ releases the Tcl lock.
+
+ By contrast, ENTER_PYTHON and LEAVE_PYTHON are used in Tcl event
+ handlers when the handler needs to use Python. Such event handlers are
+ entered while the lock for Tcl is held; the event handler presumably needs
+ to use Python. ENTER_PYTHON releases the lock for Tcl and acquires
+ the Python interpreter lock, restoring the appropriate thread state, and
+ LEAVE_PYTHON releases the Python interpreter lock and re-acquires the lock
+ for Tcl. It is okay for ENTER_TCL/LEAVE_TCL pairs to be contained inside
+ the code between ENTER_PYTHON and LEAVE_PYTHON.
+
+ These locks expand to several statements and brackets; they should not be
+ used in branches of if statements and the like.
+
+*/
+
+static PyThread_type_lock tcl_lock = 0;
+static PyThreadState *tcl_tstate = NULL;
+
+#define ENTER_TCL \
+ { PyThreadState *tstate = PyThreadState_Get(); Py_BEGIN_ALLOW_THREADS \
+ PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate;
+
+#define LEAVE_TCL \
+ tcl_tstate = NULL; PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS}
+
+#define ENTER_OVERLAP \
+ Py_END_ALLOW_THREADS
+
+#define LEAVE_OVERLAP_TCL \
+ tcl_tstate = NULL; PyThread_release_lock(tcl_lock); }
+
+#define ENTER_PYTHON \
+ { PyThreadState *tstate = tcl_tstate; tcl_tstate = NULL; \
+ PyThread_release_lock(tcl_lock); PyEval_RestoreThread((tstate)); }
+
+#define LEAVE_PYTHON \
+ { PyThreadState *tstate = PyEval_SaveThread(); \
+ PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; }
+
+#else
+
+#define ENTER_TCL
+#define LEAVE_TCL
+#define ENTER_OVERLAP
+#define LEAVE_OVERLAP_TCL
+#define ENTER_PYTHON
+#define LEAVE_PYTHON
+
+#endif
+
+#ifdef macintosh
+
+/*
+** Additional cruft needed by Tcl/Tk on the Mac.
+** This is for Tcl 7.5 and Tk 4.1 (patch release 1).
+*/
+
+/* ckfree() expects a char* */
+#define FREECAST (char *)
+
+#include <Events.h> /* For EventRecord */
+
+typedef int (*TclMacConvertEventPtr) (EventRecord *eventPtr);
+void Tcl_MacSetEventProc(TclMacConvertEventPtr procPtr);
+int TkMacConvertEvent(EventRecord *eventPtr);
+
+staticforward int PyMacConvertEvent(EventRecord *eventPtr);
+
+#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)
+ #pragma import on
+#endif
+
+#include <SIOUX.h>
+extern int SIOUXIsAppWindow(WindowPtr);
+
+#if defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)
+ #pragma import reset
+#endif
+#endif /* macintosh */
+
+#ifndef FREECAST
+#define FREECAST (char *)
+#endif
+
+/**** Tkapp Object Declaration ****/
+
+staticforward PyTypeObject Tkapp_Type;
+
+typedef struct {
+ PyObject_HEAD
+ Tcl_Interp *interp;
+} TkappObject;
+
+#define Tkapp_Check(v) ((v)->ob_type == &Tkapp_Type)
+#define Tkapp_Interp(v) (((TkappObject *) (v))->interp)
+#define Tkapp_Result(v) Tcl_GetStringResult(Tkapp_Interp(v))
+
+#define DEBUG_REFCNT(v) (printf("DEBUG: id=%p, refcnt=%i\n", \
+(void *) v, ((PyObject *) v)->ob_refcnt))
+
+
+
+/**** Error Handling ****/
+
+static PyObject *Tkinter_TclError;
+static int quitMainLoop = 0;
+static int errorInCmd = 0;
+static PyObject *excInCmd;
+static PyObject *valInCmd;
+static PyObject *trbInCmd;
+
+
+
+static PyObject *
+Tkinter_Error(PyObject *v)
+{
+ PyErr_SetString(Tkinter_TclError, Tkapp_Result(v));
+ return NULL;
+}
+
+
+
+/**** Utils ****/
+
+#ifdef WITH_THREAD
+#ifndef MS_WINDOWS
+
+/* Millisecond sleep() for Unix platforms. */
+
+static void
+Sleep(int milli)
+{
+ /* XXX Too bad if you don't have select(). */
+ struct timeval t;
+ t.tv_sec = milli/1000;
+ t.tv_usec = (milli%1000) * 1000;
+ select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t);
+}
+#endif /* MS_WINDOWS */
+#endif /* WITH_THREAD */
+
+
+static char *
+AsString(PyObject *value, PyObject *tmp)
+{
+ if (PyString_Check(value))
+ return PyString_AsString(value);
+ else if (PyUnicode_Check(value)) {
+ PyObject *v = PyUnicode_AsUTF8String(value);
+ if (v == NULL)
+ return NULL;
+ if (PyList_Append(tmp, v) != 0) {
+ Py_DECREF(v);
+ return NULL;
+ }
+ Py_DECREF(v);
+ return PyString_AsString(v);
+ }
+ else {
+ PyObject *v = PyObject_Str(value);
+ if (v == NULL)
+ return NULL;
+ if (PyList_Append(tmp, v) != 0) {
+ Py_DECREF(v);
+ return NULL;
+ }
+ Py_DECREF(v);
+ return PyString_AsString(v);
+ }
+}
+
+
+
+#define ARGSZ 64
+
+static char *
+Merge(PyObject *args)
+{
+ PyObject *tmp = NULL;
+ char *argvStore[ARGSZ];
+ char **argv = NULL;
+ int fvStore[ARGSZ];
+ int *fv = NULL;
+ int argc = 0, fvc = 0, i;
+ char *res = NULL;
+
+ if (!(tmp = PyList_New(0)))
+ return NULL;
+
+ argv = argvStore;
+ fv = fvStore;
+
+ if (args == NULL)
+ argc = 0;
+
+ else if (!PyTuple_Check(args)) {
+ argc = 1;
+ fv[0] = 0;
+ if (!(argv[0] = AsString(args, tmp)))
+ goto finally;
+ }
+ else {
+ argc = PyTuple_Size(args);
+
+ if (argc > ARGSZ) {
+ argv = (char **)ckalloc(argc * sizeof(char *));
+ fv = (int *)ckalloc(argc * sizeof(int));
+ if (argv == NULL || fv == NULL) {
+ PyErr_NoMemory();
+ goto finally;
+ }
+ }
+
+ for (i = 0; i < argc; i++) {
+ PyObject *v = PyTuple_GetItem(args, i);
+ if (PyTuple_Check(v)) {
+ fv[i] = 1;
+ if (!(argv[i] = Merge(v)))
+ goto finally;
+ fvc++;
+ }
+ else if (v == Py_None) {
+ argc = i;
+ break;
+ }
+ else {
+ fv[i] = 0;
+ if (!(argv[i] = AsString(v, tmp)))
+ goto finally;
+ fvc++;
+ }
+ }
+ }
+ res = Tcl_Merge(argc, argv);
+ if (res == NULL)
+ PyErr_SetString(Tkinter_TclError, "merge failed");
+
+ finally:
+ for (i = 0; i < fvc; i++)
+ if (fv[i]) {
+ ckfree(argv[i]);
+ }
+ if (argv != argvStore)
+ ckfree(FREECAST argv);
+ if (fv != fvStore)
+ ckfree(FREECAST fv);
+
+ Py_DECREF(tmp);
+ return res;
+}
+
+
+
+static PyObject *
+Split(char *list)
+{
+ int argc;
+ char **argv;
+ PyObject *v;
+
+ if (list == NULL) {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+ if (Tcl_SplitList((Tcl_Interp *)NULL, list, &argc, &argv) != TCL_OK) {
+ /* Not a list.
+ * Could be a quoted string containing funnies, e.g. {"}.
+ * Return the string itself.
+ */
+ return PyString_FromString(list);
+ }
+
+ if (argc == 0)
+ v = PyString_FromString("");
+ else if (argc == 1)
+ v = PyString_FromString(argv[0]);
+ else if ((v = PyTuple_New(argc)) != NULL) {
+ int i;
+ PyObject *w;
+
+ for (i = 0; i < argc; i++) {
+ if ((w = Split(argv[i])) == NULL) {
+ Py_DECREF(v);
+ v = NULL;
+ break;
+ }
+ PyTuple_SetItem(v, i, w);
+ }
+ }
+ Tcl_Free(FREECAST argv);
+ return v;
+}
+
+
+
+/**** Tkapp Object ****/
+
+#ifndef WITH_APPINIT
+int
+Tcl_AppInit(Tcl_Interp *interp)
+{
+ Tk_Window main;
+
+ main = Tk_MainWindow(interp);
+ if (Tcl_Init(interp) == TCL_ERROR) {
+ PySys_WriteStderr("Tcl_Init error: %s\n", Tcl_GetStringResult(interp));
+ return TCL_ERROR;
+ }
+ if (Tk_Init(interp) == TCL_ERROR) {
+ PySys_WriteStderr("Tk_Init error: %s\n", Tcl_GetStringResult(interp));
+ return TCL_ERROR;
+ }
+#ifdef WITH_TIX
+ if (Tix_Init(interp) == TCL_ERROR) {
+ PySys_WriteStderr("Tix_Init error: %s\n", Tcl_GetStringResult(interp));
+ return TCL_ERROR;
+ }
+#endif
+ return TCL_OK;
+}
+#endif /* !WITH_APPINIT */
+
+
+
+
+/* Initialize the Tk application; see the `main' function in
+ * `tkMain.c'.
+ */
+
+static void EnableEventHook(void); /* Forward */
+static void DisableEventHook(void); /* Forward */
+
+static TkappObject *
+Tkapp_New(char *screenName, char *baseName, char *className, int interactive)
+{
+ TkappObject *v;
+ char *argv0;
+
+ v = PyObject_New(TkappObject, &Tkapp_Type);
+ if (v == NULL)
+ return NULL;
+
+ v->interp = Tcl_CreateInterp();
+
+#if defined(macintosh)
+ /* This seems to be needed */
+ ClearMenuBar();
+ TkMacInitMenus(v->interp);
+#endif
+ /* Delete the 'exit' command, which can screw things up */
+ Tcl_DeleteCommand(v->interp, "exit");
+
+ if (screenName != NULL)
+ Tcl_SetVar2(v->interp, "env", "DISPLAY",
+ screenName, TCL_GLOBAL_ONLY);
+
+ if (interactive)
+ Tcl_SetVar(v->interp, "tcl_interactive", "1", TCL_GLOBAL_ONLY);
+ else
+ Tcl_SetVar(v->interp, "tcl_interactive", "0", TCL_GLOBAL_ONLY);
+
+ /* This is used to get the application class for Tk 4.1 and up */
+ argv0 = (char*)ckalloc(strlen(className) + 1);
+ if (!argv0) {
+ PyErr_NoMemory();
+ Py_DECREF(v);
+ return NULL;
+ }
+
+ strcpy(argv0, className);
+ if (isupper((int)(argv0[0])))
+ argv0[0] = tolower(argv0[0]);
+ Tcl_SetVar(v->interp, "argv0", argv0, TCL_GLOBAL_ONLY);
+ ckfree(argv0);
+
+ if (Tcl_AppInit(v->interp) != TCL_OK)
+ return (TkappObject *)Tkinter_Error((PyObject *)v);
+
+ EnableEventHook();
+
+ return v;
+}
+
+
+
+/** Tcl Eval **/
+
+#if TKMAJORMINOR >= 8001
+#define USING_OBJECTS
+#endif
+
+#ifdef USING_OBJECTS
+
+static Tcl_Obj*
+AsObj(PyObject *value)
+{
+ Tcl_Obj *result;
+
+ if (PyString_Check(value))
+ return Tcl_NewStringObj(PyString_AS_STRING(value),
+ PyString_GET_SIZE(value));
+ else if (PyInt_Check(value))
+ return Tcl_NewLongObj(PyInt_AS_LONG(value));
+ else if (PyFloat_Check(value))
+ return Tcl_NewDoubleObj(PyFloat_AS_DOUBLE(value));
+ else if (PyTuple_Check(value)) {
+ Tcl_Obj **argv = (Tcl_Obj**)
+ ckalloc(PyTuple_Size(value)*sizeof(Tcl_Obj*));
+ int i;
+ if(!argv)
+ return 0;
+ for(i=0;i<PyTuple_Size(value);i++)
+ argv[i] = AsObj(PyTuple_GetItem(value,i));
+ result = Tcl_NewListObj(PyTuple_Size(value), argv);
+ ckfree(FREECAST argv);
+ return result;
+ }
+ else if (PyUnicode_Check(value)) {
+#if TKMAJORMINOR <= 8001
+ /* In Tcl 8.1 we must use UTF-8 */
+ PyObject* utf8 = PyUnicode_AsUTF8String(value);
+ if (!utf8)
+ return 0;
+ result = Tcl_NewStringObj(PyString_AS_STRING(utf8),
+ PyString_GET_SIZE(utf8));
+ Py_DECREF(utf8);
+ return result;
+#else /* TKMAJORMINOR > 8001 */
+ /* In Tcl 8.2 and later, use Tcl_NewUnicodeObj() */
+ if (sizeof(Py_UNICODE) != sizeof(Tcl_UniChar)) {
+ /* XXX Should really test this at compile time */
+ PyErr_SetString(PyExc_SystemError,
+ "Py_UNICODE and Tcl_UniChar differ in size");
+ return 0;
+ }
+ return Tcl_NewUnicodeObj(PyUnicode_AS_UNICODE(value),
+ PyUnicode_GET_SIZE(value));
+#endif /* TKMAJORMINOR > 8001 */
+ }
+ else {
+ PyObject *v = PyObject_Str(value);
+ if (!v)
+ return 0;
+ result = AsObj(v);
+ Py_DECREF(v);
+ return result;
+ }
+}
+
+static PyObject *
+Tkapp_Call(PyObject *self, PyObject *args)
+{
+ Tcl_Obj *objStore[ARGSZ];
+ Tcl_Obj **objv = NULL;
+ int objc = 0, i;
+ PyObject *res = NULL;
+ Tcl_Interp *interp = Tkapp_Interp(self);
+ /* Could add TCL_EVAL_GLOBAL if wrapped by GlobalCall... */
+ int flags = TCL_EVAL_DIRECT;
+
+ objv = objStore;
+
+ if (args == NULL)
+ objc = 0;
+
+ else if (!PyTuple_Check(args)) {
+ objc = 1;
+ objv[0] = AsObj(args);
+ if (objv[0] == 0)
+ goto finally;
+ Tcl_IncrRefCount(objv[0]);
+ }
+ else {
+ objc = PyTuple_Size(args);
+
+ if (objc > ARGSZ) {
+ objv = (Tcl_Obj **)ckalloc(objc * sizeof(char *));
+ if (objv == NULL) {
+ PyErr_NoMemory();
+ goto finally;
+ }
+ }
+
+ for (i = 0; i < objc; i++) {
+ PyObject *v = PyTuple_GetItem(args, i);
+ if (v == Py_None) {
+ objc = i;
+ break;
+ }
+ objv[i] = AsObj(v);
+ if (!objv[i])
+ goto finally;
+ Tcl_IncrRefCount(objv[i]);
+ }
+ }
+
+ ENTER_TCL
+
+ i = Tcl_EvalObjv(interp, objc, objv, flags);
+
+ ENTER_OVERLAP
+ if (i == TCL_ERROR)
+ Tkinter_Error(self);
+ else {
+ /* We could request the object result here, but doing
+ so would confuse applications that expect a string. */
+ char *s = Tcl_GetStringResult(interp);
+ char *p = s;
+ /* If the result contains any bytes with the top bit set,
+ it's UTF-8 and we should decode it to Unicode */
+ while (*p != '\0') {
+ if (*p & 0x80)
+ break;
+ p++;
+ }
+ if (*p == '\0')
+ res = PyString_FromStringAndSize(s, (int)(p-s));
+ else {
+ /* Convert UTF-8 to Unicode string */
+ p = strchr(p, '\0');
+ res = PyUnicode_DecodeUTF8(s, (int)(p-s), "strict");
+ if (res == NULL) {
+ PyErr_Clear();
+ res = PyString_FromStringAndSize(s, (int)(p-s));
+ }
+ }
+ }
+
+ LEAVE_OVERLAP_TCL
+
+ finally:
+ for (i = 0; i < objc; i++)
+ Tcl_DecrRefCount(objv[i]);
+ if (objv != objStore)
+ ckfree(FREECAST objv);
+ return res;
+}
+
+#else /* !USING_OBJECTS */
+
+static PyObject *
+Tkapp_Call(PyObject *self, PyObject *args)
+{
+ /* This is copied from Merge() */
+ PyObject *tmp = NULL;
+ char *argvStore[ARGSZ];
+ char **argv = NULL;
+ int fvStore[ARGSZ];
+ int *fv = NULL;
+ int argc = 0, fvc = 0, i;
+ PyObject *res = NULL; /* except this has a different type */
+ Tcl_CmdInfo info; /* and this is added */
+ Tcl_Interp *interp = Tkapp_Interp(self); /* and this too */
+
+ if (!(tmp = PyList_New(0)))
+ return NULL;
+
+ argv = argvStore;
+ fv = fvStore;
+
+ if (args == NULL)
+ argc = 0;
+
+ else if (!PyTuple_Check(args)) {
+ argc = 1;
+ fv[0] = 0;
+ if (!(argv[0] = AsString(args, tmp)))
+ goto finally;
+ }
+ else {
+ argc = PyTuple_Size(args);
+
+ if (argc > ARGSZ) {
+ argv = (char **)ckalloc(argc * sizeof(char *));
+ fv = (int *)ckalloc(argc * sizeof(int));
+ if (argv == NULL || fv == NULL) {
+ PyErr_NoMemory();
+ goto finally;
+ }
+ }
+
+ for (i = 0; i < argc; i++) {
+ PyObject *v = PyTuple_GetItem(args, i);
+ if (PyTuple_Check(v)) {
+ fv[i] = 1;
+ if (!(argv[i] = Merge(v)))
+ goto finally;
+ fvc++;
+ }
+ else if (v == Py_None) {
+ argc = i;
+ break;
+ }
+ else {
+ fv[i] = 0;
+ if (!(argv[i] = AsString(v, tmp)))
+ goto finally;
+ fvc++;
+ }
+ }
+ }
+ /* End code copied from Merge() */
+
+ /* All this to avoid a call to Tcl_Merge() and the corresponding call
+ to Tcl_SplitList() inside Tcl_Eval()... It can save a bundle! */
+ if (Py_VerboseFlag >= 2) {
+ for (i = 0; i < argc; i++)
+ PySys_WriteStderr("%s ", argv[i]);
+ }
+ ENTER_TCL
+ info.proc = NULL;
+ if (argc < 1 ||
+ !Tcl_GetCommandInfo(interp, argv[0], &info) ||
+ info.proc == NULL)
+ {
+ char *cmd;
+ cmd = Tcl_Merge(argc, argv);
+ i = Tcl_Eval(interp, cmd);
+ ckfree(cmd);
+ }
+ else {
+ Tcl_ResetResult(interp);
+ i = (*info.proc)(info.clientData, interp, argc, argv);
+ }
+ ENTER_OVERLAP
+ if (info.proc == NULL && Py_VerboseFlag >= 2)
+ PySys_WriteStderr("... use TclEval ");
+ if (i == TCL_ERROR) {
+ if (Py_VerboseFlag >= 2)
+ PySys_WriteStderr("... error: '%s'\n",
+ Tcl_GetStringResult(interp));
+ Tkinter_Error(self);
+ }
+ else {
+ if (Py_VerboseFlag >= 2)
+ PySys_WriteStderr("-> '%s'\n", Tcl_GetStringResult(interp));
+ res = PyString_FromString(Tcl_GetStringResult(interp));
+ }
+ LEAVE_OVERLAP_TCL
+
+ /* Copied from Merge() again */
+ finally:
+ for (i = 0; i < fvc; i++)
+ if (fv[i]) {
+ ckfree(argv[i]);
+ }
+ if (argv != argvStore)
+ ckfree(FREECAST argv);
+ if (fv != fvStore)
+ ckfree(FREECAST fv);
+
+ Py_DECREF(tmp);
+ return res;
+}
+
+#endif /* !USING_OBJECTS */
+
+static PyObject *
+Tkapp_GlobalCall(PyObject *self, PyObject *args)
+{
+ /* Could do the same here as for Tkapp_Call(), but this is not used
+ much, so I can't be bothered. Unfortunately Tcl doesn't export a
+ way for the user to do what all its Global* variants do (save and
+ reset the scope pointer, call the local version, restore the saved
+ scope pointer). */
+
+ char *cmd;
+ PyObject *res = NULL;
+
+ cmd = Merge(args);
+ if (cmd) {
+ int err;
+ ENTER_TCL
+ err = Tcl_GlobalEval(Tkapp_Interp(self), cmd);
+ ENTER_OVERLAP
+ if (err == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = PyString_FromString(Tkapp_Result(self));
+ LEAVE_OVERLAP_TCL
+ ckfree(cmd);
+ }
+
+ return res;
+}
+
+static PyObject *
+Tkapp_Eval(PyObject *self, PyObject *args)
+{
+ char *script;
+ PyObject *res = NULL;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "s:eval", &script))
+ return NULL;
+
+ ENTER_TCL
+ err = Tcl_Eval(Tkapp_Interp(self), script);
+ ENTER_OVERLAP
+ if (err == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = PyString_FromString(Tkapp_Result(self));
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_GlobalEval(PyObject *self, PyObject *args)
+{
+ char *script;
+ PyObject *res = NULL;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "s:globaleval", &script))
+ return NULL;
+
+ ENTER_TCL
+ err = Tcl_GlobalEval(Tkapp_Interp(self), script);
+ ENTER_OVERLAP
+ if (err == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = PyString_FromString(Tkapp_Result(self));
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_EvalFile(PyObject *self, PyObject *args)
+{
+ char *fileName;
+ PyObject *res = NULL;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "s:evalfile", &fileName))
+ return NULL;
+
+ ENTER_TCL
+ err = Tcl_EvalFile(Tkapp_Interp(self), fileName);
+ ENTER_OVERLAP
+ if (err == TCL_ERROR)
+ res = Tkinter_Error(self);
+
+ else
+ res = PyString_FromString(Tkapp_Result(self));
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_Record(PyObject *self, PyObject *args)
+{
+ char *script;
+ PyObject *res = NULL;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "s", &script))
+ return NULL;
+
+ ENTER_TCL
+ err = Tcl_RecordAndEval(Tkapp_Interp(self), script, TCL_NO_EVAL);
+ ENTER_OVERLAP
+ if (err == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = PyString_FromString(Tkapp_Result(self));
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_AddErrorInfo(PyObject *self, PyObject *args)
+{
+ char *msg;
+
+ if (!PyArg_ParseTuple(args, "s:adderrorinfo", &msg))
+ return NULL;
+ ENTER_TCL
+ Tcl_AddErrorInfo(Tkapp_Interp(self), msg);
+ LEAVE_TCL
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+
+/** Tcl Variable **/
+
+static PyObject *
+SetVar(PyObject *self, PyObject *args, int flags)
+{
+ char *name1, *name2, *ok, *s;
+ PyObject *newValue;
+ PyObject *tmp;
+
+ tmp = PyList_New(0);
+ if (!tmp)
+ return NULL;
+
+ if (PyArg_ParseTuple(args, "sO:setvar", &name1, &newValue)) {
+ /* XXX Merge? */
+ s = AsString(newValue, tmp);
+ if (s == NULL)
+ return NULL;
+ ENTER_TCL
+ ok = Tcl_SetVar(Tkapp_Interp(self), name1, s, flags);
+ LEAVE_TCL
+ }
+ else {
+ PyErr_Clear();
+ if (PyArg_ParseTuple(args, "ssO:setvar",
+ &name1, &name2, &newValue)) {
+ s = AsString(newValue, tmp);
+ if (s == NULL)
+ return NULL;
+ ENTER_TCL
+ ok = Tcl_SetVar2(Tkapp_Interp(self), name1, name2,
+ s, flags);
+ LEAVE_TCL
+ }
+ else {
+ Py_DECREF(tmp);
+ return NULL;
+ }
+ }
+ Py_DECREF(tmp);
+
+ if (!ok)
+ return Tkinter_Error(self);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+Tkapp_SetVar(PyObject *self, PyObject *args)
+{
+ return SetVar(self, args, TCL_LEAVE_ERR_MSG);
+}
+
+static PyObject *
+Tkapp_GlobalSetVar(PyObject *self, PyObject *args)
+{
+ return SetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY);
+}
+
+
+
+static PyObject *
+GetVar(PyObject *self, PyObject *args, int flags)
+{
+ char *name1, *name2=NULL, *s;
+ PyObject *res = NULL;
+
+ if (!PyArg_ParseTuple(args, "s|s:getvar", &name1, &name2))
+ return NULL;
+ ENTER_TCL
+ if (name2 == NULL)
+ s = Tcl_GetVar(Tkapp_Interp(self), name1, flags);
+
+ else
+ s = Tcl_GetVar2(Tkapp_Interp(self), name1, name2, flags);
+ ENTER_OVERLAP
+
+ if (s == NULL)
+ res = Tkinter_Error(self);
+ else
+ res = PyString_FromString(s);
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_GetVar(PyObject *self, PyObject *args)
+{
+ return GetVar(self, args, TCL_LEAVE_ERR_MSG);
+}
+
+static PyObject *
+Tkapp_GlobalGetVar(PyObject *self, PyObject *args)
+{
+ return GetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY);
+}
+
+
+
+static PyObject *
+UnsetVar(PyObject *self, PyObject *args, int flags)
+{
+ char *name1, *name2=NULL;
+ PyObject *res = NULL;
+ int code;
+
+ if (!PyArg_ParseTuple(args, "s|s:unsetvar", &name1, &name2))
+ return NULL;
+ ENTER_TCL
+ if (name2 == NULL)
+ code = Tcl_UnsetVar(Tkapp_Interp(self), name1, flags);
+
+ else
+ code = Tcl_UnsetVar2(Tkapp_Interp(self), name1, name2, flags);
+ ENTER_OVERLAP
+
+ if (code == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else {
+ Py_INCREF(Py_None);
+ res = Py_None;
+ }
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_UnsetVar(PyObject *self, PyObject *args)
+{
+ return UnsetVar(self, args, TCL_LEAVE_ERR_MSG);
+}
+
+static PyObject *
+Tkapp_GlobalUnsetVar(PyObject *self, PyObject *args)
+{
+ return UnsetVar(self, args, TCL_LEAVE_ERR_MSG | TCL_GLOBAL_ONLY);
+}
+
+
+
+/** Tcl to Python **/
+
+static PyObject *
+Tkapp_GetInt(PyObject *self, PyObject *args)
+{
+ char *s;
+ int v;
+
+ if (!PyArg_ParseTuple(args, "s:getint", &s))
+ return NULL;
+ if (Tcl_GetInt(Tkapp_Interp(self), s, &v) == TCL_ERROR)
+ return Tkinter_Error(self);
+ return Py_BuildValue("i", v);
+}
+
+static PyObject *
+Tkapp_GetDouble(PyObject *self, PyObject *args)
+{
+ char *s;
+ double v;
+
+ if (!PyArg_ParseTuple(args, "s:getdouble", &s))
+ return NULL;
+ if (Tcl_GetDouble(Tkapp_Interp(self), s, &v) == TCL_ERROR)
+ return Tkinter_Error(self);
+ return Py_BuildValue("d", v);
+}
+
+static PyObject *
+Tkapp_GetBoolean(PyObject *self, PyObject *args)
+{
+ char *s;
+ int v;
+
+ if (!PyArg_ParseTuple(args, "s:getboolean", &s))
+ return NULL;
+ if (Tcl_GetBoolean(Tkapp_Interp(self), s, &v) == TCL_ERROR)
+ return Tkinter_Error(self);
+ return Py_BuildValue("i", v);
+}
+
+static PyObject *
+Tkapp_ExprString(PyObject *self, PyObject *args)
+{
+ char *s;
+ PyObject *res = NULL;
+ int retval;
+
+ if (!PyArg_ParseTuple(args, "s:exprstring", &s))
+ return NULL;
+ ENTER_TCL
+ retval = Tcl_ExprString(Tkapp_Interp(self), s);
+ ENTER_OVERLAP
+ if (retval == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = Py_BuildValue("s", Tkapp_Result(self));
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_ExprLong(PyObject *self, PyObject *args)
+{
+ char *s;
+ PyObject *res = NULL;
+ int retval;
+ long v;
+
+ if (!PyArg_ParseTuple(args, "s:exprlong", &s))
+ return NULL;
+ ENTER_TCL
+ retval = Tcl_ExprLong(Tkapp_Interp(self), s, &v);
+ ENTER_OVERLAP
+ if (retval == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = Py_BuildValue("l", v);
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_ExprDouble(PyObject *self, PyObject *args)
+{
+ char *s;
+ PyObject *res = NULL;
+ double v;
+ int retval;
+
+ if (!PyArg_ParseTuple(args, "s:exprdouble", &s))
+ return NULL;
+ PyFPE_START_PROTECT("Tkapp_ExprDouble", return 0)
+ ENTER_TCL
+ retval = Tcl_ExprDouble(Tkapp_Interp(self), s, &v);
+ ENTER_OVERLAP
+ PyFPE_END_PROTECT(retval)
+ if (retval == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = Py_BuildValue("d", v);
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+static PyObject *
+Tkapp_ExprBoolean(PyObject *self, PyObject *args)
+{
+ char *s;
+ PyObject *res = NULL;
+ int retval;
+ int v;
+
+ if (!PyArg_ParseTuple(args, "s:exprboolean", &s))
+ return NULL;
+ ENTER_TCL
+ retval = Tcl_ExprBoolean(Tkapp_Interp(self), s, &v);
+ ENTER_OVERLAP
+ if (retval == TCL_ERROR)
+ res = Tkinter_Error(self);
+ else
+ res = Py_BuildValue("i", v);
+ LEAVE_OVERLAP_TCL
+ return res;
+}
+
+
+
+static PyObject *
+Tkapp_SplitList(PyObject *self, PyObject *args)
+{
+ char *list;
+ int argc;
+ char **argv;
+ PyObject *v;
+ int i;
+
+ if (!PyArg_ParseTuple(args, "s:splitlist", &list))
+ return NULL;
+
+ if (Tcl_SplitList(Tkapp_Interp(self), list, &argc, &argv) == TCL_ERROR)
+ return Tkinter_Error(self);
+
+ if (!(v = PyTuple_New(argc)))
+ return NULL;
+
+ for (i = 0; i < argc; i++) {
+ PyObject *s = PyString_FromString(argv[i]);
+ if (!s || PyTuple_SetItem(v, i, s)) {
+ Py_DECREF(v);
+ v = NULL;
+ goto finally;
+ }
+ }
+
+ finally:
+ ckfree(FREECAST argv);
+ return v;
+}
+
+static PyObject *
+Tkapp_Split(PyObject *self, PyObject *args)
+{
+ char *list;
+
+ if (!PyArg_ParseTuple(args, "s:split", &list))
+ return NULL;
+ return Split(list);
+}
+
+static PyObject *
+Tkapp_Merge(PyObject *self, PyObject *args)
+{
+ char *s = Merge(args);
+ PyObject *res = NULL;
+
+ if (s) {
+ res = PyString_FromString(s);
+ ckfree(s);
+ }
+
+ return res;
+}
+
+
+
+/** Tcl Command **/
+
+/* Client data struct */
+typedef struct {
+ PyObject *self;
+ PyObject *func;
+} PythonCmd_ClientData;
+
+static int
+PythonCmd_Error(Tcl_Interp *interp)
+{
+ errorInCmd = 1;
+ PyErr_Fetch(&excInCmd, &valInCmd, &trbInCmd);
+ LEAVE_PYTHON
+ return TCL_ERROR;
+}
+
+/* This is the Tcl command that acts as a wrapper for Python
+ * function or method.
+ */
+static int
+PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[])
+{
+ PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData;
+ PyObject *self, *func, *arg, *res, *tmp;
+ int i, rv;
+ char *s;
+
+ ENTER_PYTHON
+
+ /* TBD: no error checking here since we know, via the
+ * Tkapp_CreateCommand() that the client data is a two-tuple
+ */
+ self = data->self;
+ func = data->func;
+
+ /* Create argument list (argv1, ..., argvN) */
+ if (!(arg = PyTuple_New(argc - 1)))
+ return PythonCmd_Error(interp);
+
+ for (i = 0; i < (argc - 1); i++) {
+ PyObject *s = PyString_FromString(argv[i + 1]);
+ if (!s || PyTuple_SetItem(arg, i, s)) {
+ Py_DECREF(arg);
+ return PythonCmd_Error(interp);
+ }
+ }
+ res = PyEval_CallObject(func, arg);
+ Py_DECREF(arg);
+
+ if (res == NULL)
+ return PythonCmd_Error(interp);
+
+ if (!(tmp = PyList_New(0))) {
+ Py_DECREF(res);
+ return PythonCmd_Error(interp);
+ }
+
+ s = AsString(res, tmp);
+ if (s == NULL) {
+ rv = PythonCmd_Error(interp);
+ }
+ else {
+ Tcl_SetResult(Tkapp_Interp(self), s, TCL_VOLATILE);
+ rv = TCL_OK;
+ }
+
+ Py_DECREF(res);
+ Py_DECREF(tmp);
+
+ LEAVE_PYTHON
+
+ return rv;
+}
+
+static void
+PythonCmdDelete(ClientData clientData)
+{
+ PythonCmd_ClientData *data = (PythonCmd_ClientData *)clientData;
+
+ ENTER_PYTHON
+ Py_XDECREF(data->self);
+ Py_XDECREF(data->func);
+ PyMem_DEL(data);
+ LEAVE_PYTHON
+}
+
+
+
+static PyObject *
+Tkapp_CreateCommand(PyObject *self, PyObject *args)
+{
+ PythonCmd_ClientData *data;
+ char *cmdName;
+ PyObject *func;
+ Tcl_Command err;
+
+ if (!PyArg_ParseTuple(args, "sO:createcommand", &cmdName, &func))
+ return NULL;
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError, "command not callable");
+ return NULL;
+ }
+
+ data = PyMem_NEW(PythonCmd_ClientData, 1);
+ if (!data)
+ return NULL;
+ Py_XINCREF(self);
+ Py_XINCREF(func);
+ data->self = self;
+ data->func = func;
+
+ ENTER_TCL
+ err = Tcl_CreateCommand(Tkapp_Interp(self), cmdName, PythonCmd,
+ (ClientData)data, PythonCmdDelete);
+ LEAVE_TCL
+ if (err == NULL) {
+ PyErr_SetString(Tkinter_TclError, "can't create Tcl command");
+ PyMem_DEL(data);
+ return NULL;
+ }
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+
+static PyObject *
+Tkapp_DeleteCommand(PyObject *self, PyObject *args)
+{
+ char *cmdName;
+ int err;
+
+ if (!PyArg_ParseTuple(args, "s:deletecommand", &cmdName))
+ return NULL;
+ ENTER_TCL
+ err = Tcl_DeleteCommand(Tkapp_Interp(self), cmdName);
+ LEAVE_TCL
+ if (err == -1) {
+ PyErr_SetString(Tkinter_TclError, "can't delete Tcl command");
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+
+#ifdef HAVE_CREATEFILEHANDLER
+/** File Handler **/
+
+typedef struct _fhcdata {
+ PyObject *func;
+ PyObject *file;
+ int id;
+ struct _fhcdata *next;
+} FileHandler_ClientData;
+
+static FileHandler_ClientData *HeadFHCD;
+
+static FileHandler_ClientData *
+NewFHCD(PyObject *func, PyObject *file, int id)
+{
+ FileHandler_ClientData *p;
+ p = PyMem_NEW(FileHandler_ClientData, 1);
+ if (p != NULL) {
+ Py_XINCREF(func);
+ Py_XINCREF(file);
+ p->func = func;
+ p->file = file;
+ p->id = id;
+ p->next = HeadFHCD;
+ HeadFHCD = p;
+ }
+ return p;
+}
+
+static void
+DeleteFHCD(int id)
+{
+ FileHandler_ClientData *p, **pp;
+
+ pp = &HeadFHCD;
+ while ((p = *pp) != NULL) {
+ if (p->id == id) {
+ *pp = p->next;
+ Py_XDECREF(p->func);
+ Py_XDECREF(p->file);
+ PyMem_DEL(p);
+ }
+ else
+ pp = &p->next;
+ }
+}
+
+static void
+FileHandler(ClientData clientData, int mask)
+{
+ FileHandler_ClientData *data = (FileHandler_ClientData *)clientData;
+ PyObject *func, *file, *arg, *res;
+
+ ENTER_PYTHON
+ func = data->func;
+ file = data->file;
+
+ arg = Py_BuildValue("(Oi)", file, (long) mask);
+ res = PyEval_CallObject(func, arg);
+ Py_DECREF(arg);
+
+ if (res == NULL) {
+ errorInCmd = 1;
+ PyErr_Fetch(&excInCmd, &valInCmd, &trbInCmd);
+ }
+ Py_XDECREF(res);
+ LEAVE_PYTHON
+}
+
+static PyObject *
+Tkapp_CreateFileHandler(PyObject *self, PyObject *args)
+ /* args is (file, mask, func) */
+{
+ FileHandler_ClientData *data;
+ PyObject *file, *func;
+ int mask, tfile;
+
+ if (!PyArg_ParseTuple(args, "OiO:createfilehandler",
+ &file, &mask, &func))
+ return NULL;
+ tfile = PyObject_AsFileDescriptor(file);
+ if (tfile < 0)
+ return NULL;
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError, "bad argument list");
+ return NULL;
+ }
+
+ data = NewFHCD(func, file, tfile);
+ if (data == NULL)
+ return NULL;
+
+ /* Ought to check for null Tcl_File object... */
+ ENTER_TCL
+ Tcl_CreateFileHandler(tfile, mask, FileHandler, (ClientData) data);
+ LEAVE_TCL
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+Tkapp_DeleteFileHandler(PyObject *self, PyObject *args)
+{
+ PyObject *file;
+ int tfile;
+
+ if (!PyArg_ParseTuple(args, "O:deletefilehandler", &file))
+ return NULL;
+ tfile = PyObject_AsFileDescriptor(file);
+ if (tfile < 0)
+ return NULL;
+
+ DeleteFHCD(tfile);
+
+ /* Ought to check for null Tcl_File object... */
+ ENTER_TCL
+ Tcl_DeleteFileHandler(tfile);
+ LEAVE_TCL
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+#endif /* HAVE_CREATEFILEHANDLER */
+
+
+/**** Tktt Object (timer token) ****/
+
+staticforward PyTypeObject Tktt_Type;
+
+typedef struct {
+ PyObject_HEAD
+ Tcl_TimerToken token;
+ PyObject *func;
+} TkttObject;
+
+static PyObject *
+Tktt_DeleteTimerHandler(PyObject *self, PyObject *args)
+{
+ TkttObject *v = (TkttObject *)self;
+ PyObject *func = v->func;
+
+ if (!PyArg_ParseTuple(args, ":deletetimerhandler"))
+ return NULL;
+ if (v->token != NULL) {
+ Tcl_DeleteTimerHandler(v->token);
+ v->token = NULL;
+ }
+ if (func != NULL) {
+ v->func = NULL;
+ Py_DECREF(func);
+ Py_DECREF(v); /* See Tktt_New() */
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyMethodDef Tktt_methods[] =
+{
+ {"deletetimerhandler", Tktt_DeleteTimerHandler, 1},
+ {NULL, NULL}
+};
+
+static TkttObject *
+Tktt_New(PyObject *func)
+{
+ TkttObject *v;
+
+ v = PyObject_New(TkttObject, &Tktt_Type);
+ if (v == NULL)
+ return NULL;
+
+ Py_INCREF(func);
+ v->token = NULL;
+ v->func = func;
+
+ /* Extra reference, deleted when called or when handler is deleted */
+ Py_INCREF(v);
+ return v;
+}
+
+static void
+Tktt_Dealloc(PyObject *self)
+{
+ TkttObject *v = (TkttObject *)self;
+ PyObject *func = v->func;
+
+ Py_XDECREF(func);
+
+ PyObject_Del(self);
+}
+
+static PyObject *
+Tktt_Repr(PyObject *self)
+{
+ TkttObject *v = (TkttObject *)self;
+ char buf[100];
+
+ sprintf(buf, "<tktimertoken at %p%s>", v,
+ v->func == NULL ? ", handler deleted" : "");
+ return PyString_FromString(buf);
+}
+
+static PyObject *
+Tktt_GetAttr(PyObject *self, char *name)
+{
+ return Py_FindMethod(Tktt_methods, self, name);
+}
+
+static PyTypeObject Tktt_Type =
+{
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size */
+ "tktimertoken", /*tp_name */
+ sizeof(TkttObject), /*tp_basicsize */
+ 0, /*tp_itemsize */
+ Tktt_Dealloc, /*tp_dealloc */
+ 0, /*tp_print */
+ Tktt_GetAttr, /*tp_getattr */
+ 0, /*tp_setattr */
+ 0, /*tp_compare */
+ Tktt_Repr, /*tp_repr */
+ 0, /*tp_as_number */
+ 0, /*tp_as_sequence */
+ 0, /*tp_as_mapping */
+ 0, /*tp_hash */
+};
+
+
+
+/** Timer Handler **/
+
+static void
+TimerHandler(ClientData clientData)
+{
+ TkttObject *v = (TkttObject *)clientData;
+ PyObject *func = v->func;
+ PyObject *res;
+
+ if (func == NULL)
+ return;
+
+ v->func = NULL;
+
+ ENTER_PYTHON
+
+ res = PyEval_CallObject(func, NULL);
+ Py_DECREF(func);
+ Py_DECREF(v); /* See Tktt_New() */
+
+ if (res == NULL) {
+ errorInCmd = 1;
+ PyErr_Fetch(&excInCmd, &valInCmd, &trbInCmd);
+ }
+ else
+ Py_DECREF(res);
+
+ LEAVE_PYTHON
+}
+
+static PyObject *
+Tkapp_CreateTimerHandler(PyObject *self, PyObject *args)
+{
+ int milliseconds;
+ PyObject *func;
+ TkttObject *v;
+
+ if (!PyArg_ParseTuple(args, "iO:createtimerhandler",
+ &milliseconds, &func))
+ return NULL;
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError, "bad argument list");
+ return NULL;
+ }
+ v = Tktt_New(func);
+ v->token = Tcl_CreateTimerHandler(milliseconds, TimerHandler,
+ (ClientData)v);
+
+ return (PyObject *) v;
+}
+
+
+/** Event Loop **/
+
+static PyObject *
+Tkapp_MainLoop(PyObject *self, PyObject *args)
+{
+ int threshold = 0;
+#ifdef WITH_THREAD
+ PyThreadState *tstate = PyThreadState_Get();
+#endif
+
+ if (!PyArg_ParseTuple(args, "|i:mainloop", &threshold))
+ return NULL;
+
+ quitMainLoop = 0;
+ while (Tk_GetNumMainWindows() > threshold &&
+ !quitMainLoop &&
+ !errorInCmd)
+ {
+ int result;
+
+#ifdef WITH_THREAD
+ Py_BEGIN_ALLOW_THREADS
+ PyThread_acquire_lock(tcl_lock, 1);
+ tcl_tstate = tstate;
+ result = Tcl_DoOneEvent(TCL_DONT_WAIT);
+ tcl_tstate = NULL;
+ PyThread_release_lock(tcl_lock);
+ if (result == 0)
+ Sleep(20);
+ Py_END_ALLOW_THREADS
+#else
+ result = Tcl_DoOneEvent(0);
+#endif
+
+ if (PyErr_CheckSignals() != 0)
+ return NULL;
+ if (result < 0)
+ break;
+ }
+ quitMainLoop = 0;
+
+ if (errorInCmd) {
+ errorInCmd = 0;
+ PyErr_Restore(excInCmd, valInCmd, trbInCmd);
+ excInCmd = valInCmd = trbInCmd = NULL;
+ return NULL;
+ }
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+Tkapp_DoOneEvent(PyObject *self, PyObject *args)
+{
+ int flags = 0;
+ int rv;
+
+ if (!PyArg_ParseTuple(args, "|i:dooneevent", &flags))
+ return NULL;
+
+ ENTER_TCL
+ rv = Tcl_DoOneEvent(flags);
+ LEAVE_TCL
+ return Py_BuildValue("i", rv);
+}
+
+static PyObject *
+Tkapp_Quit(PyObject *self, PyObject *args)
+{
+
+ if (!PyArg_ParseTuple(args, ":quit"))
+ return NULL;
+
+ quitMainLoop = 1;
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+Tkapp_InterpAddr(PyObject *self, PyObject *args)
+{
+
+ if (!PyArg_ParseTuple(args, ":interpaddr"))
+ return NULL;
+
+ return PyInt_FromLong((long)Tkapp_Interp(self));
+}
+
+
+
+/**** Tkapp Method List ****/
+
+static PyMethodDef Tkapp_methods[] =
+{
+ {"call", Tkapp_Call, 0},
+ {"globalcall", Tkapp_GlobalCall, 0},
+ {"eval", Tkapp_Eval, 1},
+ {"globaleval", Tkapp_GlobalEval, 1},
+ {"evalfile", Tkapp_EvalFile, 1},
+ {"record", Tkapp_Record, 1},
+ {"adderrorinfo", Tkapp_AddErrorInfo, 1},
+ {"setvar", Tkapp_SetVar, 1},
+ {"globalsetvar", Tkapp_GlobalSetVar, 1},
+ {"getvar", Tkapp_GetVar, 1},
+ {"globalgetvar", Tkapp_GlobalGetVar, 1},
+ {"unsetvar", Tkapp_UnsetVar, 1},
+ {"globalunsetvar", Tkapp_GlobalUnsetVar, 1},
+ {"getint", Tkapp_GetInt, 1},
+ {"getdouble", Tkapp_GetDouble, 1},
+ {"getboolean", Tkapp_GetBoolean, 1},
+ {"exprstring", Tkapp_ExprString, 1},
+ {"exprlong", Tkapp_ExprLong, 1},
+ {"exprdouble", Tkapp_ExprDouble, 1},
+ {"exprboolean", Tkapp_ExprBoolean, 1},
+ {"splitlist", Tkapp_SplitList, 1},
+ {"split", Tkapp_Split, 1},
+ {"merge", Tkapp_Merge, 0},
+ {"createcommand", Tkapp_CreateCommand, 1},
+ {"deletecommand", Tkapp_DeleteCommand, 1},
+#ifdef HAVE_CREATEFILEHANDLER
+ {"createfilehandler", Tkapp_CreateFileHandler, 1},
+ {"deletefilehandler", Tkapp_DeleteFileHandler, 1},
+#endif
+ {"createtimerhandler", Tkapp_CreateTimerHandler, 1},
+ {"mainloop", Tkapp_MainLoop, 1},
+ {"dooneevent", Tkapp_DoOneEvent, 1},
+ {"quit", Tkapp_Quit, 1},
+ {"interpaddr", Tkapp_InterpAddr, 1},
+ {NULL, NULL}
+};
+
+
+
+/**** Tkapp Type Methods ****/
+
+static void
+Tkapp_Dealloc(PyObject *self)
+{
+ ENTER_TCL
+ Tcl_DeleteInterp(Tkapp_Interp(self));
+ LEAVE_TCL
+ PyObject_Del(self);
+ DisableEventHook();
+}
+
+static PyObject *
+Tkapp_GetAttr(PyObject *self, char *name)
+{
+ return Py_FindMethod(Tkapp_methods, self, name);
+}
+
+static PyTypeObject Tkapp_Type =
+{
+ PyObject_HEAD_INIT(NULL)
+ 0, /*ob_size */
+ "tkapp", /*tp_name */
+ sizeof(TkappObject), /*tp_basicsize */
+ 0, /*tp_itemsize */
+ Tkapp_Dealloc, /*tp_dealloc */
+ 0, /*tp_print */
+ Tkapp_GetAttr, /*tp_getattr */
+ 0, /*tp_setattr */
+ 0, /*tp_compare */
+ 0, /*tp_repr */
+ 0, /*tp_as_number */
+ 0, /*tp_as_sequence */
+ 0, /*tp_as_mapping */
+ 0, /*tp_hash */
+};
+
+
+
+/**** Tkinter Module ****/
+
+typedef struct {
+ PyObject* tuple;
+ int size; /* current size */
+ int maxsize; /* allocated size */
+} FlattenContext;
+
+static int
+_bump(FlattenContext* context, int size)
+{
+ /* expand tuple to hold (at least) size new items.
+ return true if successful, false if an exception was raised */
+
+ int maxsize = context->maxsize * 2;
+
+ if (maxsize < context->size + size)
+ maxsize = context->size + size;
+
+ context->maxsize = maxsize;
+
+ return _PyTuple_Resize(&context->tuple, maxsize, 0) >= 0;
+}
+
+static int
+_flatten1(FlattenContext* context, PyObject* item, int depth)
+{
+ /* add tuple or list to argument tuple (recursively) */
+
+ int i, size;
+
+ if (depth > 1000) {
+ PyErr_SetString(PyExc_ValueError,
+ "nesting too deep in _flatten");
+ return 0;
+ } else if (PyList_Check(item)) {
+ size = PyList_GET_SIZE(item);
+ /* preallocate (assume no nesting) */
+ if (context->size + size > context->maxsize &&
+ !_bump(context, size))
+ return 0;
+ /* copy items to output tuple */
+ for (i = 0; i < size; i++) {
+ PyObject *o = PyList_GET_ITEM(item, i);
+ if (PyList_Check(o) || PyTuple_Check(o)) {
+ if (!_flatten1(context, o, depth + 1))
+ return 0;
+ } else if (o != Py_None) {
+ if (context->size + 1 > context->maxsize &&
+ !_bump(context, 1))
+ return 0;
+ Py_INCREF(o);
+ PyTuple_SET_ITEM(context->tuple,
+ context->size++, o);
+ }
+ }
+ } else if (PyTuple_Check(item)) {
+ /* same, for tuples */
+ size = PyTuple_GET_SIZE(item);
+ if (context->size + size > context->maxsize &&
+ !_bump(context, size))
+ return 0;
+ for (i = 0; i < size; i++) {
+ PyObject *o = PyTuple_GET_ITEM(item, i);
+ if (PyList_Check(o) || PyTuple_Check(o)) {
+ if (!_flatten1(context, o, depth + 1))
+ return 0;
+ } else if (o != Py_None) {
+ if (context->size + 1 > context->maxsize &&
+ !_bump(context, 1))
+ return 0;
+ Py_INCREF(o);
+ PyTuple_SET_ITEM(context->tuple,
+ context->size++, o);
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError, "argument must be sequence");
+ return 0;
+ }
+ return 1;
+}
+
+static PyObject *
+Tkinter_Flatten(PyObject* self, PyObject* args)
+{
+ FlattenContext context;
+ PyObject* item;
+
+ if (!PyArg_ParseTuple(args, "O:_flatten", &item))
+ return NULL;
+
+ context.maxsize = PySequence_Size(item);
+ if (context.maxsize <= 0)
+ return PyTuple_New(0);
+
+ context.tuple = PyTuple_New(context.maxsize);
+ if (!context.tuple)
+ return NULL;
+
+ context.size = 0;
+
+ if (!_flatten1(&context, item,0))
+ return NULL;
+
+ if (_PyTuple_Resize(&context.tuple, context.size, 0))
+ return NULL;
+
+ return context.tuple;
+}
+
+static PyObject *
+Tkinter_Create(PyObject *self, PyObject *args)
+{
+ char *screenName = NULL;
+ char *baseName = NULL;
+ char *className = NULL;
+ int interactive = 0;
+
+ baseName = strrchr(Py_GetProgramName(), '/');
+ if (baseName != NULL)
+ baseName++;
+ else
+ baseName = Py_GetProgramName();
+ className = "Tk";
+
+ if (!PyArg_ParseTuple(args, "|zssi:create",
+ &screenName, &baseName, &className,
+ &interactive))
+ return NULL;
+
+ return (PyObject *) Tkapp_New(screenName, baseName, className,
+ interactive);
+}
+
+static PyMethodDef moduleMethods[] =
+{
+ {"_flatten", Tkinter_Flatten, 1},
+ {"create", Tkinter_Create, 1},
+#ifdef HAVE_CREATEFILEHANDLER
+ {"createfilehandler", Tkapp_CreateFileHandler, 1},
+ {"deletefilehandler", Tkapp_DeleteFileHandler, 1},
+#endif
+ {"createtimerhandler", Tkapp_CreateTimerHandler, 1},
+ {"mainloop", Tkapp_MainLoop, 1},
+ {"dooneevent", Tkapp_DoOneEvent, 1},
+ {"quit", Tkapp_Quit, 1},
+ {NULL, NULL}
+};
+
+#ifdef WAIT_FOR_STDIN
+
+static int stdin_ready = 0;
+
+#ifndef MS_WINDOWS
+static void
+MyFileProc(void *clientData, int mask)
+{
+ stdin_ready = 1;
+}
+#endif
+
+static PyThreadState *event_tstate = NULL;
+
+static int
+EventHook(void)
+{
+#ifndef MS_WINDOWS
+ int tfile;
+#endif
+#ifdef WITH_THREAD
+ PyEval_RestoreThread(event_tstate);
+#endif
+ stdin_ready = 0;
+ errorInCmd = 0;
+#ifndef MS_WINDOWS
+ tfile = fileno(stdin);
+ Tcl_CreateFileHandler(tfile, TCL_READABLE, MyFileProc, NULL);
+#endif
+ while (!errorInCmd && !stdin_ready) {
+ int result;
+#ifdef MS_WINDOWS
+ if (_kbhit()) {
+ stdin_ready = 1;
+ break;
+ }
+#endif
+#if defined(WITH_THREAD) || defined(MS_WINDOWS)
+ Py_BEGIN_ALLOW_THREADS
+ PyThread_acquire_lock(tcl_lock, 1);
+ tcl_tstate = event_tstate;
+
+ result = Tcl_DoOneEvent(TCL_DONT_WAIT);
+
+ tcl_tstate = NULL;
+ PyThread_release_lock(tcl_lock);
+ if (result == 0)
+ Sleep(20);
+ Py_END_ALLOW_THREADS
+#else
+ result = Tcl_DoOneEvent(0);
+#endif
+
+ if (result < 0)
+ break;
+ }
+#ifndef MS_WINDOWS
+ Tcl_DeleteFileHandler(tfile);
+#endif
+ if (errorInCmd) {
+ errorInCmd = 0;
+ PyErr_Restore(excInCmd, valInCmd, trbInCmd);
+ excInCmd = valInCmd = trbInCmd = NULL;
+ PyErr_Print();
+ }
+#ifdef WITH_THREAD
+ PyEval_SaveThread();
+#endif
+ return 0;
+}
+
+#endif
+
+static void
+EnableEventHook(void)
+{
+#ifdef WAIT_FOR_STDIN
+ if (PyOS_InputHook == NULL) {
+#ifdef WITH_THREAD
+ event_tstate = PyThreadState_Get();
+#endif
+ PyOS_InputHook = EventHook;
+ }
+#endif
+}
+
+static void
+DisableEventHook(void)
+{
+#ifdef WAIT_FOR_STDIN
+ if (Tk_GetNumMainWindows() == 0 && PyOS_InputHook == EventHook) {
+ PyOS_InputHook = NULL;
+ }
+#endif
+}
+
+
+/* all errors will be checked in one fell swoop in init_tkinter() */
+static void
+ins_long(PyObject *d, char *name, long val)
+{
+ PyObject *v = PyInt_FromLong(val);
+ if (v) {
+ PyDict_SetItemString(d, name, v);
+ Py_DECREF(v);
+ }
+}
+static void
+ins_string(PyObject *d, char *name, char *val)
+{
+ PyObject *v = PyString_FromString(val);
+ if (v) {
+ PyDict_SetItemString(d, name, v);
+ Py_DECREF(v);
+ }
+}
+
+
+DL_EXPORT(void)
+init_tkinter(void)
+{
+ PyObject *m, *d;
+
+ Tkapp_Type.ob_type = &PyType_Type;
+
+#ifdef WITH_THREAD
+ tcl_lock = PyThread_allocate_lock();
+#endif
+
+ m = Py_InitModule("_tkinter", moduleMethods);
+
+ d = PyModule_GetDict(m);
+ Tkinter_TclError = Py_BuildValue("s", "TclError");
+ PyDict_SetItemString(d, "TclError", Tkinter_TclError);
+
+ ins_long(d, "READABLE", TCL_READABLE);
+ ins_long(d, "WRITABLE", TCL_WRITABLE);
+ ins_long(d, "EXCEPTION", TCL_EXCEPTION);
+ ins_long(d, "WINDOW_EVENTS", TCL_WINDOW_EVENTS);
+ ins_long(d, "FILE_EVENTS", TCL_FILE_EVENTS);
+ ins_long(d, "TIMER_EVENTS", TCL_TIMER_EVENTS);
+ ins_long(d, "IDLE_EVENTS", TCL_IDLE_EVENTS);
+ ins_long(d, "ALL_EVENTS", TCL_ALL_EVENTS);
+ ins_long(d, "DONT_WAIT", TCL_DONT_WAIT);
+ ins_string(d, "TK_VERSION", TK_VERSION);
+ ins_string(d, "TCL_VERSION", TCL_VERSION);
+#ifdef WITH_TIX
+ ins_string(d, "TIX_VERSION", TIX_VERSION);
+#endif
+
+ PyDict_SetItemString(d, "TkappType", (PyObject *)&Tkapp_Type);
+
+ Tktt_Type.ob_type = &PyType_Type;
+ PyDict_SetItemString(d, "TkttType", (PyObject *)&Tktt_Type);
+
+ /* This helps the dynamic loader; in Unicode aware Tcl versions
+ it also helps Tcl find its encodings. */
+ Tcl_FindExecutable(Py_GetProgramName());
+
+ if (PyErr_Occurred())
+ return;
+
+#if 0
+ /* This was not a good idea; through <Destroy> bindings,
+ Tcl_Finalize() may invoke Python code but at that point the
+ interpreter and thread state have already been destroyed! */
+ Py_AtExit(Tcl_Finalize);
+#endif
+
+#ifdef macintosh
+ /*
+ ** Part of this code is stolen from MacintoshInit in tkMacAppInit.
+ ** Most of the initializations in that routine (toolbox init calls and
+ ** such) have already been done for us, so we only need these.
+ */
+ tcl_macQdPtr = &qd;
+
+ Tcl_MacSetEventProc(PyMacConvertEvent);
+#if GENERATINGCFM
+ mac_addlibresources();
+#endif /* GENERATINGCFM */
+#endif /* macintosh */
+}
+
+
+
+#ifdef macintosh
+
+/*
+** Anyone who embeds Tcl/Tk on the Mac must define panic().
+*/
+
+void
+panic(char * format, ...)
+{
+ va_list varg;
+
+ va_start(varg, format);
+
+ vfprintf(stderr, format, varg);
+ (void) fflush(stderr);
+
+ va_end(varg);
+
+ Py_FatalError("Tcl/Tk panic");
+}
+
+/*
+** Pass events to SIOUX before passing them to Tk.
+*/
+
+static int
+PyMacConvertEvent(EventRecord *eventPtr)
+{
+ WindowPtr frontwin;
+ /*
+ ** Sioux eats too many events, so we don't pass it everything. We
+ ** always pass update events to Sioux, and we only pass other events if
+ ** the Sioux window is frontmost. This means that Tk menus don't work
+ ** in that case, but at least we can scroll the sioux window.
+ ** Note that the SIOUXIsAppWindow() routine we use here is not really
+ ** part of the external interface of Sioux...
+ */
+ frontwin = FrontWindow();
+ if ( eventPtr->what == updateEvt || SIOUXIsAppWindow(frontwin) ) {
+ if (SIOUXHandleOneEvent(eventPtr))
+ return 0; /* Nothing happened to the Tcl event queue */
+ }
+ return TkMacConvertEvent(eventPtr);
+}
+
+#if GENERATINGCFM
+
+/*
+** Additional Mac specific code for dealing with shared libraries.
+*/
+
+#include <Resources.h>
+#include <CodeFragments.h>
+
+static int loaded_from_shlib = 0;
+static FSSpec library_fss;
+
+/*
+** If this module is dynamically loaded the following routine should
+** be the init routine. It takes care of adding the shared library to
+** the resource-file chain, so that the tk routines can find their
+** resources.
+*/
+OSErr pascal
+init_tkinter_shlib(CFragInitBlockPtr data)
+{
+ __initialize();
+ if ( data == nil ) return noErr;
+ if ( data->fragLocator.where == kDataForkCFragLocator ) {
+ library_fss = *data->fragLocator.u.onDisk.fileSpec;
+ loaded_from_shlib = 1;
+ } else if ( data->fragLocator.where == kResourceCFragLocator ) {
+ library_fss = *data->fragLocator.u.inSegs.fileSpec;
+ loaded_from_shlib = 1;
+ }
+ return noErr;
+}
+
+/*
+** Insert the library resources into the search path. Put them after
+** the resources from the application. Again, we ignore errors.
+*/
+static
+mac_addlibresources(void)
+{
+ if ( !loaded_from_shlib )
+ return;
+ (void)FSpOpenResFile(&library_fss, fsRdPerm);
+}
+
+#endif /* GENERATINGCFM */
+#endif /* macintosh */
Added: external/tix-8.4.2.x/PyTix-2.0/2.0/_tkinter.c.diff
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/2.0/_tkinter.c.diff Tue Mar 18 19:38:59 2008
@@ -0,0 +1,41 @@
+*** _tkinter.c.dist Mon Oct 16 14:49:32 2000
+--- _tkinter.c Wed Nov 22 00:27:54 2000
+***************
+*** 43,48 ****
+--- 43,51 ----
+
+ #include <tcl.h>
+ #include <tk.h>
++ #ifdef WITH_TIX
++ #include <tix.h>
++ #endif
+
+ #define TKMAJORMINOR (TK_MAJOR_VERSION*1000 + TK_MINOR_VERSION)
+
+***************
+*** 427,432 ****
+--- 430,441 ----
+ PySys_WriteStderr("Tk_Init error: %s\n", Tcl_GetStringResult(interp));
+ return TCL_ERROR;
+ }
++ #ifdef WITH_TIX
++ if (Tix_Init(interp) == TCL_ERROR) {
++ PySys_WriteStderr("Tix_Init error: %s\n", Tcl_GetStringResult(interp));
++ return TCL_ERROR;
++ }
++ #endif
+ return TCL_OK;
+ }
+ #endif /* !WITH_APPINIT */
+***************
+*** 2121,2126 ****
+--- 2130,2138 ----
+ ins_long(d, "DONT_WAIT", TCL_DONT_WAIT);
+ ins_string(d, "TK_VERSION", TK_VERSION);
+ ins_string(d, "TCL_VERSION", TCL_VERSION);
++ #ifdef WITH_TIX
++ ins_string(d, "TIX_VERSION", TIX_VERSION);
++ #endif
+
+ PyDict_SetItemString(d, "TkappType", (PyObject *)&Tkapp_Type);
+
Added: external/tix-8.4.2.x/PyTix-2.0/2.0/tkappinit.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/2.0/tkappinit.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,94 @@
+/* appinit.c -- Tcl and Tk application initialization.
+
+ The function Tcl_AppInit() below initializes various Tcl packages.
+ It is called for each Tcl interpreter created by _tkinter.create().
+ It needs to be compiled with -DWITH_<package> flags for each package
+ that you are statically linking with. You may have to add sections
+ for packages not yet listed below.
+
+ Note that those packages for which Tcl_StaticPackage() is called with
+ a NULL first argument are known as "static loadable" packages to
+ Tcl but not actually initialized. To use these, you have to load
+ it explicitly, e.g. tkapp.eval("load {} Blt").
+ */
+
+#include <tcl.h>
+#include <tk.h>
+
+int
+Tcl_AppInit(Tcl_Interp *interp)
+{
+ Tk_Window main_window;
+
+ if (Tcl_Init (interp) == TCL_ERROR)
+ return TCL_ERROR;
+ if (Tk_Init (interp) == TCL_ERROR)
+ return TCL_ERROR;
+
+
+ main_window = Tk_MainWindow(interp);
+
+
+#ifdef WITH_MOREBUTTONS
+ {
+ extern Tcl_CmdProc studButtonCmd;
+ extern Tcl_CmdProc triButtonCmd;
+
+ Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
+ (ClientData) main_window, NULL);
+ Tcl_CreateCommand(interp, "tributton", triButtonCmd,
+ (ClientData) main_window, NULL);
+ }
+#endif
+
+#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
+ {
+ extern void TkImaging_Init(Tcl_Interp *);
+ TkImaging_Init(interp);
+ /* XXX TkImaging_Init() doesn't have the right return type */
+ /*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
+ }
+#endif
+
+#ifdef WITH_PIL_OLD /* 0.2b4 and earlier */
+ {
+ extern void TkImaging_Init(void);
+ /* XXX TkImaging_Init() doesn't have the right prototype */
+ /*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
+ }
+#endif
+
+#ifdef WITH_TIX
+ {
+ extern int Tix_Init(Tcl_Interp *interp);
+ extern int Tix_SafeInit(Tcl_Interp *interp);
+
+ if (Tix_Init(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ Tcl_StaticPackage(interp, "Tix", Tix_Init, Tix_SafeInit);
+ }
+#endif
+
+#ifdef WITH_BLT
+ {
+ extern int Blt_Init(Tcl_Interp *);
+ extern int Blt_SafeInit(Tcl_Interp *);
+ Tcl_StaticPackage(NULL, "Blt", Blt_Init, Blt_SafeInit);
+ }
+#endif
+
+#ifdef WITH_TOGL
+ {
+ /* XXX I've heard rumors that this doesn't work */
+ extern int Togl_Init(Tcl_Interp *);
+ /* XXX Is there no Togl_SafeInit? */
+ Tcl_StaticPackage(NULL, "Togl", Togl_Init, NULL);
+ }
+#endif
+
+#ifdef WITH_XXX
+
+#endif
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/PyTix-2.0/2.0/tkappinit.c.diff
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/2.0/tkappinit.c.diff Tue Mar 18 19:38:59 2008
@@ -0,0 +1,36 @@
+*** tkappinit.c.dist Mon Oct 16 14:49:34 2000
+--- tkappinit.c Wed Nov 22 02:00:13 2000
+***************
+*** 25,32 ****
+--- 25,34 ----
+ if (Tk_Init (interp) == TCL_ERROR)
+ return TCL_ERROR;
+
++
+ main_window = Tk_MainWindow(interp);
+
++
+ #ifdef WITH_MOREBUTTONS
+ {
+ extern Tcl_CmdProc studButtonCmd;
+***************
+*** 60,66 ****
+ {
+ extern int Tix_Init(Tcl_Interp *interp);
+ extern int Tix_SafeInit(Tcl_Interp *interp);
+! Tcl_StaticPackage(NULL, "Tix", Tix_Init, Tix_SafeInit);
+ }
+ #endif
+
+--- 62,72 ----
+ {
+ extern int Tix_Init(Tcl_Interp *interp);
+ extern int Tix_SafeInit(Tcl_Interp *interp);
+!
+! if (Tix_Init(interp) == TCL_ERROR) {
+! return TCL_ERROR;
+! }
+! Tcl_StaticPackage(interp, "Tix", Tix_Init, Tix_SafeInit);
+ }
+ #endif
+
Added: external/tix-8.4.2.x/PyTix-2.0/BUGS-1.12.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/BUGS-1.12.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,15 @@
+1) The compound image stuff doesn't work. CmpImg core dumps.
+ This seems to be something to do with Tcl/Tkinter
+
+ **** FIXED **** as of Tcl7.6, Tk4.2, Tix4.0.5
+
+2) tk.call is used a lot in the demos. These functions should be
+ encapsulated somewhere in Python (more mods to Tkinter ?)
+
+3) Callback definition is not straightforward. A lot of the time
+ a lambda definition has to be written. However, this is a
+ general Tkinter problem.
+
+4) In the Control widget, the callbacks for increment, decrement
+ and validate should return a string to Tix. Find a way to do
+ this.
Added: external/tix-8.4.2.x/PyTix-2.0/BUGS-2.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/BUGS-2.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+$Id: BUGS-2.0.txt,v 1.1 2000/11/05 19:46:32 idiscovery Exp $
+
+1) There seems to be a problem with ComboBox that shows up
+in the ExFileSelectBox demo. The popdown scrolled list widget
+is being created, then destroyed. This does not happen in Tcl Tix.
+
Added: external/tix-8.4.2.x/PyTix-2.0/ChangeLog
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/ChangeLog Tue Mar 18 19:38:59 2008
@@ -0,0 +1,67 @@
+$Id: ChangeLog,v 1.1 2000/11/05 19:46:02 idiscovery Exp $
+
+PyTix version 2.0 alpha
+-----------------------
+
+ CHANGES
+ -------
+ 1) Made diffs against Python 2.0 and put them in the 2.0 subdirectory.
+ 2) Changed _tkinter.c to define TIX_VERSION and call Tix_Init.
+
+ BUG FIXES
+ ---------
+ 1) Fixed demo/samples/CmpImg.py to make the images be descendents
+ of the root window (see the Python FAQ for an explanation).
+
+PyTix version 1.12
+------------------
+
+ CHANGES
+ -------
+ 1) Tkinter.py now only has the addition of the Form class since
+ the globalsetvar() etc. has been rolled into the 1.4 Tkinter
+
+ BUG FIXES
+ ---------
+ 1) Fixed typo in TixWidgets.subwidgets_all()
+ 2) Fixed bug in TixWidgets.subwidgets_all where some Tix internal
+ widgets were causing an exception.
+ 3) Added new method config_all to set common configuration options
+ for a tree of subwidgets
+ 4) The label subwidget of the ComboBox was inadvertently left out
+ 5) The orientation option of a PanedWindow was not marked static
+
+
+PyTix Version 1.11
+-------------------
+
+ADDITIONS
+---------
+
+Tix ver. 4.0.1 has enhanced HList functionality and an additional widget (Tree).
+Tix.py V1.11 has been updated to reflect these changes as well. However,
+it will still work with Tix v4.0 since there are no incompatible changes (only
+additions).
+
+A new DisplayStyle class has been added (thanks to Steffen Kremser). This
+allows the user to create a display style and apply it to many items
+subsequently (via the -style switch).
+
+BUG FIXES
+---------
+
+0) In the __init__ methods for all the __dummy... Tix widgets, initialization
+ of the subwidgets was missing in V1.1. Thanks to Guenter Kolousek for
+ pointing this out.
+
+1) Removed listbox child of ComboBox as result of (0). It can now be accessed
+ as combobox.slistbox.listbox
+
+2) The dirlist member in ExFileSelectBox was actually a DirList and not a
+ ScrolledListBox.
+
+3) The HList widget method 'column' was renamed and modified to 'column_width'
+
+4) NoteBook.raised_page() renamed to NoteBook.raised()
+
+5) Various other small bug fixes
Added: external/tix-8.4.2.x/PyTix-2.0/INSTALL-1.12.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/INSTALL-1.12.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,52 @@
+Installing PyTix
+----------------
+
+0) To use PyTix, you need Tcl (V7.6), Tk (V4.2), Tix (V4.0.5) and Python (V1.4).
+ PyTix has been written and tested on a Sun Sparc running Solaris 2.5
+ with the above mentioned packages.
+
+ Tcl7.5 and Tk4.1 should work just as well but I haven't tried it. If
+ you are using Tcl7.4 and Tk4.0, there are bugs with the handling of
+ compound images.
+
+ There is nothing OS-specific in PyTix itself so it should work on
+ any machine with Tix and Python installed.
+
+1) Build and install Tcl 7.6, Tk 4.2 and Tix 4.0.5.
+ Ensure that Tix is properly installed by running tixwish and executing
+ the demo programs
+
+ Note that Tix 4.0.5 does not compile with Tcl 7.6 / Tk 4.2 out of the
+ box although it seems to compile and run OK. You might want to use
+ Tcl 7.5/ Tk 4.1 instead.
+
+2) Modify _tkinter.c in the Modules directory of the Python distribution.
+ In the routine Tcl_AppInit(), add the following lines just after the
+ block which calls to Tk_Init().
+
+ if (Tix_Init (interp) == TCL_ERROR) {
+ fprintf(stderr, "Tix_Init error: %s\n", interp->result);
+ return TCL_ERROR;
+ }
+
+ The modified _tkinter.c is supplied.
+
+3) Modify the Modules/Setup file to link in the Tix library. On Solaris,
+ this looks like
+
+ tkinter tkintermodule.c -I/usr/local/include -L/usr/local/lib \
+ -ltix4.0-tk4.1 -ltk4.2 -ltcl7.6 -lX11
+
+4) Copy Tix.py and the modified Tkinter.py to Lib/tkinter. If you have
+ modified Tkinter for any reason, just apply the diffs by hand. There
+ are only a few changes (see Tkinter.diff)
+
+5) Rebuild Python and reinstall.
+
+You should now have a working Tix implementation in Python. To see if all
+is as it should be, run the 'tixwidgets.py' script in the demos directory.
+
+If you find any bugs or have suggestions for improvement, please report them
+to me.
+
+Sudhir Shenoy (sshenoy at gol.com)
Added: external/tix-8.4.2.x/PyTix-2.0/INSTALL-2.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/INSTALL-2.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,76 @@
+$Id: INSTALL-2.0.txt,v 1.4 2000/11/23 02:32:30 idiscovery Exp $
+
+Installing PyTix
+----------------
+
+0) To use PyTix, you need Tcl/Tk (V8.[012]), Tix (V8.1) and Python (V2.0).
+ PyTix has been written and tested on a Intel Pentium running RH Linux 5.2
+ with the above mentioned packages.
+
+ There is nothing OS-specific in PyTix itself so it should work on
+ any machine with Tix and Python installed.
+
+1) Build and install Tcl/Tk 8.0 8.1 or 8.2 and Tix 8.1.
+ Ensure that Tix is properly installed by running tixwish and executing
+ the demo programs. Under Unix use the --enable-shared configure option
+ for all three. We recommend tcl tcl8.2.3 for this release of PyTix.
+
+ Note that Tix 8.1 does not compile with Tcl 8.3 under Windows out of the
+ box although it seems to compile and run OK. You might want to use
+ Tcl 8.2 instead.
+
+2) Modify _tkinter.c in the Modules directory of the Python distribution.
+ The modified _tkinter.c is supplied in the 2.0 subdirectory.
+ Modify tkappinit.c in the Modules directory of the Python distribution.
+ The modified tkappinit.c is supplied in the 2.0 subdirectory.
+ These modified files can be used for Tkinter with or without Tix.
+
+3) Modify the Modules/Setup file to link in the Tix library according
+ to the comments in the file. On Linux this looks like
+
+# *** Always uncomment this (leave the leading underscore in!):
+ _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
+ -I/usr/local/src/tcl8.2.3/generic -I/usr/local/src/tk8.2.3/generic \
+# *** Uncomment and edit to reflect where your X11 header files are:
+ -I/usr/X11R6/include \
+# *** Or uncomment this for Solaris:
+# -I/usr/openwin/include \
+# *** Uncomment and edit for Tix extension only:
+ -DWITH_TIX -I/usr/local/src/tix-8.1.1/generic -L/usr/local/src/tix-8.1.1/unix/tk8.2 -ltix8.1.8.2 \
+# *** Uncomment and edit for BLT extension only:
+# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
+# *** Uncomment and edit for PIL (TkImaging) extension only:
+# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
+# *** Uncomment and edit for TOGL extension only:
+# -DWITH_TOGL togl.c \
+# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
+ -L/usr/local/src/tcl8.2.3/unix -L/usr/local/src/tk8.2.3/unix \
+# *** Uncomment and edit to reflect your Tcl/Tk versions:
+ -ltk8.2 -ltcl8.2 \
+# *** Uncomment and edit to reflect where your X11 libraries are:
+ -L/usr/X11R6/lib \
+# *** Or uncomment this for Solaris:
+# -L/usr/openwin/lib \
+# *** Uncomment these for TOGL extension only:
+# -lGL -lGLU -lXext -lXmu \
+# *** Uncomment for AIX:
+# -lld \
+# *** Always uncomment this; X11 libraries to link with:
+ -lX11
+
+4) Modify Tkinter.py in the Lib/lib-tk directory of the Python distribution.
+ The modified Tkinter.py is supplied in the 2.0 subdirectory.
+ This modified file can be used for Tkinter with or without Tix.
+
+5) Copy Tix.py to the Lib/lib-tk directory of the Python distribution.
+
+6) Rebuild Python and reinstall.
+
+You should now have a working Tix implementation in Python. To see if all
+is as it should be, run the 'tixwidgets.py' script in the demos directory.
+
+If you find any bugs or have suggestions for improvement, please report them
+via http://tix.sourceforge.net
+
+
Added: external/tix-8.4.2.x/PyTix-2.0/README-1.12.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/README-1.12.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,100 @@
+About PyTix
+-----------
+
+PyTix is based on an idea of Jean-Marc Lugrin (lugrin at ms.com) who wrote
+pytix (another Python-Tix marriage). Tix widgets are an attractive and
+useful extension to Tk. See http://www.cis.upenn.edu/~ioi/tix/tix.html
+for more details about Tix and how to get it.
+
+PyTix differs from Pytix in the following ways -
+ 1) It is complete at least as far as the Tix documentation
+ would allow !!
+ 2) Tix widgets are represented by classes in Python. Sub-widgets
+ are members of the mega-widget class. For example, if a
+ particular TixWidget (e.g. ScrolledText) has an embedded widget
+ (Text in this case), it is possible to call the methods of the
+ child directly.
+ 3) The members of the class are created automatically. In the case
+ of widgets like ButtonBox, the members are added dynamically.
+
+
+Changes in Version 1.12 (see ChangeLog for details)
+-----------------------
+
+1) Minor bug fixes
+2) Tested with Python 1.4, Tk 4.2, Tcl 7.6 and Tix 4.0.5
+3) Compound Images now work !!
+
+Modifications to Tkinter
+------------------------
+
+To support the full Tix functionality, the Tkinter module has been
+modified. The modifications are quite minor (see Tkinter.diff for a diff
+listing). Basically, in order to support the 'tixForm' geometry manager,
+a new class 'Form' has been added. The class 'Widget' now also inherits
+from this class.
+
+
+Tix.py
+------
+
+PyTix has Tix.py as the wrapper for Tix widgets. It defines a couple of new
+classes (TixWidget and TixSubWidget) which do the dirty work of initializing
+a new widget instance.
+
+The problem in Tix is that a single widget is actually a composite of many
+smaller widgets. For example, a LabelEntry widget contains a Label and
+and Entry. When we instantiate the LabelEntry widget, Python code is not
+aware of the subwidgets. This is a problem because we cannot refer to
+the widgets e.g. to change the color. We cannot instantiate a new widget
+either because this would send a call to Tk to create a widget that is
+already created. To separate the instantiation of the Python class and
+the Tk widget, we need to have the new classes.
+
+The subwidgets instances in Python is properly subclassed from the
+appropriate base class. For example the 'entry' child of the LabelEntry
+widget is subclassed from the Entry class. Thus all the methods of the
+Entry class are known by the subwidget. This makes it possible to write
+code like
+
+ w = Tix.LabelEntry(master)
+ w.text['bg'] = 'gray'
+ w.text.insert(Tix.END, 'Hello, world')
+
+The appropriate subwidgets are created automatically (they are kept in a
+list in the parent). Member access is provided by writing the __getattr__
+method.
+
+There is a separate class for each Tix widget.
+There are a few Tix convenience routines defined at the end as well.
+
+
+How to install
+--------------
+
+See the file INSTALL for installation directions
+
+
+How to use
+----------
+
+You must import the module Tix in your program. You no longer have to
+import Tkinter since Tix.py does it for you.
+
+See the sample programs in demos and demos/samples for an idea of how
+to use Tix.
+
+The basic documentation remains the Tix man pages. Note that currently
+this documentation is not complete but it is expected to be so by Jan.
+1996.
+
+Credits
+-------
+
+The original pytix was written by Jean-Marc Lugrin (lugrin at ms.com).
+
+PyTix (this package) is written by Sudhir Shenoy (sshenoy at gol.com)
+
+Version 1.11 was only possible with help from Steffen Kremser(kremser at danet.de)
+who helped a lot on cleaning up the HList widget and also translated the HList
+demos from the Tix distribution
Added: external/tix-8.4.2.x/PyTix-2.0/README-2.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/README-2.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,19 @@
+About PyTix
+-----------
+
+PyTix is based on an idea of Jean-Marc Lugrin (lugrin at ms.com) who wrote
+pytix (another Python-Tix marriage). Tix widgets are an attractive and
+useful extension to Tk. See http://tix.sourceforge.net
+for more details about Tix and how to get it.
+
+Features:
+ 1) It is almost complete.
+ 2) Tix widgets are represented by classes in Python. Sub-widgets
+ are members of the mega-widget class. For example, if a
+ particular TixWidget (e.g. ScrolledText) has an embedded widget
+ (Text in this case), it is possible to call the methods of the
+ child directly.
+ 3) The members of the class are created automatically. In the case
+ of widgets like ButtonBox, the members are added dynamically.
+
+
Added: external/tix-8.4.2.x/PyTix-2.0/Tix.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/Tix.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1097 @@
+#
+# $Id: Tix.py,v 1.5 2000/12/08 01:14:24 idiscovery Exp $
+#
+# Tix.py -- Tix widget wrappers, part of PyTix.
+#
+# - Sudhir Shenoy (sshenoy at gol.com), Dec. 1995.
+# based on an idea (and a little code !!) of Jean-Marc Lugrin
+# (lugrin at ms.com)
+#
+# NOTE: In order to minimize changes to Tkinter.py, some of the code here
+# (TixWidget.__init__) has been taken from Tkinter (Widget.__init__)
+# and will break if there are major changes in Tkinter.
+#
+# The Tix widgets are represented by a class hierarchy in python with proper
+# inheritance of base classes.
+#
+# As a result after creating a 'w = StdButtonBox', I can write
+# w.ok['text'] = 'Who Cares'
+# or w.ok['bg'] = w['bg']
+# or even w.ok.invoke()
+# etc.
+#
+# Compare the demo tixwidgets.py to the original Tcl program and you will
+# appreciate the advantages.
+#
+
+import string
+from Tkinter import *
+from Tkinter import _flatten, _cnfmerge, _default_root
+
+# WARNING - TkVersion is a limited precision floating point number
+if TkVersion < 3.999:
+ raise ImportError, "This version of Tix.py requires Tk 4.0 or higher"
+
+import _tkinter # If this fails your Python may not be configured for Tk
+TixVersion = string.atof(tkinter.TIX_VERSION) # If this fails your Python may not be configured for Tix
+# WARNING - TixVersion is a limited precision floating point number
+
+# Some more constants (for consistency with Tkinter)
+WINDOW = 'window'
+TEXT = 'text'
+IMAGETEXT = 'imagetext'
+
+# BEWARE - this is implemented by copying some code from the Widget class
+# in Tkinter (to override Widget initialization) and is therefore
+# liable to break.
+class TixWidget(Widget):
+ """A TixWidget class is used to package all (or most) Tix widgets.
+
+ Widget initialization is extended in two ways:
+ 1) It is possible to give a list of options which must be part of
+ the creation command (so called Tix 'static' options). These cannot be
+ given as a 'config' command later.
+ 2) It is possible to give the name of an existing TK widget. These are
+ child widgets created automatically by a Tix mega-widget. The Tk call
+ to create these widgets is therefore bypassed in TixWidget.__init__
+
+ Both options are for use by subclasses only.
+ """
+ def __init__ (self, master=None, widgetName=None,
+ static_options=None, cnf={}, kw={}):
+ # Merge keywords and dictionary arguments
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ else:
+ cnf = _cnfmerge(cnf)
+
+ # Move static options into extra. static_options must be
+ # a list of keywords (or None).
+ extra=()
+ if static_options:
+ for k,v in cnf.items()[:]:
+ if k in static_options:
+ extra = extra + ('-' + k, v)
+ del cnf[k]
+
+ self.widgetName = widgetName
+ Widget._setup(self, master, cnf)
+
+ # If widgetName is None, this is a dummy creation call where the
+ # corresponding Tk widget has already been created by Tix
+ if widgetName:
+ apply(self.tk.call, (widgetName, self._w) + extra)
+
+ # Non-static options - to be done via a 'config' command
+ if cnf:
+ Widget.config(self, cnf)
+
+ # Dictionary to hold subwidget names for easier access. We can't
+ # use the children list because the public Tix names may not be the
+ # same as the pathname component
+ self.subwidget_list = {}
+
+ # We set up an attribute access function so that it is possible to
+ # do w.ok['text'] = 'Hello' rather than w.subwidget('ok')['text'] = 'Hello'
+ # when w is a StdButtonBox.
+ # We can even do w.ok.invoke() because w.ok is subclassed from the
+ # Button class if you go through the proper constructors
+ def __getattr__(self, name):
+ if self.subwidget_list.has_key(name):
+ return self.subwidget_list[name]
+ raise AttributeError, name
+
+ # Set a variable without calling its action routine
+ def set_silent(self, value):
+ self.tk.call('tixSetSilent', self._w, value)
+
+ # Return the named subwidget (which must have been created by
+ # the sub-class).
+ def subwidget(self, name):
+ n = self._subwidget_name(name)
+ if not n:
+ raise TclError, "Subwidget " + name + " not child of " + self._name
+ # Remove header of name and leading dot
+ n = n[len(self._w)+1:]
+ return self._nametowidget(n)
+
+ # Return all subwidgets
+ def subwidgets_all(self):
+ names = self._subwidget_names()
+ if not names:
+ return []
+ retlist = []
+ for name in names:
+ name = name[len(self._w)+1:]
+ try:
+ retlist.append(self._nametowidget(name))
+ except:
+ # some of the widgets are unknown e.g. border in LabelFrame
+ pass
+ return retlist
+
+ # Get a subwidget name (returns a String, not a Widget !)
+ def _subwidget_name(self,name):
+ try:
+ return self.tk.call(self._w, 'subwidget', name)
+ except TclError:
+ return None
+
+ # Return the name of all subwidgets
+ def _subwidget_names(self):
+ try:
+ x = self.tk.call(self._w, 'subwidgets', '-all')
+ return self.tk.split(x)
+ except TclError:
+ return None
+
+ # Set configuration options for all subwidgets (and self)
+ def config_all(self, option, value):
+ if option == '':
+ return
+ elif type(option) != type(''):
+ option = `option`
+ if type(value) != type(''):
+ value = `value`
+ names = self._subwidget_names()
+ for name in names:
+ self.tk.call(name, 'configure', '-' + option, value)
+
+
+# Subwidgets are child widgets created automatically by mega-widgets.
+# In python, we have to create these subwidgets manually to mirror their
+# existence in Tk/Tix.
+class TixSubWidget(TixWidget):
+ """Subwidget class.
+
+ This is used to mirror child widgets automatically created
+ by Tix/Tk as part of a mega-widget in Python (which is not informed
+ of this)"""
+
+ def __init__(self, master, name,
+ destroy_physically=1, check_intermediate=1):
+ if check_intermediate:
+ path = master._subwidget_name(name)
+ try:
+ path = path[len(master._w)+1:]
+ plist = string.splitfields(path, '.')
+ except:
+ plist = []
+
+ if (not check_intermediate) or len(plist) < 2:
+ # immediate descendant
+ TixWidget.__init__(self, master, None, None, {'name' : name})
+ else:
+ # Ensure that the intermediate widgets exist
+ parent = master
+ for i in range(len(plist) - 1):
+ n = string.joinfields(plist[:i+1], '.')
+ try:
+ w = master._nametowidget(n)
+ parent = w
+ except KeyError:
+ # Create the intermediate widget
+ parent = TixSubWidget(parent, plist[i],
+ destroy_physically=0,
+ check_intermediate=0)
+ TixWidget.__init__(self, parent, None, None, {'name' : name})
+ self.destroy_physically = destroy_physically
+
+ def destroy(self):
+ # For some widgets e.g., a NoteBook, when we call destructors,
+ # we must be careful not to destroy the frame widget since this
+ # also destroys the parent NoteBook thus leading to an exception
+ # in Tkinter when it finally calls Tcl to destroy the NoteBook
+ for c in self.children.values(): c.destroy()
+ if self.master.children.has_key(self._name):
+ del self.master.children[self._name]
+ if self.master.subwidget_list.has_key(self._name):
+ del self.master.subwidget_list[self._name]
+ if self.destroy_physically:
+ # This is bypassed only for a few widgets
+ self.tk.call('destroy', self._w)
+
+
+# Useful func. to split Tcl lists and return as a dict. From Tkinter.py
+def _lst2dict(lst):
+ dict = {}
+ for x in lst:
+ dict[x[0][1:]] = (x[0][1:],) + x[1:]
+ return dict
+
+# Useful class to create a display style - later shared by many items.
+# Contributed by Steffen Kremser
+class DisplayStyle:
+ """DisplayStyle - handle configuration options shared by
+ (multiple) Display Items"""
+
+ def __init__(self, itemtype, cnf={}, **kw ):
+ master = _default_root # global from Tkinter
+ if not master and cnf.has_key('refwindow'): master=cnf['refwindow']
+ elif not master and kw.has_key('refwindow'): master= kw['refwindow']
+ elif not master: raise RuntimeError, "Too early to create display style: no root window"
+ self.tk = master.tk
+ self.stylename = apply(self.tk.call, ('tixDisplayStyle', itemtype) +
+ self._options(cnf,kw) )
+
+ def __str__(self):
+ return self.stylename
+
+ def _options(self, cnf, kw ):
+ if kw and cnf:
+ cnf = _cnfmerge((cnf, kw))
+ elif kw:
+ cnf = kw
+ opts = ()
+ for k, v in cnf.items():
+ opts = opts + ('-'+k, v)
+ return opts
+
+ def delete(self):
+ self.tk.call(self.stylename, 'delete')
+ del(self)
+
+ def __setitem__(self,key,value):
+ self.tk.call(self.stylename, 'configure', '-%s'%key, value)
+
+ def config(self, cnf={}, **kw):
+ return _lst2dict(
+ self.tk.split(
+ apply(self.tk.call,
+ (self.stylename, 'configure') + self._options(cnf,kw))))
+
+ def __getitem__(self,key):
+ return self.tk.call(self.stylename, 'cget', '-%s'%key, value)
+
+
+######################################################
+### The Tix Widget classes - in alphabetical order ###
+######################################################
+
+class Balloon(TixWidget):
+ """Balloon help widget.
+
+ Subwidget Class
+ --------- -----
+ label Label
+ message Message"""
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixBalloon', ['options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label',
+ destroy_physically=0)
+ self.subwidget_list['message'] = _dummyLabel(self, 'message',
+ destroy_physically=0)
+
+ def bind_widget(self, widget, cnf={}, **kw):
+ """Bind balloon widget to another.
+ One balloon widget may be bound to several widgets at the same time"""
+ apply(self.tk.call,
+ (self._w, 'bind', widget._w) + self._options(cnf, kw))
+
+ def unbind_widget(self, widget):
+ self.tk.call(self._w, 'unbind', widget._w)
+
+class ButtonBox(TixWidget):
+ """ButtonBox - A container for pushbuttons"""
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixButtonBox',
+ ['orientation', 'options'], cnf, kw)
+
+ def add(self, name, cnf={}, **kw):
+ """Add a button with given name to box."""
+
+ btn = apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = _dummyButton(self, name)
+ return btn
+
+ def invoke(self, name):
+ if self.subwidget_list.has_key(name):
+ self.tk.call(self._w, 'invoke', name)
+
+class ComboBox(TixWidget):
+ """ComboBox - an Entry field with a dropdown menu
+
+ Subwidget Class
+ --------- -----
+ entry Entry
+ arrow Button
+ slistbox ScrolledListBox
+ tick Button }
+ cross Button } present if created with the fancy option"""
+
+ def __init__ (self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixComboBox',
+ ['editable', 'dropdown', 'fancy', 'options'],
+ cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+ self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
+ self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
+ 'slistbox')
+ try:
+ self.subwidget_list['tick'] = _dummyButton(self, 'tick')
+ self.subwidget_list['cross'] = _dummyButton(self, 'cross')
+ except TypeError:
+ # unavailable when -fancy not specified
+ pass
+
+ def add_history(self, str):
+ self.tk.call(self._w, 'addhistory', str)
+
+ def append_history(self, str):
+ self.tk.call(self._w, 'appendhistory', str)
+
+ def insert(self, index, str):
+ self.tk.call(self._w, 'insert', index, str)
+
+ def pick(self, index):
+ self.tk.call(self._w, 'pick', index)
+
+class Control(TixWidget):
+ """Control - An entry field with value change arrows.
+
+ Subwidget Class
+ --------- -----
+ incr Button
+ decr Button
+ entry Entry
+ label Label"""
+
+ def __init__ (self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixControl', ['options'], cnf, kw)
+ self.subwidget_list['incr'] = _dummyButton(self, 'incr')
+ self.subwidget_list['decr'] = _dummyButton(self, 'decr')
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+ def decrement(self):
+ self.tk.call(self._w, 'decr')
+
+ def increment(self):
+ self.tk.call(self._w, 'incr')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+ def update(self):
+ self.tk.call(self._w, 'update')
+
+class DirList(TixWidget):
+ """DirList - Directory Listing.
+
+ Subwidget Class
+ --------- -----
+ hlist HList
+ hsb Scrollbar
+ vsb Scrollbar"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def chdir(self, dir):
+ self.tk.call(self._w, 'chdir', dir)
+
+class DirTree(TixWidget):
+ """DirList - Directory Listing in a hierarchical view.
+
+ Subwidget Class
+ --------- -----
+ hlist HList
+ hsb Scrollbar
+ vsb Scrollbar"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirTree', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def chdir(self, dir):
+ self.tk.call(self._w, 'chdir', dir)
+
+class ExFileSelectBox(TixWidget):
+ """ExFileSelectBox - MS Windows style file select box.
+
+ Subwidget Class
+ --------- -----
+ cancel Button
+ ok Button
+ hidden Checkbutton
+ types ComboBox
+ dir ComboBox
+ file ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixExFileSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden')
+ self.subwidget_list['types'] = _dummyComboBox(self, 'types')
+ self.subwidget_list['dir'] = _dummyComboBox(self, 'dir')
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['file'] = _dummyComboBox(self, 'file')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+
+ def filter(self):
+ self.tk.call(self._w, 'filter')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+class ExFileSelectDialog(TixWidget):
+ """ExFileSelectDialog - MS Windows style file select dialog.
+
+ Subwidgets Class
+ ---------- -----
+ fsbox ExFileSelectBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixExFileSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['fsbox'] = _dummyExFileSelectBox(self, 'fsbox')
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+class FileSelectBox(TixWidget):
+ """ExFileSelectBox - Motif style file select box.
+
+ Subwidget Class
+ --------- -----
+ selection ComboBox
+ filter ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+ self.subwidget_list['filter'] = _dummyComboBox(self, 'filter')
+ self.subwidget_list['selection'] = _dummyComboBox(self, 'selection')
+
+ def apply_filter(self): # name of subwidget is same as command
+ self.tk.call(self._w, 'filter')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+class FileSelectDialog(TixWidget):
+ """FileSelectDialog - Motif style file select dialog.
+
+ Subwidgets Class
+ ---------- -----
+ btns StdButtonBox
+ fsbox FileSelectBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['btns'] = _dummyStdButtonBox(self, 'btns')
+ self.subwidget_list['fsbox'] = _dummyFileSelectBox(self, 'fsbox')
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+class FileEntry(TixWidget):
+ """FileEntry - Entry field with button that invokes a FileSelectDialog
+
+ Subwidgets Class
+ ---------- -----
+ button Button
+ entry Entry"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileEntry',
+ ['dialogtype', 'options'], cnf, kw)
+ self.subwidget_list['button'] = _dummyButton(self, 'button')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+ def file_dialog(self):
+ # XXX return python object
+ pass
+
+class HList(TixWidget):
+ """HList - Hierarchy display.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixHList',
+ ['columns', 'options'], cnf, kw)
+
+ def add(self, entry, cnf={}, **kw):
+ return apply(self.tk.call,
+ (self._w, 'add', entry) + self._options(cnf, kw))
+
+ def add_child(self, parent=None, cnf={}, **kw):
+ if not parent:
+ parent = ''
+ return apply(self.tk.call,
+ (self._w, 'addchild', parent) + self._options(cnf, kw))
+
+ def anchor_set(self, entry):
+ self.tk.call(self._w, 'anchor', 'set', entry)
+
+ def anchor_clear(self):
+ self.tk.call(self._w, 'anchor', 'clear')
+
+ def column_width(self, col=0, width=None, chars=None):
+ if not chars:
+ return self.tk.call(self._w, 'column', 'width', col, width)
+ else:
+ return self.tk.call(self._w, 'column', 'width', col,
+ '-char', chars)
+
+ def delete_all(self):
+ self.tk.call(self._w, 'delete', 'all')
+
+ def delete_entry(self, entry):
+ self.tk.call(self._w, 'delete', 'entry', entry)
+
+ def delete_offsprings(self, entry):
+ self.tk.call(self._w, 'delete', 'offsprings', entry)
+
+ def delete_siblings(self, entry):
+ self.tk.call(self._w, 'delete', 'siblings', entry)
+
+ def header_create(self, col, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'header', 'create', col) + self._options(cnf, kw))
+
+ def header_configure(self, col, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'header', 'configure', col)))
+ apply(self.tk.call, (self._w, 'header', 'configure', col)
+ + self._options(cnf, kw))
+
+ def header_cget(self, col, opt):
+ return self.tk.call(self._w, 'header', 'cget', col, opt)
+
+ def header_exists(self, col):
+ return self.tk.call(self._w, 'header', 'exists', col)
+
+ def header_delete(self, col):
+ self.tk.call(self._w, 'header', 'delete', col)
+
+ def header_size(self, col):
+ return self.tk.call(self._w, 'header', 'size', col)
+
+ def hide_entry(self, entry):
+ self.tk.call(self._w, 'hide', 'entry', entry)
+
+ def indicator_create(self, entry, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'indicator', 'create', entry) + self._options(cnf, kw))
+
+ def indicator_configure(self, entry, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'indicator', 'configure', entry)))
+ apply(self.tk.call,
+ (self._w, 'indicator', 'configure', entry) + self._options(cnf, kw))
+
+ def indicator_cget(self, entry, opt):
+ return self.tk.call(self._w, 'indicator', 'cget', entry, opt)
+
+ def indicator_exists(self, entry):
+ return self.tk.call (self._w, 'indicator', 'exists', entry)
+
+ def indicator_delete(self, entry):
+ self.tk.call(self._w, 'indicator', 'delete', entry)
+
+ def indicator_size(self, entry):
+ return self.tk.call(self._w, 'indicator', 'size', entry)
+
+ def info_anchor(self):
+ return self.tk.call(self._w, 'info', 'anchor')
+
+ def info_children(self, entry=None):
+ c = self.tk.call(self._w, 'info', 'children', entry)
+ return self.tk.splitlist(c)
+
+ def info_data(self, entry):
+ return self.tk.call(self._w, 'info', 'data', entry)
+
+ def info_exists(self, entry):
+ return self.tk.call(self._w, 'info', 'exists', entry)
+
+ def info_hidden(self, entry):
+ return self.tk.call(self._w, 'info', 'hidden', entry)
+
+ def info_next(self, entry):
+ return self.tk.call(self._w, 'info', 'next', entry)
+
+ def info_parent(self, entry):
+ return self.tk.call(self._w, 'info', 'parent', entry)
+
+ def info_prev(self, entry):
+ return self.tk.call(self._w, 'info', 'prev', entry)
+
+ def info_selection(self):
+ c = self.tk.call(self._w, 'info', 'selection')
+ return self.tk.splitlist(c)
+
+ def item_cget(self, col, opt):
+ return self.tk.call(self._w, 'item', 'cget', col, opt)
+
+ def item_configure(self, entry, col, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'item', 'configure', entry, col)))
+ apply(self.tk.call, (self._w, 'item', 'configure', entry, col) +
+ self._options(cnf, kw))
+
+ def item_create(self, entry, col, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'item', 'create', entry, col) + self._options(cnf, kw))
+
+ def item_exists(self, entry, col):
+ return self.tk.call(self._w, 'item', 'exists', entry, col)
+
+ def item_delete(self, entry, col):
+ self.tk.call(self._w, 'item', 'delete', entry, col)
+
+ def nearest(self, y):
+ return self.tk.call(self._w, 'nearest', y)
+
+ def see(self, entry):
+ self.tk.call(self._w, 'see', entry)
+
+ def selection_clear(self, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'selection', 'clear') + self._options(cnf, kw))
+
+ def selection_includes(self, entry):
+ return self.tk.call(self._w, 'selection', 'includes', entry)
+
+ def selectiom_set(self, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'selection', 'set') + self._options(cnf, kw))
+
+ def show_entry(self, entry):
+ return self.tk.call(self._w, 'show', 'entry', entry)
+
+ def xview(self, *args):
+ apply(self.tk.call, (self._w, 'xview') + args)
+
+ def yview(self, *args):
+ apply(self.tk.call, (self._w, 'yview') + args)
+
+class InputOnly(TixWidget):
+ """InputOnly - Invisible widget.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixInputOnly', None, cnf, kw)
+
+class LabelEntry(TixWidget):
+ """LabelEntry - Entry field with label.
+
+ Subwidgets Class
+ ---------- -----
+ label Label
+ entry Entry"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixLabelEntry',
+ ['labelside','options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+class LabelFrame(TixWidget):
+ """LabelFrame - Labelled Frame container.
+
+ Subwidgets Class
+ ---------- -----
+ label Label
+ frame Frame"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixLabelFrame',
+ ['labelside','options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['frame'] = _dummyFrame(self, 'frame')
+
+class Meter(TixWidget): # Rozen
+ """Meter - Widget suitable for displaying progress.
+
+ No Subwidgets"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self,master,'tixMeter',['options'], cnf, kw)
+
+class NoteBook(TixWidget):
+ """NoteBook - Multi-page container widget (tabbed notebook metaphor).
+
+ Subwidgets Class
+ ---------- -----
+ nbframe NoteBookFrame
+ <pages> g/p widgets added dynamically"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw)
+ self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe',
+ destroy_physically=0)
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name)
+ return self.subwidget_list[name]
+
+ def delete(self, name):
+ self.tk.call(self._w, 'delete', name)
+
+ def page(self, name):
+ return self.subwidget(name)
+
+ def pages(self):
+ # Can't call subwidgets_all directly because we don't want .nbframe
+ names = self.tk.split(self.tk.call(self._w, 'pages'))
+ ret = []
+ for x in names:
+ ret.append(self.subwidget(x))
+ return ret
+
+ def raise_page(self, name): # raise is a python keyword
+ self.tk.call(self._w, 'raise', name)
+
+ def raised(self):
+ return self.tk.call(self._w, 'raised')
+
+class NoteBookFrame(TixWidget):
+ """Will be added when Tix documentation is available !!!"""
+ pass
+
+class OptionMenu(TixWidget):
+ """OptionMenu - Option menu widget.
+
+ Subwidget Class
+ --------- -----
+ menubutton Menubutton
+ menu Menu"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixOptionMenu', ['options'], cnf, kw)
+ self.subwidget_list['menubutton'] = _dummyMenubutton(self, 'menubutton')
+ self.subwidget_list['menu'] = _dummyMenu(self, 'menu')
+
+ def add_command(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', 'command', name) + self._options(cnf, kw))
+
+ def add_separator(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', 'separator', name) + self._options(cnf, kw))
+
+ def delete(self, name):
+ self.tk.call(self._w, 'delete', name)
+
+ def disable(self, name):
+ self.tk.call(self._w, 'disable', name)
+
+ def enable(self, name):
+ self.tk.call(self._w, 'enable', name)
+
+class PanedWindow(TixWidget):
+ """PanedWindow - Multi-pane container widget. Panes are resizable.
+
+ Subwidgets Class
+ ---------- -----
+ <panes> g/p widgets added dynamically"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixPanedWindow', ['orientation', 'options'], cnf, kw)
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name,
+ check_intermediate=0)
+ return self.subwidget_list[name]
+
+ def panes(self):
+ names = self.tk.call(self._w, 'panes')
+ ret = []
+ for x in names:
+ ret.append(self.subwidget(x))
+ return ret
+
+class PopupMenu(TixWidget):
+ """PopupMenu widget.
+
+ Subwidgets Class
+ ---------- -----
+ menubutton Menubutton
+ menu Menu"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixPopupMenu', ['options'], cnf, kw)
+ self.subwidget_list['menubutton'] = _dummyMenubutton(self, 'menubutton')
+ self.subwidget_list['menu'] = _dummyMenu(self, 'menu')
+
+ def bind_widget(self, widget):
+ self.tk.call(self._w, 'bind', widget._w)
+
+ def unbind_widget(self, widget):
+ self.tk.call(self._w, 'unbind', widget._w)
+
+ def post_widget(self, widget, x, y):
+ self.tk.call(self._w, 'post', widget._w, x, y)
+
+class ResizeHandle(TixWidget):
+ """Incomplete - no documentation in Tix for this !!!"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixResizeHandle',
+ ['options'], cnf, kw)
+
+ def attach_widget(self, widget):
+ self.tk.call(self._w, 'attachwidget', widget._w)
+
+class ScrolledHList(TixWidget):
+ """ScrolledHList - HList with scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledHList', ['options'],
+ cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledListBox(TixWidget):
+ """ScrolledListBox - Listbox with scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledListBox', ['options'], cnf, kw)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledText(TixWidget):
+ """ScrolledText - Text with scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledText', ['options'], cnf, kw)
+ self.subwidget_list['text'] = _dummyText(self, 'text')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledWindow(TixWidget):
+ """ScrolledWindow - Window with scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw)
+ self.subwidget_list['window'] = _dummyFrame(self, 'window')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class Select(TixWidget):
+ """Select - Container for buttons. Can enforce radio buttons etc.
+
+ Subwidgets are buttons added dynamically"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixSelect',
+ ['allowzero', 'radio', 'orientation', 'labelside',
+ 'options'],
+ cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = _dummyButton(self, name)
+ return self.subwidget_list[name]
+
+ def invoke(self, name):
+ self.tk.call(self._w, 'invoke', name)
+
+class StdButtonBox(TixWidget):
+ """StdButtonBox - Standard Button Box (OK, Apply, Cancel and Help) """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixStdButtonBox',
+ ['orientation', 'options'], cnf, kw)
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['apply'] = _dummyButton(self, 'apply')
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['help'] = _dummyButton(self, 'help')
+
+ def invoke(self, name):
+ if self.subwidget_list.has_key(name):
+ self.tk.call(self._w, 'invoke', name)
+
+class Tree(TixWidget):
+ """Tree - The tixTree widget (general purpose DirList like widget)"""
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixTree',
+ ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def autosetmode(self):
+ self.tk.call(self._w, 'autosetmode')
+
+ def close(self, entrypath):
+ self.tk.call(self._w, 'close', entrypath)
+
+ def getmode(self, entrypath):
+ return self.tk.call(self._w, 'getmode', entrypath)
+
+ def open(self, entrypath):
+ self.tk.call(self._w, 'open', entrypath)
+
+ def setmode(self, entrypath, mode='none'):
+ self.tk.call(self._w, 'setmode', entrypath, mode)
+
+###########################################################################
+### The subclassing below is used to instantiate the subwidgets in each ###
+### mega widget. This allows us to access their methods directly. ###
+###########################################################################
+
+class _dummyButton(TixSubWidget, Button):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyCheckbutton(TixSubWidget, Checkbutton):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyEntry(TixSubWidget, Entry):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyFrame(TixSubWidget, Frame):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyLabel(TixSubWidget, Label):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyListbox(TixSubWidget, Listbox):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyMenu(TixSubWidget, Menu):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyMenubutton(TixSubWidget, Menubutton):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrollbar(TixSubWidget, Scrollbar):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyText(TixSubWidget, Text):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrolledListBox(TixSubWidget, ScrolledListBox):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyHList(TixSubWidget, HList):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyComboBox(TixSubWidget, ComboBox):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+ self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
+ self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
+ 'slistbox')
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox',
+ destroy_physically=0)
+
+class _dummyDirList(TixSubWidget, DirList):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyExFileSelectBox(TixSubWidget, ExFileSelectBox):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden')
+ self.subwidget_list['types'] = _dummyComboBox(self, 'types')
+ self.subwidget_list['dir'] = _dummyComboBox(self, 'dir')
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['file'] = _dummyComboBox(self, 'file')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+
+class _dummyFileSelectBox(TixSubWidget, FileSelectBox):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+ self.subwidget_list['filter'] = _dummyComboBox(self, 'filter')
+ self.subwidget_list['selection'] = _dummyComboBox(self, 'selection')
+
+class _dummyStdButtonBox(TixSubWidget, StdButtonBox):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['apply'] = _dummyButton(self, 'apply')
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['help'] = _dummyButton(self, 'help')
+
+class _dummyNoteBookFrame(TixSubWidget, NoteBookFrame):
+ def __init__(self, master, name, destroy_physically=0):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+########################
+### Utility Routines ###
+########################
+
+# Returns the qualified path name for the widget. Normally used to set
+# default options for subwidgets. See tixwidgets.py
+def OptionName(widget):
+ return widget.tk.call('tixOptionName', widget._w)
+
+# Called with a dictionary argument of the form
+# {'*.c':'C source files', '*.txt':'Text Files', '*':'All files'}
+# returns a string which can be used to configure the fsbox file types
+# in an ExFileSelectBox. i.e.,
+# '{{*} {* - All files}} {{*.c} {*.c - C source files}} {{*.txt} {*.txt - Text Files}}'
+def FileTypeList(dict):
+ s = ''
+ for type in dict.keys():
+ s = s + '{{' + type + '} {' + type + ' - ' + dict[type] + '}} '
+ return s
+
+
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/about.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/about.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+/* XPM */
+static char * about_xpm[] = {
+"50 40 7 1",
+" s None c None",
+". c black",
+"X c white",
+"o c gray70",
+"O c navy",
+"+ c red",
+"@ c yellow",
+" ",
+" ",
+" ",
+" ................................. ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
+" .XooooooooooooooooooooooooooooooXo. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
+" ..oooooooooooooooooooooooooooooooXo. ",
+" ...............................XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
+" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
+" .OOOOOOO at OOOOO@OOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOO@@OOO at OOO@OOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOO at O@OOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOOO at OOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOOO at OOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOO at O@OOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOO@@@OO at OOO@OOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
+" ............................. ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/bold.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/bold.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define bold_width 16
+#define bold_height 16
+static unsigned char bold_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
+ 0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/capital.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/capital.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define capital_width 16
+#define capital_height 16
+static unsigned char capital_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x30, 0x0c, 0x30, 0x06,
+ 0x30, 0x03, 0xb0, 0x01, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 0x03,
+ 0x30, 0x07, 0x30, 0x0e, 0x30, 0x1c, 0x00, 0x00};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/centerj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/centerj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define centerj_width 16
+#define centerj_height 16
+static unsigned char centerj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xc0, 0x0d,
+ 0x00, 0x00, 0x58, 0x77, 0x00, 0x00, 0xb0, 0x3b, 0x00, 0x00, 0xdc, 0xf7,
+ 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xd8, 0x7e};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define combobox_width 32
+#define combobox_height 32
+static unsigned char combobox_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
+ 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
+ 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
+ 0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
+ 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
+ 0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
+ 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
+ 0xf8, 0xff, 0xff, 0x3f, 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};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+/* XPM */
+static char * combobox_xpm[] = {
+"50 40 6 1",
+" s None c None",
+". c black",
+"X c white",
+"o c #FFFF80808080",
+"O c gray70",
+"+ c #808000008080",
+" ",
+" ",
+" ",
+" .................................... XXXXXXX ",
+" .ooooooooooooooooooooooooooooooooooX X . . ",
+" .ooooooooooooooooooooooooooooooooooX X . . ",
+" .oooo.oooooooooooooooooooooooooooooX X . . ",
+" .oo.o..oo.o.oo.o.ooooooooooooooooooX X . . ",
+" .o..o.o.o.oo.oo.oo.ooooooooooooooooX X ... . ",
+" .oo.oo.oo.o.oo.ooo.ooooooooooooooooX X . . ",
+" .ooooooooooooooooooooooooooooooooooX X . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...... ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+" X............................................ ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.O+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OX OX. ",
+" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.X ..X. ",
+" X.O+O+O+OOO+O+OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.XXXXX. ",
+" X.O.....X..........................OOX.X .X. ",
+" X.OX...XXX.X.XX.XX.................OOX.X .X. ",
+" X.OX.X..X..X.XX..XX.X..............OOX.X .X. ",
+" X.O.X...X..X.X...X..X..............OOX.X .X. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOX.X .X. ",
+" X.OOOOOOOOO+OOO+OOOOO+OOOO+OOOOOOOOOOX.X .X. ",
+" X.O+++OO+OO+O+OO++O++OO+OO+OOOOOOOOOOX.X...X. ",
+" X.OO+OO++OO+O+OO+OOO+OO+O++OOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOO+OOOOO++OO+OOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.X .X. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.O .OX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX. ",
+" X............................................ ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xpm.1
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/combobox.xpm.1 Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+/* XPM */
+static char * combobox_xpm[] = {
+"50 40 4 1",
+" s None c None",
+". c black",
+"X c #FFFF80808080",
+"o c gray70",
+" ",
+" ",
+" ",
+" .................................... ....... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . ... . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . ",
+" .................................... ....... ",
+" ",
+" ............................................. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .o...................................o.ooooo. ",
+" .o...................................o.ooooo. ",
+" .o...................................o.ooooo. ",
+" .o...................................o.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" ............................................. ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/drivea.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/drivea.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define drivea_width 32
+#define drivea_height 32
+static unsigned char drivea_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};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/drivea.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/drivea.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/exit.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/exit.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+/* XPM */
+static char * exit_xpm[] = {
+"50 40 5 1",
+" s None c None",
+". c black",
+"X c white",
+"o c #000080800000",
+"O c yellow",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ....................................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooOoooooooooooX. ",
+" .XoooooooooooooooooooooooOOooooooooooX. ",
+" .XoooooooooooooooooooooooOOOoooooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOOoooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
+" .XoooooooooooooooooooooooOOOoooooooooX. ",
+" .XoooooooooooooooooooooooOOooooooooooX. ",
+" .XoooooooooooooooooooooooOoooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" ....................................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/filebox.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/filebox.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define filebox_width 32
+#define filebox_height 32
+static unsigned char filebox_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, 0x20,
+ 0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
+ 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xe4, 0x7f, 0xfe, 0x27,
+ 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25,
+ 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24,
+ 0x24, 0x50, 0x02, 0x25, 0xe4, 0x7f, 0xfe, 0x27, 0x04, 0x00, 0x00, 0x20,
+ 0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
+ 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xfc, 0xff, 0xff, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/filebox.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/filebox.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+/* XPM */
+static char * filebox_xpm[] = {
+"50 40 6 1",
+" s None c None",
+". c white",
+"X c gray80",
+"o c black",
+"O c #FFFF80808080",
+"+ c gray70",
+" ",
+" ",
+" ",
+" ............................................ ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooooooooooooooooooooooooooooooooooooo.XXo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
+" .XX......................................XXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXoooooooooooooooo.XXXXoooooooooooooooo.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XX.................XXXX.................XXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXoooooooooooooooooooooooooooooooooooooo.Xo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" .XX.......................................Xo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .ooooooooooooooooooooooooooooooooooooooooooo ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/italic.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/italic.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define italic_width 16
+#define italic_height 16
+static unsigned char italic_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x80, 0x3f, 0x00, 0x06, 0x00, 0x06,
+ 0x00, 0x03, 0x00, 0x03, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00,
+ 0x60, 0x00, 0x60, 0x00, 0xfc, 0x01, 0xfc, 0x01};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/justify.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/justify.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define justify_width 16
+#define justify_height 16
+static unsigned char justify_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xdb, 0x00, 0x00, 0x7c, 0xdb,
+ 0x00, 0x00, 0xbc, 0xf7, 0x00, 0x00, 0xdc, 0xde, 0x00, 0x00, 0x6c, 0xdf,
+ 0x00, 0x00, 0x6c, 0xef, 0x00, 0x00, 0xdc, 0xdf};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/leftj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/leftj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define leftj_width 16
+#define leftj_height 16
+static unsigned char leftj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x6d, 0x00, 0x00, 0xdc, 0x01,
+ 0x00, 0x00, 0xec, 0x0e, 0x00, 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xdc, 0x03,
+ 0x00, 0x00, 0x6c, 0x3b, 0x00, 0x00, 0x6c, 0x1f};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/netw.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/netw.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define netw_width 32
+#define netw_height 32
+static unsigned char netw_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};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/netw.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/netw.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/optmenu.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/optmenu.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+/* XPM */
+static char * optmenu_xpm[] = {
+"50 40 5 1",
+" s None c None",
+". c white",
+"X c gray80",
+"o c gray50",
+"O c black",
+" ",
+" ",
+" .............................. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXOXOXXOXXOXXXXOOXXXXXXXXXXo ",
+" .XXXOXOXXOXOXXXOXXOXXXXXXXXXXo ",
+" .XXXXOXXOXXOXXXOXXXOXXXXXXXXXo ",
+" .XXXXOXXXOXXOOXXOXOXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo.............o ",
+" .............................o o ",
+" ..XXXOXXXXXOXXXXXXXXOXXXXXXXOo o ",
+" ..XXOXOXOXXOXOXXXOXXOXXXXXXXOo ...... o ",
+" ..XXXOXXXOXXOXXXOXXXOXXXXXXXOo . o o ",
+" ..XXOXXXOXXXOXOXXOXXOXXXXXXXOo . o o ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXOo .ooooo o ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOo o ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo o ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooo ",
+" .XXXXOXXXXXOXXXXXXXXXXXXXXXXXo ",
+" .XXXOXXXXXXXXXOXXXXXXXXXXXXXXo ",
+" .XXXXOXXOXXOXOXOXXXXXXXXXXXXXo ",
+" .XXXXXOXXOXOXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXOXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXOXOXXXXXXXOXOXXXXXOXXXXXXo ",
+" .XXXXXOXOXOXXOXXXXXOXXOXXXXXXo ",
+" .XXXXOXXOXOXOXXXOXOXOXXOXXXXXo ",
+" .XXXOXXXXOXXOXXXOXXOXXXXOXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" oooooooooooooooooooooooooooooo ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/rightj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/rightj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define rightj_width 16
+#define rightj_height 16
+static unsigned char rightj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdb, 0x00, 0x00, 0x70, 0xdb,
+ 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0xd8, 0xde, 0x00, 0x00, 0xc0, 0xdd,
+ 0x00, 0x00, 0xa0, 0xef, 0x00, 0x00, 0xd8, 0xde};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/select.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/select.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,52 @@
+/* XPM */
+static char * select_xpm[] = {
+"50 40 9 1",
+" s None c None",
+". c black",
+"X c gray95",
+"o c gray50",
+"O c gray70",
+"+ c navy",
+"@ c #000080800000",
+"# c #808000000000",
+"$ c white",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............................................. ",
+" .XXXXXXXXXXooooooooooooXXXXXXXXXXXoXXXXXXXXXX. ",
+" .X ooOOOOOOOOOOXX oX o. ",
+" .X ooOOOOOOOOOOXX oX o. ",
+" .X ++++ ooOOOOOOOOOOXX ... oX @ o. ",
+" .X +++++ ooOOOOOOOOOOXX . . oX @@@ o. ",
+" .X +++ + ooOOOOOOOOOOXX . . oX @ @ o. ",
+" .X + + ooOO#####OOOXX . . oX @ @ o. ",
+" .X + + ooOO#OOO##OOXX . oX @ @ o. ",
+" .X + + ooO##OOOO##OXX . oX @ @ o. ",
+" .X ++ ++ ooO###OOO#OOXX . oX @ @ o. ",
+" .X +++++++ ooO#######OOXX . oX @ @ o. ",
+" .X + + ooO##O#OO#OOXX . oX @ @ o. ",
+" .X + ++ ooO##OOOOO#OXX . . oX @ @ o. ",
+" .X + + ooOO#OOOOO#OXX . . oX @ @@ o. ",
+" .X + ++ ooOO#OOOOO#OXX .... oX @@@@@ o. ",
+" .X ooOO######OOXX oX o. ",
+" .X ooOOOOOOOOOOXX $oX o. ",
+" .XoooooooooooXXXXXXXXXXXoooooooooooXooooooooo. ",
+" .............................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/tix.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/underline.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/bitmaps/underline.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define underline_width 16
+#define underline_height 16
+static unsigned char underline_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0x1c,
+ 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x70, 0x0e,
+ 0xf0, 0x0f, 0xe0, 0x07, 0x00, 0x00, 0xf8, 0x1f};
Added: external/tix-8.4.2.x/PyTix-2.0/demos/pman.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/pman.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,536 @@
+#! /usr/local/bin/python
+#
+#
+# $Id: pman.py,v 1.1 2000/11/05 19:52:02 idiscovery Exp $
+#
+# An xman like program. - Sudhir Shenoy, January 1996.
+#
+# Features:
+#
+# Can have multiple man pages open at the same time.
+#
+# Hypertext: Manual page cross references in the Apropos output or a man page
+# are highlighted when the mouse moves on top of them. Clicking button 1 over
+# the highlighted reference displays the relevant page.
+#
+# Regexp search in manual page window with wrap around.
+#
+# Handles MANPATH correctly. If the same man page (e.g. 'make') is in more
+# than one directory (/usr/man/man1 and /usr/local/man/man1), precedence is
+# decided by which dir appears first in the MANPATH.
+#
+# BUGS: Doesn't handle the case when the reference is split across two lines.
+# This can be fixed by sucking in the whole text from the text widget and then
+# doing the search e.g., in class ManWindow but this involves more work.
+#
+# Page display is slow.
+#
+
+import os, regex, regsub, string, sys, Tix
+
+BOLDFONT = '*-Courier-Bold-R-Normal-*-140-*'
+ITALICFONT = '*-Courier-Medium-O-Normal-*-140-*'
+
+footer_pat = regex.compile('^ Page [1-9][0-9]*[ \t]+\|^.*Last change:.*[1-9][0-9]*\n')
+empty_pat = regex.compile('^[ \t]*\n')
+underline_pat = regex.compile('^[ \t]*[Xv!_][Xv!_ \t]*\n')
+link_pat = regex.compile('\([A-Za-z0-9._]+\)[ \t]*([ \t]*\([A-Za-z0-9]+\)[ \t]*)')
+
+# Man Page display widget - borrowed from Guido's demos with minor changes.
+class ManPageWidget(Tix.ScrolledText):
+ def __init__(self, master=None, cnf={}):
+ # Initialize base class
+ Tix.ScrolledText.__init__(self, master, cnf)
+ self.text['state'] = 'disabled'
+
+ # Define tags for formatting styles
+ self.text.tag_config('X', {'underline': 1})
+ self.text.tag_config('!', {'font': BOLDFONT})
+ self.text.tag_config('_', {'font': ITALICFONT})
+
+ # Set state to idle
+ self.fp = None
+ self.lineno = 0
+ self.tagnum = 0
+
+ # Test whether we are busy parsing a file
+ def busy(self):
+ return self.fp != None
+
+ # Ensure we're not busy
+ def kill(self):
+ if self.busy():
+ self._endparser()
+
+ # Parse a file, in the background
+ def asyncparsefile(self, fp):
+ self._startparser(fp)
+ self.tk.createfilehandler(fp, Tix.READABLE, self._filehandler)
+
+ parsefile = asyncparsefile # Alias
+
+ # I/O handler used by background parsing
+ def _filehandler(self, fp, mask):
+ nextline = self.fp.readline()
+ if not nextline:
+ self._endparser()
+ return
+ self._parseline(nextline)
+
+ # Parse a file, now (cannot be aborted)
+ def syncparsefile(self, fp):
+ from select import select
+ def avail(fp=fp, tout=0.0, select=select):
+ return select([fp], [], [], tout)[0]
+ height = self.getint(self['height'])
+ self._startparser(fp)
+ while 1:
+ nextline = fp.readline()
+ if not nextline:
+ break
+ self._parseline(nextline)
+ self._endparser()
+
+ # Initialize parsing from a particular file -- must not be busy
+ def _startparser(self, fp):
+ if self.busy():
+ raise RuntimeError, 'startparser: still busy'
+ fp.fileno() # Test for file-ness
+ self.fp = fp
+ self.lineno = 0
+ self.tagnum = 0
+ self.ok = 0
+ self.empty = 0
+ self.buffer = None
+ self.text['state'] = 'normal'
+ self.text.delete('1.0', 'end')
+ self.text['state'] = 'disabled'
+
+ # End parsing -- must be busy, need not be at EOF
+ def _endparser(self):
+ if not self.busy():
+ raise RuntimeError, 'endparser: not busy'
+ if self.buffer:
+ self._parseline('')
+ try:
+ self.tk.deletefilehandler(self.fp)
+ except Tix.TclError, msg:
+ pass
+ self.fp.close()
+ self.fp = None
+ del self.ok, self.empty, self.buffer
+
+ # Parse a single line
+ def _parseline(self, nextline):
+ if not self.buffer:
+ # Save this line -- we need one line read-ahead
+ self.buffer = nextline
+ return
+ if empty_pat.match(self.buffer) >= 0:
+ # Buffered line was empty -- set a flag
+ self.empty = 1
+ self.buffer = nextline
+ return
+ textline = self.buffer
+ if underline_pat.match(nextline) >= 0:
+ # Next line is properties for buffered line
+ propline = nextline
+ self.buffer = None
+ else:
+ # Next line is read-ahead
+ propline = None
+ self.buffer = nextline
+ if not self.ok:
+ # First non blank line after footer must be header
+ # -- skip that too
+ self.ok = 1
+ self.empty = 0
+ return
+ if footer_pat.match(textline) >= 0:
+ # Footer -- start skipping until next non-blank line
+ self.ok = 0
+ self.empty = 0
+ return
+ self.text['state'] = 'normal'
+ if Tix.TkVersion >= 4.0:
+ self.text.mark_set('insert', 'end-1c')
+ else:
+ self.text.mark_set('insert', 'end')
+ if self.empty:
+ # One or more previous lines were empty
+ # -- insert one blank line in the text
+ self._insert_prop('\n')
+ self.lineno = self.lineno + 1
+ self.empty = 0
+ if not propline:
+ # No properties
+ self._insert_prop(textline)
+ else:
+ # Search for properties
+ p = ''
+ j = 0
+ for i in range(min(len(propline), len(textline))):
+ if propline[i] != p:
+ if j < i:
+ self._insert_prop(textline[j:i], p)
+ j = i
+ p = propline[i]
+ self._insert_prop(textline[j:])
+ startpos = 0
+ line = textline[:]
+ while 1:
+ pos = link_pat.search(line)
+ if pos < 0:
+ break
+ pos = pos + startpos
+ startpos = startpos + link_pat.regs[0][1]
+ tag = self._w + `self.tagnum`
+ self.tagnum = self.tagnum + 1
+ self.text.tag_add(tag, '%d.%d' % (self.lineno + 1, pos),
+ '%d.%d' % (self.lineno + 1, startpos))
+ self.text.tag_bind(tag, '<Any-Enter>',
+ lambda e=None,t=tag,w=self: w._highlight(t, 1))
+ self.text.tag_bind(tag, '<Any-Leave>',
+ lambda e=None,t=tag,w=self: w._highlight(t, 0))
+ self.text.tag_bind(tag, '<1>',
+ lambda e=None,w=self,t=textline[pos:startpos]:
+ w._hyper_link(t))
+ if startpos >= len(textline):
+ break
+ line = textline[startpos:]
+ self.lineno = self.lineno + 1
+ self.text['state'] = 'disabled'
+
+ def _highlight(self, tag, how):
+ if how:
+ self.text.tag_config(tag, background="#43ce80", relief=Tix.RAISED)
+ else:
+ self.text.tag_config(tag, background="", relief=Tix.FLAT)
+
+ def _hyper_link(self, txt):
+ if link_pat.search(txt) < 0:
+ print "Invalid man reference string"
+ return
+ pagename = txt[link_pat.regs[1][0]:link_pat.regs[1][1]]
+ section = txt[link_pat.regs[2][0]:link_pat.regs[2][1]]
+ mandirs = ManDirectories()
+ pipe = mandirs.FormattedPipe(section, pagename)
+ self.parsefile(pipe)
+
+ # Insert a string at the end, with at most one property (tag)
+ def _insert_prop(self, str, prop = ' '):
+ here = self.text.index('insert')
+ self.text.insert('insert', str)
+ if prop != ' ':
+ self.text.tag_add(prop, here, 'insert')
+#end class ManPageWidget
+
+
+class ManDirectories:
+ """Find all man directories (using MANPATH if defined)
+
+ The section names are kept in the list sections.
+ Descriptive names are in the dictionary section_names
+ The full path name(s) for each section are in the dictionary secpaths."""
+
+ def __init__(self):
+ known_names = {'1':'User Commands', '1b':'Commands: BSD',
+ '1c':'Commands: Communications',
+ '1f':'Commands: FMLI', '1m':'Commands: Maintenance',
+ '1s':'Commands: SunOS specific',
+ '2':'System Calls',
+ '3':'Subroutines', '3b':'Routines: BSD',
+ '3c':'Routines: C Library', '3e':'Routines: ELF',
+ '3g':'Routines: General', '3i':'Routines: Wide Char',
+ '3k':'Routines: Kernel VM', '3m':'Routines: Math',
+ '3n':'Routines: Network', '3r':'Routines: Realtime',
+ '3s':'Routines: Std. I/O', '3t':'Routines: Threads',
+ '3x':'Routines: Misc.',
+ '4':'File Formats', '4b':'Files: BSD',
+ '5':'Miscellaneous',
+ '6':'Games',
+ '7':'Devices',
+ '9':'Device Drivers', '9e':'Drivers: Entry Points',
+ '9f':'Drivers: Functions',
+ '9s':'Drivers: Data Structures',
+ 'l':'Local',
+ 'n':'New'}
+ if os.environ.has_key('MANPATH'):
+ manpath = os.environ["MANPATH"]
+ if not manpath:
+ manpath = "/usr/share/man"
+ manpath = string.splitfields(manpath, ':')
+ self.secpaths = {}
+ for path in manpath:
+ files = os.listdir(path)
+ for f in files:
+ if os.path.isdir(path + '/' + f) and len(f) > 3 and f[:3] == 'man':
+ sec = f[3:]
+ if self.secpaths.has_key(sec):
+ temp = self.secpaths[sec] + ':'
+ else:
+ temp = ''
+ self.secpaths[sec] = temp + path + '/' + f
+ self.sections = self.secpaths.keys()
+ self.sections.sort()
+ self.section_names = {}
+ for s in self.sections:
+ if s in known_names.keys():
+ self.section_names[s + ': ' + known_names[s]] = s
+ else:
+ self.section_names[s] = s
+
+ def Pages(self, secname):
+ if not self.secpaths.has_key(secname):
+ return []
+ paths = string.splitfields(self.secpaths[secname], ':')
+ wid = len(secname)
+ names = []
+ for path in paths:
+ files = os.listdir(path)
+ for file in files:
+ if file[-(wid + 1):-wid] == '.' and file[-wid:] == secname:
+ file = file[:-(wid + 1)]
+ if file not in names:
+ # if duplicate - preceding path takes precedence
+ names.append(file)
+ names.sort()
+ return names
+
+ def FormattedPipe(self, secname, page):
+ secname = string.lower(secname)
+ if not self.secpaths.has_key(secname):
+ raise ValueError
+ file = page + '.' + secname
+ paths = string.splitfields(self.secpaths[secname], ':')
+ cwd = os.getcwd()
+ for path in paths:
+ files = os.listdir(path)
+ if file in files:
+ file = path + '/' + file
+ os.chdir(path)
+ os.chdir('..')
+ break
+ pipe = os.popen('nroff -man %s | ul -i' % file)
+ os.chdir(cwd)
+ return pipe
+#end class ManDirectories
+
+
+class ManPageWindow:
+ def __init__(self, pipe):
+ self.top = Tix.Toplevel()
+ frame = Tix.Frame(self.top)
+ frame2 = Tix.Frame(frame)
+ self.search_str = Tix.StringVar()
+ self.case_sensitive = Tix.StringVar()
+ btn = Tix.Button(frame2, text='Regexp Search:', command=self.Search)
+ entry = Tix.Entry(frame2, relief=Tix.SUNKEN)
+ entry['textvariable'] = self.search_str
+ entry.bind('<Return>', self.Search)
+ casesense = Tix.Checkbutton(frame2, text='Case Sensitive',
+ relief=Tix.FLAT,
+ variable=self.case_sensitive)
+ btn.pack(side=Tix.LEFT, expand=0)
+ entry.pack(side=Tix.LEFT, expand=1, fill=Tix.X)
+ casesense.pack(side=Tix.RIGHT, expand=0)
+ self.man = ManPageWidget(frame)
+ btn = Tix.Button(frame, text='Close', command=self.Quit)
+ frame2.pack(side=Tix.TOP, expand=0, fill=Tix.X)
+ self.man.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
+ btn.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
+ frame.pack(expand=1, fill=Tix.BOTH)
+ self.man.parsefile(pipe)
+
+ def Search(self, event=None):
+ str = self.search_str.get()
+ if not str:
+ self.top.bell()
+ print "No search string ?"
+ return
+ try:
+ if self.case_sensitive.get() == '1':
+ pat = regex.compile(str, regex.casefold)
+ else:
+ pat = regex.compile(str)
+ except regex.error, msg:
+ self.top.bell()
+ print "regex error"
+ return
+ pos = self.man.text.index('insert')
+ lineno = string.atoi(pos[:string.find(pos, '.')])
+ endpos = self.man.text.index('end')
+ endlineno = string.atoi(endpos[:string.find(endpos, '.')])
+ wraplineno = lineno
+ found = 0
+ while 1:
+ lineno = lineno + 1
+ if lineno > endlineno:
+ if wraplineno <= 0:
+ break
+ endlineno = wraplineno
+ lineno = 0
+ wraplineno = 0
+ line = self.man.text.get('%d.0 linestart' % lineno,
+ '%d.0 lineend' % lineno)
+ i = pat.search(line)
+ if i >= 0:
+ found = 1
+ n = max(1, len(pat.group(0)))
+ try:
+ self.man.text.tag_remove('sel', 'sel.first', 'sel.last')
+ except Tix.TclError:
+ pass
+ self.man.text.tag_add('sel', '%d.%d' % (lineno, i),
+ '%d.%d' % (lineno, i+n))
+ self.man.text.mark_set('insert', '%d.%d' % (lineno, i))
+ self.man.text.yview_pickplace('insert')
+ break
+
+ if not found:
+ self.frame.bell()
+
+ def Quit(self):
+ del self.search_str
+ del self.case_sensitive
+ self.top.destroy()
+#end class ManPageWindow
+
+class AproposWindow:
+ def __init__(self):
+ self.top = Tix.Toplevel()
+ frame = Tix.Frame(self.top)
+ frame2 = Tix.Frame(frame)
+ self.apropos_str = Tix.StringVar()
+ btn = Tix.Button(frame2, text='Apropos:', command=self.Apropos)
+ entry = Tix.Entry(frame2, relief=Tix.SUNKEN, width=20)
+ entry['textvariable'] = self.apropos_str
+ entry.bind('<Return>', self.Apropos)
+ btn.pack(side=Tix.LEFT, expand=0)
+ entry.pack(side=Tix.RIGHT, expand=1, fill=Tix.X)
+ frame2.pack(side=Tix.TOP, expand=0, fill=Tix.X)
+ self.stext = Tix.ScrolledText(frame)
+ self.stext.text.tag_config('!', font=BOLDFONT)
+ btn = Tix.Button(frame, text='Close', command=self.Quit)
+ self.stext.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
+ btn.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
+ frame.pack(expand=1, fill=Tix.BOTH)
+
+ def Apropos(self, event=None):
+ str = self.apropos_str.get()
+ if not str:
+ self.top.bell()
+ print "No string ?"
+ return
+ pipe = os.popen('apropos ' + str, 'r')
+ self.stext.text.delete('1.0', Tix.END)
+ tabs = regex.compile('\011+')
+ num = 1
+ while 1:
+ line = pipe.readline()
+ if not line:
+ break
+ line = regsub.gsub(tabs, '\011', line)
+ fields = string.splitfields(line, '\011')
+ if len(fields) == 1:
+ line = line[string.find(line, ' ') + 1:]
+ line = regsub.gsub('^ *', '', line)
+ fields = ['???', line]
+ if len(fields) == 2:
+ tmp = string.splitfields(fields[1], '-')
+ fields = fields[0:1] + tmp
+ num = num + 1
+ self.stext.text.insert('insert', fields[0]+'\t', '!')
+ self.stext.text.insert('insert', fields[1], `num`)
+ self.stext.text.tag_bind(`num`, '<Any-Enter>',
+ lambda e=None,t=`num`,w=self:
+ w._highlight(t, 1))
+ self.stext.text.tag_bind(`num`, '<Any-Leave>',
+ lambda e=None,t=`num`,w=self:
+ w._highlight(t, 0))
+ self.stext.text.tag_bind(`num`, '<1>',
+ lambda e=None,w=self,t=fields[1]:
+ w._hyper_link(t))
+ self.stext.text.insert('insert', fields[2])
+
+ def _highlight(self, tag, how):
+ if how:
+ self.stext.text.tag_config(tag, background="#43ce80",
+ relief=Tix.RAISED)
+ else:
+ self.stext.text.tag_config(tag, background="", relief=Tix.FLAT)
+
+ def _hyper_link(self, txt):
+ if link_pat.search(txt) < 0:
+ print "Invalid man reference string"
+ return
+ pagename = txt[link_pat.regs[1][0]:link_pat.regs[1][1]]
+ section = txt[link_pat.regs[2][0]:link_pat.regs[2][1]]
+ mandirs = ManDirectories()
+ pipe = mandirs.FormattedPipe(section, pagename)
+ disp = ManPageWindow(pipe)
+
+ def Quit(self):
+ del self.apropos_str
+ self.top.destroy()
+
+class PManWindow:
+ def __init__(self, master=None):
+ self.mandirs = ManDirectories()
+ self.frame = Tix.Frame(master)
+ self.section = Tix.StringVar()
+ combo = Tix.ComboBox(self.frame, label='Section: ', dropdown=1,
+ editable=0, variable=self.section,
+ command=self.UpdatePageList)
+ pagelist = Tix.ScrolledListBox(self.frame, scrollbar='auto')
+ self.listbox = pagelist.listbox
+ self.listbox.bind('<Double-1>', self.ShowPage)
+ temp = self.mandirs.section_names.keys()
+ temp.sort()
+ for s in temp:
+ combo.insert(Tix.END, s)
+ box = Tix.ButtonBox(self.frame, orientation=Tix.HORIZONTAL)
+ box.add('show', text='Show Page ...', underline=0, width=13,
+ command=self.ShowPage)
+ box.add('aprop', text='Apropos ...', underline=0, width=13,
+ command=self.Apropos)
+ box.add('quit', text='Quit', underline=0, width=13,
+ command=self.Quit)
+ combo.pack(side=Tix.TOP, expand=0, fill=Tix.X)
+ pagelist.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
+ box.pack(side=Tix.BOTTOM, expand=0, fill=Tix.X)
+ self.frame.pack(expand=1, fill=Tix.BOTH)
+
+ def UpdatePageList(self, event=None):
+ secname = self.section.get()
+ if not self.mandirs.section_names.has_key(secname):
+ return
+ secname = self.mandirs.section_names[secname]
+ pages = self.mandirs.Pages(secname)
+ self.listbox.delete(0, Tix.END)
+ for page in pages:
+ self.listbox.insert(Tix.END, page)
+
+ def ShowPage(self, event=None):
+ secname = self.section.get()
+ secname = self.mandirs.section_names[secname]
+ idx = self.listbox.curselection()
+ pagename = self.listbox.get(idx)
+ pipe = self.mandirs.FormattedPipe(secname, pagename)
+ page_display = ManPageWindow(pipe)
+
+ def Apropos(self):
+ apropos_disp = AproposWindow()
+
+ def Quit(self):
+ sys.exit()
+#end class PManWindow
+
+def main():
+ root = Tix.Tk()
+ root.minsize(10, 10)
+ win = PManWindow(root)
+ root.mainloop()
+
+if __name__ == '__main__':
+ main()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/Balloon.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/Balloon.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+#!/usr/local/bin/python
+#
+# $Id: Balloon.py,v 1.1 2000/11/05 19:54:53 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixBalloon widget, which provides
+# a interesting way to give help tips about elements in your user interface.
+# Your can display the help message in a "balloon" and a status bar widget.
+#
+
+import Tix
+
+def RunSample(w):
+ status = Tix.Label(w, width=40, relief=Tix.SUNKEN, bd=1)
+ status.pack(side=Tix.BOTTOM, fill=Tix.Y, padx=2, pady=1)
+
+ # Create two mysterious widgets that need balloon help
+ button1 = Tix.Button(w, text='Something Unexpected',
+ command=lambda w=w: w.destroy())
+ button2 = Tix.Button(w, text='Something Else Unexpected')
+ button2['command'] = lambda w=button2: w.destroy()
+ button1.pack(side=Tix.TOP, expand=1)
+ button2.pack(side=Tix.TOP, expand=1)
+
+ # Create the balloon widget and associate it with the widgets that we want
+ # to provide tips for:
+ b = Tix.Balloon(w, statusbar=status)
+
+ b.bind_widget(button1, balloonmsg='Close Window',
+ statusmsg='Press this button to close this window')
+ b.bind_widget(button2, balloonmsg='Self-destruct button',
+ statusmsg='Press this button and it will destroy itself')
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/BtnBox.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/BtnBox.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+#!/usr/local/bin/python
+#
+# $Id: BtnBox.py,v 1.1 2000/11/05 19:56:48 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixButtonBox widget, which is a
+# group of TK buttons. You can use it to manage the buttons in a dialog box,
+# for example.
+#
+
+import Tix
+
+def RunSample(w):
+ # Create the label on the top of the dialog box
+ #
+ top = Tix.Label(w, padx=20, pady=10, bd=1, relief=Tix.RAISED,
+ anchor=Tix.CENTER, text='This dialog box is\n a demonstration of the\n tixButtonBox widget')
+
+ # Create the button box and add a few buttons in it. Set the
+ # -width of all the buttons to the same value so that they
+ # appear in the same size.
+ #
+ # Note that the -text, -underline, -command and -width options are all
+ # standard options of the button widgets.
+ #
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='OK', underline=0, width=5,
+ command=lambda w=w: w.destroy())
+ box.add('close', text='Cancel', underline=0, width=5,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/CmpImg.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/CmpImg.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,197 @@
+#!/usr/local/bin/python
+#
+# $Id: CmpImg.py,v 1.1 2000/11/05 19:57:44 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the compound images: it uses compound
+# images to display a text string together with a pixmap inside
+# buttons
+#
+
+import Tix
+
+network_pixmap = """/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};
+"""
+
+hard_disk_pixmap = """/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
+"""
+
+network_bitmap = """
+#define netw_width 32
+#define netw_height 32
+static unsigned char netw_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};
+"""
+
+hard_disk_bitmap = """
+#define drivea_width 32
+#define drivea_height 32
+static unsigned char drivea_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};
+"""
+
+def RunSample(w):
+ w.img0 = Tix.Image('pixmap', data=network_pixmap)
+ if not w.img0:
+ w.img0 = Tix.Image('bitmap', data=network_bitmap)
+ w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap)
+ if not w.img0:
+ w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap)
+
+ hdd = Tix.Button(w, padx=4, pady=1, width=120)
+ net = Tix.Button(w, padx=4, pady=1, width=120)
+
+ # Create the first image: we create a line, then put a string,
+ # a space and a image into this line, from left to right.
+ # The result: we have a one-line image that consists of three
+ # individual items
+ #
+ # The tk.calls should be methods in Tix ...
+ w.hdd_img = Tix.Image('compound', window=hdd)
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'line')
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'text', '-text', 'Hard Disk',
+ '-underline', '0')
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'space', '-width', '7')
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'image', '-image', w.img1)
+
+ # Put this image into the first button
+ #
+ hdd['image'] = w.hdd_img
+
+ # Next button
+ w.net_img = Tix.Image('compound', window=net)
+ w.net_img.tk.call(str(w.net_img), 'add', 'line')
+ w.net_img.tk.call(str(w.net_img), 'add', 'text', '-text', 'Network',
+ '-underline', '0')
+ w.net_img.tk.call(str(w.net_img), 'add', 'space', '-width', '7')
+ w.net_img.tk.call(str(w.net_img), 'add', 'image', '-image', w.img0)
+
+ # Put this image into the first button
+ #
+ net['image'] = w.net_img
+
+ close = Tix.Button(w, pady=1, text='Close',
+ command=lambda w=w: w.destroy())
+
+ hdd.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
+ net.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
+ close.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
+
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/ComboBox.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/ComboBox.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,100 @@
+#!/usr/local/bin/python
+#
+# $Id: ComboBox.py,v 1.1 2000/11/05 19:58:00 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixComboBox widget, which is close
+# to the MS Window Combo Box control.
+#
+import Tix
+
+def RunSample(w):
+ global demo_month, demo_year
+
+ top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
+
+ demo_month = Tix.StringVar()
+ demo_year = Tix.StringVar()
+
+ # $w.top.a is a drop-down combo box. It is not editable -- who wants
+ # to invent new months?
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of both comboboxes to
+ # be 10 so that their labels appear to be aligned.
+ #
+ a = Tix.ComboBox(top, label="Month: ", dropdown=1,
+ command=select_month, editable=0, variable=demo_month,
+ options='listbox.height 6 label.width 10 label.anchor e')
+
+ # $w.top.b is a non-drop-down combo box. It is not editable: we provide
+ # four choices for the user, but he can enter an alternative year if he
+ # wants to.
+ #
+ # [Hint] Use the padY and anchor options of the label subwidget to
+ # align the label with the entry subwidget.
+ # [Hint] Notice that you should use padY (the NAME of the option) and not
+ # pady (the SWITCH of the option).
+ #
+ b = Tix.ComboBox(top, label="Year: ", dropdown=0,
+ command=select_year, editable=1, variable=demo_year,
+ options='listbox.height 4 label.padY 5 label.width 10 label.anchor ne')
+
+ a.pack(side=Tix.TOP, anchor=Tix.W)
+ b.pack(side=Tix.TOP, anchor=Tix.W)
+
+ a.insert(Tix.END, 'January')
+ a.insert(Tix.END, 'February')
+ a.insert(Tix.END, 'March')
+ a.insert(Tix.END, 'April')
+ a.insert(Tix.END, 'May')
+ a.insert(Tix.END, 'June')
+ a.insert(Tix.END, 'July')
+ a.insert(Tix.END, 'August')
+ a.insert(Tix.END, 'September')
+ a.insert(Tix.END, 'October')
+ a.insert(Tix.END, 'November')
+ a.insert(Tix.END, 'December')
+
+ b.insert(Tix.END, '1992')
+ b.insert(Tix.END, '1993')
+ b.insert(Tix.END, '1994')
+ b.insert(Tix.END, '1995')
+ b.insert(Tix.END, '1996')
+
+ # Use "tixSetSilent" to set the values of the combo box if you
+ # don't want your -command procedures (cbx:select_month and
+ # cbx:select_year) to be called.
+ #
+ a.set_silent('January')
+ b.set_silent('1995')
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: ok_command(w))
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def select_month(event=None):
+ print "Month =", demo_month.get()
+
+def select_year(event=None):
+ print "Year =", demo_year.get()
+
+def ok_command(w):
+ print "Month =", demo_month.get(), ", Year=", demo_year.get()
+ w.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/Control.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/Control.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,102 @@
+#!/usr/local/bin/python
+#
+# $Id: Control.py,v 1.1 2000/11/05 19:58:13 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixControl widget -- it is an
+# entry widget with up/down arrow buttons. You can use the arrow buttons
+# to adjust the value inside the entry widget.
+#
+# This example program uses three Control widgets. One lets you select
+# integer values; one lets you select floating point values and the last
+# one lets you select a few names.
+#
+import Tix
+
+def RunSample(w):
+ global demo_maker, demo_thrust, demo_num_engines
+
+ demo_maker = Tix.StringVar()
+ demo_thrust = Tix.DoubleVar()
+ demo_num_engines = Tix.IntVar()
+ demo_maker.set('P&W')
+ demo_thrust.set(20000.0)
+ demo_num_engines.set(2)
+
+ top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
+
+ # $w.top.a allows only integer values
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of the Controls to
+ # be 16 so that their labels appear to be aligned.
+ #
+ a = Tix.Control(top, label='Number of Engines: ', integer=1,
+ variable=demo_num_engines, min=1, max=4,
+ options='entry.width 10 label.width 20 label.anchor e')
+
+ b = Tix.Control(top, label='Thrust: ', integer=0,
+ min='10000.0', max='60000.0', step=500,
+ variable=demo_thrust,
+ options='entry.width 10 label.width 20 label.anchor e')
+
+ c = Tix.Control(top, label='Engine Maker: ', value='P&W',
+ variable=demo_maker,
+ options='entry.width 10 label.width 20 label.anchor e')
+
+ # We can't define these in the init because the widget 'c' doesn't
+ # exist yet and we need to reference it
+ c['incrcmd'] = lambda w=c: adjust_maker(w, 1)
+ c['decrcmd'] = lambda w=c: adjust_maker(w, -1)
+ c['validatecmd'] = lambda w=c: validate_maker(w)
+
+ a.pack(side=Tix.TOP, anchor=Tix.W)
+ b.pack(side=Tix.TOP, anchor=Tix.W)
+ c.pack(side=Tix.TOP, anchor=Tix.W)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: ok_command(w))
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+maker_list = ['P&W', 'GE', 'Rolls Royce']
+
+def adjust_maker(w, inc):
+ i = maker_list.index(demo_maker.get())
+ i = i + inc
+ if i >= len(maker_list):
+ i = 0
+ elif i < 0:
+ i = len(maker_list) - 1
+
+ # In Tcl/Tix we should return the string maker_list[i]. We can't
+ # do that in Tkinter so we set the global variable. (This works).
+ demo_maker.set(maker_list[i])
+
+def validate_maker(w):
+ try:
+ i = maker_list.index(demo_maker.get())
+ except:
+ # Works here though. Why ? Beats me.
+ return maker_list[0]
+ # Works here though. Why ? Beats me.
+ return maker_list[i]
+
+def ok_command(w):
+ print "Selected", demo_num_engines.get(), "of", demo_maker.get(), " engines each of thrust", demo_thrust.get()
+ w.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/NoteBook.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/NoteBook.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,119 @@
+#!/usr/local/bin/python
+#
+# $Id: NoteBook.py,v 1.1 2000/11/05 19:58:27 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixNoteBook widget, which allows
+# you to lay out your interface using a "notebook" metaphore
+#
+import Tix
+
+def RunSample(w):
+ global root
+ root = w
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ prefix = Tix.OptionName(w)
+ if prefix:
+ prefix = '*'+prefix
+ else:
+ prefix = ''
+ w.option_add(prefix+'*TixControl*entry.width', 10)
+ w.option_add(prefix+'*TixControl*label.width', 18)
+ w.option_add(prefix+'*TixControl*label.anchor', Tix.E)
+ w.option_add(prefix+'*TixNoteBook*tagPadX', 8)
+
+ # Create the notebook widget and set its backpagecolor to gray.
+ # Note that the -backpagecolor option belongs to the "nbframe"
+ # subwidget.
+ nb = Tix.NoteBook(w, name='nb', ipadx=6, ipady=6)
+ nb['bg'] = 'gray'
+ nb.nbframe['backpagecolor'] = 'gray'
+
+ # Create the two tabs on the notebook. The -underline option
+ # puts a underline on the first character of the labels of the tabs.
+ # Keyboard accelerators will be defined automatically according
+ # to the underlined character.
+ nb.add('hard_disk', label="Hard Disk", underline=0)
+ nb.add('network', label="Network", underline=0)
+
+ nb.pack(expand=1, fill=Tix.BOTH, padx=5, pady=5 ,side=Tix.TOP)
+
+ #----------------------------------------
+ # Create the first page
+ #----------------------------------------
+ # Create two frames: one for the common buttons, one for the
+ # other widgets
+ #
+ tab=nb.hard_disk
+ f = Tix.Frame(tab)
+ common = Tix.Frame(tab)
+
+ f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
+ common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
+
+ a = Tix.Control(f, value=12, label='Access time: ')
+ w = Tix.Control(f, value=400, label='Write Throughput: ')
+ r = Tix.Control(f, value=400, label='Read Throughput: ')
+ c = Tix.Control(f, value=1021, label='Capacity: ')
+
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+
+ # Create the common buttons
+ createCommonButtons(common)
+
+ #----------------------------------------
+ # Create the second page
+ #----------------------------------------
+
+ tab = nb.network
+
+ f = Tix.Frame(tab)
+ common = Tix.Frame(tab)
+
+ f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
+ common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
+
+ a = Tix.Control(f, value=12, label='Access time: ')
+ w = Tix.Control(f, value=400, label='Write Throughput: ')
+ r = Tix.Control(f, value=400, label='Read Throughput: ')
+ c = Tix.Control(f, value=1021, label='Capacity: ')
+ u = Tix.Control(f, value=10, label='Users: ')
+
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+ u.pack(side=Tix.TOP, padx=20, pady=2)
+
+ createCommonButtons(common)
+
+def doDestroy():
+ global root
+ root.destroy()
+
+def createCommonButtons(master):
+ ok = Tix.Button(master, name='ok', text='OK', width=6,
+ command=doDestroy)
+ cancel = Tix.Button(master, name='cancel',
+ text='Cancel', width=6,
+ command=doDestroy)
+
+ ok.pack(side=Tix.TOP, padx=2, pady=2)
+ cancel.pack(side=Tix.TOP, padx=2, pady=2)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/OptMenu.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/OptMenu.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,68 @@
+#!/usr/local/bin/python
+#
+# $Id: OptMenu.py,v 1.1 2000/11/05 19:58:41 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixOptionMenu widget -- you can
+# use it for the user to choose from a fixed set of options
+#
+import Tix
+
+options = {'text':'Plain Text', 'post':'PostScript', 'html':'HTML',
+ 'tex':'LaTeX', 'rtf':'Rich Text Format'}
+
+def RunSample(w):
+ global demo_opt_from, demo_opt_to
+
+ demo_opt_from = Tix.StringVar()
+ demo_opt_to = Tix.StringVar()
+
+ top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
+
+ from_file = Tix.OptionMenu(top, label="From File Format : ",
+ variable=demo_opt_from,
+ options = 'label.width 19 label.anchor e menubutton.width 15')
+
+ to_file = Tix.OptionMenu(top, label="To File Format : ",
+ variable=demo_opt_to,
+ options='label.width 19 label.anchor e menubutton.width 15')
+
+ # Add the available options to the two OptionMenu widgets
+ #
+ # [Hint] You have to add the options first before you set the
+ # global variables "demo_opt_from" and "demo_opt_to". Otherwise
+ # the OptionMenu widget will complain about "unknown options"!
+ #
+ for opt in options.keys():
+ from_file.add_command(opt, label=options[opt])
+ to_file.add_command(opt, label=options[opt])
+
+ demo_opt_from.set('html')
+ demo_opt_to.set('post')
+
+ from_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
+ to_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: ok_command(w))
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def ok_command(w):
+ print "Convert file from", demo_opt_from.get(), " to", demo_opt_to.get()
+ w.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/PopMenu.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/PopMenu.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,56 @@
+# Tix Demostration Program
+#
+# $Id: PopMenu.py,v 1.1 2000/11/05 19:58:57 idiscovery Exp $
+#
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixPopupMenu widget.
+#
+import Tix
+
+def RunSample(w):
+ # We create the frame and the button, then we'll bind the PopupMenu
+ # to both widgets. The result is, when you press the right mouse
+ # button over $w.top or $w.top.but, the PopupMenu will come up.
+ #
+ top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
+ but = Tix.Button(top, text='Press the right mouse button over this button or its surrounding area')
+ but.pack(expand=1, fill=Tix.BOTH, padx=50, pady=50)
+
+ p = Tix.PopupMenu(top, title='Popup Test')
+ p.bind_widget(top)
+ p.bind_widget(but)
+
+ # Set the entries inside the PopupMenu widget.
+ # [Hint] You have to manipulate the "menu" subwidget.
+ # $w.top.p itself is NOT a menu widget.
+ # [Hint] Watch carefully how the sub-menu is created
+ #
+ p.menu.add_command(label='Desktop', underline=0)
+ p.menu.add_command(label='Select', underline=0)
+ p.menu.add_command(label='Find', underline=0)
+ p.menu.add_command(label='System', underline=1)
+ p.menu.add_command(label='Help', underline=0)
+ m1 = Tix.Menu(p.menu)
+ m1.add_command(label='Hello')
+ p.menu.add_cascade(label='More', menu=m1)
+
+ but.pack(side=Tix.TOP, padx=40, pady=50)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/SHList1.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/SHList1.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,107 @@
+#!/usr/local/bin/python
+#
+# $Id: SHList1.py,v 1.1 2000/11/05 19:59:11 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixScrolledHList widget.
+#
+
+import Tix
+
+def RunSample (w) :
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
+
+ # Put a simple hierachy into the HList (two levels). Use colors and
+ # separator widgets (frames) to make the list look fancy
+ #
+ top.a = Tix.ScrolledHList(top)
+ top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
+
+
+ # This is our little relational database
+ #
+ bosses = [
+ ('jeff', 'Jeff Waxman'),
+ ('john', 'John Lee'),
+ ('peter', 'Peter Kenson')
+ ]
+
+ employees = [
+ ('alex', 'john', 'Alex Kellman'),
+ ('alan', 'john', 'Alan Adams'),
+ ('andy', 'peter', 'Andreas Crawford'),
+ ('doug', 'jeff', 'Douglas Bloom'),
+ ('jon', 'peter', 'Jon Baraki'),
+ ('chris', 'jeff', 'Chris Geoffrey'),
+ ('chuck', 'jeff', 'Chuck McLean')
+ ]
+
+ hlist=top.a.hlist
+
+ # Let configure the appearance of the HList subwidget
+ #
+ hlist.config( separator='.', width=25, drawbranch=0, indent=10)
+
+ count=0
+ for boss,name in bosses :
+ if count :
+ f=Tix.Frame(hlist, name='sep%d' % count, height=2, width=150,
+ bd=2, relief=Tix.SUNKEN, bg=hlist['bg'] )
+
+ hlist.add_child( itemtype=Tix.WINDOW,
+ window=f, state=Tix.DISABLED )
+
+ hlist.add(boss, itemtype=Tix.TEXT, text=name)
+ count = count+1
+
+
+ for person,boss,name in employees :
+ # '.' is the separator character we chose above
+ #
+ key= boss + '.' + person
+ # ^^^^ ^^^^^^
+ # parent entryPath / child's name
+
+ hlist.add( key, text=name )
+
+ # [Hint] Make sure the keys (e.g. 'boss.person') you choose
+ # are unique names. If you cannot be sure of this (because of
+ # the structure of your database, e.g.) you can use the
+ # "add_child" command instead:
+ #
+ # hlist.addchild( boss, text=name)
+ # ^^^^
+ # parent entryPath
+
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
+ box.add( 'ok', text='Ok', underline=0, width=6,
+ command = lambda w=w: w.destroy() )
+
+ box.add( 'cancel', text='Cancel', underline=0, width=6,
+ command = lambda w=w: w.destroy() )
+
+ box.pack( side=Tix.BOTTOM, fill=Tix.X)
+ top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if __name__== '__main__' :
+ root=Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/SHList2.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/SHList2.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,148 @@
+#!/usr/local/bin/python
+#
+# $Id: SHList2.py,v 1.1 2000/11/05 19:59:27 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the PyTix demo program "tixwidget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use multiple columns and multiple styles
+# in the tixHList widget
+#
+# In a tixHList widget, you can have one ore more columns.
+#
+
+import Tix
+
+def RunSample (w) :
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
+
+ # Put a simple hierachy into the HList (two levels). Use colors and
+ # separator widgets (frames) to make the list look fancy
+ #
+ top.a = Tix.ScrolledHList(top, options='hlist.columns 3 hlist.header 1' )
+
+ top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
+
+ hlist=top.a.hlist
+
+ # Create the title for the HList widget
+ # >> Notice that we have set the hlist.header subwidget option to true
+ # so that the header is displayed
+ #
+
+ boldfont=hlist.tk.call('tix','option','get','bold_font')
+
+ # First some styles for the headers
+ style={}
+ style['header'] = Tix.DisplayStyle(Tix.TEXT, fg='black', refwindow=top,
+ anchor=Tix.CENTER, padx=8, pady=2, font = boldfont )
+
+ hlist.header_create(0, itemtype=Tix.TEXT, text='Name',
+ style=style['header'])
+ hlist.header_create(1, itemtype=Tix.TEXT, text='Position',
+ style=style['header'])
+
+ # Notice that we use 3 columns in the hlist widget. This way when the user
+ # expands the windows wide, the right side of the header doesn't look
+ # chopped off. The following line ensures that the 3 column header is
+ # not shown unless the hlist window is wider than its contents.
+ #
+ hlist.column_width(2,0)
+
+ # This is our little relational database
+ #
+ boss = ('doe', 'John Doe', 'Director')
+
+ managers = [
+ ('jeff', 'Jeff Waxman', 'Manager'),
+ ('john', 'John Lee', 'Manager'),
+ ('peter', 'Peter Kenson', 'Manager')
+ ]
+
+ employees = [
+ ('alex', 'john', 'Alex Kellman', 'Clerk'),
+ ('alan', 'john', 'Alan Adams', 'Clerk'),
+ ('andy', 'peter', 'Andreas Crawford', 'Salesman'),
+ ('doug', 'jeff', 'Douglas Bloom', 'Clerk'),
+ ('jon', 'peter', 'Jon Baraki', 'Salesman'),
+ ('chris', 'jeff', 'Chris Geoffrey', 'Clerk'),
+ ('chuck', 'jeff', 'Chuck McLean', 'Cleaner')
+ ]
+
+ style['mgr_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=top,
+ fg='#202060', selectforeground = '#202060', font = boldfont )
+
+ style['mgr_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=top,
+ fg='#202060', selectforeground='#202060' )
+
+ style['empl_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=top,
+ fg='#602020', selectforeground = '#602020', font = boldfont )
+
+ style['empl_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=top,
+ fg='#602020', selectforeground = '#602020' )
+
+ # Let configure the appearance of the HList subwidget
+ #
+ hlist.config(separator='.', width=25, drawbranch=0, indent=10)
+ hlist.column_width(0, chars=20)
+
+ # Create the boss
+ #
+ hlist.add ('.', itemtype=Tix.TEXT, text=boss[1],
+ style=style['mgr_name'])
+ hlist.item_create('.', 1, itemtype=Tix.TEXT, text=boss[2],
+ style=style['mgr_posn'])
+
+ # Create the managers
+ #
+
+ for key,name,posn in managers :
+ e= '.'+ key
+ hlist.add(e, itemtype=Tix.TEXT, text=name,
+ style=style['mgr_name'])
+ hlist.item_create(e, 1, itemtype=Tix.TEXT, text=posn,
+ style=style['mgr_posn'])
+
+
+ for key,mgr,name,posn in employees :
+ # "." is the separator character we chose above
+
+ entrypath = '.' + mgr + '.' + key
+
+ # ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
+ # parent entryPath / child's name
+
+ hlist.add(entrypath, text=name, style=style['empl_name'])
+ hlist.item_create(entrypath, 1, itemtype=Tix.TEXT,
+ text = posn, style = style['empl_posn'] )
+
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
+ box.add( 'ok', text='Ok', underline=0, width=6,
+ command = lambda w=w: w.destroy() )
+
+ box.add( 'cancel', text='Cancel', underline=0, width=6,
+ command = lambda w=w: w.destroy() )
+
+ box.pack( side=Tix.BOTTOM, fill=Tix.X)
+ top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if __name__== '__main__' :
+ root=Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/samples/Tree.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/samples/Tree.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,80 @@
+#!/usr/local/bin/python
+#
+# $Id: Tree.py,v 1.1 2000/11/05 19:59:48 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates how to use the TixTree widget to display
+# dynamic hierachical data (the files in the Unix file system)
+#
+
+import Tix, os
+
+def RunSample(w):
+ top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
+ tree = Tix.Tree(top, options='separator "/"')
+ tree.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.LEFT)
+ tree['opencmd'] = lambda dir=None, w=tree: opendir(w, dir)
+
+ # The / directory is added in the "open" mode. The user can open it
+ # and then browse its subdirectories ...
+ adddir(tree, "/")
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, command=w.destroy, width=6)
+ box.add('cancel', text='Cancel', underline=0, command=w.destroy, width=6)
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def adddir(tree, dir):
+ if dir == '/':
+ text = '/'
+ else:
+ text = os.path.basename(dir)
+ tree.hlist.add(dir, itemtype=Tix.IMAGETEXT, text=text,
+ image=tree.tk.call('tix', 'getimage', 'folder'))
+ try:
+ os.listdir(dir)
+ tree.setmode(dir, 'open')
+ except os.error:
+ # No read permission ?
+ pass
+
+# This function is called whenever the user presses the (+) indicator or
+# double clicks on a directory whose mode is "open". It loads the files
+# inside that directory into the Tree widget.
+#
+# Note we didn't specify the closecmd option for the Tree widget, so it
+# performs the default action when the user presses the (-) indicator or
+# double clicks on a directory whose mode is "close": hide all of its child
+# entries
+def opendir(tree, dir):
+ entries = tree.hlist.info_children(dir)
+ if entries:
+ # We have already loaded this directory. Let's just
+ # show all the child entries
+ #
+ # Note: since we load the directory only once, it will not be
+ # refreshed if the you add or remove files from this
+ # directory.
+ #
+ for entry in entries:
+ tree.hlist.show_entry(entry)
+ files = os.listdir(dir)
+ for file in files:
+ if os.path.isdir(dir + '/' + file):
+ adddir(tree, dir + '/' + file)
+ else:
+ tree.hlist.add(dir + '/' + file, itemtype=Tix.IMAGETEXT, text=file,
+ image=tree.tk.call('tix', 'getimage', 'file'))
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/PyTix-2.0/demos/tixwidgets.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/PyTix-2.0/demos/tixwidgets.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,823 @@
+#! /usr/local/bin/python
+#
+# $Id: tixwidgets.py,v 1.2 2000/11/22 08:03:01 idiscovery Exp $
+#
+# tixwidgets.py --
+# This is a demo program of all Tix widgets available from Python. If
+# you have installed Python & Tix properly, you can execute this as
+#
+# % tixwidget.py
+#
+
+import os, sys, Tix
+
+class Demo:
+ pass
+
+root = Tix.Tk()
+demo = Demo()
+demo.dir = None # script directory
+demo.balloon = None # balloon widget
+demo.useBalloons = Tix.StringVar()
+demo.useBalloons.set('0')
+demo.statusbar = None # status bar widget
+demo.welmsg = None # Msg widget
+demo.welfont = '' # font name
+demo.welsize = '' # font size
+
+def main():
+ global demo, root
+
+ progname = sys.argv[0]
+ dirname = os.path.dirname(progname)
+ if dirname and dirname != os.curdir:
+ demo.dir = dirname
+ index = -1
+ for i in range(len(sys.path)):
+ p = sys.path[i]
+ if p in ("", os.curdir):
+ index = i
+ if index >= 0:
+ sys.path[index] = dirname
+ else:
+ sys.path.insert(0, dirname)
+ else:
+ demo.dir = os.getcwd()
+ sys.path.insert(0, demo.dir+'/samples')
+
+ root.withdraw()
+ root = Tix.Toplevel()
+ root.title('Tix Widget Demonstration')
+ root.geometry('780x570+50+50')
+
+ demo.balloon = Tix.Balloon(root)
+ frame1 = MkMainMenu(root)
+ frame2 = MkMainNotebook(root)
+ frame3 = MkMainStatus(root)
+ frame1.pack(side=Tix.TOP, fill=Tix.X)
+ frame3.pack(side=Tix.BOTTOM, fill=Tix.X)
+ frame2.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=4, pady=4)
+ demo.balloon['statusbar'] = demo.statusbar
+ root.mainloop()
+
+def exit_cmd(event=None):
+ sys.exit()
+
+def MkMainMenu(top):
+ global demo
+
+ w = Tix.Frame(top, bd=2, relief=Tix.RAISED)
+ file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
+ help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
+ file.pack(side=Tix.LEFT)
+ help.pack(side=Tix.RIGHT)
+ fm = Tix.Menu(file)
+ file['menu'] = fm
+ hm = Tix.Menu(help)
+ help['menu'] = hm
+
+ fm.add_command(label='Exit', underline=1, accelerator='Ctrl+X',
+ command=exit_cmd)
+ hm.add_checkbutton(label='BalloonHelp', underline=0, command=ToggleHelp,
+ variable=demo.useBalloons)
+ # The trace variable option doesn't seem to work, instead I use 'command'
+ #apply(w.tk.call, ('trace', 'variable', demo.useBalloons, 'w',
+ # ToggleHelp))
+ top.bind_all("<Control-x>", exit_cmd)
+ top.bind_all("<Control-X>", exit_cmd)
+ return w
+
+def MkMainNotebook(top):
+ top.option_add('*TixNoteBook*tagPadX', 6)
+ top.option_add('*TixNoteBook*tagPadY', 4)
+ top.option_add('*TixNoteBook*borderWidth', 2)
+ top.option_add('*TixNoteBook*font',
+ '-*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*')
+ w = Tix.NoteBook(top, ipadx=5, ipady=5)
+ w.add('wel', label='Welcome', underline=0,
+ createcmd=lambda w=w, name='wel': MkWelcome(w, name))
+ w.add('cho', label='Choosers', underline=0,
+ createcmd=lambda w=w, name='cho': MkChoosers(w, name))
+ w.add('scr', label='Scrolled Widgets', underline=0,
+ createcmd=lambda w=w, name='scr': MkScroll(w, name))
+ w.add('mgr', label='Manager Widgets', underline=0,
+ createcmd=lambda w=w, name='mgr': MkManager(w, name))
+ w.add('dir', label='Directory List', underline=0,
+ createcmd=lambda w=w, name='dir': MkDirList(w, name))
+ w.add('exp', label='Run Sample Programs', underline=0,
+ createcmd=lambda w=w, name='exp': MkSample(w, name))
+ return w
+
+def MkMainStatus(top):
+ global demo
+
+ w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
+ demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1, font='-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*')
+ demo.statusbar.form(padx=3, pady=3, left=0, right='%70')
+ return w
+
+def MkWelcome(nb, name):
+ w = nb.page(name)
+ bar = MkWelcomeBar(w)
+ text = MkWelcomeText(w)
+ bar.pack(side=Tix.TOP, fill=Tix.X, padx=2, pady=2)
+ text.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def MkWelcomeBar(top):
+ global demo
+
+ w = Tix.Frame(top, bd=2, relief=Tix.GROOVE)
+ b1 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
+ b2 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
+ b1.entry['width'] = 15
+ b1.slistbox.listbox['height'] = 3
+ b2.entry['width'] = 4
+ b2.slistbox.listbox['height'] = 3
+
+ demo.welfont = b1
+ demo.welsize = b2
+
+ b1.insert(Tix.END, 'Courier')
+ b1.insert(Tix.END, 'Helvetica')
+ b1.insert(Tix.END, 'Lucida')
+ b1.insert(Tix.END, 'Times Roman')
+
+ b2.insert(Tix.END, '8')
+ b2.insert(Tix.END, '10')
+ b2.insert(Tix.END, '12')
+ b2.insert(Tix.END, '14')
+ b2.insert(Tix.END, '18')
+
+ b1.pick(1)
+ b2.pick(3)
+
+ b1.pack(side=Tix.LEFT, padx=4, pady=4)
+ b2.pack(side=Tix.LEFT, padx=4, pady=4)
+
+ demo.balloon.bind_widget(b1, msg='Choose\na font',
+ statusmsg='Choose a font for this page')
+ demo.balloon.bind_widget(b2, msg='Point size',
+ statusmsg='Choose the font size for this page')
+ return w
+
+def MkWelcomeText(top):
+ global demo
+
+ w = Tix.ScrolledWindow(top, scrollbar='auto')
+ win = w.window
+ title = Tix.Label(win, font='-*-times-bold-r-normal-*-18-*-*-*-*-*-*-*',
+ bd=0, width=30, anchor=Tix.N, text='Welcome to TIX Version 4.0 from Python Version 1.3')
+ msg = Tix.Message(win, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ bd=0, width=400, anchor=Tix.N,
+ text='Tix 4.0 is a set of mega-widgets based on TK. This program \
+demonstrates the widgets in the Tix widget set. You can choose the pages \
+in this window to look at the corresponding widgets. \n\n\
+To quit this program, choose the "File | Exit" command.')
+ title.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
+ msg.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
+ demo.welmsg = msg
+ return w
+
+def MainTextFont(w):
+ global demo
+
+ if not demo.welmsg:
+ return
+ font = demo.welfont['value']
+ point = demo.welsize['value']
+ if font == 'Times Roman':
+ font = 'times'
+ fontstr = '-*-%s-bold-r-normal-*-%s-*-*-*-*-*-*-*' % (font, point)
+ demo.welmsg['font'] = fontstr
+
+def ToggleHelp():
+ if demo.useBalloons.get() == '1':
+ demo.balloon['state'] = 'both'
+ else:
+ demo.balloon['state'] = 'none'
+
+def MkChoosers(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ til = Tix.LabelFrame(w, label='Chooser Widgets')
+ cbx = Tix.LabelFrame(w, label='tixComboBox')
+ ctl = Tix.LabelFrame(w, label='tixControl')
+ sel = Tix.LabelFrame(w, label='tixSelect')
+ opt = Tix.LabelFrame(w, label='tixOptionMenu')
+ fil = Tix.LabelFrame(w, label='tixFileEntry')
+ fbx = Tix.LabelFrame(w, label='tixFileSelectBox')
+ tbr = Tix.LabelFrame(w, label='Tool Bar')
+
+ MkTitle(til.frame)
+ MkCombo(cbx.frame)
+ MkControl(ctl.frame)
+ MkSelect(sel.frame)
+ MkOptMenu(opt.frame)
+ MkFileEnt(fil.frame)
+ MkFileBox(fbx.frame)
+ MkToolBar(tbr.frame)
+
+ # First column: comBox and selector
+ cbx.form(top=0, left=0, right='%33')
+ sel.form(left=0, right='&'+str(cbx), top=cbx)
+ opt.form(left=0, right='&'+str(cbx), top=sel, bottom=-1)
+
+ # Second column: title .. etc
+ til.form(left=cbx, top=0,right='%66')
+ ctl.form(left=cbx, right='&'+str(til), top=til)
+ fil.form(left=cbx, right='&'+str(til), top=ctl)
+ tbr.form(left=cbx, right='&'+str(til), top=fil, bottom=-1)
+
+ #
+ # Third column: file selection
+ fbx.form(right=-1, top=0, left='%66')
+
+def MkCombo(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixComboBox*label.width', 10)
+ w.option_add('*' + prefix + '*TixComboBox*label.anchor', Tix.E)
+ w.option_add('*' + prefix + '*TixComboBox*entry.width', 14)
+
+ static = Tix.ComboBox(w, label='Static', editable=0)
+ editable = Tix.ComboBox(w, label='Editable', editable=1)
+ history = Tix.ComboBox(w, label='History', editable=1, history=1,
+ anchor=Tix.E)
+ static.insert(Tix.END, 'January')
+ static.insert(Tix.END, 'February')
+ static.insert(Tix.END, 'March')
+ static.insert(Tix.END, 'April')
+ static.insert(Tix.END, 'May')
+ static.insert(Tix.END, 'June')
+ static.insert(Tix.END, 'July')
+ static.insert(Tix.END, 'August')
+ static.insert(Tix.END, 'September')
+ static.insert(Tix.END, 'October')
+ static.insert(Tix.END, 'November')
+ static.insert(Tix.END, 'December')
+
+ editable.insert(Tix.END, 'Angola')
+ editable.insert(Tix.END, 'Bangladesh')
+ editable.insert(Tix.END, 'China')
+ editable.insert(Tix.END, 'Denmark')
+ editable.insert(Tix.END, 'Ecuador')
+
+ history.insert(Tix.END, '/usr/bin/ksh')
+ history.insert(Tix.END, '/usr/local/lib/python')
+ history.insert(Tix.END, '/var/adm')
+
+ static.pack(side=Tix.TOP, padx=5, pady=3)
+ editable.pack(side=Tix.TOP, padx=5, pady=3)
+ history.pack(side=Tix.TOP, padx=5, pady=3)
+
+states = ['Bengal', 'Delhi', 'Karnataka', 'Tamil Nadu']
+
+def spin_cmd(w, inc):
+ idx = states.index(demo_spintxt.get()) + inc
+ if idx < 0:
+ idx = len(states) - 1
+ elif idx >= len(states):
+ idx = 0
+# following doesn't work.
+# return states[idx]
+ demo_spintxt.set(states[idx]) # this works
+
+def spin_validate(w):
+ global states, demo_spintxt
+
+ try:
+ i = states.index(demo_spintxt.get())
+ except:
+ return states[0]
+ return states[i]
+ # why this procedure works as opposed to the previous one beats me.
+
+def MkControl(w):
+ global demo_spintxt
+
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixControl*label.width', 10)
+ w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
+ w.option_add('*' + prefix + '*TixControl*entry.width', 13)
+
+ demo_spintxt = Tix.StringVar()
+ demo_spintxt.set(states[0])
+ simple = Tix.Control(w, label='Numbers')
+ spintxt = Tix.Control(w, label='States', variable=demo_spintxt)
+ spintxt['incrcmd'] = lambda w=spintxt: spin_cmd(w, 1)
+ spintxt['decrcmd'] = lambda w=spintxt: spin_cmd(w, -1)
+ spintxt['validatecmd'] = lambda w=spintxt: spin_validate(w)
+
+ simple.pack(side=Tix.TOP, padx=5, pady=3)
+ spintxt.pack(side=Tix.TOP, padx=5, pady=3)
+
+def MkSelect(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixSelect*label.anchor', Tix.CENTER)
+ w.option_add('*' + prefix + '*TixSelect*orientation', Tix.VERTICAL)
+ w.option_add('*' + prefix + '*TixSelect*labelSide', Tix.TOP)
+
+ sel1 = Tix.Select(w, label='Mere Mortals', allowzero=1, radio=1)
+ sel2 = Tix.Select(w, label='Geeks', allowzero=1, radio=0)
+
+ sel1.add('eat', text='Eat')
+ sel1.add('work', text='Work')
+ sel1.add('play', text='Play')
+ sel1.add('party', text='Party')
+ sel1.add('sleep', text='Sleep')
+
+ sel2.add('eat', text='Eat')
+ sel2.add('prog1', text='Program')
+ sel2.add('prog2', text='Program')
+ sel2.add('prog3', text='Program')
+ sel2.add('sleep', text='Sleep')
+
+ sel1.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
+ sel2.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
+
+def MkOptMenu(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixOptionMenu*label.anchor', Tix.E)
+ m = Tix.OptionMenu(w, label='File Format : ', options='menubutton.width 15')
+ m.add_command('text', label='Plain Text')
+ m.add_command('post', label='PostScript')
+ m.add_command('format', label='Formatted Text')
+ m.add_command('html', label='HTML')
+ m.add_command('sep')
+ m.add_command('tex', label='LaTeX')
+ m.add_command('rtf', label='Rich Text Format')
+
+ m.pack(fill=Tix.X, padx=5, pady=3)
+
+def MkFileEnt(w):
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='Press the "open file" icon button and a TixFileSelectDialog will popup.')
+ ent = Tix.FileEntry(w, label='Select a file : ')
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ ent.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
+
+def MkFileBox(w):
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The TixFileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.')
+ box = Tix.FileSelectBox(w)
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ box.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
+
+def MkToolBar(w):
+ global demo
+
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The Select widget is also good for arranging buttons in a tool bar.')
+ bar = Tix.Frame(w, bd=2, relief=Tix.RAISED)
+ font = Tix.Select(w, allowzero=1, radio=0, label='')
+ para = Tix.Select(w, allowzero=0, radio=1, label='')
+
+ font.add('bold', bitmap='@' + demo.dir + '/bitmaps/bold.xbm')
+ font.add('italic', bitmap='@' + demo.dir + '/bitmaps/italic.xbm')
+ font.add('underline', bitmap='@' + demo.dir + '/bitmaps/underline.xbm')
+ font.add('capital', bitmap='@' + demo.dir + '/bitmaps/capital.xbm')
+
+ para.add('left', bitmap='@' + demo.dir + '/bitmaps/leftj.xbm')
+ para.add('right', bitmap='@' + demo.dir + '/bitmaps/rightj.xbm')
+ para.add('center', bitmap='@' + demo.dir + '/bitmaps/centerj.xbm')
+ para.add('justify', bitmap='@' + demo.dir + '/bitmaps/justify.xbm')
+
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ bar.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
+ font.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
+ para.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
+
+def MkTitle(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='There are many types of "chooser" widgets that allow the user to input different types of information')
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+
+def MkScroll(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ sls = Tix.LabelFrame(w, label='tixScrolledListBox')
+ swn = Tix.LabelFrame(w, label='tixScrolledWindow')
+ stx = Tix.LabelFrame(w, label='tixScrolledText')
+
+ MkSList(sls.frame)
+ MkSWindow(swn.frame)
+ MkSText(stx.frame)
+
+ sls.form(top=0, left=0, right='%33', bottom=-1)
+ swn.form(top=0, left=sls, right='%66', bottom=-1)
+ stx.form(top=0, left=swn, right=-1, bottom=-1)
+
+def MkSList(w):
+ top = Tix.Frame(w, width=300, height=330)
+ bot = Tix.Frame(w)
+ msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=200, anchor=Tix.N,
+ text='This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.')
+
+ list = Tix.ScrolledListBox(top, scrollbar='auto')
+ list.place(x=50, y=150, width=120, height=80)
+ list.listbox.insert(Tix.END, 'Alabama')
+ list.listbox.insert(Tix.END, 'California')
+ list.listbox.insert(Tix.END, 'Montana')
+ list.listbox.insert(Tix.END, 'New Jersey')
+ list.listbox.insert(Tix.END, 'New York')
+ list.listbox.insert(Tix.END, 'Pennsylvania')
+ list.listbox.insert(Tix.END, 'Washington')
+
+ rh = Tix.ResizeHandle(top, bg='black',
+ relief=Tix.RAISED,
+ handlesize=8, gridded=1, minwidth=50, minheight=30)
+ btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=list: SList_reset(w,x))
+ top.propagate(0)
+ msg.pack(fill=Tix.X)
+ btn.pack(anchor=Tix.CENTER)
+ top.pack(expand=1, fill=Tix.BOTH)
+ bot.pack(fill=Tix.BOTH)
+ list.bind('<Map>', func=lambda arg=0, rh=rh, list=list:
+ list.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(list)))
+
+def SList_reset(rh, list):
+ list.place(x=50, y=150, width=120, height=80)
+ list.update()
+ rh.attach_widget(list)
+
+def MkSWindow(w):
+ global demo
+
+ top = Tix.Frame(w, width=330, height=330)
+ bot = Tix.Frame(w)
+ msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=200, anchor=Tix.N,
+ text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
+ win = Tix.ScrolledWindow(top, scrollbar='auto')
+ image = Tix.Image('photo', file=demo.dir + "/bitmaps/tix.gif")
+ lbl = Tix.Label(win.window, image=image)
+ lbl.pack(expand=1, fill=Tix.BOTH)
+
+ win.place(x=30, y=150, width=190, height=120)
+
+ rh = Tix.ResizeHandle(top, bg='black',
+ relief=Tix.RAISED,
+ handlesize=8, gridded=1, minwidth=50, minheight=30)
+ btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SWindow_reset(w,x))
+ top.propagate(0)
+ msg.pack(fill=Tix.X)
+ btn.pack(anchor=Tix.CENTER)
+ top.pack(expand=1, fill=Tix.BOTH)
+ bot.pack(fill=Tix.BOTH)
+ win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
+ win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
+
+def SWindow_reset(rh, win):
+ win.place(x=30, y=150, width=190, height=120)
+ win.update()
+ rh.attach_widget(win)
+
+def MkSText(w):
+ top = Tix.Frame(w, width=330, height=330)
+ bot = Tix.Frame(w)
+ msg = Tix.Message(top, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=200, anchor=Tix.N,
+ text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
+
+ win = Tix.ScrolledText(top, scrollbar='auto')
+# win.text['wrap'] = 'none'
+ win.text.insert(Tix.END, 'This is a text widget embedded in a scrolled window. Although the original Tix demo does not have any text here, I decided to put in some so that you can see the effect of scrollbars etc.')
+ win.place(x=30, y=150, width=190, height=100)
+
+ rh = Tix.ResizeHandle(top, bg='black',
+ relief=Tix.RAISED,
+ handlesize=8, gridded=1, minwidth=50, minheight=30)
+ btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SText_reset(w,x))
+ top.propagate(0)
+ msg.pack(fill=Tix.X)
+ btn.pack(anchor=Tix.CENTER)
+ top.pack(expand=1, fill=Tix.BOTH)
+ bot.pack(fill=Tix.BOTH)
+ win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
+ win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
+
+def SText_reset(rh, win):
+ win.place(x=30, y=150, width=190, height=120)
+ win.update()
+ rh.attach_widget(win)
+
+def MkManager(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ pane = Tix.LabelFrame(w, label='tixPanedWindow')
+ note = Tix.LabelFrame(w, label='tixNoteBook')
+
+ MkPanedWindow(pane.frame)
+ MkNoteBook(note.frame)
+
+ pane.form(top=0, left=0, right=note, bottom=-1)
+ note.form(top=0, right=-1, bottom=-1)
+
+def MkPanedWindow(w):
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.')
+ group = Tix.Label(w, text='Newsgroup: comp.lang.python')
+ pane = Tix.PanedWindow(w, orientation='vertical')
+
+ p1 = pane.add('list', min=70, size=100)
+ p2 = pane.add('text', min=70)
+ list = Tix.ScrolledListBox(p1)
+ text = Tix.ScrolledText(p2)
+
+ list.listbox.insert(Tix.END, " 12324 Re: TK is good for your health")
+ list.listbox.insert(Tix.END, "+ 12325 Re: TK is good for your health")
+ list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: TK is good...)")
+ list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: TK is good...)")
+ list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: TK is good...)")
+ list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: TK is good...)")
+ list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: TK is good...)")
+
+ text.text['bg'] = list.listbox['bg']
+ text.text['wrap'] = 'none'
+ text.text.insert(Tix.END, """
+Mon, 19 Jun 1995 11:39:52 comp.lang.tcl Thread 34 of 220
+Lines 353 A new way to put text and bitmaps together iNo responses
+ioi at blue.seas.upenn.edu Ioi K. Lam at University of Pennsylvania
+
+Hi,
+
+I have implemented a new image type called "compound". It allows you
+to glue together a bunch of bitmaps, images and text strings together
+to form a bigger image. Then you can use this image with widgets that
+support the -image option. This way you can display very fancy stuffs
+in your GUI. For example, you can display a text string string
+together with a bitmap, at the same time, inside a TK button widget. A
+screenshot of compound images can be found at the bottom of this page:
+
+ http://www.cis.upenn.edu/~ioi/tix/screenshot.html
+
+You can also you is in other places such as putting fancy bitmap+text
+in menus, tabs of tixNoteBook widgets, etc. This feature will be
+included in the next release of Tix (4.0b1). Count on it to make jazzy
+interfaces!""")
+ list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
+ text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
+
+ msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ group.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ pane.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH, expand=1)
+
+def MkNoteBook(w):
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The NoteBook widget allows you to layout a complex interface into individual pages.')
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixControl*entry.width', 10)
+ w.option_add('*' + prefix + '*TixControl*label.width', 18)
+ w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
+ w.option_add('*' + prefix + '*TixNoteBook*tagPadX', 8)
+
+ nb = Tix.NoteBook(w, ipadx=6, ipady=6)
+ nb.add('hard_disk', label="Hard Disk", underline=0)
+ nb.add('network', label="Network", underline=0)
+
+ # Frame for the buttons that are present on all pages
+ common = Tix.Frame(nb.hard_disk)
+ common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
+ CreateCommonButtons(common)
+
+ # Widgets belonging only to this page
+ a = Tix.Control(nb.hard_disk, value=12, label='Access Time: ')
+ w = Tix.Control(nb.hard_disk, value=400, label='Write Throughput: ')
+ r = Tix.Control(nb.hard_disk, value=400, label='Read Throughput: ')
+ c = Tix.Control(nb.hard_disk, value=1021, label='Capacity: ')
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+
+ common = Tix.Frame(nb.network)
+ common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
+ CreateCommonButtons(common)
+
+ a = Tix.Control(nb.network, value=12, label='Access Time: ')
+ w = Tix.Control(nb.network, value=400, label='Write Throughput: ')
+ r = Tix.Control(nb.network, value=400, label='Read Throughput: ')
+ c = Tix.Control(nb.network, value=1021, label='Capacity: ')
+ u = Tix.Control(nb.network, value=10, label='Users: ')
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+ u.pack(side=Tix.TOP, padx=20, pady=2)
+
+ msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ nb.pack(side=Tix.TOP, padx=5, pady=5, fill=Tix.BOTH, expand=1)
+
+def CreateCommonButtons(f):
+ ok = Tix.Button(f, text='OK', width = 6)
+ cancel = Tix.Button(f, text='Cancel', width = 6)
+ ok.pack(side=Tix.TOP, padx=2, pady=2)
+ cancel.pack(side=Tix.TOP, padx=2, pady=2)
+
+def MkDirList(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ dir = Tix.LabelFrame(w, label='tixDirList')
+ fsbox = Tix.LabelFrame(w, label='tixExFileSelectBox')
+ MkDirListWidget(dir.frame)
+ MkExFileWidget(fsbox.frame)
+ dir.form(top=0, left=0, right='%40', bottom=-1)
+ fsbox.form(top=0, left='%40', right=-1, bottom=-1)
+
+def MkDirListWidget(w):
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The TixDirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.')
+ dirlist = Tix.DirList(w, options='hlist.padY 1 hlist.width 25 hlist.height 16')
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ dirlist.pack(side=Tix.TOP, padx=3, pady=3)
+
+def MkExFileWidget(w):
+ msg = Tix.Message(w, font='-*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*',
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The TixExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
+ # There's a bug in the ComboBoxes - the scrolledlistbox is destroyed
+ box = Tix.ExFileSelectBox(w, bd=2, relief=Tix.RAISED)
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ box.pack(side=Tix.TOP, padx=3, pady=3)
+
+###
+### List of all the demos we want to show off
+comments = {'widget' : 'Widget Demos', 'image' : 'Image Demos'}
+samples = {'Balloon' : 'Balloon',
+ 'Button Box' : 'BtnBox',
+ 'Combo Box' : 'ComboBox',
+ 'Compound Image' : 'CmpImg',
+ 'Control' : 'Control',
+ 'Notebook' : 'NoteBook',
+ 'Option Menu' : 'OptMenu',
+ 'Popup Menu' : 'PopMenu',
+ 'ScrolledHList (1)' : 'SHList1',
+ 'ScrolledHList (2)' : 'SHList2',
+ 'Tree (dynamic)' : 'Tree'
+}
+
+stypes = {}
+stypes['widget'] = ['Balloon', 'Button Box', 'Combo Box', 'Control',
+ 'Notebook', 'Option Menu', 'Popup Menu',
+ 'ScrolledHList (1)', 'ScrolledHList (2)', 'Tree (dynamic)']
+stypes['image'] = ['Compound Image']
+
+def MkSample(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ lab = Tix.Label(w, text='Select a sample program:', anchor=Tix.W)
+ lab1 = Tix.Label(w, text='Source:', anchor=Tix.W)
+
+ slb = Tix.ScrolledHList(w, options='listbox.exportSelection 0')
+ slb.hlist['command'] = lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'run')
+ slb.hlist['browsecmd'] = lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'browse')
+
+ stext = Tix.ScrolledText(w, name='stext')
+ stext.text.bind('<1>', stext.text.focus())
+ stext.text.bind('<Up>', lambda w=stext.text: w.yview(scroll='-1 unit'))
+ stext.text.bind('<Down>', lambda w=stext.text: w.yview(scroll='1 unit'))
+ stext.text.bind('<Left>', lambda w=stext.text: w.xview(scroll='-1 unit'))
+ stext.text.bind('<Right>', lambda w=stext.text: w.xview(scroll='1 unit'))
+
+ run = Tix.Button(w, text='Run ...', name='run', command=lambda args=0, w=w,slb=slb: Sample_Action(w, slb, 'run'))
+ view = Tix.Button(w, text='View Source ...', name='view', command=lambda args=0,w=w,slb=slb: Sample_Action(w, slb, 'view'))
+
+ lab.form(top=0, left=0, right='&'+str(slb))
+ slb.form(left=0, top=lab, bottom=-4)
+ lab1.form(left='&'+str(stext), top=0, right='&'+str(stext), bottom=stext)
+ run.form(left=str(slb)+' 30', bottom=-4)
+ view.form(left=run, bottom=-4)
+ stext.form(bottom=str(run)+' -5', left='&'+str(run), right='-0', top='&'+str(slb))
+
+ stext.text['bg'] = slb.hlist['bg']
+ stext.text['state'] = 'disabled'
+ stext.text['wrap'] = 'none'
+ #XXX stext.text['font'] = fixed_font
+
+ slb.hlist['separator'] = '.'
+ slb.hlist['width'] = 25
+ slb.hlist['drawbranch'] = 0
+ slb.hlist['indent'] = 10
+ slb.hlist['wideselect'] = 1
+
+ for type in ['widget', 'image']:
+ if type != 'widget':
+ x = Tix.Frame(slb.hlist, bd=2, height=2, width=150,
+ relief=Tix.SUNKEN, bg=slb.hlist['bg'])
+ slb.hlist.add_child(itemtype=Tix.WINDOW, window=x, state='disabled')
+ x = slb.hlist.add_child(itemtype=Tix.TEXT, state='disabled',
+ text=comments[type])
+ for key in stypes[type]:
+ slb.hlist.add_child(x, itemtype=Tix.TEXT, data=key,
+ text=key)
+ slb.hlist.selection_clear()
+
+ run['state'] = 'disabled'
+ view['state'] = 'disabled'
+
+def Sample_Action(w, slb, action):
+ global demo
+
+ run = w._nametowidget(str(w) + '.run')
+ view = w._nametowidget(str(w) + '.view')
+ stext = w._nametowidget(str(w) + '.stext')
+
+ hlist = slb.hlist
+ anchor = hlist.info_anchor()
+ if not anchor:
+ run['state'] = 'disabled'
+ view['state'] = 'disabled'
+ elif not hlist.info_parent(anchor):
+ # a comment
+ return
+
+ run['state'] = 'normal'
+ view['state'] = 'normal'
+ key = hlist.info_data(anchor)
+ title = key
+ prog = samples[key]
+
+ if action == 'run':
+ exec('import ' + prog)
+ w = Tix.Toplevel()
+ w.title(title)
+ rtn = eval(prog + '.RunSample')
+ rtn(w)
+ elif action == 'view':
+ w = Tix.Toplevel()
+ w.title('Source view: ' + title)
+ LoadFile(w, demo.dir + '/samples/' + prog + '.py')
+ elif action == 'browse':
+ ReadFile(stext.text, demo.dir + '/samples/' + prog + '.py')
+
+def LoadFile(w, fname):
+ b = Tix.Button(w, text='Close', command=w.destroy)
+ t = Tix.ScrolledText(w)
+ # b.form(left=0, bottom=0, padx=4, pady=4)
+ # t.form(left=0, bottom=b, right='-0', top=0)
+ t.pack()
+ b.pack()
+
+ t.text['highlightcolor'] = t['bg']
+ t.text['bd'] = 2
+ t.text['bg'] = t['bg']
+ t.text['wrap'] = 'none'
+
+ ReadFile(t.text, fname)
+
+def ReadFile(w, fname):
+ old_state = w['state']
+ w['state'] = 'normal'
+ w.delete('0.0', Tix.END)
+
+ try:
+ f = open(fname)
+ lines = f.readlines()
+ for s in lines:
+ w.insert(Tix.END, s)
+ f.close()
+ finally:
+# w.see('1.0')
+ w['state'] = old_state
+
+if __name__ == '__main__':
+ main()
Added: external/tix-8.4.2.x/Python/BUGS-2.1.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/BUGS-2.1.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,9 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: BUGS-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
+#
+
+1) There seems to be a problem with ComboBox that shows up
+in the ExFileSelectBox demo. The popdown scrolled list widget
+is being created, then destroyed. This does not happen in Tcl Tix.
+
Added: external/tix-8.4.2.x/Python/Demo/tix/BUGS.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/BUGS.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,8 @@
+$Id: BUGS.txt,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+
+1) There seems to be a problem with ComboBox that shows up
+in the ExFileSelectBox demo. The popdown scrolled list widget
+is being created, then destroyed. This does not happen in Tcl Tix.
+This is probably a sympton in Tix from _tkinter; if you find the cause
+of this, please post a patch on http://tix.sourceforge.net.
+
Added: external/tix-8.4.2.x/Python/Demo/tix/INSTALL.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/INSTALL.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,89 @@
+$Id: INSTALL.txt,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+
+Installing Tix.py
+----------------
+
+0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.1.1) and Python (V2.1.1).
+ Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
+ and Mandrake Linux 7.0 and Windows with the above mentioned packages.
+
+ Older versions, e.g. Tix 4.1 and Tk 8.0, might also work.
+
+ There is nothing OS-specific in Tix.py itself so it should work on
+ any machine with Tix and Python installed. You can get Tcl and Tk
+ from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
+
+1) Build and install Tcl/Tk 8.3. Build and install Tix 8.1.
+ Ensure that Tix is properly installed by running tixwish and executing
+ the demo programs. Under Unix, use the --enable-shared configure option
+ for all three. We recommend tcl8.3.3 for this release of Tix.py.
+
+2a) If you have a distribution like ActiveState with a tcl subdirectory
+ of $PYTHONHOME, which contains the directories tcl8.3 and tk8.3,
+ make a directory tix8.1 as well. Recursively copy the files from
+ <tix>/library to $PYTHONHOME/lib/tix8.1, and copy the dynamic library
+ (tix8183.dll or libtix8.1.8.3.so) to the same place as the tcl dynamic
+ libraries ($PYTHONHOME/Dlls or lib/python-2.1/lib-dynload). In this
+ case you are all installed, and you can skip to the end.
+
+2b) Modify Modules/Setup.dist and setup.py to change the version of the
+ tix library from tix4.1.8.0 to tix8.1.8.3
+ These modified files can be used for Tkinter with or without Tix.
+
+3) The default is to build dynamically, and use the Tcl 'package require'.
+ To build statically, modify the Modules/Setup file to link in the Tix
+ library according to the comments in the file. On Linux this looks like:
+
+# *** Always uncomment this (leave the leading underscore in!):
+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
+ -L/usr/local/lib \
+# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
+ -I/usr/local/include \
+# *** Uncomment and edit to reflect where your X11 header files are:
+ -I/usr/X11R6/include \
+# *** Or uncomment this for Solaris:
+# -I/usr/openwin/include \
+# *** Uncomment and edit for BLT extension only:
+# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
+# *** Uncomment and edit for PIL (TkImaging) extension only:
+# (See http://www.pythonware.com/products/pil/ for more info)
+# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
+# *** Uncomment and edit for TOGL extension only:
+# -DWITH_TOGL togl.c \
+# *** Uncomment and edit for Tix extension only:
+ -DWITH_TIX -ltix8.1.8.3 \
+# *** Uncomment and edit to reflect your Tcl/Tk versions:
+ -ltk8.3 -ltcl8.3 \
+# *** Uncomment and edit to reflect where your X11 libraries are:
+ -L/usr/X11R6/lib \
+# *** Or uncomment this for Solaris:
+# -L/usr/openwin/lib \
+# *** Uncomment these for TOGL extension only:
+# -lGL -lGLU -lXext -lXmu \
+# *** Uncomment for AIX:
+# -lld \
+# *** Always uncomment this; X11 libraries to link with:
+ -lX11
+
+4) Rebuild Python and reinstall.
+
+You should now have a working Tix implementation in Python. To see if all
+is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
+Under X windows, do
+ /usr/local/bin/python Demo/tix/tixwidgets.py
+
+If this does not work, you may need to tell python where to find
+the Tcl, Tk and Tix library files. This is done by setting the
+TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables. Try this:
+
+ env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
+ TK_LIBRARY=/usr/local/lib/tk8.3 \
+ TIX_LIBRARY=/usr/local/lib/tix8.1 \
+ /usr/local/bin/python Demo/tix/tixwidgets.py
+
+
+If you find any bugs or have suggestions for improvement, please report them
+via http://tix.sourceforge.net
+
+
Added: external/tix-8.4.2.x/Python/Demo/tix/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,19 @@
+About Tix.py
+-----------
+
+Tix.py is based on an idea of Jean-Marc Lugrin (lugrin at ms.com) who wrote
+pytix (another Python-Tix marriage). Tix widgets are an attractive and
+useful extension to Tk. See http://tix.sourceforge.net
+for more details about Tix and how to get it.
+
+Features:
+ 1) It is almost complete.
+ 2) Tix widgets are represented by classes in Python. Sub-widgets
+ are members of the mega-widget class. For example, if a
+ particular TixWidget (e.g. ScrolledText) has an embedded widget
+ (Text in this case), it is possible to call the methods of the
+ child directly.
+ 3) The members of the class are created automatically. In the case
+ of widgets like ButtonBox, the members are added dynamically.
+
+
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/about.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/about.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+/* XPM */
+static char * about_xpm[] = {
+"50 40 7 1",
+" s None c None",
+". c black",
+"X c white",
+"o c gray70",
+"O c navy",
+"+ c red",
+"@ c yellow",
+" ",
+" ",
+" ",
+" ................................. ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
+" .XooooooooooooooooooooooooooooooXo. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
+" ..oooooooooooooooooooooooooooooooXo. ",
+" ...............................XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
+" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
+" .OOOOOOO at OOOOO@OOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOO@@OOO at OOO@OOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOO at O@OOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOOO at OOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOOO at OOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOO at O@OOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOO@@@OO at OOO@OOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
+" ............................. ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/bold.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/bold.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define bold_width 16
+#define bold_height 16
+static unsigned char bold_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
+ 0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/capital.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/capital.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define capital_width 16
+#define capital_height 16
+static unsigned char capital_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x30, 0x0c, 0x30, 0x06,
+ 0x30, 0x03, 0xb0, 0x01, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 0x03,
+ 0x30, 0x07, 0x30, 0x0e, 0x30, 0x1c, 0x00, 0x00};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/centerj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/centerj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define centerj_width 16
+#define centerj_height 16
+static unsigned char centerj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xc0, 0x0d,
+ 0x00, 0x00, 0x58, 0x77, 0x00, 0x00, 0xb0, 0x3b, 0x00, 0x00, 0xdc, 0xf7,
+ 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xd8, 0x7e};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define combobox_width 32
+#define combobox_height 32
+static unsigned char combobox_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
+ 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
+ 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
+ 0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
+ 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
+ 0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
+ 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
+ 0xf8, 0xff, 0xff, 0x3f, 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};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+/* XPM */
+static char * combobox_xpm[] = {
+"50 40 6 1",
+" s None c None",
+". c black",
+"X c white",
+"o c #FFFF80808080",
+"O c gray70",
+"+ c #808000008080",
+" ",
+" ",
+" ",
+" .................................... XXXXXXX ",
+" .ooooooooooooooooooooooooooooooooooX X . . ",
+" .ooooooooooooooooooooooooooooooooooX X . . ",
+" .oooo.oooooooooooooooooooooooooooooX X . . ",
+" .oo.o..oo.o.oo.o.ooooooooooooooooooX X . . ",
+" .o..o.o.o.oo.oo.oo.ooooooooooooooooX X ... . ",
+" .oo.oo.oo.o.oo.ooo.ooooooooooooooooX X . . ",
+" .ooooooooooooooooooooooooooooooooooX X . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...... ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+" X............................................ ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.O+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OX OX. ",
+" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.X ..X. ",
+" X.O+O+O+OOO+O+OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.XXXXX. ",
+" X.O.....X..........................OOX.X .X. ",
+" X.OX...XXX.X.XX.XX.................OOX.X .X. ",
+" X.OX.X..X..X.XX..XX.X..............OOX.X .X. ",
+" X.O.X...X..X.X...X..X..............OOX.X .X. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOX.X .X. ",
+" X.OOOOOOOOO+OOO+OOOOO+OOOO+OOOOOOOOOOX.X .X. ",
+" X.O+++OO+OO+O+OO++O++OO+OO+OOOOOOOOOOX.X...X. ",
+" X.OO+OO++OO+O+OO+OOO+OO+O++OOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOO+OOOOO++OO+OOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.X .X. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.O .OX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX. ",
+" X............................................ ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xpm.1
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/combobox.xpm.1 Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+/* XPM */
+static char * combobox_xpm[] = {
+"50 40 4 1",
+" s None c None",
+". c black",
+"X c #FFFF80808080",
+"o c gray70",
+" ",
+" ",
+" ",
+" .................................... ....... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . ... . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. . . ",
+" .................................... ....... ",
+" ",
+" ............................................. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .o...................................o.ooooo. ",
+" .o...................................o.ooooo. ",
+" .o...................................o.ooooo. ",
+" .o...................................o.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" .ooooooooooooooooooooooooooooooooooooo.ooooo. ",
+" ............................................. ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/drivea.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/drivea.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define drivea_width 32
+#define drivea_height 32
+static unsigned char drivea_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};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/drivea.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/drivea.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/exit.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/exit.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+/* XPM */
+static char * exit_xpm[] = {
+"50 40 5 1",
+" s None c None",
+". c black",
+"X c white",
+"o c #000080800000",
+"O c yellow",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ....................................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooOoooooooooooX. ",
+" .XoooooooooooooooooooooooOOooooooooooX. ",
+" .XoooooooooooooooooooooooOOOoooooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOOoooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
+" .XoooooooooooooooooooooooOOOoooooooooX. ",
+" .XoooooooooooooooooooooooOOooooooooooX. ",
+" .XoooooooooooooooooooooooOoooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" ....................................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/filebox.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/filebox.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define filebox_width 32
+#define filebox_height 32
+static unsigned char filebox_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, 0x20,
+ 0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
+ 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xe4, 0x7f, 0xfe, 0x27,
+ 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25,
+ 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24,
+ 0x24, 0x50, 0x02, 0x25, 0xe4, 0x7f, 0xfe, 0x27, 0x04, 0x00, 0x00, 0x20,
+ 0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
+ 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xfc, 0xff, 0xff, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/filebox.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/filebox.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+/* XPM */
+static char * filebox_xpm[] = {
+"50 40 6 1",
+" s None c None",
+". c white",
+"X c gray80",
+"o c black",
+"O c #FFFF80808080",
+"+ c gray70",
+" ",
+" ",
+" ",
+" ............................................ ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooooooooooooooooooooooooooooooooooooo.XXo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
+" .XX......................................XXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXoooooooooooooooo.XXXXoooooooooooooooo.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XX.................XXXX.................XXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXoooooooooooooooooooooooooooooooooooooo.Xo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" .XX.......................................Xo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .ooooooooooooooooooooooooooooooooooooooooooo ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/italic.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/italic.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define italic_width 16
+#define italic_height 16
+static unsigned char italic_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x80, 0x3f, 0x00, 0x06, 0x00, 0x06,
+ 0x00, 0x03, 0x00, 0x03, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00,
+ 0x60, 0x00, 0x60, 0x00, 0xfc, 0x01, 0xfc, 0x01};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/justify.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/justify.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define justify_width 16
+#define justify_height 16
+static unsigned char justify_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xdb, 0x00, 0x00, 0x7c, 0xdb,
+ 0x00, 0x00, 0xbc, 0xf7, 0x00, 0x00, 0xdc, 0xde, 0x00, 0x00, 0x6c, 0xdf,
+ 0x00, 0x00, 0x6c, 0xef, 0x00, 0x00, 0xdc, 0xdf};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/leftj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/leftj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define leftj_width 16
+#define leftj_height 16
+static unsigned char leftj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x6d, 0x00, 0x00, 0xdc, 0x01,
+ 0x00, 0x00, 0xec, 0x0e, 0x00, 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xdc, 0x03,
+ 0x00, 0x00, 0x6c, 0x3b, 0x00, 0x00, 0x6c, 0x1f};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/netw.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/netw.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define netw_width 32
+#define netw_height 32
+static unsigned char netw_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};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/netw.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/netw.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/optmenu.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/optmenu.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+/* XPM */
+static char * optmenu_xpm[] = {
+"50 40 5 1",
+" s None c None",
+". c white",
+"X c gray80",
+"o c gray50",
+"O c black",
+" ",
+" ",
+" .............................. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXOXOXXOXXOXXXXOOXXXXXXXXXXo ",
+" .XXXOXOXXOXOXXXOXXOXXXXXXXXXXo ",
+" .XXXXOXXOXXOXXXOXXXOXXXXXXXXXo ",
+" .XXXXOXXXOXXOOXXOXOXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo.............o ",
+" .............................o o ",
+" ..XXXOXXXXXOXXXXXXXXOXXXXXXXOo o ",
+" ..XXOXOXOXXOXOXXXOXXOXXXXXXXOo ...... o ",
+" ..XXXOXXXOXXOXXXOXXXOXXXXXXXOo . o o ",
+" ..XXOXXXOXXXOXOXXOXXOXXXXXXXOo . o o ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXOo .ooooo o ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOo o ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo o ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooo ",
+" .XXXXOXXXXXOXXXXXXXXXXXXXXXXXo ",
+" .XXXOXXXXXXXXXOXXXXXXXXXXXXXXo ",
+" .XXXXOXXOXXOXOXOXXXXXXXXXXXXXo ",
+" .XXXXXOXXOXOXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXOXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXOXOXXXXXXXOXOXXXXXOXXXXXXo ",
+" .XXXXXOXOXOXXOXXXXXOXXOXXXXXXo ",
+" .XXXXOXXOXOXOXXXOXOXOXXOXXXXXo ",
+" .XXXOXXXXOXXOXXXOXXOXXXXOXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" oooooooooooooooooooooooooooooo ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/rightj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/rightj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define rightj_width 16
+#define rightj_height 16
+static unsigned char rightj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdb, 0x00, 0x00, 0x70, 0xdb,
+ 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0xd8, 0xde, 0x00, 0x00, 0xc0, 0xdd,
+ 0x00, 0x00, 0xa0, 0xef, 0x00, 0x00, 0xd8, 0xde};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/select.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/select.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,52 @@
+/* XPM */
+static char * select_xpm[] = {
+"50 40 9 1",
+" s None c None",
+". c black",
+"X c gray95",
+"o c gray50",
+"O c gray70",
+"+ c navy",
+"@ c #000080800000",
+"# c #808000000000",
+"$ c white",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............................................. ",
+" .XXXXXXXXXXooooooooooooXXXXXXXXXXXoXXXXXXXXXX. ",
+" .X ooOOOOOOOOOOXX oX o. ",
+" .X ooOOOOOOOOOOXX oX o. ",
+" .X ++++ ooOOOOOOOOOOXX ... oX @ o. ",
+" .X +++++ ooOOOOOOOOOOXX . . oX @@@ o. ",
+" .X +++ + ooOOOOOOOOOOXX . . oX @ @ o. ",
+" .X + + ooOO#####OOOXX . . oX @ @ o. ",
+" .X + + ooOO#OOO##OOXX . oX @ @ o. ",
+" .X + + ooO##OOOO##OXX . oX @ @ o. ",
+" .X ++ ++ ooO###OOO#OOXX . oX @ @ o. ",
+" .X +++++++ ooO#######OOXX . oX @ @ o. ",
+" .X + + ooO##O#OO#OOXX . oX @ @ o. ",
+" .X + ++ ooO##OOOOO#OXX . . oX @ @ o. ",
+" .X + + ooOO#OOOOO#OXX . . oX @ @@ o. ",
+" .X + ++ ooOO#OOOOO#OXX .... oX @@@@@ o. ",
+" .X ooOO######OOXX oX o. ",
+" .X ooOOOOOOOOOOXX $oX o. ",
+" .XoooooooooooXXXXXXXXXXXoooooooooooXooooooooo. ",
+" .............................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/tix.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/Python/Demo/tix/bitmaps/underline.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/bitmaps/underline.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define underline_width 16
+#define underline_height 16
+static unsigned char underline_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0x1c,
+ 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x70, 0x0e,
+ 0xf0, 0x0f, 0xe0, 0x07, 0x00, 0x00, 0xf8, 0x1f};
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/Balloon.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/Balloon.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,68 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Balloon.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixBalloon widget, which provides
+# a interesting way to give help tips about elements in your user interface.
+# Your can display the help message in a "balloon" and a status bar widget.
+#
+
+import Tix
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ balloon = DemoBalloon(root)
+ balloon.mainloop()
+ balloon.destroy()
+
+class DemoBalloon:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ z = w.winfo_toplevel()
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ status = Tix.Label(w, width=40, relief=Tix.SUNKEN, bd=1)
+ status.pack(side=Tix.BOTTOM, fill=Tix.Y, padx=2, pady=1)
+
+ # Create two mysterious widgets that need balloon help
+ button1 = Tix.Button(w, text='Something Unexpected',
+ command=self.quitcmd)
+ button2 = Tix.Button(w, text='Something Else Unexpected')
+ button2['command'] = lambda w=button2: w.destroy()
+ button1.pack(side=Tix.TOP, expand=1)
+ button2.pack(side=Tix.TOP, expand=1)
+
+ # Create the balloon widget and associate it with the widgets that we want
+ # to provide tips for:
+ b = Tix.Balloon(w, statusbar=status)
+
+ b.bind_widget(button1, balloonmsg='Close Window',
+ statusmsg='Press this button to close this window')
+ b.bind_widget(button2, balloonmsg='Self-destruct button',
+ statusmsg='Press this button and it will destroy itself')
+
+ def quitcmd (self):
+ self.exit = 0
+
+ def mainloop(self):
+ foundEvent = 1
+ while self.exit < 0 and foundEvent > 0:
+ foundEvent = self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/BtnBox.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/BtnBox.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: BtnBox.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixButtonBox widget, which is a
+# group of TK buttons. You can use it to manage the buttons in a dialog box,
+# for example.
+#
+
+import Tix
+
+def RunSample(w):
+ # Create the label on the top of the dialog box
+ #
+ top = Tix.Label(w, padx=20, pady=10, bd=1, relief=Tix.RAISED,
+ anchor=Tix.CENTER, text='This dialog box is\n a demonstration of the\n tixButtonBox widget')
+
+ # Create the button box and add a few buttons in it. Set the
+ # -width of all the buttons to the same value so that they
+ # appear in the same size.
+ #
+ # Note that the -text, -underline, -command and -width options are all
+ # standard options of the button widgets.
+ #
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='OK', underline=0, width=5,
+ command=lambda w=w: w.destroy())
+ box.add('close', text='Cancel', underline=0, width=5,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/CmpImg.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/CmpImg.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,197 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CmpImg.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the compound images: it uses compound
+# images to display a text string together with a pixmap inside
+# buttons
+#
+
+import Tix
+
+network_pixmap = """/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};
+"""
+
+hard_disk_pixmap = """/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
+"""
+
+network_bitmap = """
+#define netw_width 32
+#define netw_height 32
+static unsigned char netw_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};
+"""
+
+hard_disk_bitmap = """
+#define drivea_width 32
+#define drivea_height 32
+static unsigned char drivea_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};
+"""
+
+def RunSample(w):
+ w.img0 = Tix.Image('pixmap', data=network_pixmap)
+ if not w.img0:
+ w.img0 = Tix.Image('bitmap', data=network_bitmap)
+ w.img1 = Tix.Image('pixmap', data=hard_disk_pixmap)
+ if not w.img0:
+ w.img1 = Tix.Image('bitmap', data=hard_disk_bitmap)
+
+ hdd = Tix.Button(w, padx=4, pady=1, width=120)
+ net = Tix.Button(w, padx=4, pady=1, width=120)
+
+ # Create the first image: we create a line, then put a string,
+ # a space and a image into this line, from left to right.
+ # The result: we have a one-line image that consists of three
+ # individual items
+ #
+ # The tk.calls should be methods in Tix ...
+ w.hdd_img = Tix.Image('compound', window=hdd)
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'line')
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'text', '-text', 'Hard Disk',
+ '-underline', '0')
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'space', '-width', '7')
+ w.hdd_img.tk.call(str(w.hdd_img), 'add', 'image', '-image', w.img1)
+
+ # Put this image into the first button
+ #
+ hdd['image'] = w.hdd_img
+
+ # Next button
+ w.net_img = Tix.Image('compound', window=net)
+ w.net_img.tk.call(str(w.net_img), 'add', 'line')
+ w.net_img.tk.call(str(w.net_img), 'add', 'text', '-text', 'Network',
+ '-underline', '0')
+ w.net_img.tk.call(str(w.net_img), 'add', 'space', '-width', '7')
+ w.net_img.tk.call(str(w.net_img), 'add', 'image', '-image', w.img0)
+
+ # Put this image into the first button
+ #
+ net['image'] = w.net_img
+
+ close = Tix.Button(w, pady=1, text='Close',
+ command=lambda w=w: w.destroy())
+
+ hdd.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
+ net.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
+ close.pack(side=Tix.LEFT, padx=10, pady=10, fill=Tix.Y, expand=1)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/ComboBox.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/ComboBox.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,102 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ComboBox.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixComboBox widget, which is close
+# to the MS Window Combo Box control.
+#
+import Tix
+
+def RunSample(w):
+ global demo_month, demo_year
+
+ top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
+
+ demo_month = Tix.StringVar()
+ demo_year = Tix.StringVar()
+
+ # $w.top.a is a drop-down combo box. It is not editable -- who wants
+ # to invent new months?
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of both comboboxes to
+ # be 10 so that their labels appear to be aligned.
+ #
+ a = Tix.ComboBox(top, label="Month: ", dropdown=1,
+ command=select_month, editable=0, variable=demo_month,
+ options='listbox.height 6 label.width 10 label.anchor e')
+
+ # $w.top.b is a non-drop-down combo box. It is not editable: we provide
+ # four choices for the user, but he can enter an alternative year if he
+ # wants to.
+ #
+ # [Hint] Use the padY and anchor options of the label subwidget to
+ # align the label with the entry subwidget.
+ # [Hint] Notice that you should use padY (the NAME of the option) and not
+ # pady (the SWITCH of the option).
+ #
+ b = Tix.ComboBox(top, label="Year: ", dropdown=0,
+ command=select_year, editable=1, variable=demo_year,
+ options='listbox.height 4 label.padY 5 label.width 10 label.anchor ne')
+
+ a.pack(side=Tix.TOP, anchor=Tix.W)
+ b.pack(side=Tix.TOP, anchor=Tix.W)
+
+ a.insert(Tix.END, 'January')
+ a.insert(Tix.END, 'February')
+ a.insert(Tix.END, 'March')
+ a.insert(Tix.END, 'April')
+ a.insert(Tix.END, 'May')
+ a.insert(Tix.END, 'June')
+ a.insert(Tix.END, 'July')
+ a.insert(Tix.END, 'August')
+ a.insert(Tix.END, 'September')
+ a.insert(Tix.END, 'October')
+ a.insert(Tix.END, 'November')
+ a.insert(Tix.END, 'December')
+
+ b.insert(Tix.END, '1992')
+ b.insert(Tix.END, '1993')
+ b.insert(Tix.END, '1994')
+ b.insert(Tix.END, '1995')
+ b.insert(Tix.END, '1996')
+
+ # Use "tixSetSilent" to set the values of the combo box if you
+ # don't want your -command procedures (cbx:select_month and
+ # cbx:select_year) to be called.
+ #
+ a.set_silent('January')
+ b.set_silent('1995')
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: ok_command(w))
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def select_month(event=None):
+ # tixDemo:Status "Month = %s" % demo_month.get()
+ pass
+
+def select_year(event=None):
+ # tixDemo:Status "Year = %s" % demo_year.get()
+ pass
+
+def ok_command(w):
+ # tixDemo:Status "Month = %s, Year= %s" % (demo_month.get(), demo_year.get())
+ w.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/Control.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/Control.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,123 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Control.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixControl widget -- it is an
+# entry widget with up/down arrow buttons. You can use the arrow buttons
+# to adjust the value inside the entry widget.
+#
+# This example program uses three Control widgets. One lets you select
+# integer values; one lets you select floating point values and the last
+# one lets you select a few names.
+
+import Tix
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ control = DemoControl(root)
+ control.mainloop()
+ control.destroy()
+
+class DemoControl:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ global demo_maker, demo_thrust, demo_num_engines
+
+ demo_maker = Tix.StringVar()
+ demo_thrust = Tix.DoubleVar()
+ demo_num_engines = Tix.IntVar()
+ demo_maker.set('P&W')
+ demo_thrust.set(20000.0)
+ demo_num_engines.set(2)
+
+ top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
+
+ # $w.top.a allows only integer values
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of the Controls to
+ # be 16 so that their labels appear to be aligned.
+ #
+ a = Tix.Control(top, label='Number of Engines: ', integer=1,
+ variable=demo_num_engines, min=1, max=4,
+ options='entry.width 10 label.width 20 label.anchor e')
+
+ b = Tix.Control(top, label='Thrust: ', integer=0,
+ min='10000.0', max='60000.0', step=500,
+ variable=demo_thrust,
+ options='entry.width 10 label.width 20 label.anchor e')
+
+ c = Tix.Control(top, label='Engine Maker: ', value='P&W',
+ variable=demo_maker,
+ options='entry.width 10 label.width 20 label.anchor e')
+
+ # We can't define these in the init because the widget 'c' doesn't
+ # exist yet and we need to reference it
+ c['incrcmd'] = lambda w=c: adjust_maker(w, 1)
+ c['decrcmd'] = lambda w=c: adjust_maker(w, -1)
+ c['validatecmd'] = lambda w=c: validate_maker(w)
+
+ a.pack(side=Tix.TOP, anchor=Tix.W)
+ b.pack(side=Tix.TOP, anchor=Tix.W)
+ c.pack(side=Tix.TOP, anchor=Tix.W)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=self.okcmd)
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=self.quitcmd)
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+ def okcmd (self):
+ # tixDemo:Status "Selected %d of %s engines each of thrust %d", (demo_num_engines.get(), demo_maker.get(), demo_thrust.get())
+ self.quitcmd()
+
+ def quitcmd (self):
+ self.exit = 0
+
+ def mainloop(self):
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+maker_list = ['P&W', 'GE', 'Rolls Royce']
+
+def adjust_maker(w, inc):
+ i = maker_list.index(demo_maker.get())
+ i = i + inc
+ if i >= len(maker_list):
+ i = 0
+ elif i < 0:
+ i = len(maker_list) - 1
+
+ # In Tcl/Tix we should return the string maker_list[i]. We can't
+ # do that in Tkinter so we set the global variable. (This works).
+ demo_maker.set(maker_list[i])
+
+def validate_maker(w):
+ try:
+ i = maker_list.index(demo_maker.get())
+ except ValueError:
+ # Works here though. Why ? Beats me.
+ return maker_list[0]
+ # Works here though. Why ? Beats me.
+ return maker_list[i]
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/DirList.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/DirList.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,132 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirList.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixDirList widget -- you can
+# use it for the user to select a directory. For example, an installation
+# program can use the tixDirList widget to ask the user to select the
+# installation directory for an application.
+#
+
+import Tix, os, copy
+from Tkconstants import *
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ dirlist = DemoDirList(root)
+ dirlist.mainloop()
+ dirlist.destroy()
+
+class DemoDirList:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ z = w.winfo_toplevel()
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ # Create the tixDirList and the tixLabelEntry widgets on the on the top
+ # of the dialog box
+
+ # bg = root.tk.eval('tix option get bg')
+ # adding bg=bg crashes Windows pythonw tk8.3.3 Python 2.1.0
+
+ top = Tix.Frame( w, relief=RAISED, bd=1)
+
+ # Create the DirList widget. By default it will show the current
+ # directory
+ #
+ #
+ top.dir = Tix.DirList(top)
+ top.dir.hlist['width'] = 40
+
+ # When the user presses the ".." button, the selected directory
+ # is "transferred" into the entry widget
+ #
+ top.btn = Tix.Button(top, text = " >> ", pady = 0)
+
+ # We use a LabelEntry to hold the installation directory. The user
+ # can choose from the DirList widget, or he can type in the directory
+ # manually
+ #
+ top.ent = Tix.LabelEntry(top, label="Installation Directory:",
+ labelside = 'top',
+ options = '''
+ entry.width 40
+ label.anchor w
+ ''')
+
+ font = self.root.tk.eval('tix option get fixed_font')
+ # font = self.root.master.tix_option_get('fixed_font')
+ top.ent.entry['font'] = font
+
+ self.dlist_dir = copy.copy(os.curdir)
+ # This should work setting the entry's textvariable
+ top.ent.entry['textvariable'] = self.dlist_dir
+ top.btn['command'] = lambda dir=top.dir, ent=top.ent, self=self: \
+ self.copy_name(dir,ent)
+
+ # top.ent.entry.insert(0,'tix'+`self`)
+ top.ent.entry.bind('<Return>', lambda self=self: self.okcmd () )
+
+ top.pack( expand='yes', fill='both', side=TOP)
+ top.dir.pack( expand=1, fill=BOTH, padx=4, pady=4, side=LEFT)
+ top.btn.pack( anchor='s', padx=4, pady=4, side=LEFT)
+ top.ent.pack( expand=1, fill=X, anchor='s', padx=4, pady=4, side=LEFT)
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ box = Tix.ButtonBox (w, orientation='horizontal')
+ box.add ('ok', text='Ok', underline=0, width=6,
+ command = lambda self=self: self.okcmd () )
+ box.add ('cancel', text='Cancel', underline=0, width=6,
+ command = lambda self=self: self.quitcmd () )
+
+ box.pack( anchor='s', fill='x', side=BOTTOM)
+
+ def copy_name (self, dir, ent):
+ # This should work as it is the entry's textvariable
+ self.dlist_dir = dir.cget('value')
+ # but it isn't so I'll do it manually
+ ent.entry.delete(0,'end')
+ ent.entry.insert(0, self.dlist_dir)
+
+ def okcmd (self):
+ # tixDemo:Status "You have selected the directory" + self.dlist_dir
+ self.quitcmd()
+
+ def quitcmd (self):
+ self.exit = 0
+
+ def mainloop(self):
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "tixwidgets.py".
+#
+if __name__== '__main__' :
+ import tkMessageBox, traceback
+
+ try:
+ root=Tix.Tk()
+ RunSample(root)
+ except:
+ t, v, tb = sys.exc_info()
+ text = "Error running the demo script:\n"
+ for line in traceback.format_exception(t,v,tb):
+ text = text + line + '\n'
+ d = tkMessageBox.showerror ( 'Tix Demo Error', text)
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/DirTree.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/DirTree.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,118 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirTree.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixDirTree widget -- you can
+# use it for the user to select a directory. For example, an installation
+# program can use the tixDirTree widget to ask the user to select the
+# installation directory for an application.
+#
+
+import Tix, os, copy
+from Tkconstants import *
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ dirtree = DemoDirTree(root)
+ dirtree.mainloop()
+ dirtree.destroy()
+
+class DemoDirTree:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ z = w.winfo_toplevel()
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ # Create the tixDirTree and the tixLabelEntry widgets on the on the top
+ # of the dialog box
+
+ # bg = root.tk.eval('tix option get bg')
+ # adding bg=bg crashes Windows pythonw tk8.3.3 Python 2.1.0
+
+ top = Tix.Frame( w, relief=RAISED, bd=1)
+
+ # Create the DirTree widget. By default it will show the current
+ # directory
+ #
+ #
+ top.dir = Tix.DirTree(top)
+ top.dir.hlist['width'] = 40
+
+ # When the user presses the ".." button, the selected directory
+ # is "transferred" into the entry widget
+ #
+ top.btn = Tix.Button(top, text = " >> ", pady = 0)
+
+ # We use a LabelEntry to hold the installation directory. The user
+ # can choose from the DirTree widget, or he can type in the directory
+ # manually
+ #
+ top.ent = Tix.LabelEntry(top, label="Installation Directory:",
+ labelside = 'top',
+ options = '''
+ entry.width 40
+ label.anchor w
+ ''')
+
+ self.dlist_dir = copy.copy(os.curdir)
+ top.ent.entry['textvariable'] = self.dlist_dir
+ top.btn['command'] = lambda dir=top.dir, ent=top.ent, self=self: \
+ self.copy_name(dir,ent)
+
+ top.ent.entry.bind('<Return>', lambda self=self: self.okcmd () )
+
+ top.pack( expand='yes', fill='both', side=TOP)
+ top.dir.pack( expand=1, fill=BOTH, padx=4, pady=4, side=LEFT)
+ top.btn.pack( anchor='s', padx=4, pady=4, side=LEFT)
+ top.ent.pack( expand=1, fill=X, anchor='s', padx=4, pady=4, side=LEFT)
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ box = Tix.ButtonBox (w, orientation='horizontal')
+ box.add ('ok', text='Ok', underline=0, width=6,
+ command = lambda self=self: self.okcmd () )
+ box.add ('cancel', text='Cancel', underline=0, width=6,
+ command = lambda self=self: self.quitcmd () )
+
+ box.pack( anchor='s', fill='x', side=BOTTOM)
+
+ def copy_name (self, dir, ent):
+ # This should work as it is the entry's textvariable
+ self.dlist_dir = dir.cget('value')
+ # but it isn't so I'll do it manually
+ ent.entry.delete(0,'end')
+ ent.entry.insert(0, self.dlist_dir)
+
+ def okcmd (self):
+ # tixDemo:Status "You have selected the directory" + self.dlist_dir
+ self.quitcmd()
+
+ def quitcmd (self):
+ # tixDemo:Status "You have selected the directory" + self.dlist_dir
+ self.exit = 0
+
+ def mainloop(self):
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "tixwidgets.py".
+#
+if __name__== '__main__' :
+ root=Tix.Tk()
+ RunSample(root)
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/NoteBook.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/NoteBook.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,119 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: NoteBook.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixNoteBook widget, which allows
+# you to lay out your interface using a "notebook" metaphore
+#
+import Tix
+
+def RunSample(w):
+ global root
+ root = w
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ prefix = Tix.OptionName(w)
+ if prefix:
+ prefix = '*'+prefix
+ else:
+ prefix = ''
+ w.option_add(prefix+'*TixControl*entry.width', 10)
+ w.option_add(prefix+'*TixControl*label.width', 18)
+ w.option_add(prefix+'*TixControl*label.anchor', Tix.E)
+ w.option_add(prefix+'*TixNoteBook*tagPadX', 8)
+
+ # Create the notebook widget and set its backpagecolor to gray.
+ # Note that the -backpagecolor option belongs to the "nbframe"
+ # subwidget.
+ nb = Tix.NoteBook(w, name='nb', ipadx=6, ipady=6)
+ nb['bg'] = 'gray'
+ nb.nbframe['backpagecolor'] = 'gray'
+
+ # Create the two tabs on the notebook. The -underline option
+ # puts a underline on the first character of the labels of the tabs.
+ # Keyboard accelerators will be defined automatically according
+ # to the underlined character.
+ nb.add('hard_disk', label="Hard Disk", underline=0)
+ nb.add('network', label="Network", underline=0)
+
+ nb.pack(expand=1, fill=Tix.BOTH, padx=5, pady=5 ,side=Tix.TOP)
+
+ #----------------------------------------
+ # Create the first page
+ #----------------------------------------
+ # Create two frames: one for the common buttons, one for the
+ # other widgets
+ #
+ tab=nb.hard_disk
+ f = Tix.Frame(tab)
+ common = Tix.Frame(tab)
+
+ f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
+ common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
+
+ a = Tix.Control(f, value=12, label='Access time: ')
+ w = Tix.Control(f, value=400, label='Write Throughput: ')
+ r = Tix.Control(f, value=400, label='Read Throughput: ')
+ c = Tix.Control(f, value=1021, label='Capacity: ')
+
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+
+ # Create the common buttons
+ createCommonButtons(common)
+
+ #----------------------------------------
+ # Create the second page
+ #----------------------------------------
+
+ tab = nb.network
+
+ f = Tix.Frame(tab)
+ common = Tix.Frame(tab)
+
+ f.pack(side=Tix.LEFT, padx=2, pady=2, fill=Tix.BOTH, expand=1)
+ common.pack(side=Tix.RIGHT, padx=2, fill=Tix.Y)
+
+ a = Tix.Control(f, value=12, label='Access time: ')
+ w = Tix.Control(f, value=400, label='Write Throughput: ')
+ r = Tix.Control(f, value=400, label='Read Throughput: ')
+ c = Tix.Control(f, value=1021, label='Capacity: ')
+ u = Tix.Control(f, value=10, label='Users: ')
+
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+ u.pack(side=Tix.TOP, padx=20, pady=2)
+
+ createCommonButtons(common)
+
+def doDestroy():
+ global root
+ root.destroy()
+
+def createCommonButtons(master):
+ ok = Tix.Button(master, name='ok', text='OK', width=6,
+ command=doDestroy)
+ cancel = Tix.Button(master, name='cancel',
+ text='Cancel', width=6,
+ command=doDestroy)
+
+ ok.pack(side=Tix.TOP, padx=2, pady=2)
+ cancel.pack(side=Tix.TOP, padx=2, pady=2)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/OptMenu.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/OptMenu.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,68 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: OptMenu.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixOptionMenu widget -- you can
+# use it for the user to choose from a fixed set of options
+#
+import Tix
+
+options = {'text':'Plain Text', 'post':'PostScript', 'html':'HTML',
+ 'tex':'LaTeX', 'rtf':'Rich Text Format'}
+
+def RunSample(w):
+ global demo_opt_from, demo_opt_to
+
+ demo_opt_from = Tix.StringVar()
+ demo_opt_to = Tix.StringVar()
+
+ top = Tix.Frame(w, bd=1, relief=Tix.RAISED)
+
+ from_file = Tix.OptionMenu(top, label="From File Format : ",
+ variable=demo_opt_from,
+ options = 'label.width 19 label.anchor e menubutton.width 15')
+
+ to_file = Tix.OptionMenu(top, label="To File Format : ",
+ variable=demo_opt_to,
+ options='label.width 19 label.anchor e menubutton.width 15')
+
+ # Add the available options to the two OptionMenu widgets
+ #
+ # [Hint] You have to add the options first before you set the
+ # global variables "demo_opt_from" and "demo_opt_to". Otherwise
+ # the OptionMenu widget will complain about "unknown options"!
+ #
+ for opt in options.keys():
+ from_file.add_command(opt, label=options[opt])
+ to_file.add_command(opt, label=options[opt])
+
+ demo_opt_from.set('html')
+ demo_opt_to.set('post')
+
+ from_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
+ to_file.pack(side=Tix.TOP, anchor=Tix.W, pady=3, padx=6)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: ok_command(w))
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def ok_command(w):
+ # tixDemo:Status "Convert file from %s to %s" % ( demo_opt_from.get(), demo_opt_to.get())
+ w.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/PanedWin.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/PanedWin.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,99 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: PanedWin.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates the use of the tixPanedWindow widget. This program
+# is a dummy news reader: the user can adjust the sizes of the list
+# of artical names and the size of the text widget that shows the body
+# of the article.
+
+import Tix
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ panedwin = DemoPanedwin(root)
+ panedwin.mainloop()
+ panedwin.destroy()
+
+class DemoPanedwin:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ z = w.winfo_toplevel()
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ group = Tix.LabelEntry(w, label='Newsgroup:', options='entry.width 25')
+ group.entry.insert(0,'comp.lang.python')
+ pane = Tix.PanedWindow(w, orientation='vertical')
+
+ p1 = pane.add('list', min=70, size=100)
+ p2 = pane.add('text', min=70)
+ list = Tix.ScrolledListBox(p1)
+ list.listbox['width'] = 80
+ list.listbox['height'] = 5
+ text = Tix.ScrolledText(p2)
+ text.text['width'] = 80
+ text.text['height'] = 20
+
+ list.listbox.insert(Tix.END, " 12324 Re: Tkinter is good for your health")
+ list.listbox.insert(Tix.END, "+ 12325 Re: Tkinter is good for your health")
+ list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: Tkinter is good...)")
+
+ text.text['bg'] = list.listbox['bg']
+ text.text['wrap'] = 'none'
+ text.text.insert(Tix.END, """
+ Mon, 19 Jun 1995 11:39:52 comp.lang.python Thread 34 of 220
+ Lines 353 A new way to put text and bitmaps together iNo responses
+ ioi at blue.seas.upenn.edu Ioi K. Lam at University of Pennsylvania
+
+ Hi,
+
+ I have implemented a new image type called "compound". It allows you
+ to glue together a bunch of bitmaps, images and text strings together
+ to form a bigger image. Then you can use this image with widgets that
+ support the -image option. For example, you can display a text string string
+ together with a bitmap, at the same time, inside a TK button widget.
+ """)
+ text.text['state'] = 'disabled'
+
+ list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
+ text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
+
+ group.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ pane.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH, expand=1)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=self.quitcmd)
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=self.quitcmd)
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+
+ def quitcmd (self):
+ self.exit = 0
+
+ def mainloop(self):
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/PopMenu.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/PopMenu.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,57 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: PopMenu.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixPopupMenu widget.
+#
+import Tix
+
+def RunSample(w):
+ # We create the frame and the button, then we'll bind the PopupMenu
+ # to both widgets. The result is, when you press the right mouse
+ # button over $w.top or $w.top.but, the PopupMenu will come up.
+ #
+ top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
+ but = Tix.Button(top, text='Press the right mouse button over this button or its surrounding area')
+ but.pack(expand=1, fill=Tix.BOTH, padx=50, pady=50)
+
+ p = Tix.PopupMenu(top, title='Popup Test')
+ p.bind_widget(top)
+ p.bind_widget(but)
+
+ # Set the entries inside the PopupMenu widget.
+ # [Hint] You have to manipulate the "menu" subwidget.
+ # $w.top.p itself is NOT a menu widget.
+ # [Hint] Watch carefully how the sub-menu is created
+ #
+ p.menu.add_command(label='Desktop', underline=0)
+ p.menu.add_command(label='Select', underline=0)
+ p.menu.add_command(label='Find', underline=0)
+ p.menu.add_command(label='System', underline=1)
+ p.menu.add_command(label='Help', underline=0)
+ m1 = Tix.Menu(p.menu)
+ m1.add_command(label='Hello')
+ p.menu.add_cascade(label='More', menu=m1)
+
+ but.pack(side=Tix.TOP, padx=40, pady=50)
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.add('cancel', text='Cancel', underline=0, width=6,
+ command=lambda w=w: w.destroy())
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/SHList1.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/SHList1.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,132 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SHList1.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixScrolledHList widget.
+#
+
+import Tix
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ shlist = DemoSHList(root)
+ shlist.mainloop()
+ shlist.destroy()
+
+class DemoSHList:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ z = w.winfo_toplevel()
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
+
+ # Put a simple hierachy into the HList (two levels). Use colors and
+ # separator widgets (frames) to make the list look fancy
+ #
+ top.a = Tix.ScrolledHList(top)
+ top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
+
+ # This is our little relational database
+ #
+ bosses = [
+ ('jeff', 'Jeff Waxman'),
+ ('john', 'John Lee'),
+ ('peter', 'Peter Kenson')
+ ]
+
+ employees = [
+ ('alex', 'john', 'Alex Kellman'),
+ ('alan', 'john', 'Alan Adams'),
+ ('andy', 'peter', 'Andreas Crawford'),
+ ('doug', 'jeff', 'Douglas Bloom'),
+ ('jon', 'peter', 'Jon Baraki'),
+ ('chris', 'jeff', 'Chris Geoffrey'),
+ ('chuck', 'jeff', 'Chuck McLean')
+ ]
+
+ hlist=top.a.hlist
+
+ # Let configure the appearance of the HList subwidget
+ #
+ hlist.config( separator='.', width=25, drawbranch=0, indent=10)
+
+ count=0
+ for boss,name in bosses :
+ if count :
+ f=Tix.Frame(hlist, name='sep%d' % count, height=2, width=150,
+ bd=2, relief=Tix.SUNKEN )
+
+ hlist.add_child( itemtype=Tix.WINDOW,
+ window=f, state=Tix.DISABLED )
+
+ hlist.add(boss, itemtype=Tix.TEXT, text=name)
+ count = count+1
+
+
+ for person,boss,name in employees :
+ # '.' is the separator character we chose above
+ #
+ key= boss + '.' + person
+ # ^^^^ ^^^^^^
+ # parent entryPath / child's name
+
+ hlist.add( key, text=name )
+
+ # [Hint] Make sure the keys (e.g. 'boss.person') you choose
+ # are unique names. If you cannot be sure of this (because of
+ # the structure of your database, e.g.) you can use the
+ # "add_child" command instead:
+ #
+ # hlist.addchild( boss, text=name)
+ # ^^^^
+ # parent entryPath
+
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
+ box.add( 'ok', text='Ok', underline=0, width=6,
+ command = self.okcmd)
+
+ box.add( 'cancel', text='Cancel', underline=0, width=6,
+ command = self.quitcmd)
+
+ box.pack( side=Tix.BOTTOM, fill=Tix.X)
+ top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
+
+ def okcmd (self):
+ self.quitcmd()
+
+ def quitcmd (self):
+ self.exit = 0
+
+ def mainloop(self):
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "tixwidgets.py".
+#
+if __name__== '__main__' :
+ root=Tix.Tk()
+ RunSample(root)
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/SHList2.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/SHList2.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,169 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SHList2.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use multiple columns and multiple styles
+# in the tixHList widget
+#
+# In a tixHList widget, you can have one ore more columns.
+#
+
+import Tix
+
+TCL_ALL_EVENTS = 0
+
+def RunSample (root):
+ shlist = DemoSHList(root)
+ shlist.mainloop()
+ shlist.destroy()
+
+class DemoSHList:
+ def __init__(self, w):
+ self.root = w
+ self.exit = -1
+
+ z = w.winfo_toplevel()
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ top = Tix.Frame( w, relief=Tix.RAISED, bd=1)
+
+ # Put a simple hierachy into the HList (two levels). Use colors and
+ # separator widgets (frames) to make the list look fancy
+ #
+ top.a = Tix.ScrolledHList(top, options='hlist.columns 3 hlist.header 1' )
+ top.a.pack( expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.TOP)
+
+ hlist=top.a.hlist
+
+ # Create the title for the HList widget
+ # >> Notice that we have set the hlist.header subwidget option to true
+ # so that the header is displayed
+ #
+
+ boldfont=hlist.tk.call('tix','option','get','bold_font')
+
+ # First some styles for the headers
+ style={}
+ style['header'] = Tix.DisplayStyle(Tix.TEXT, refwindow=hlist,
+ anchor=Tix.CENTER, padx=8, pady=2, font = boldfont )
+
+ hlist.header_create(0, itemtype=Tix.TEXT, text='Name',
+ style=style['header'])
+ hlist.header_create(1, itemtype=Tix.TEXT, text='Position',
+ style=style['header'])
+
+ # Notice that we use 3 columns in the hlist widget. This way when the user
+ # expands the windows wide, the right side of the header doesn't look
+ # chopped off. The following line ensures that the 3 column header is
+ # not shown unless the hlist window is wider than its contents.
+ #
+ hlist.column_width(2,0)
+
+ # This is our little relational database
+ #
+ boss = ('doe', 'John Doe', 'Director')
+
+ managers = [
+ ('jeff', 'Jeff Waxman', 'Manager'),
+ ('john', 'John Lee', 'Manager'),
+ ('peter', 'Peter Kenson', 'Manager')
+ ]
+
+ employees = [
+ ('alex', 'john', 'Alex Kellman', 'Clerk'),
+ ('alan', 'john', 'Alan Adams', 'Clerk'),
+ ('andy', 'peter', 'Andreas Crawford', 'Salesman'),
+ ('doug', 'jeff', 'Douglas Bloom', 'Clerk'),
+ ('jon', 'peter', 'Jon Baraki', 'Salesman'),
+ ('chris', 'jeff', 'Chris Geoffrey', 'Clerk'),
+ ('chuck', 'jeff', 'Chuck McLean', 'Cleaner')
+ ]
+
+ style['mgr_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=hlist)
+
+ style['mgr_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=hlist)
+
+ style['empl_name'] = Tix.DisplayStyle(Tix.TEXT, refwindow=hlist)
+
+ style['empl_posn'] = Tix.DisplayStyle(Tix.TEXT, padx=8, refwindow=hlist)
+
+ # Let configure the appearance of the HList subwidget
+ #
+ hlist.config(separator='.', width=25, drawbranch=0, indent=10)
+ hlist.column_width(0, chars=20)
+
+ # Create the boss
+ #
+ hlist.add ('.', itemtype=Tix.TEXT, text=boss[1],
+ style=style['mgr_name'])
+ hlist.item_create('.', 1, itemtype=Tix.TEXT, text=boss[2],
+ style=style['mgr_posn'])
+
+ # Create the managers
+ #
+
+ for key,name,posn in managers :
+ e= '.'+ key
+ hlist.add(e, itemtype=Tix.TEXT, text=name,
+ style=style['mgr_name'])
+ hlist.item_create(e, 1, itemtype=Tix.TEXT, text=posn,
+ style=style['mgr_posn'])
+
+
+ for key,mgr,name,posn in employees :
+ # "." is the separator character we chose above
+
+ entrypath = '.' + mgr + '.' + key
+
+ # ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
+ # parent entryPath / child's name
+
+ hlist.add(entrypath, text=name, style=style['empl_name'])
+ hlist.item_create(entrypath, 1, itemtype=Tix.TEXT,
+ text = posn, style = style['empl_posn'] )
+
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ box= Tix.ButtonBox(top, orientation=Tix.HORIZONTAL )
+ box.add( 'ok', text='Ok', underline=0, width=6,
+ command = self.okcmd )
+
+ box.add( 'cancel', text='Cancel', underline=0, width=6,
+ command = self.quitcmd )
+
+ box.pack( side=Tix.BOTTOM, fill=Tix.X)
+ top.pack( side=Tix.TOP, fill=Tix.BOTH, expand=1 )
+
+ def okcmd (self):
+ self.quitcmd()
+
+ def quitcmd (self):
+ self.exit = 0
+
+ def mainloop(self):
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+
+ def destroy (self):
+ self.root.destroy()
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "tixwidgets.py".
+#
+if __name__== '__main__' :
+ root=Tix.Tk()
+ RunSample(root)
+
Added: external/tix-8.4.2.x/Python/Demo/tix/samples/Tree.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/samples/Tree.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,80 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Tree.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "tixwidgets.py": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program.
+
+# This file demonstrates how to use the TixTree widget to display
+# dynamic hierachical data (the files in the Unix file system)
+#
+
+import Tix, os
+
+def RunSample(w):
+ top = Tix.Frame(w, relief=Tix.RAISED, bd=1)
+ tree = Tix.Tree(top, options='separator "/"')
+ tree.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10, side=Tix.LEFT)
+ tree['opencmd'] = lambda dir=None, w=tree: opendir(w, dir)
+
+ # The / directory is added in the "open" mode. The user can open it
+ # and then browse its subdirectories ...
+ adddir(tree, "/")
+
+ box = Tix.ButtonBox(w, orientation=Tix.HORIZONTAL)
+ box.add('ok', text='Ok', underline=0, command=w.destroy, width=6)
+ box.add('cancel', text='Cancel', underline=0, command=w.destroy, width=6)
+ box.pack(side=Tix.BOTTOM, fill=Tix.X)
+ top.pack(side=Tix.TOP, fill=Tix.BOTH, expand=1)
+
+def adddir(tree, dir):
+ if dir == '/':
+ text = '/'
+ else:
+ text = os.path.basename(dir)
+ tree.hlist.add(dir, itemtype=Tix.IMAGETEXT, text=text,
+ image=tree.tk.call('tix', 'getimage', 'folder'))
+ try:
+ os.listdir(dir)
+ tree.setmode(dir, 'open')
+ except os.error:
+ # No read permission ?
+ pass
+
+# This function is called whenever the user presses the (+) indicator or
+# double clicks on a directory whose mode is "open". It loads the files
+# inside that directory into the Tree widget.
+#
+# Note we didn't specify the closecmd option for the Tree widget, so it
+# performs the default action when the user presses the (-) indicator or
+# double clicks on a directory whose mode is "close": hide all of its child
+# entries
+def opendir(tree, dir):
+ entries = tree.hlist.info_children(dir)
+ if entries:
+ # We have already loaded this directory. Let's just
+ # show all the child entries
+ #
+ # Note: since we load the directory only once, it will not be
+ # refreshed if the you add or remove files from this
+ # directory.
+ #
+ for entry in entries:
+ tree.hlist.show_entry(entry)
+ files = os.listdir(dir)
+ for file in files:
+ if os.path.isdir(dir + '/' + file):
+ adddir(tree, dir + '/' + file)
+ else:
+ tree.hlist.add(dir + '/' + file, itemtype=Tix.IMAGETEXT, text=file,
+ image=tree.tk.call('tix', 'getimage', 'file'))
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunSample(root)
+ root.mainloop()
Added: external/tix-8.4.2.x/Python/Demo/tix/tixwidgets.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Demo/tix/tixwidgets.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1032 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: tixwidgets.py,v 1.1 2001/12/09 23:29:43 idiscovery Exp $
+#
+# tixwidgets.py --
+#
+# For Tix, see http://tix.sourceforge.net
+#
+# This is a demo program of all Tix widgets available from Python. If
+# you have installed Python & Tix properly, you can execute this as
+#
+# % python tixwidgets.py
+#
+
+import os, os.path, sys, Tix
+from Tkconstants import *
+
+TCL_DONT_WAIT = 1<<1
+TCL_WINDOW_EVENTS = 1<<2
+TCL_FILE_EVENTS = 1<<3
+TCL_TIMER_EVENTS = 1<<4
+TCL_IDLE_EVENTS = 1<<5
+TCL_ALL_EVENTS = 0
+
+class Demo:
+ def __init__(self, top):
+ self.root = top
+ self.exit = -1
+
+ self.dir = None # script directory
+ self.balloon = None # balloon widget
+ self.useBalloons = Tix.StringVar()
+ self.useBalloons.set('0')
+ self.statusbar = None # status bar widget
+ self.welmsg = None # Msg widget
+ self.welfont = '' # font name
+ self.welsize = '' # font size
+
+ progname = sys.argv[0]
+ dirname = os.path.dirname(progname)
+ if dirname and dirname != os.curdir:
+ self.dir = dirname
+ index = -1
+ for i in range(len(sys.path)):
+ p = sys.path[i]
+ if p in ("", os.curdir):
+ index = i
+ if index >= 0:
+ sys.path[index] = dirname
+ else:
+ sys.path.insert(0, dirname)
+ else:
+ self.dir = os.getcwd()
+ sys.path.insert(0, self.dir+'/samples')
+
+ def MkMainMenu(self):
+ top = self.root
+ w = Tix.Frame(top, bd=2, relief=RAISED)
+ file = Tix.Menubutton(w, text='File', underline=0, takefocus=0)
+ help = Tix.Menubutton(w, text='Help', underline=0, takefocus=0)
+ file.pack(side=LEFT)
+ help.pack(side=RIGHT)
+ fm = Tix.Menu(file, tearoff=0)
+ file['menu'] = fm
+ hm = Tix.Menu(help, tearoff=0)
+ help['menu'] = hm
+
+ if w.tk.eval ('info commands console') == "console":
+ fm.add_command(label='Console', underline=1,
+ command=lambda w=w: w.tk.eval('console show'))
+
+ fm.add_command(label='Exit', underline=1,
+ command = lambda self=self: self.quitcmd () )
+ hm.add_checkbutton(label='BalloonHelp', underline=0, command=ToggleHelp,
+ variable=self.useBalloons)
+ # The trace variable option doesn't seem to work, instead I use 'command'
+ #apply(w.tk.call, ('trace', 'variable', self.useBalloons, 'w',
+ # ToggleHelp))
+ return w
+
+ def MkMainNotebook(self):
+ top = self.root
+ w = Tix.NoteBook(top, ipadx=5, ipady=5, options="""
+ *TixNoteBook*tagPadX 6
+ *TixNoteBook*tagPadY 4
+ *TixNoteBook*borderWidth 2
+ """)
+ # This may be required if there is no *Background option
+ top['bg'] = w['bg']
+
+ w.add('wel', label='Welcome', underline=0,
+ createcmd=lambda w=w, name='wel': MkWelcome(w, name))
+ w.add('cho', label='Choosers', underline=0,
+ createcmd=lambda w=w, name='cho': MkChoosers(w, name))
+ w.add('scr', label='Scrolled Widgets', underline=0,
+ createcmd=lambda w=w, name='scr': MkScroll(w, name))
+ w.add('mgr', label='Manager Widgets', underline=0,
+ createcmd=lambda w=w, name='mgr': MkManager(w, name))
+ w.add('dir', label='Directory List', underline=0,
+ createcmd=lambda w=w, name='dir': MkDirList(w, name))
+ w.add('exp', label='Run Sample Programs', underline=0,
+ createcmd=lambda w=w, name='exp': MkSample(w, name))
+ return w
+
+ def MkMainStatus(self):
+ global demo
+ top = self.root
+
+ w = Tix.Frame(top, relief=Tix.RAISED, bd=1)
+ demo.statusbar = Tix.Label(w, relief=Tix.SUNKEN, bd=1)
+ demo.statusbar.form(padx=3, pady=3, left=0, right='%70')
+ return w
+
+ def build(self):
+ root = self.root
+ z = root.winfo_toplevel()
+ z.wm_title('Tix Widget Demonstration')
+ z.geometry('790x590+10+10')
+
+ demo.balloon = Tix.Balloon(root)
+ frame1 = self.MkMainMenu()
+ frame2 = self.MkMainNotebook()
+ frame3 = self.MkMainStatus()
+ frame1.pack(side=TOP, fill=X)
+ frame3.pack(side=BOTTOM, fill=X)
+ frame2.pack(side=TOP, expand=1, fill=BOTH, padx=4, pady=4)
+ demo.balloon['statusbar'] = demo.statusbar
+ z.wm_protocol("WM_DELETE_WINDOW", lambda self=self: self.quitcmd())
+
+ def quitcmd (self):
+ """Quit our mainloop. It is up to you to call root.destroy() after."""
+ self.exit = 0
+
+ def loop(self):
+ import tkMessageBox, traceback
+ while self.exit < 0:
+ try:
+ while self.exit < 0:
+ self.root.tk.dooneevent(TCL_ALL_EVENTS)
+ except SystemExit:
+ #print 'Exit'
+ self.exit = 1
+ break
+ except KeyboardInterrupt:
+ if tkMessageBox.askquestion ('Interrupt', 'Really Quit?') == 'yes':
+ # self.tk.eval('exit')
+ return
+ else:
+ pass
+ continue
+ except:
+ t, v, tb = sys.exc_info()
+ text = ""
+ for line in traceback.format_exception(t,v,tb):
+ text += line + '\n'
+ try: tkMessageBox.showerror ('Error', text)
+ except: pass
+ self.exit = 1
+ raise SystemExit, 1
+
+
+ def destroy (self):
+ self.root.destroy()
+
+def RunMain(root):
+ global demo
+
+ demo = Demo(root)
+
+ demo.build()
+ demo.loop()
+ demo.destroy()
+
+# Tabs
+def MkWelcome(nb, name):
+ w = nb.page(name)
+ bar = MkWelcomeBar(w)
+ text = MkWelcomeText(w)
+ bar.pack(side=TOP, fill=X, padx=2, pady=2)
+ text.pack(side=TOP, fill=BOTH, expand=1)
+
+def MkWelcomeBar(top):
+ global demo
+
+ w = Tix.Frame(top, bd=2, relief=Tix.GROOVE)
+ b1 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
+ b2 = Tix.ComboBox(w, command=lambda w=top: MainTextFont(w))
+ b1.entry['width'] = 15
+ b1.slistbox.listbox['height'] = 3
+ b2.entry['width'] = 4
+ b2.slistbox.listbox['height'] = 3
+
+ demo.welfont = b1
+ demo.welsize = b2
+
+ b1.insert(Tix.END, 'Courier')
+ b1.insert(Tix.END, 'Helvetica')
+ b1.insert(Tix.END, 'Lucida')
+ b1.insert(Tix.END, 'Times Roman')
+
+ b2.insert(Tix.END, '8')
+ b2.insert(Tix.END, '10')
+ b2.insert(Tix.END, '12')
+ b2.insert(Tix.END, '14')
+ b2.insert(Tix.END, '18')
+
+ b1.pick(1)
+ b2.pick(3)
+
+ b1.pack(side=Tix.LEFT, padx=4, pady=4)
+ b2.pack(side=Tix.LEFT, padx=4, pady=4)
+
+ demo.balloon.bind_widget(b1, msg='Choose\na font',
+ statusmsg='Choose a font for this page')
+ demo.balloon.bind_widget(b2, msg='Point size',
+ statusmsg='Choose the font size for this page')
+ return w
+
+def MkWelcomeText(top):
+ global demo
+
+ w = Tix.ScrolledWindow(top, scrollbar='auto')
+ win = w.window
+ text = 'Welcome to TIX in Python'
+ title = Tix.Label(win,
+ bd=0, width=30, anchor=Tix.N, text=text)
+ msg = Tix.Message(win,
+ bd=0, width=400, anchor=Tix.N,
+ text='Tix is a set of mega-widgets based on TK. This program \
+demonstrates the widgets in the Tix widget set. You can choose the pages \
+in this window to look at the corresponding widgets. \n\n\
+To quit this program, choose the "File | Exit" command.\n\n\
+For more information, see http://tix.sourceforge.net.')
+ title.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
+ msg.pack(expand=1, fill=Tix.BOTH, padx=10, pady=10)
+ demo.welmsg = msg
+ return w
+
+def MainTextFont(w):
+ global demo
+
+ if not demo.welmsg:
+ return
+ font = demo.welfont['value']
+ point = demo.welsize['value']
+ if font == 'Times Roman':
+ font = 'times'
+ fontstr = '%s %s' % (font, point)
+ demo.welmsg['font'] = fontstr
+
+def ToggleHelp():
+ if demo.useBalloons.get() == '1':
+ demo.balloon['state'] = 'both'
+ else:
+ demo.balloon['state'] = 'none'
+
+def MkChoosers(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ til = Tix.LabelFrame(w, label='Chooser Widgets')
+ cbx = Tix.LabelFrame(w, label='tixComboBox')
+ ctl = Tix.LabelFrame(w, label='tixControl')
+ sel = Tix.LabelFrame(w, label='tixSelect')
+ opt = Tix.LabelFrame(w, label='tixOptionMenu')
+ fil = Tix.LabelFrame(w, label='tixFileEntry')
+ fbx = Tix.LabelFrame(w, label='tixFileSelectBox')
+ tbr = Tix.LabelFrame(w, label='Tool Bar')
+
+ MkTitle(til.frame)
+ MkCombo(cbx.frame)
+ MkControl(ctl.frame)
+ MkSelect(sel.frame)
+ MkOptMenu(opt.frame)
+ MkFileEnt(fil.frame)
+ MkFileBox(fbx.frame)
+ MkToolBar(tbr.frame)
+
+ # First column: comBox and selector
+ cbx.form(top=0, left=0, right='%33')
+ sel.form(left=0, right='&'+str(cbx), top=cbx)
+ opt.form(left=0, right='&'+str(cbx), top=sel, bottom=-1)
+
+ # Second column: title .. etc
+ til.form(left=cbx, top=0,right='%66')
+ ctl.form(left=cbx, right='&'+str(til), top=til)
+ fil.form(left=cbx, right='&'+str(til), top=ctl)
+ tbr.form(left=cbx, right='&'+str(til), top=fil, bottom=-1)
+
+ #
+ # Third column: file selection
+ fbx.form(right=-1, top=0, left='%66')
+
+def MkCombo(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixComboBox*label.width', 10)
+ w.option_add('*' + prefix + '*TixComboBox*label.anchor', Tix.E)
+ w.option_add('*' + prefix + '*TixComboBox*entry.width', 14)
+
+ static = Tix.ComboBox(w, label='Static', editable=0)
+ editable = Tix.ComboBox(w, label='Editable', editable=1)
+ history = Tix.ComboBox(w, label='History', editable=1, history=1,
+ anchor=Tix.E)
+ static.insert(Tix.END, 'January')
+ static.insert(Tix.END, 'February')
+ static.insert(Tix.END, 'March')
+ static.insert(Tix.END, 'April')
+ static.insert(Tix.END, 'May')
+ static.insert(Tix.END, 'June')
+ static.insert(Tix.END, 'July')
+ static.insert(Tix.END, 'August')
+ static.insert(Tix.END, 'September')
+ static.insert(Tix.END, 'October')
+ static.insert(Tix.END, 'November')
+ static.insert(Tix.END, 'December')
+
+ editable.insert(Tix.END, 'Angola')
+ editable.insert(Tix.END, 'Bangladesh')
+ editable.insert(Tix.END, 'China')
+ editable.insert(Tix.END, 'Denmark')
+ editable.insert(Tix.END, 'Ecuador')
+
+ history.insert(Tix.END, '/usr/bin/ksh')
+ history.insert(Tix.END, '/usr/local/lib/python')
+ history.insert(Tix.END, '/var/adm')
+
+ static.pack(side=Tix.TOP, padx=5, pady=3)
+ editable.pack(side=Tix.TOP, padx=5, pady=3)
+ history.pack(side=Tix.TOP, padx=5, pady=3)
+
+states = ['Bengal', 'Delhi', 'Karnataka', 'Tamil Nadu']
+
+def spin_cmd(w, inc):
+ idx = states.index(demo_spintxt.get()) + inc
+ if idx < 0:
+ idx = len(states) - 1
+ elif idx >= len(states):
+ idx = 0
+# following doesn't work.
+# return states[idx]
+ demo_spintxt.set(states[idx]) # this works
+
+def spin_validate(w):
+ global states, demo_spintxt
+
+ try:
+ i = states.index(demo_spintxt.get())
+ except ValueError:
+ return states[0]
+ return states[i]
+ # why this procedure works as opposed to the previous one beats me.
+
+def MkControl(w):
+ global demo_spintxt
+
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixControl*label.width', 10)
+ w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
+ w.option_add('*' + prefix + '*TixControl*entry.width', 13)
+
+ demo_spintxt = Tix.StringVar()
+ demo_spintxt.set(states[0])
+ simple = Tix.Control(w, label='Numbers')
+ spintxt = Tix.Control(w, label='States', variable=demo_spintxt)
+ spintxt['incrcmd'] = lambda w=spintxt: spin_cmd(w, 1)
+ spintxt['decrcmd'] = lambda w=spintxt: spin_cmd(w, -1)
+ spintxt['validatecmd'] = lambda w=spintxt: spin_validate(w)
+
+ simple.pack(side=Tix.TOP, padx=5, pady=3)
+ spintxt.pack(side=Tix.TOP, padx=5, pady=3)
+
+def MkSelect(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixSelect*label.anchor', Tix.CENTER)
+ w.option_add('*' + prefix + '*TixSelect*orientation', Tix.VERTICAL)
+ w.option_add('*' + prefix + '*TixSelect*labelSide', Tix.TOP)
+
+ sel1 = Tix.Select(w, label='Mere Mortals', allowzero=1, radio=1)
+ sel2 = Tix.Select(w, label='Geeks', allowzero=1, radio=0)
+
+ sel1.add('eat', text='Eat')
+ sel1.add('work', text='Work')
+ sel1.add('play', text='Play')
+ sel1.add('party', text='Party')
+ sel1.add('sleep', text='Sleep')
+
+ sel2.add('eat', text='Eat')
+ sel2.add('prog1', text='Program')
+ sel2.add('prog2', text='Program')
+ sel2.add('prog3', text='Program')
+ sel2.add('sleep', text='Sleep')
+
+ sel1.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
+ sel2.pack(side=Tix.LEFT, padx=5, pady=3, fill=Tix.X)
+
+def MkOptMenu(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixOptionMenu*label.anchor', Tix.E)
+ m = Tix.OptionMenu(w, label='File Format : ', options='menubutton.width 15')
+ m.add_command('text', label='Plain Text')
+ m.add_command('post', label='PostScript')
+ m.add_command('format', label='Formatted Text')
+ m.add_command('html', label='HTML')
+ m.add_command('sep')
+ m.add_command('tex', label='LaTeX')
+ m.add_command('rtf', label='Rich Text Format')
+
+ m.pack(fill=Tix.X, padx=5, pady=3)
+
+def MkFileEnt(w):
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='Press the "open file" icon button and a TixFileSelectDialog will popup.')
+ ent = Tix.FileEntry(w, label='Select a file : ')
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ ent.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
+
+def MkFileBox(w):
+ """The FileSelectBox is a Motif-style box with various enhancements.
+ For example, you can adjust the size of the two listboxes
+ and your past selections are recorded.
+ """
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The Tix FileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.')
+ box = Tix.FileSelectBox(w)
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ box.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
+
+def MkToolBar(w):
+ """The Select widget is also good for arranging buttons in a tool bar.
+ """
+ global demo
+
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The Select widget is also good for arranging buttons in a tool bar.')
+ bar = Tix.Frame(w, bd=2, relief=Tix.RAISED)
+ font = Tix.Select(w, allowzero=1, radio=0, label='')
+ para = Tix.Select(w, allowzero=0, radio=1, label='')
+
+ font.add('bold', bitmap='@' + demo.dir + '/bitmaps/bold.xbm')
+ font.add('italic', bitmap='@' + demo.dir + '/bitmaps/italic.xbm')
+ font.add('underline', bitmap='@' + demo.dir + '/bitmaps/underline.xbm')
+ font.add('capital', bitmap='@' + demo.dir + '/bitmaps/capital.xbm')
+
+ para.add('left', bitmap='@' + demo.dir + '/bitmaps/leftj.xbm')
+ para.add('right', bitmap='@' + demo.dir + '/bitmaps/rightj.xbm')
+ para.add('center', bitmap='@' + demo.dir + '/bitmaps/centerj.xbm')
+ para.add('justify', bitmap='@' + demo.dir + '/bitmaps/justify.xbm')
+
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ bar.pack(side=Tix.TOP, fill=Tix.X, padx=3, pady=3)
+ font.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
+ para.pack({'in':bar}, side=Tix.LEFT, padx=3, pady=3)
+
+def MkTitle(w):
+ prefix = Tix.OptionName(w)
+ if not prefix: prefix = ''
+ w.option_add('*' + prefix + '*TixSelect*frame.borderWidth', 1)
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='There are many types of "chooser" widgets that allow the user to input different types of information')
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+
+def MkScroll(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ sls = Tix.LabelFrame(w, label='tixScrolledListBox')
+ swn = Tix.LabelFrame(w, label='tixScrolledWindow')
+ stx = Tix.LabelFrame(w, label='tixScrolledText')
+
+ MkSList(sls.frame)
+ MkSWindow(swn.frame)
+ MkSText(stx.frame)
+
+ sls.form(top=0, left=0, right='%33', bottom=-1)
+ swn.form(top=0, left=sls, right='%66', bottom=-1)
+ stx.form(top=0, left=swn, right=-1, bottom=-1)
+
+def MkSList(w):
+ """This TixScrolledListBox is configured so that it uses scrollbars
+ only when it is necessary. Use the handles to resize the listbox and
+ watch the scrollbars automatically appear and disappear. """
+ top = Tix.Frame(w, width=300, height=330)
+ bot = Tix.Frame(w)
+ msg = Tix.Message(top,
+ relief=Tix.FLAT, width=200, anchor=Tix.N,
+ text='This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.')
+
+ list = Tix.ScrolledListBox(top, scrollbar='auto')
+ list.place(x=50, y=150, width=120, height=80)
+ list.listbox.insert(Tix.END, 'Alabama')
+ list.listbox.insert(Tix.END, 'California')
+ list.listbox.insert(Tix.END, 'Montana')
+ list.listbox.insert(Tix.END, 'New Jersey')
+ list.listbox.insert(Tix.END, 'New York')
+ list.listbox.insert(Tix.END, 'Pennsylvania')
+ list.listbox.insert(Tix.END, 'Washington')
+
+ rh = Tix.ResizeHandle(top, bg='black',
+ relief=Tix.RAISED,
+ handlesize=8, gridded=1, minwidth=50, minheight=30)
+ btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=list: SList_reset(w,x))
+ top.propagate(0)
+ msg.pack(fill=Tix.X)
+ btn.pack(anchor=Tix.CENTER)
+ top.pack(expand=1, fill=Tix.BOTH)
+ bot.pack(fill=Tix.BOTH)
+ list.bind('<Map>', func=lambda arg=0, rh=rh, list=list:
+ list.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(list)))
+
+def SList_reset(rh, list):
+ list.place(x=50, y=150, width=120, height=80)
+ list.update()
+ rh.attach_widget(list)
+
+def MkSWindow(w):
+ """The ScrolledWindow widget allows you to scroll any kind of Tk
+ widget. It is more versatile than a scrolled canvas widget.
+ """
+ global demo
+
+ text = 'The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.'
+
+ file = os.path.join(demo.dir, 'bitmaps', 'tix.gif')
+ if not os.path.isfile(file):
+ text += ' (Image missing)'
+
+ top = Tix.Frame(w, width=330, height=330)
+ bot = Tix.Frame(w)
+ msg = Tix.Message(top,
+ relief=Tix.FLAT, width=200, anchor=Tix.N,
+ text=text)
+
+ win = Tix.ScrolledWindow(top, scrollbar='auto')
+
+ if 0:
+ global image1
+ # This image is not showing up in the Label unless it is set to a
+ # global variable - no problem under Tcl/Tix. I assume it is being
+ # garbage collected somehow, even though the Tcl command 'image names'
+ # shows that as far as Tcl is concerned, the image exists and is
+ # called pyimage1. What I find curious is that this if 0: branch
+ # works only if image1 is global, *even though I give Label a string*.
+ image1 = Tix.Image('photo', file=file)
+ else:
+ # No need for image1 to be global if I do it in pure Tcl.
+ # When I do it in pure Tcl the image shows up in the Label.
+ # The tcl command 'image names' shows as far as Tcl is concerned,
+ # the image exists and is called image1. So I assume the problem
+ # lies Tkinter.py Image.__init__, where the image gets the name
+ # pyimage1, instead of what Tcl would have called it - image1.
+ image1 = win.tk.eval('image create photo -file {%s}' % file)
+
+ lbl = Tix.Label(win.window, image='%s' % image1)
+ lbl.pack(expand=1, fill=Tix.BOTH)
+
+ win.place(x=30, y=150, width=190, height=120)
+
+ rh = Tix.ResizeHandle(top, bg='black',
+ relief=Tix.RAISED,
+ handlesize=8, gridded=1, minwidth=50, minheight=30)
+ btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SWindow_reset(w,x))
+ top.propagate(0)
+ msg.pack(fill=Tix.X)
+ btn.pack(anchor=Tix.CENTER)
+ top.pack(expand=1, fill=Tix.BOTH)
+ bot.pack(fill=Tix.BOTH)
+ win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
+ win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
+
+def SWindow_reset(rh, win):
+ win.place(x=30, y=150, width=190, height=120)
+ win.update()
+ rh.attach_widget(win)
+
+def MkSText(w):
+ """The TixScrolledWindow widget allows you to scroll any kind of Tk
+ widget. It is more versatile than a scrolled canvas widget."""
+ top = Tix.Frame(w, width=330, height=330)
+ bot = Tix.Frame(w)
+ msg = Tix.Message(top,
+ relief=Tix.FLAT, width=200, anchor=Tix.N,
+ text='The TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.')
+
+ win = Tix.ScrolledText(top, scrollbar='auto')
+# win.text['wrap'] = 'none'
+ win.text.insert(Tix.END, 'This is a text widget embedded in a scrolled window. Although the original Tix demo does not have any text here, I decided to put in some so that you can see the effect of scrollbars etc.')
+ win.place(x=30, y=150, width=190, height=100)
+
+ rh = Tix.ResizeHandle(top, bg='black',
+ relief=Tix.RAISED,
+ handlesize=8, gridded=1, minwidth=50, minheight=30)
+ btn = Tix.Button(bot, text='Reset', command=lambda w=rh, x=win: SText_reset(w,x))
+ top.propagate(0)
+ msg.pack(fill=Tix.X)
+ btn.pack(anchor=Tix.CENTER)
+ top.pack(expand=1, fill=Tix.BOTH)
+ bot.pack(fill=Tix.BOTH)
+ win.bind('<Map>', func=lambda arg=0, rh=rh, win=win:
+ win.tk.call('tixDoWhenIdle', str(rh), 'attachwidget', str(win)))
+
+def SText_reset(rh, win):
+ win.place(x=30, y=150, width=190, height=120)
+ win.update()
+ rh.attach_widget(win)
+
+def MkManager(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ pane = Tix.LabelFrame(w, label='tixPanedWindow')
+ note = Tix.LabelFrame(w, label='tixNoteBook')
+
+ MkPanedWindow(pane.frame)
+ MkNoteBook(note.frame)
+
+ pane.form(top=0, left=0, right=note, bottom=-1)
+ note.form(top=0, right=-1, bottom=-1)
+
+def MkPanedWindow(w):
+ """The PanedWindow widget allows the user to interactively manipulate
+ the sizes of several panes. The panes can be arranged either vertically
+ or horizontally.
+ """
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.')
+ group = Tix.LabelEntry(w, label='Newsgroup:', options='entry.width 25')
+ group.entry.insert(0,'comp.lang.python')
+ pane = Tix.PanedWindow(w, orientation='vertical')
+
+ p1 = pane.add('list', min=70, size=100)
+ p2 = pane.add('text', min=70)
+ list = Tix.ScrolledListBox(p1)
+ text = Tix.ScrolledText(p2)
+
+ list.listbox.insert(Tix.END, " 12324 Re: Tkinter is good for your health")
+ list.listbox.insert(Tix.END, "+ 12325 Re: Tkinter is good for your health")
+ list.listbox.insert(Tix.END, "+ 12326 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, " 12327 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, "+ 12328 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, " 12329 Re: Tix is even better for your health (Was: Tkinter is good...)")
+ list.listbox.insert(Tix.END, "+ 12330 Re: Tix is even better for your health (Was: Tkinter is good...)")
+
+ text.text['bg'] = list.listbox['bg']
+ text.text['wrap'] = 'none'
+ text.text.insert(Tix.END, """
+Mon, 19 Jun 1995 11:39:52 comp.lang.python Thread 34 of 220
+Lines 353 A new way to put text and bitmaps together iNo responses
+ioi at blue.seas.upenn.edu Ioi K. Lam at University of Pennsylvania
+
+Hi,
+
+I have implemented a new image type called "compound". It allows you
+to glue together a bunch of bitmaps, images and text strings together
+to form a bigger image. Then you can use this image with widgets that
+support the -image option. For example, you can display a text string string
+together with a bitmap, at the same time, inside a TK button widget.
+""")
+ list.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
+ text.pack(expand=1, fill=Tix.BOTH, padx=4, pady=6)
+
+ msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ group.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ pane.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH, expand=1)
+
+def MkNoteBook(w):
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The NoteBook widget allows you to layout a complex interface into individual pages.')
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixControl*entry.width', 10)
+ w.option_add('*' + prefix + '*TixControl*label.width', 18)
+ w.option_add('*' + prefix + '*TixControl*label.anchor', Tix.E)
+ w.option_add('*' + prefix + '*TixNoteBook*tagPadX', 8)
+
+ nb = Tix.NoteBook(w, ipadx=6, ipady=6)
+ nb.add('hard_disk', label="Hard Disk", underline=0)
+ nb.add('network', label="Network", underline=0)
+
+ # Frame for the buttons that are present on all pages
+ common = Tix.Frame(nb.hard_disk)
+ common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
+ CreateCommonButtons(common)
+
+ # Widgets belonging only to this page
+ a = Tix.Control(nb.hard_disk, value=12, label='Access Time: ')
+ w = Tix.Control(nb.hard_disk, value=400, label='Write Throughput: ')
+ r = Tix.Control(nb.hard_disk, value=400, label='Read Throughput: ')
+ c = Tix.Control(nb.hard_disk, value=1021, label='Capacity: ')
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+
+ common = Tix.Frame(nb.network)
+ common.pack(side=Tix.RIGHT, padx=2, pady=2, fill=Tix.Y)
+ CreateCommonButtons(common)
+
+ a = Tix.Control(nb.network, value=12, label='Access Time: ')
+ w = Tix.Control(nb.network, value=400, label='Write Throughput: ')
+ r = Tix.Control(nb.network, value=400, label='Read Throughput: ')
+ c = Tix.Control(nb.network, value=1021, label='Capacity: ')
+ u = Tix.Control(nb.network, value=10, label='Users: ')
+ a.pack(side=Tix.TOP, padx=20, pady=2)
+ w.pack(side=Tix.TOP, padx=20, pady=2)
+ r.pack(side=Tix.TOP, padx=20, pady=2)
+ c.pack(side=Tix.TOP, padx=20, pady=2)
+ u.pack(side=Tix.TOP, padx=20, pady=2)
+
+ msg.pack(side=Tix.TOP, padx=3, pady=3, fill=Tix.BOTH)
+ nb.pack(side=Tix.TOP, padx=5, pady=5, fill=Tix.BOTH, expand=1)
+
+def CreateCommonButtons(f):
+ ok = Tix.Button(f, text='OK', width = 6)
+ cancel = Tix.Button(f, text='Cancel', width = 6)
+ ok.pack(side=Tix.TOP, padx=2, pady=2)
+ cancel.pack(side=Tix.TOP, padx=2, pady=2)
+
+def MkDirList(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ w.option_add('*' + prefix + '*TixLabelFrame*label.padX', 4)
+
+ dir = Tix.LabelFrame(w, label='tixDirList')
+ fsbox = Tix.LabelFrame(w, label='tixExFileSelectBox')
+ MkDirListWidget(dir.frame)
+ MkExFileWidget(fsbox.frame)
+ dir.form(top=0, left=0, right='%40', bottom=-1)
+ fsbox.form(top=0, left='%40', right=-1, bottom=-1)
+
+def MkDirListWidget(w):
+ """The TixDirList widget gives a graphical representation of the file
+ system directory and makes it easy for the user to choose and access
+ directories.
+ """
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The TixDirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.')
+ dirlist = Tix.DirList(w, options='hlist.padY 1 hlist.width 25 hlist.height 16')
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ dirlist.pack(side=Tix.TOP, padx=3, pady=3)
+
+def MkExFileWidget(w):
+ """The TixExFileSelectBox widget is more user friendly than the Motif
+ style FileSelectBox. """
+ msg = Tix.Message(w,
+ relief=Tix.FLAT, width=240, anchor=Tix.N,
+ text='The TixExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.')
+ # There's a bug in the ComboBoxes - the scrolledlistbox is destroyed
+ box = Tix.ExFileSelectBox(w, bd=2, relief=Tix.RAISED)
+ msg.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=3, pady=3)
+ box.pack(side=Tix.TOP, padx=3, pady=3)
+
+###
+### List of all the demos we want to show off
+comments = {'widget' : 'Widget Demos', 'image' : 'Image Demos'}
+samples = {'Balloon' : 'Balloon',
+ 'Button Box' : 'BtnBox',
+ 'Combo Box' : 'ComboBox',
+ 'Compound Image' : 'CmpImg',
+ 'Directory List' : 'DirList',
+ 'Directory Tree' : 'DirTree',
+ 'Control' : 'Control',
+ 'Notebook' : 'NoteBook',
+ 'Option Menu' : 'OptMenu',
+ 'Paned Window' : 'PanedWin',
+ 'Popup Menu' : 'PopMenu',
+ 'ScrolledHList (1)' : 'SHList1',
+ 'ScrolledHList (2)' : 'SHList2',
+ 'Tree (dynamic)' : 'Tree'
+}
+
+# There are still a lot of demos to be translated:
+## set root {
+## {d "File Selectors" file }
+## {d "Hierachical ListBox" hlist }
+## {d "Tabular ListBox" tlist {c tixTList}}
+## {d "Grid Widget" grid {c tixGrid}}
+## {d "Manager Widgets" manager }
+## {d "Scrolled Widgets" scroll }
+## {d "Miscellaneous Widgets" misc }
+## {d "Image Types" image }
+## }
+##
+## set image {
+## {d "Compound Image" cmpimg }
+## {d "XPM Image" xpm {i pixmap}}
+## }
+##
+## set cmpimg {
+## {f "In Buttons" CmpImg.tcl }
+## {f "In NoteBook" CmpImg2.tcl }
+## {f "Notebook Color Tabs" CmpImg4.tcl }
+## {f "Icons" CmpImg3.tcl }
+## }
+##
+## set xpm {
+## {f "In Button" Xpm.tcl {i pixmap}}
+## {f "In Menu" Xpm1.tcl {i pixmap}}
+## }
+##
+## set file {
+##added {f DirList DirList.tcl }
+##added {f DirTree DirTree.tcl }
+## {f DirSelectDialog DirDlg.tcl }
+## {f ExFileSelectDialog EFileDlg.tcl }
+## {f FileSelectDialog FileDlg.tcl }
+## {f FileEntry FileEnt.tcl }
+## }
+##
+## set hlist {
+## {f HList HList1.tcl }
+## {f CheckList ChkList.tcl {c tixCheckList}}
+##done {f "ScrolledHList (1)" SHList.tcl }
+##done {f "ScrolledHList (2)" SHList2.tcl }
+##done {f Tree Tree.tcl }
+##done {f "Tree (Dynamic)" DynTree.tcl {v win}}
+## }
+##
+## set tlist {
+## {f "ScrolledTList (1)" STList1.tcl {c tixTList}}
+## {f "ScrolledTList (2)" STList2.tcl {c tixTList}}
+## }
+## global tcl_platform
+## # This demo hangs windows
+## if {$tcl_platform(platform) != "windows"} {
+##na lappend tlist {f "TList File Viewer" STList3.tcl {c tixTList}}
+## }
+##
+## set grid {
+##na {f "Simple Grid" SGrid0.tcl {c tixGrid}}
+##na {f "ScrolledGrid" SGrid1.tcl {c tixGrid}}
+##na {f "Editable Grid" EditGrid.tcl {c tixGrid}}
+## }
+##
+## set scroll {
+## {f ScrolledListBox SListBox.tcl }
+## {f ScrolledText SText.tcl }
+## {f ScrolledWindow SWindow.tcl }
+##na {f "Canvas Object View" CObjView.tcl {c tixCObjView}}
+## }
+##
+## set manager {
+## {f ListNoteBook ListNBK.tcl }
+##done {f NoteBook NoteBook.tcl }
+##done {f PanedWindow PanedWin.tcl }
+## }
+##
+## set misc {
+##done {f Balloon Balloon.tcl }
+##done {f ButtonBox BtnBox.tcl }
+##done {f ComboBox ComboBox.tcl }
+##done {f Control Control.tcl }
+## {f LabelEntry LabEntry.tcl }
+## {f LabelFrame LabFrame.tcl }
+## {f Meter Meter.tcl {c tixMeter}}
+##done {f OptionMenu OptMenu.tcl }
+##done {f PopupMenu PopMenu.tcl }
+## {f Select Select.tcl }
+## {f StdButtonBox StdBBox.tcl }
+## }
+##
+
+stypes = {}
+stypes['widget'] = ['Balloon', 'Button Box', 'Combo Box', 'Control',
+ 'Directory List', 'Directory Tree',
+ 'Notebook', 'Option Menu', 'Popup Menu', 'Paned Window',
+ 'ScrolledHList (1)', 'ScrolledHList (2)', 'Tree (dynamic)']
+stypes['image'] = ['Compound Image']
+
+def MkSample(nb, name):
+ w = nb.page(name)
+ prefix = Tix.OptionName(w)
+ if not prefix:
+ prefix = ''
+ else:
+ prefix = '*' + prefix
+ w.option_add(prefix + '*TixLabelFrame*label.padX', 4)
+
+ pane = Tix.PanedWindow(w, orientation='horizontal')
+ pane.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH)
+ f1 = pane.add('list', expand='1')
+ f2 = pane.add('text', expand='5')
+ f1['relief'] = 'flat'
+ f2['relief'] = 'flat'
+
+ lab = Tix.Label(f1, text='Select a sample program:', anchor=Tix.W)
+ lab.pack(side=Tix.TOP, expand=0, fill=Tix.X, padx=5, pady=5)
+ lab1 = Tix.Label(f2, text='Source:', anchor=Tix.W)
+ lab1.pack(side=Tix.TOP, expand=0, fill=Tix.X, padx=5, pady=5)
+
+ slb = Tix.Tree(f1, options='hlist.width 25')
+ slb.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=5)
+
+ stext = Tix.ScrolledText(f2, name='stext')
+ font = root.tk.eval('tix option get fixed_font')
+ stext.text.config(font=font)
+ stext.text.bind('<Up>', lambda w=stext.text: w.yview(scroll='-1 unit'))
+ stext.text.bind('<Down>', lambda w=stext.text: w.yview(scroll='1 unit'))
+ stext.text.bind('<Left>', lambda w=stext.text: w.xview(scroll='-1 unit'))
+ stext.text.bind('<Right>', lambda w=stext.text: w.xview(scroll='1 unit'))
+ stext.pack(side=Tix.TOP, expand=1, fill=Tix.BOTH, padx=7)
+
+ frame = Tix.Frame(f2, name='frame')
+ frame.pack(side=Tix.TOP, expand=0, fill=Tix.X, padx=7)
+
+ run = Tix.Button(frame, text='Run ...', name='run')
+ view = Tix.Button(frame, text='View Source ...', name='view')
+ run.pack(side=Tix.LEFT, expand=0, fill=Tix.NONE)
+ view.pack(side=Tix.LEFT, expand=0, fill=Tix.NONE)
+
+ stext.text['bg'] = slb.hlist['bg']
+ stext.text['state'] = 'disabled'
+ stext.text['wrap'] = 'none'
+ stext.text['width'] = 80
+
+ slb.hlist['separator'] = '.'
+ slb.hlist['width'] = 25
+ slb.hlist['drawbranch'] = 0
+ slb.hlist['indent'] = 10
+ slb.hlist['wideselect'] = 1
+ slb.hlist['command'] = lambda args=0, w=w,slb=slb,stext=stext,run=run,view=view: Sample_Action(w, slb, stext, run, view, 'run')
+ slb.hlist['browsecmd'] = lambda args=0, w=w,slb=slb,stext=stext,run=run,view=view: Sample_Action(w, slb, stext, run, view, 'browse')
+
+ run['command'] = lambda args=0, w=w,slb=slb,stext=stext,run=run,view=view: Sample_Action(w, slb, stext, run, view, 'run')
+ view['command'] = lambda args=0, w=w,slb=slb,stext=stext,run=run,view=view: Sample_Action(w, slb, stext, run, view, 'view')
+
+ for type in ['widget', 'image']:
+ if type != 'widget':
+ x = Tix.Frame(slb.hlist, bd=2, height=2, width=150,
+ relief=Tix.SUNKEN, bg=slb.hlist['bg'])
+ slb.hlist.add_child(itemtype=Tix.WINDOW, window=x, state='disabled')
+ x = slb.hlist.add_child(itemtype=Tix.TEXT, state='disabled',
+ text=comments[type])
+ for key in stypes[type]:
+ slb.hlist.add_child(x, itemtype=Tix.TEXT, data=key,
+ text=key)
+ slb.hlist.selection_clear()
+
+ run['state'] = 'disabled'
+ view['state'] = 'disabled'
+
+def Sample_Action(w, slb, stext, run, view, action):
+ global demo
+
+ hlist = slb.hlist
+ anchor = hlist.info_anchor()
+ if not anchor:
+ run['state'] = 'disabled'
+ view['state'] = 'disabled'
+ elif not hlist.info_parent(anchor):
+ # a comment
+ return
+
+ run['state'] = 'normal'
+ view['state'] = 'normal'
+ key = hlist.info_data(anchor)
+ title = key
+ prog = samples[key]
+
+ if action == 'run':
+ exec('import ' + prog)
+ w = Tix.Toplevel()
+ w.title(title)
+ rtn = eval(prog + '.RunSample')
+ rtn(w)
+ elif action == 'view':
+ w = Tix.Toplevel()
+ w.title('Source view: ' + title)
+ LoadFile(w, demo.dir + '/samples/' + prog + '.py')
+ elif action == 'browse':
+ ReadFile(stext.text, demo.dir + '/samples/' + prog + '.py')
+
+def LoadFile(w, fname):
+ global root
+ b = Tix.Button(w, text='Close', command=w.destroy)
+ t = Tix.ScrolledText(w)
+ # b.form(left=0, bottom=0, padx=4, pady=4)
+ # t.form(left=0, bottom=b, right='-0', top=0)
+ t.pack()
+ b.pack()
+
+ font = root.tk.eval('tix option get fixed_font')
+ t.text.config(font=font)
+ t.text['bd'] = 2
+ t.text['wrap'] = 'none'
+
+ ReadFile(t.text, fname)
+
+def ReadFile(w, fname):
+ old_state = w['state']
+ w['state'] = 'normal'
+ w.delete('0.0', Tix.END)
+
+ try:
+ f = open(fname)
+ lines = f.readlines()
+ for s in lines:
+ w.insert(Tix.END, s)
+ f.close()
+ finally:
+# w.see('1.0')
+ w['state'] = old_state
+
+if __name__ == '__main__':
+ root = Tix.Tk()
+ RunMain(root)
+
Added: external/tix-8.4.2.x/Python/INSTALL-2.1.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/INSTALL-2.1.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,107 @@
+# -*-mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: INSTALL-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
+
+INSTALLING TIX
+
+0) To use Tix.py, you need Tcl/Tk (V8.3.3), Tix (V8.2.0) and Python (V2.1.1).
+ Tix.py has been written and tested on a Intel Pentium running RH Linux 5.2
+ and Mandrake Linux 6.x and 7.0 and Windows with the above mentioned packages.
+ Any version of Tcl 8.3.x should work with any version of Python >= 2.1.0
+ and any version of Tix >= 8.1.1 from http://tix.sourceforge.net. However,
+ tcl/tk8.4* is likely to cause problems and may not work by default.
+
+ Older versions, e.g. Tix 4.1 and Tk 8.0, might also work;
+ there is nothing OS-specific in Tix.py itself so it should work on
+ any machine with Tix and Python installed. You can get Tcl and Tk
+ from http://dev.scriptics.com and Tix from http://tix.sourceforge.net.
+
+1) Build and install Tcl/Tk 8.3. Build and install Tix 8.1.2 or 8.2.x.
+ Ensure that Tix is properly installed by running tixwish and executing
+ the demo programs. Under Unix, use the --enable-shared configure option
+ for all three. We recommend tcl8.3.3 for this release of Tix.py.
+
+2a) If you have a distribution like ActiveState with a tcl subdirectory
+ of $PYTHONHOME, which contains the directories tcl8.3 and tk8.3,
+ make a directory tix8.2 as well. Recursively copy the files from the
+ *installed* <tix>/lib8.2 to $PYTHONHOME/lib/tix8.2, and copy the dynamic
+ library (tix8283.dll or libtix8.2.8.3.so) to the same place as the tcl
+ dynamic libraries ($PYTHONHOME/Dlls or lib/python-2.1/lib-dynload).
+ For shared library install such as this are all down, and you
+ can skip to the section TESTING.
+
+
+2b) To build statically, modify Modules/Setup.dist and setup.py to change
+ the version of the tix library from tix4.1.8.0 to tix8.2.8.3 if necessary.
+ These modified files can be used for Tkinter with or without Tix.
+
+3) The default is to build dynamically, and use the Tcl 'package require'.
+ Under Windows, you will have to modify the MS VC project files,
+ which is complex: use a text editor to modify the PCBuild/_tkinter.dsp file.
+ To build statically under Unix, modify the Modules/Setup file to link
+ in the Tix library according to the comments in the file.
+ On Linux this looks like:
+
+# *** Always uncomment this (leave the leading underscore in!):
+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
+# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
+ -L/usr/local/lib \
+# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
+ -I/usr/local/include \
+# *** Uncomment and edit to reflect where your X11 header files are:
+ -I/usr/X11R6/include \
+# *** Or uncomment this for Solaris:
+# -I/usr/openwin/include \
+# *** Uncomment and edit for BLT extension only:
+# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
+# *** Uncomment and edit for PIL (TkImaging) extension only:
+# (See http://www.pythonware.com/products/pil/ for more info)
+# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
+# *** Uncomment and edit for TOGL extension only:
+# -DWITH_TOGL togl.c \
+# *** Uncomment and edit for Tix extension only:
+ -DWITH_TIX -ltix8.2.8.3 \
+# *** Uncomment and edit to reflect your Tcl/Tk versions:
+ -ltk8.3 -ltcl8.3 \
+# *** Uncomment and edit to reflect where your X11 libraries are:
+ -L/usr/X11R6/lib \
+# *** Or uncomment this for Solaris:
+# -L/usr/openwin/lib \
+# *** Uncomment these for TOGL extension only:
+# -lGL -lGLU -lXext -lXmu \
+# *** Uncomment for AIX:
+# -lld \
+# *** Always uncomment this; X11 libraries to link with:
+ -lX11
+
+4) Rebuild Python and reinstall.
+
+TESTING
+-------
+
+You should now have a working Tix implementation in Python. To see if all
+is as it should be, run the 'tixwidgets.py' script in the Demo/tix directory.
+Under X windows, do
+ /usr/local/bin/python Demo/tix/tixwidgets.py
+
+If this does not work, you may need to tell python where to find
+the Tcl, Tk and Tix library files. This is done by setting the
+TCL_LIBRARY, TK_LIBRARY and TIX_LIBRARY environment variables.
+Try this under Unix:
+
+ env TCL_LIBRARY=/usr/local/lib/tcl8.3 \
+ TK_LIBRARY=/usr/local/lib/tk8.3 \
+ TIX_LIBRARY=/usr/local/lib/tix8.2 \
+ /usr/local/bin/python Demo/tix/tixwidgets.py
+
+or under Windows:
+
+ set TCL_LIBRARY=\usr\local\lib\tcl8.3
+ set TK_LIBRARY=\usr\local\lib\tk8.3
+ set TIX_LIBRARY=\usr\local\lib\tix8.2
+ pythonw.exe Demo\tix\tixwidgets.py
+
+
+If you find any bugs or have suggestions for improvement, please report them
+via http://tix.sourceforge.net
+
Added: external/tix-8.4.2.x/Python/Lib/lib-tk/Tix.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Lib/lib-tk/Tix.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1625 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Tix.py,v 1.1 2002/01/24 09:48:42 idiscovery Exp $
+#
+# Tix.py -- Tix widget wrappers.
+#
+# For Tix, see http://tix.sourceforge.net
+#
+# - Sudhir Shenoy (sshenoy at gol.com), Dec. 1995.
+# based on an idea of Jean-Marc Lugrin (lugrin at ms.com)
+#
+# NOTE: In order to minimize changes to Tkinter.py, some of the code here
+# (TixWidget.__init__) has been taken from Tkinter (Widget.__init__)
+# and will break if there are major changes in Tkinter.
+#
+# The Tix widgets are represented by a class hierarchy in python with proper
+# inheritance of base classes.
+#
+# As a result after creating a 'w = StdButtonBox', I can write
+# w.ok['text'] = 'Who Cares'
+# or w.ok['bg'] = w['bg']
+# or even w.ok.invoke()
+# etc.
+#
+# Compare the demo tixwidgets.py to the original Tcl program and you will
+# appreciate the advantages.
+#
+
+import string
+from Tkinter import *
+from Tkinter import _flatten, _cnfmerge, _default_root
+
+# WARNING - TkVersion is a limited precision floating point number
+if TkVersion < 3.999:
+ raise ImportError, "This version of Tix.py requires Tk 4.0 or higher"
+
+import _tkinter # If this fails your Python may not be configured for Tk
+# TixVersion = string.atof(tkinter.TIX_VERSION) # If this fails your Python may not be configured for Tix
+# WARNING - TixVersion is a limited precision floating point number
+
+# Some more constants (for consistency with Tkinter)
+WINDOW = 'window'
+TEXT = 'text'
+STATUS = 'status'
+IMMEDIATE = 'immediate'
+IMAGE = 'image'
+IMAGETEXT = 'imagetext'
+BALLOON = 'balloon'
+AUTO = 'auto'
+ACROSSTOP = 'acrosstop'
+
+# Some constants used by Tkinter dooneevent()
+TCL_DONT_WAIT = 1<<1
+TCL_WINDOW_EVENTS = 1<<2
+TCL_FILE_EVENTS = 1<<3
+TCL_TIMER_EVENTS = 1<<4
+TCL_IDLE_EVENTS = 1<<5
+TCL_ALL_EVENTS = 0
+
+# BEWARE - this is implemented by copying some code from the Widget class
+# in Tkinter (to override Widget initialization) and is therefore
+# liable to break.
+import Tkinter, os
+
+# Could probably add this to Tkinter.Misc
+class tixCommand:
+ """The tix commands provide access to miscellaneous elements
+ of Tix's internal state and the Tix application context.
+ Most of the information manipulated by these commands pertains
+ to the application as a whole, or to a screen or
+ display, rather than to a particular window.
+
+ This is a mixin class, assumed to be mixed to Tkinter.Tk
+ that supports the self.tk.call method.
+ """
+
+ def tix_addbitmapdir(self, directory):
+ """Tix maintains a list of directories under which
+ the tix_getimage and tix_getbitmap commands will
+ search for image files. The standard bitmap directory
+ is $TIX_LIBRARY/bitmaps. The addbitmapdir command
+ adds directory into this list. By using this
+ command, the image files of an applications can
+ also be located using the tix_getimage or tix_getbitmap
+ command.
+ """
+ return self.tk.call('tix', 'addbitmapdir', directory)
+
+ def tix_cget(self, option):
+ """Returns the current value of the configuration
+ option given by option. Option may be any of the
+ options described in the CONFIGURATION OPTIONS section.
+ """
+ return self.tk.call('tix', 'cget', option)
+
+ def tix_configure(self, cnf=None, **kw):
+ """Query or modify the configuration options of the Tix application
+ context. If no option is specified, returns a dictionary all of the
+ available options. 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 option(s)
+ to have the given value(s); in this case the command returns an
+ empty string. Option may be any of the configuration options.
+ """
+ # Copied from Tkinter.py
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ elif cnf:
+ cnf = _cnfmerge(cnf)
+ if cnf is None:
+ cnf = {}
+ for x in self.tk.split(self.tk.call('tix', 'configure')):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+ if type(cnf) is StringType:
+ x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ return self.tk.call(('tix', 'configure') + self._options(cnf))
+
+ def tix_filedialog(self, dlgclass=None):
+ """Returns the file selection dialog that may be shared among
+ different calls from this application. This command will create a
+ file selection dialog widget when it is called the first time. This
+ dialog will be returned by all subsequent calls to tix_filedialog.
+ An optional dlgclass parameter can be passed to specified what type
+ of file selection dialog widget is desired. Possible options are
+ tix FileSelectDialog or tixExFileSelectDialog.
+ """
+ if dlgclass is not None:
+ return self.tk.call('tix', 'filedialog', dlgclass)
+ else:
+ return self.tk.call('tix', 'filedialog')
+
+ def tix_getbitmap(self, name):
+ """Locates a bitmap file of the name name.xpm or name in one of the
+ bitmap directories (see the tix_addbitmapdir command above). By
+ using tix_getbitmap, you can avoid hard coding the pathnames of the
+ bitmap files in your application. When successful, it returns the
+ complete pathname of the bitmap file, prefixed with the character
+ '@'. The returned value can be used to configure the -bitmap
+ option of the TK and Tix widgets.
+ """
+ return self.tk.call('tix', 'getbitmap', name)
+
+ def tix_getimage(self, name):
+ """Locates an image file of the name name.xpm, name.xbm or name.ppm
+ in one of the bitmap directories (see the addbitmapdir command
+ above). If more than one file with the same name (but different
+ extensions) exist, then the image type is chosen according to the
+ depth of the X display: xbm images are chosen on monochrome
+ displays and color images are chosen on color displays. By using
+ tix_ getimage, you can advoid hard coding the pathnames of the
+ image files in your application. When successful, this command
+ returns the name of the newly created image, which can be used to
+ configure the -image option of the Tk and Tix widgets.
+ """
+ return self.tk.call('tix', 'getimage', name)
+
+ def tix_option_get(self, name):
+ """Gets the options manitained by the Tix
+ scheme mechanism. Available options include:
+
+ active_bg active_fg bg
+ bold_font dark1_bg dark1_fg
+ dark2_bg dark2_fg disabled_fg
+ fg fixed_font font
+ inactive_bg inactive_fg input1_bg
+ input2_bg italic_font light1_bg
+ light1_fg light2_bg light2_fg
+ menu_font output1_bg output2_bg
+ select_bg select_fg selector
+ """
+ # could use self.tk.globalgetvar('tixOption', name)
+ return self.tk.call('tix', 'option', 'get', name)
+
+ def tix_resetoptions(self, newScheme, newFontSet, newScmPrio=None):
+ """Resets the scheme and fontset of the Tix application to
+ newScheme and newFontSet, respectively. This affects only those
+ widgets created after this call. Therefore, it is best to call the
+ resetoptions command before the creation of any widgets in a Tix
+ application.
+
+ The optional parameter newScmPrio can be given to reset the
+ priority level of the Tk options set by the Tix schemes.
+
+ Because of the way Tk handles the X option database, after Tix has
+ been has imported and inited, it is not possible to reset the color
+ schemes and font sets using the tix config command. Instead, the
+ tix_resetoptions command must be used.
+ """
+ if newScmPrio is not None:
+ return self.tk.call('tix', 'resetoptions', newScheme, newFontSet, newScmPrio)
+ else:
+ return self.tk.call('tix', 'resetoptions', newScheme, newFontSet)
+
+class Tk(Tkinter.Tk, tixCommand):
+ """Toplevel widget of Tix which represents mostly the main window
+ of an application. It has an associated Tcl interpreter."""
+ def __init__(self, screenName=None, baseName=None, className='Tix'):
+ Tkinter.Tk.__init__(self, screenName, baseName, className)
+ tixlib = os.environ.get('TIX_LIBRARY')
+ self.tk.eval('global auto_path; lappend auto_path [file dir [info nameof]]')
+ if tixlib is not None:
+ self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib)
+ self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib)
+ # Load Tix - this should work dynamically or statically
+ # If it's static, lib/tix8.1/pkgIndex.tcl should have
+ # 'load {} Tix'
+ # If it's dynamic under Unix, lib/tix8.1/pkgIndex.tcl should have
+ # 'load libtix8.1.8.3.so Tix'
+ self.tk.eval('package require Tix')
+
+
+# The Tix 'tixForm' geometry manager
+class Form:
+ """The Tix Form geometry manager
+
+ Widgets can be arranged by specifying attachments to other widgets.
+ See Tix documentation for complete details"""
+
+ def config(self, cnf={}, **kw):
+ apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
+
+ form = config
+
+ def __setitem__(self, key, value):
+ Form.form(self, {key: value})
+
+ def check(self):
+ return self.tk.call('tixForm', 'check', self._w)
+
+ def forget(self):
+ self.tk.call('tixForm', 'forget', self._w)
+
+ def grid(self, xsize=0, ysize=0):
+ if (not xsize) and (not ysize):
+ x = self.tk.call('tixForm', 'grid', self._w)
+ y = self.tk.splitlist(x)
+ z = ()
+ for x in y:
+ z = z + (self.tk.getint(x),)
+ return z
+ self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
+
+ def info(self, option=None):
+ if not option:
+ return self.tk.call('tixForm', 'info', self._w)
+ if option[0] != '-':
+ option = '-' + option
+ return self.tk.call('tixForm', 'info', self._w, option)
+
+ def slaves(self):
+ return map(self._nametowidget,
+ self.tk.splitlist(
+ self.tk.call(
+ 'tixForm', 'slaves', self._w)))
+
+
+
+
+Tkinter.Widget.__bases__ = Tkinter.Widget.__bases__ + (Form,)
+
+class TixWidget(Tkinter.Widget):
+ """A TixWidget class is used to package all (or most) Tix widgets.
+
+ Widget initialization is extended in two ways:
+ 1) It is possible to give a list of options which must be part of
+ the creation command (so called Tix 'static' options). These cannot be
+ given as a 'config' command later.
+ 2) It is possible to give the name of an existing TK widget. These are
+ child widgets created automatically by a Tix mega-widget. The Tk call
+ to create these widgets is therefore bypassed in TixWidget.__init__
+
+ Both options are for use by subclasses only.
+ """
+ def __init__ (self, master=None, widgetName=None,
+ static_options=None, cnf={}, kw={}):
+ # Merge keywords and dictionary arguments
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ else:
+ cnf = _cnfmerge(cnf)
+
+ # Move static options into extra. static_options must be
+ # a list of keywords (or None).
+ extra=()
+ if static_options:
+ for k,v in cnf.items()[:]:
+ if k in static_options:
+ extra = extra + ('-' + k, v)
+ del cnf[k]
+
+ self.widgetName = widgetName
+ Widget._setup(self, master, cnf)
+
+ # If widgetName is None, this is a dummy creation call where the
+ # corresponding Tk widget has already been created by Tix
+ if widgetName:
+ apply(self.tk.call, (widgetName, self._w) + extra)
+
+ # Non-static options - to be done via a 'config' command
+ if cnf:
+ Widget.config(self, cnf)
+
+ # Dictionary to hold subwidget names for easier access. We can't
+ # use the children list because the public Tix names may not be the
+ # same as the pathname component
+ self.subwidget_list = {}
+
+ # We set up an attribute access function so that it is possible to
+ # do w.ok['text'] = 'Hello' rather than w.subwidget('ok')['text'] = 'Hello'
+ # when w is a StdButtonBox.
+ # We can even do w.ok.invoke() because w.ok is subclassed from the
+ # Button class if you go through the proper constructors
+ def __getattr__(self, name):
+ if self.subwidget_list.has_key(name):
+ return self.subwidget_list[name]
+ raise AttributeError, name
+
+ def set_silent(self, value):
+ """Set a variable without calling its action routine"""
+ self.tk.call('tixSetSilent', self._w, value)
+
+ def subwidget(self, name):
+ """Return the named subwidget (which must have been created by
+ the sub-class)."""
+ n = self._subwidget_name(name)
+ if not n:
+ raise TclError, "Subwidget " + name + " not child of " + self._name
+ # Remove header of name and leading dot
+ n = n[len(self._w)+1:]
+ return self._nametowidget(n)
+
+ def subwidgets_all(self):
+ """Return all subwidgets."""
+ names = self._subwidget_names()
+ if not names:
+ return []
+ retlist = []
+ for name in names:
+ name = name[len(self._w)+1:]
+ try:
+ retlist.append(self._nametowidget(name))
+ except:
+ # some of the widgets are unknown e.g. border in LabelFrame
+ pass
+ return retlist
+
+ def _subwidget_name(self,name):
+ """Get a subwidget name (returns a String, not a Widget !)"""
+ try:
+ return self.tk.call(self._w, 'subwidget', name)
+ except TclError:
+ return None
+
+ def _subwidget_names(self):
+ """Return the name of all subwidgets."""
+ try:
+ x = self.tk.call(self._w, 'subwidgets', '-all')
+ return self.tk.split(x)
+ except TclError:
+ return None
+
+ def config_all(self, option, value):
+ """Set configuration options for all subwidgets (and self)."""
+ if option == '':
+ return
+ elif type(option) != type(''):
+ option = `option`
+ if type(value) != type(''):
+ value = `value`
+ names = self._subwidget_names()
+ for name in names:
+ self.tk.call(name, 'configure', '-' + option, value)
+
+# Subwidgets are child widgets created automatically by mega-widgets.
+# In python, we have to create these subwidgets manually to mirror their
+# existence in Tk/Tix.
+class TixSubWidget(TixWidget):
+ """Subwidget class.
+
+ This is used to mirror child widgets automatically created
+ by Tix/Tk as part of a mega-widget in Python (which is not informed
+ of this)"""
+
+ def __init__(self, master, name,
+ destroy_physically=1, check_intermediate=1):
+ if check_intermediate:
+ path = master._subwidget_name(name)
+ try:
+ path = path[len(master._w)+1:]
+ plist = string.splitfields(path, '.')
+ except:
+ plist = []
+
+ if (not check_intermediate) or len(plist) < 2:
+ # immediate descendant
+ TixWidget.__init__(self, master, None, None, {'name' : name})
+ else:
+ # Ensure that the intermediate widgets exist
+ parent = master
+ for i in range(len(plist) - 1):
+ n = string.joinfields(plist[:i+1], '.')
+ try:
+ w = master._nametowidget(n)
+ parent = w
+ except KeyError:
+ # Create the intermediate widget
+ parent = TixSubWidget(parent, plist[i],
+ destroy_physically=0,
+ check_intermediate=0)
+ TixWidget.__init__(self, parent, None, None, {'name' : name})
+ self.destroy_physically = destroy_physically
+
+ def destroy(self):
+ # For some widgets e.g., a NoteBook, when we call destructors,
+ # we must be careful not to destroy the frame widget since this
+ # also destroys the parent NoteBook thus leading to an exception
+ # in Tkinter when it finally calls Tcl to destroy the NoteBook
+ for c in self.children.values(): c.destroy()
+ if self.master.children.has_key(self._name):
+ del self.master.children[self._name]
+ if self.master.subwidget_list.has_key(self._name):
+ del self.master.subwidget_list[self._name]
+ if self.destroy_physically:
+ # This is bypassed only for a few widgets
+ self.tk.call('destroy', self._w)
+
+
+# Useful func. to split Tcl lists and return as a dict. From Tkinter.py
+def _lst2dict(lst):
+ dict = {}
+ for x in lst:
+ dict[x[0][1:]] = (x[0][1:],) + x[1:]
+ return dict
+
+# Useful class to create a display style - later shared by many items.
+# Contributed by Steffen Kremser
+class DisplayStyle:
+ """DisplayStyle - handle configuration options shared by
+ (multiple) Display Items"""
+
+ def __init__(self, itemtype, cnf={}, **kw ):
+ master = _default_root # global from Tkinter
+ if not master and cnf.has_key('refwindow'): master=cnf['refwindow']
+ elif not master and kw.has_key('refwindow'): master= kw['refwindow']
+ elif not master: raise RuntimeError, "Too early to create display style: no root window"
+ self.tk = master.tk
+ self.stylename = apply(self.tk.call, ('tixDisplayStyle', itemtype) +
+ self._options(cnf,kw) )
+
+ def __str__(self):
+ return self.stylename
+
+ def _options(self, cnf, kw ):
+ if kw and cnf:
+ cnf = _cnfmerge((cnf, kw))
+ elif kw:
+ cnf = kw
+ opts = ()
+ for k, v in cnf.items():
+ opts = opts + ('-'+k, v)
+ return opts
+
+ def delete(self):
+ self.tk.call(self.stylename, 'delete')
+ del(self)
+
+ def __setitem__(self,key,value):
+ self.tk.call(self.stylename, 'configure', '-%s'%key, value)
+
+ def config(self, cnf={}, **kw):
+ return _lst2dict(
+ self.tk.split(
+ apply(self.tk.call,
+ (self.stylename, 'configure') + self._options(cnf,kw))))
+
+ def __getitem__(self,key):
+ return self.tk.call(self.stylename, 'cget', '-%s'%key)
+
+
+######################################################
+### The Tix Widget classes - in alphabetical order ###
+######################################################
+
+class Balloon(TixWidget):
+ """Balloon help widget.
+
+ Subwidget Class
+ --------- -----
+ label Label
+ message Message"""
+
+ def __init__(self, master=None, cnf={}, **kw):
+ # static seem to be -installcolormap -initwait -statusbar -cursor
+ static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor']
+ TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label',
+ destroy_physically=0)
+ self.subwidget_list['message'] = _dummyLabel(self, 'message',
+ destroy_physically=0)
+
+ def bind_widget(self, widget, cnf={}, **kw):
+ """Bind balloon widget to another.
+ One balloon widget may be bound to several widgets at the same time"""
+ apply(self.tk.call,
+ (self._w, 'bind', widget._w) + self._options(cnf, kw))
+
+ def unbind_widget(self, widget):
+ self.tk.call(self._w, 'unbind', widget._w)
+
+class ButtonBox(TixWidget):
+ """ButtonBox - A container for pushbuttons.
+ Subwidgets are the buttons added with the add method.
+ """
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixButtonBox',
+ ['orientation', 'options'], cnf, kw)
+
+ def add(self, name, cnf={}, **kw):
+ """Add a button with given name to box."""
+
+ btn = apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = _dummyButton(self, name)
+ return btn
+
+ def invoke(self, name):
+ if self.subwidget_list.has_key(name):
+ self.tk.call(self._w, 'invoke', name)
+
+class ComboBox(TixWidget):
+ """ComboBox - an Entry field with a dropdown menu. The user can select a
+ choice by either typing in the entry subwdget or selecting from the
+ listbox subwidget.
+
+ Subwidget Class
+ --------- -----
+ entry Entry
+ arrow Button
+ slistbox ScrolledListBox
+ tick Button
+ cross Button : present if created with the fancy option"""
+
+ def __init__ (self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixComboBox',
+ ['editable', 'dropdown', 'fancy', 'options'],
+ cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+ self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
+ self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
+ 'slistbox')
+ try:
+ self.subwidget_list['tick'] = _dummyButton(self, 'tick')
+ self.subwidget_list['cross'] = _dummyButton(self, 'cross')
+ except TypeError:
+ # unavailable when -fancy not specified
+ pass
+
+ def add_history(self, str):
+ self.tk.call(self._w, 'addhistory', str)
+
+ def append_history(self, str):
+ self.tk.call(self._w, 'appendhistory', str)
+
+ def insert(self, index, str):
+ self.tk.call(self._w, 'insert', index, str)
+
+ def pick(self, index):
+ self.tk.call(self._w, 'pick', index)
+
+class Control(TixWidget):
+ """Control - An entry field with value change arrows. The user can
+ adjust the value by pressing the two arrow buttons or by entering
+ the value directly into the entry. The new value will be checked
+ against the user-defined upper and lower limits.
+
+ Subwidget Class
+ --------- -----
+ incr Button
+ decr Button
+ entry Entry
+ label Label"""
+
+ def __init__ (self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixControl', ['options'], cnf, kw)
+ self.subwidget_list['incr'] = _dummyButton(self, 'incr')
+ self.subwidget_list['decr'] = _dummyButton(self, 'decr')
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+ def decrement(self):
+ self.tk.call(self._w, 'decr')
+
+ def increment(self):
+ self.tk.call(self._w, 'incr')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+ def update(self):
+ self.tk.call(self._w, 'update')
+
+class DirList(TixWidget):
+ """DirList - 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.
+
+ Subwidget Class
+ --------- -----
+ hlist HList
+ hsb Scrollbar
+ vsb Scrollbar"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def chdir(self, dir):
+ self.tk.call(self._w, 'chdir', dir)
+
+class DirTree(TixWidget):
+ """DirTree - Directory Listing in a hierarchical view.
+ Displays a tree 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.
+
+ Subwidget Class
+ --------- -----
+ hlist HList
+ hsb Scrollbar
+ vsb Scrollbar"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirTree', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def chdir(self, dir):
+ self.tk.call(self._w, 'chdir', dir)
+
+class DirSelectBox(TixWidget):
+ """DirSelectBox - Motif style file select box.
+ It is generally used for
+ the user to choose a file. FileSelectBox stores the files mostly
+ recently selected into a ComboBox widget so that they can be quickly
+ selected again.
+
+ Subwidget Class
+ --------- -----
+ selection ComboBox
+ filter ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['dircbx'] = _dummyFileComboBox(self, 'dircbx')
+
+class ExFileSelectBox(TixWidget):
+ """ExFileSelectBox - MS Windows style file select box.
+ It provides an convenient method for the user to select files.
+
+ Subwidget Class
+ --------- -----
+ cancel Button
+ ok Button
+ hidden Checkbutton
+ types ComboBox
+ dir ComboBox
+ file ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixExFileSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden')
+ self.subwidget_list['types'] = _dummyComboBox(self, 'types')
+ self.subwidget_list['dir'] = _dummyComboBox(self, 'dir')
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['file'] = _dummyComboBox(self, 'file')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+
+ def filter(self):
+ self.tk.call(self._w, 'filter')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+
+# Should inherit from a Dialog class
+class DirSelectDialog(TixWidget):
+ """The DirSelectDialog widget presents the directories in the file
+ system in a dialog window. The user can use this dialog window to
+ navigate through the file system to select the desired directory.
+
+ Subwidgets Class
+ ---------- -----
+ dirbox DirSelectDialog"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['dirbox'] = _dummyDirSelectBox(self, 'dirbox')
+ # cancel and ok buttons are missing
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+
+# Should inherit from a Dialog class
+class ExFileSelectDialog(TixWidget):
+ """ExFileSelectDialog - MS Windows style file select dialog.
+ It provides an convenient method for the user to select files.
+
+ Subwidgets Class
+ ---------- -----
+ fsbox ExFileSelectBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixExFileSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['fsbox'] = _dummyExFileSelectBox(self, 'fsbox')
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+class FileSelectBox(TixWidget):
+ """ExFileSelectBox - Motif style file select box.
+ It is generally used for
+ the user to choose a file. FileSelectBox stores the files mostly
+ recently selected into a ComboBox widget so that they can be quickly
+ selected again.
+
+ Subwidget Class
+ --------- -----
+ selection ComboBox
+ filter ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+ self.subwidget_list['filter'] = _dummyComboBox(self, 'filter')
+ self.subwidget_list['selection'] = _dummyComboBox(self, 'selection')
+
+ def apply_filter(self): # name of subwidget is same as command
+ self.tk.call(self._w, 'filter')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+# Should inherit from a Dialog class
+class FileSelectDialog(TixWidget):
+ """FileSelectDialog - Motif style file select dialog.
+
+ Subwidgets Class
+ ---------- -----
+ btns StdButtonBox
+ fsbox FileSelectBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['btns'] = _dummyStdButtonBox(self, 'btns')
+ self.subwidget_list['fsbox'] = _dummyFileSelectBox(self, 'fsbox')
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+class FileEntry(TixWidget):
+ """FileEntry - Entry field with button that invokes a FileSelectDialog.
+ The user can type in the filename manually. Alternatively, the user can
+ press the button widget that sits next to the entry, which will bring
+ up a file selection dialog.
+
+ Subwidgets Class
+ ---------- -----
+ button Button
+ entry Entry"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileEntry',
+ ['dialogtype', 'options'], cnf, kw)
+ self.subwidget_list['button'] = _dummyButton(self, 'button')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+ def file_dialog(self):
+ # XXX return python object
+ pass
+
+class HList(TixWidget):
+ """HList - Hierarchy display 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.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixHList',
+ ['columns', 'options'], cnf, kw)
+
+ def add(self, entry, cnf={}, **kw):
+ return apply(self.tk.call,
+ (self._w, 'add', entry) + self._options(cnf, kw))
+
+ def add_child(self, parent=None, cnf={}, **kw):
+ if not parent:
+ parent = ''
+ return apply(self.tk.call,
+ (self._w, 'addchild', parent) + self._options(cnf, kw))
+
+ def anchor_set(self, entry):
+ self.tk.call(self._w, 'anchor', 'set', entry)
+
+ def anchor_clear(self):
+ self.tk.call(self._w, 'anchor', 'clear')
+
+ def column_width(self, col=0, width=None, chars=None):
+ if not chars:
+ return self.tk.call(self._w, 'column', 'width', col, width)
+ else:
+ return self.tk.call(self._w, 'column', 'width', col,
+ '-char', chars)
+
+ def delete_all(self):
+ self.tk.call(self._w, 'delete', 'all')
+
+ def delete_entry(self, entry):
+ self.tk.call(self._w, 'delete', 'entry', entry)
+
+ def delete_offsprings(self, entry):
+ self.tk.call(self._w, 'delete', 'offsprings', entry)
+
+ def delete_siblings(self, entry):
+ self.tk.call(self._w, 'delete', 'siblings', entry)
+
+ def dragsite_set(self, index):
+ self.tk.call(self._w, 'dragsite', 'set', index)
+
+ def dragsite_clear(self):
+ self.tk.call(self._w, 'dragsite', 'clear')
+
+ def dropsite_set(self, index):
+ self.tk.call(self._w, 'dropsite', 'set', index)
+
+ def dropsite_clear(self):
+ self.tk.call(self._w, 'dropsite', 'clear')
+
+ def header_create(self, col, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'header', 'create', col) + self._options(cnf, kw))
+
+ def header_configure(self, col, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'header', 'configure', col)))
+ apply(self.tk.call, (self._w, 'header', 'configure', col)
+ + self._options(cnf, kw))
+
+ def header_cget(self, col, opt):
+ return self.tk.call(self._w, 'header', 'cget', col, opt)
+
+ def header_exists(self, col):
+ return self.tk.call(self._w, 'header', 'exists', col)
+
+ def header_delete(self, col):
+ self.tk.call(self._w, 'header', 'delete', col)
+
+ def header_size(self, col):
+ return self.tk.call(self._w, 'header', 'size', col)
+
+ def hide_entry(self, entry):
+ self.tk.call(self._w, 'hide', 'entry', entry)
+
+ def indicator_create(self, entry, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'indicator', 'create', entry) + self._options(cnf, kw))
+
+ def indicator_configure(self, entry, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'indicator', 'configure', entry)))
+ apply(self.tk.call,
+ (self._w, 'indicator', 'configure', entry) + self._options(cnf, kw))
+
+ def indicator_cget(self, entry, opt):
+ return self.tk.call(self._w, 'indicator', 'cget', entry, opt)
+
+ def indicator_exists(self, entry):
+ return self.tk.call (self._w, 'indicator', 'exists', entry)
+
+ def indicator_delete(self, entry):
+ self.tk.call(self._w, 'indicator', 'delete', entry)
+
+ def indicator_size(self, entry):
+ return self.tk.call(self._w, 'indicator', 'size', entry)
+
+ def info_anchor(self):
+ return self.tk.call(self._w, 'info', 'anchor')
+
+ def info_children(self, entry=None):
+ c = self.tk.call(self._w, 'info', 'children', entry)
+ return self.tk.splitlist(c)
+
+ def info_data(self, entry):
+ return self.tk.call(self._w, 'info', 'data', entry)
+
+ def info_exists(self, entry):
+ return self.tk.call(self._w, 'info', 'exists', entry)
+
+ def info_hidden(self, entry):
+ return self.tk.call(self._w, 'info', 'hidden', entry)
+
+ def info_next(self, entry):
+ return self.tk.call(self._w, 'info', 'next', entry)
+
+ def info_parent(self, entry):
+ return self.tk.call(self._w, 'info', 'parent', entry)
+
+ def info_prev(self, entry):
+ return self.tk.call(self._w, 'info', 'prev', entry)
+
+ def info_selection(self):
+ c = self.tk.call(self._w, 'info', 'selection')
+ return self.tk.splitlist(c)
+
+ def item_cget(self, entry, col, opt):
+ return self.tk.call(self._w, 'item', 'cget', entry, col, opt)
+
+ def item_configure(self, entry, col, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'item', 'configure', entry, col)))
+ apply(self.tk.call, (self._w, 'item', 'configure', entry, col) +
+ self._options(cnf, kw))
+
+ def item_create(self, entry, col, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'item', 'create', entry, col) + self._options(cnf, kw))
+
+ def item_exists(self, entry, col):
+ return self.tk.call(self._w, 'item', 'exists', entry, col)
+
+ def item_delete(self, entry, col):
+ self.tk.call(self._w, 'item', 'delete', entry, col)
+
+ def nearest(self, y):
+ return self.tk.call(self._w, 'nearest', y)
+
+ def see(self, entry):
+ self.tk.call(self._w, 'see', entry)
+
+ def selection_clear(self, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'selection', 'clear') + self._options(cnf, kw))
+
+ def selection_includes(self, entry):
+ return self.tk.call(self._w, 'selection', 'includes', entry)
+
+ def selection_set(self, first, last=None):
+ self.tk.call(self._w, 'selection', 'set', first, last)
+
+ def show_entry(self, entry):
+ return self.tk.call(self._w, 'show', 'entry', entry)
+
+ def xview(self, *args):
+ apply(self.tk.call, (self._w, 'xview') + args)
+
+ def yview(self, *args):
+ apply(self.tk.call, (self._w, 'yview') + args)
+
+class InputOnly(TixWidget):
+ """InputOnly - Invisible widget.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixInputOnly', None, cnf, kw)
+
+class LabelEntry(TixWidget):
+ """LabelEntry - Entry field with label. Packages an entry widget
+ and a label into one mega widget. It can beused be used to simplify
+ the creation of ``entry-form'' type of interface.
+
+ Subwidgets Class
+ ---------- -----
+ label Label
+ entry Entry"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixLabelEntry',
+ ['labelside','options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+class LabelFrame(TixWidget):
+ """LabelFrame - Labelled Frame container. Packages a frame widget
+ and a label into one mega widget. To create widgets inside a
+ LabelFrame widget, one creates the new widgets relative to the
+ frame subwidget and manage them inside the frame subwidget.
+
+ Subwidgets Class
+ ---------- -----
+ label Label
+ frame Frame"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixLabelFrame',
+ ['labelside','options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['frame'] = _dummyFrame(self, 'frame')
+
+
+class ListNoteBook(TixWidget):
+ """A ListNoteBook widget is very similar to the TixNoteBook widget:
+ it can be used to display many windows in a limited space using a
+ notebook metaphor. The notebook is divided into a stack of pages
+ (windows). At one time only one of these pages can be shown.
+ The user can navigate through these pages by
+ choosing the name of the desired page in the hlist subwidget."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb')
+
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name)
+ return self.subwidget_list[name]
+
+ def raise_page(self, name): # raise is a python keyword
+ self.tk.call(self._w, 'raise', name)
+
+class Meter(TixWidget):
+ """The Meter widget can be used to show the progress of a background
+ job which may take a long time to execute.
+ """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixMeter',
+ ['options'], cnf, kw)
+
+class NoteBook(TixWidget):
+ """NoteBook - Multi-page container widget (tabbed notebook metaphor).
+
+ Subwidgets Class
+ ---------- -----
+ nbframe NoteBookFrame
+ <pages> page widgets added dynamically with the add method"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw)
+ self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe',
+ destroy_physically=0)
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name)
+ return self.subwidget_list[name]
+
+ def delete(self, name):
+ self.tk.call(self._w, 'delete', name)
+
+ def page(self, name):
+ return self.subwidget(name)
+
+ def pages(self):
+ # Can't call subwidgets_all directly because we don't want .nbframe
+ names = self.tk.split(self.tk.call(self._w, 'pages'))
+ ret = []
+ for x in names:
+ ret.append(self.subwidget(x))
+ return ret
+
+ def raise_page(self, name): # raise is a python keyword
+ self.tk.call(self._w, 'raise', name)
+
+ def raised(self):
+ return self.tk.call(self._w, 'raised')
+
+class NoteBookFrame(TixWidget):
+ """Will be added when Tix documentation is available !!!"""
+ pass
+
+class OptionMenu(TixWidget):
+ """OptionMenu - creates a menu button of options.
+
+ Subwidget Class
+ --------- -----
+ menubutton Menubutton
+ menu Menu"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixOptionMenu', ['options'], cnf, kw)
+ self.subwidget_list['menubutton'] = _dummyMenubutton(self, 'menubutton')
+ self.subwidget_list['menu'] = _dummyMenu(self, 'menu')
+
+ def add_command(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', 'command', name) + self._options(cnf, kw))
+
+ def add_separator(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', 'separator', name) + self._options(cnf, kw))
+
+ def delete(self, name):
+ self.tk.call(self._w, 'delete', name)
+
+ def disable(self, name):
+ self.tk.call(self._w, 'disable', name)
+
+ def enable(self, name):
+ self.tk.call(self._w, 'enable', name)
+
+class PanedWindow(TixWidget):
+ """PanedWindow - Multi-pane container widget
+ allows the user to interactively manipulate the sizes of several
+ panes. The panes can be arranged either vertically or horizontally.The
+ user changes the sizes of the panes by dragging the resize handle
+ between two panes.
+
+ Subwidgets Class
+ ---------- -----
+ <panes> g/p widgets added dynamically with the add method."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixPanedWindow', ['orientation', 'options'], cnf, kw)
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name,
+ check_intermediate=0)
+ return self.subwidget_list[name]
+
+ def panes(self):
+ names = self.tk.call(self._w, 'panes')
+ ret = []
+ for x in names:
+ ret.append(self.subwidget(x))
+ return ret
+
+class PopupMenu(TixWidget):
+ """PopupMenu widget can be used as a replacement of the tk_popup command.
+ The advantage of the Tix PopupMenu widget is it requires less application
+ code to manipulate.
+
+
+ Subwidgets Class
+ ---------- -----
+ menubutton Menubutton
+ menu Menu"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixPopupMenu', ['options'], cnf, kw)
+ self.subwidget_list['menubutton'] = _dummyMenubutton(self, 'menubutton')
+ self.subwidget_list['menu'] = _dummyMenu(self, 'menu')
+
+ def bind_widget(self, widget):
+ self.tk.call(self._w, 'bind', widget._w)
+
+ def unbind_widget(self, widget):
+ self.tk.call(self._w, 'unbind', widget._w)
+
+ def post_widget(self, widget, x, y):
+ self.tk.call(self._w, 'post', widget._w, x, y)
+
+class ResizeHandle(TixWidget):
+ """Internal widget to draw resize handles on Scrolled widgets."""
+
+ def __init__(self, master, cnf={}, **kw):
+ # There seems to be a Tix bug rejecting the configure method
+ # Let's try making the flags -static
+ flags = ['options', 'command', 'cursorfg', 'cursorbg',
+ 'handlesize', 'hintcolor', 'hintwidth',
+ 'x', 'y']
+ # In fact, x y height width are configurable
+ TixWidget.__init__(self, master, 'tixResizeHandle',
+ flags, cnf, kw)
+
+ def attach_widget(self, widget):
+ self.tk.call(self._w, 'attachwidget', widget._w)
+
+ def detach_widget(self, widget):
+ self.tk.call(self._w, 'detachwidget', widget._w)
+
+ def hide(self, widget):
+ self.tk.call(self._w, 'hide', widget._w)
+
+ def show(self, widget):
+ self.tk.call(self._w, 'show', widget._w)
+
+class ScrolledHList(TixWidget):
+ """ScrolledHList - HList with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledHList', ['options'],
+ cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledListBox(TixWidget):
+ """ScrolledListBox - Listbox with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledListBox', ['options'], cnf, kw)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledText(TixWidget):
+ """ScrolledText - Text with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledText', ['options'], cnf, kw)
+ self.subwidget_list['text'] = _dummyText(self, 'text')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledTList(TixWidget):
+ """ScrolledTList - TList with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledTList', ['options'],
+ cnf, kw)
+ self.subwidget_list['tlist'] = _dummyTList(self, 'tlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledWindow(TixWidget):
+ """ScrolledWindow - Window with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw)
+ self.subwidget_list['window'] = _dummyFrame(self, 'window')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class Select(TixWidget):
+ """Select - Container of button subwidgets. It can be used to provide
+ radio-box or check-box style of selection options for the user.
+
+ Subwidgets are buttons added dynamically using the add method."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixSelect',
+ ['allowzero', 'radio', 'orientation', 'labelside',
+ 'options'],
+ cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = _dummyButton(self, name)
+ return self.subwidget_list[name]
+
+ def invoke(self, name):
+ self.tk.call(self._w, 'invoke', name)
+
+class StdButtonBox(TixWidget):
+ """StdButtonBox - Standard Button Box (OK, Apply, Cancel and Help) """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixStdButtonBox',
+ ['orientation', 'options'], cnf, kw)
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['apply'] = _dummyButton(self, 'apply')
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['help'] = _dummyButton(self, 'help')
+
+ def invoke(self, name):
+ if self.subwidget_list.has_key(name):
+ self.tk.call(self._w, 'invoke', name)
+
+class TList(TixWidget):
+ """TList - Hierarchy display widget which 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.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixTList', ['options'], cnf, kw)
+
+ def active_set(self, index):
+ self.tk.call(self._w, 'active', 'set', index)
+
+ def active_clear(self):
+ self.tk.call(self._w, 'active', 'clear')
+
+ def anchor_set(self, index):
+ self.tk.call(self._w, 'anchor', 'set', index)
+
+ def anchor_clear(self):
+ self.tk.call(self._w, 'anchor', 'clear')
+
+ def delete(self, from_, to=None):
+ self.tk.call(self._w, 'delete', from_, to)
+
+ def dragsite_set(self, index):
+ self.tk.call(self._w, 'dragsite', 'set', index)
+
+ def dragsite_clear(self):
+ self.tk.call(self._w, 'dragsite', 'clear')
+
+ def dropsite_set(self, index):
+ self.tk.call(self._w, 'dropsite', 'set', index)
+
+ def dropsite_clear(self):
+ self.tk.call(self._w, 'dropsite', 'clear')
+
+ def insert(self, index, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'insert', index) + self._options(cnf, kw))
+
+ def info_active(self):
+ return self.tk.call(self._w, 'info', 'active')
+
+ def info_anchor(self):
+ return self.tk.call(self._w, 'info', 'anchor')
+
+ def info_down(self, index):
+ return self.tk.call(self._w, 'info', 'down', index)
+
+ def info_left(self, index):
+ return self.tk.call(self._w, 'info', 'left', index)
+
+ def info_right(self, index):
+ return self.tk.call(self._w, 'info', 'right', index)
+
+ def info_selection(self):
+ c = self.tk.call(self._w, 'info', 'selection')
+ return self.tk.splitlist(c)
+
+ def info_size(self):
+ return self.tk.call(self._w, 'info', 'size')
+
+ def info_up(self, index):
+ return self.tk.call(self._w, 'info', 'up', index)
+
+ def nearest(self, x, y):
+ return self.tk.call(self._w, 'nearest', x, y)
+
+ def see(self, index):
+ self.tk.call(self._w, 'see', index)
+
+ def selection_clear(self, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'selection', 'clear') + self._options(cnf, kw))
+
+ def selection_includes(self, index):
+ return self.tk.call(self._w, 'selection', 'includes', index)
+
+ def selection_set(self, first, last=None):
+ self.tk.call(self._w, 'selection', 'set', first, last)
+
+ def xview(self, *args):
+ apply(self.tk.call, (self._w, 'xview') + args)
+
+ def yview(self, *args):
+ apply(self.tk.call, (self._w, 'yview') + args)
+
+class Tree(TixWidget):
+ """Tree - The tixTree widget can be used to display hierachical
+ data in a tree form. The user can adjust
+ the view of the tree by opening or closing parts of the tree."""
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixTree',
+ ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def autosetmode(self):
+ self.tk.call(self._w, 'autosetmode')
+
+ def close(self, entrypath):
+ self.tk.call(self._w, 'close', entrypath)
+
+ def getmode(self, entrypath):
+ return self.tk.call(self._w, 'getmode', entrypath)
+
+ def open(self, entrypath):
+ self.tk.call(self._w, 'open', entrypath)
+
+ def setmode(self, entrypath, mode='none'):
+ self.tk.call(self._w, 'setmode', entrypath, mode)
+
+
+# Could try subclassing Tree for CheckList - would need another arg to init
+class CheckList(TixWidget):
+ """The CheckList widget
+ displays a list of items to be selected by the user. CheckList acts
+ similarly to the Tk checkbutton or radiobutton widgets, except it is
+ capable of handling many more items than checkbuttons or radiobuttons.
+ """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixCheckList',
+ ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def autosetmode(self):
+ self.tk.call(self._w, 'autosetmode')
+
+ def close(self, entrypath):
+ self.tk.call(self._w, 'close', entrypath)
+
+ def getmode(self, entrypath):
+ return self.tk.call(self._w, 'getmode', entrypath)
+
+ def open(self, entrypath):
+ self.tk.call(self._w, 'open', entrypath)
+
+ def getselection(self, mode='on'):
+ '''Mode can be on, off, default'''
+ self.tk.call(self._w, 'getselection', mode)
+
+ def getstatus(self, entrypath):
+ self.tk.call(self._w, 'getstatus', entrypath)
+
+ def setstatus(self, entrypath, mode='on'):
+ self.tk.call(self._w, 'setstatus', entrypath, mode)
+
+
+###########################################################################
+### The subclassing below is used to instantiate the subwidgets in each ###
+### mega widget. This allows us to access their methods directly. ###
+###########################################################################
+
+class _dummyButton(Button, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyCheckbutton(Checkbutton, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyEntry(Entry, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyFrame(Frame, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyLabel(Label, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyListbox(Listbox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyMenu(Menu, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyMenubutton(Menubutton, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrollbar(Scrollbar, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyText(Text, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrolledListBox(ScrolledListBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyHList(HList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrolledHList(ScrolledHList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyTList(TList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyComboBox(ComboBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+ self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
+ # I'm not sure about this destroy_physically=0 in all cases;
+ # it may depend on if -dropdown is true; I've added as a trial
+ self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
+ 'slistbox',
+ destroy_physically=0)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox',
+ destroy_physically=0)
+
+class _dummyDirList(DirList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyDirSelectBox(DirSelectBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['dircbx'] = _dummyFileComboBox(self, 'dircbx')
+
+class _dummyExFileSelectBox(ExFileSelectBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden')
+ self.subwidget_list['types'] = _dummyComboBox(self, 'types')
+ self.subwidget_list['dir'] = _dummyComboBox(self, 'dir')
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['file'] = _dummyComboBox(self, 'file')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+
+class _dummyFileSelectBox(FileSelectBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+ self.subwidget_list['filter'] = _dummyComboBox(self, 'filter')
+ self.subwidget_list['selection'] = _dummyComboBox(self, 'selection')
+
+class _dummyFileComboBox(ComboBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dircbx'] = _dummyComboBox(self, 'dircbx')
+
+class _dummyStdButtonBox(StdButtonBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['apply'] = _dummyButton(self, 'apply')
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['help'] = _dummyButton(self, 'help')
+
+class _dummyNoteBookFrame(NoteBookFrame, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=0):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+########################
+### Utility Routines ###
+########################
+
+# Returns the qualified path name for the widget. Normally used to set
+# default options for subwidgets. See tixwidgets.py
+def OptionName(widget):
+ return widget.tk.call('tixOptionName', widget._w)
+
+# Called with a dictionary argument of the form
+# {'*.c':'C source files', '*.txt':'Text Files', '*':'All files'}
+# returns a string which can be used to configure the fsbox file types
+# in an ExFileSelectBox. i.e.,
+# '{{*} {* - All files}} {{*.c} {*.c - C source files}} {{*.txt} {*.txt - Text Files}}'
+def FileTypeList(dict):
+ s = ''
+ for type in dict.keys():
+ s = s + '{{' + type + '} {' + type + ' - ' + dict[type] + '}} '
+ return s
+
+# Still to be done:
+class CObjView(TixWidget):
+ """This file implements the Canvas Object View widget. This is a base
+ class of IconView. It implements automatic placement/adjustment of the
+ scrollbars according to the canvas objects inside the canvas subwidget.
+ The scrollbars are adjusted so that the canvas is just large enough
+ to see all the objects.
+ """
+ pass
+
Added: external/tix-8.4.2.x/Python/README-2.1.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/README-2.1.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,30 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: README-2.1.txt,v 1.2 2001/12/09 05:01:28 idiscovery Exp $
+#
+
+About Tix.py
+-----------
+
+Tix.py is based on an idea of Jean-Marc Lugrin (lugrin at ms.com) who wrote
+pytix (another Python-Tix marriage). Tix widgets are an attractive and
+useful extension to Tk. See http://tix.sourceforge.net
+for more details about Tix and how to get it.
+
+As of version 2.1, Tix.py is a part of the standard Python library.
+You should find Tix.py in the Lib/lib-tk directory, and demos in the Demo/tix
+directory. The files here were current as of Python 2.2 and should work with
+any version of Python, but may have updated in the standard Python distribution
+(http://python.sourceforge.net and http://www.python.org).
+
+Features:
+ 1) It is almost complete.
+ 2) Tix widgets are represented by classes in Python. Sub-widgets
+ are members of the mega-widget class. For example, if a
+ particular TixWidget (e.g. ScrolledText) has an embedded widget
+ (Text in this case), it is possible to call the methods of the
+ child directly.
+ 3) The members of the class are created automatically. In the case
+ of widgets like ButtonBox, the members are added dynamically.
+
+
Added: external/tix-8.4.2.x/Python/README-2.2.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/README-2.2.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,15 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: README-2.2.txt,v 1.1 2002/01/24 09:48:42 idiscovery Exp $
+#
+
+About Tix.py
+-----------
+
+As of version 2.1, Tix.py is a part of the standard Python library.
+However, the Tix shipped with Python 2.2 is broken.
+
+You should replace Tix.py in the Lib/lib-tk directory, and demos in the Demo/tix
+directory with the files found here.
+
+
Added: external/tix-8.4.2.x/Python/Tix.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/Python/Tix.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1625 @@
+# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Tix.py,v 1.4 2002/01/31 19:13:15 idiscovery Exp $
+#
+# Tix.py -- Tix widget wrappers.
+#
+# For Tix, see http://tix.sourceforge.net
+#
+# - Sudhir Shenoy (sshenoy at gol.com), Dec. 1995.
+# based on an idea of Jean-Marc Lugrin (lugrin at ms.com)
+#
+# NOTE: In order to minimize changes to Tkinter.py, some of the code here
+# (TixWidget.__init__) has been taken from Tkinter (Widget.__init__)
+# and will break if there are major changes in Tkinter.
+#
+# The Tix widgets are represented by a class hierarchy in python with proper
+# inheritance of base classes.
+#
+# As a result after creating a 'w = StdButtonBox', I can write
+# w.ok['text'] = 'Who Cares'
+# or w.ok['bg'] = w['bg']
+# or even w.ok.invoke()
+# etc.
+#
+# Compare the demo tixwidgets.py to the original Tcl program and you will
+# appreciate the advantages.
+#
+
+import string
+from Tkinter import *
+from Tkinter import _flatten, _cnfmerge, _default_root
+
+# WARNING - TkVersion is a limited precision floating point number
+if TkVersion < 3.999:
+ raise ImportError, "This version of Tix.py requires Tk 4.0 or higher"
+
+import _tkinter # If this fails your Python may not be configured for Tk
+# TixVersion = string.atof(tkinter.TIX_VERSION) # If this fails your Python may not be configured for Tix
+# WARNING - TixVersion is a limited precision floating point number
+
+# Some more constants (for consistency with Tkinter)
+WINDOW = 'window'
+TEXT = 'text'
+STATUS = 'status'
+IMMEDIATE = 'immediate'
+IMAGE = 'image'
+IMAGETEXT = 'imagetext'
+BALLOON = 'balloon'
+AUTO = 'auto'
+ACROSSTOP = 'acrosstop'
+
+# Some constants used by Tkinter dooneevent()
+TCL_DONT_WAIT = 1<<1
+TCL_WINDOW_EVENTS = 1<<2
+TCL_FILE_EVENTS = 1<<3
+TCL_TIMER_EVENTS = 1<<4
+TCL_IDLE_EVENTS = 1<<5
+TCL_ALL_EVENTS = 0
+
+# BEWARE - this is implemented by copying some code from the Widget class
+# in Tkinter (to override Widget initialization) and is therefore
+# liable to break.
+import Tkinter, os
+
+# Could probably add this to Tkinter.Misc
+class tixCommand:
+ """The tix commands provide access to miscellaneous elements
+ of Tix's internal state and the Tix application context.
+ Most of the information manipulated by these commands pertains
+ to the application as a whole, or to a screen or
+ display, rather than to a particular window.
+
+ This is a mixin class, assumed to be mixed to Tkinter.Tk
+ that supports the self.tk.call method.
+ """
+
+ def tix_addbitmapdir(self, directory):
+ """Tix maintains a list of directories under which
+ the tix_getimage and tix_getbitmap commands will
+ search for image files. The standard bitmap directory
+ is $TIX_LIBRARY/bitmaps. The addbitmapdir command
+ adds directory into this list. By using this
+ command, the image files of an applications can
+ also be located using the tix_getimage or tix_getbitmap
+ command.
+ """
+ return self.tk.call('tix', 'addbitmapdir', directory)
+
+ def tix_cget(self, option):
+ """Returns the current value of the configuration
+ option given by option. Option may be any of the
+ options described in the CONFIGURATION OPTIONS section.
+ """
+ return self.tk.call('tix', 'cget', option)
+
+ def tix_configure(self, cnf=None, **kw):
+ """Query or modify the configuration options of the Tix application
+ context. If no option is specified, returns a dictionary all of the
+ available options. 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 option(s)
+ to have the given value(s); in this case the command returns an
+ empty string. Option may be any of the configuration options.
+ """
+ # Copied from Tkinter.py
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ elif cnf:
+ cnf = _cnfmerge(cnf)
+ if cnf is None:
+ cnf = {}
+ for x in self.tk.split(self.tk.call('tix', 'configure')):
+ cnf[x[0][1:]] = (x[0][1:],) + x[1:]
+ return cnf
+ if type(cnf) is StringType:
+ x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf))
+ return (x[0][1:],) + x[1:]
+ return self.tk.call(('tix', 'configure') + self._options(cnf))
+
+ def tix_filedialog(self, dlgclass=None):
+ """Returns the file selection dialog that may be shared among
+ different calls from this application. This command will create a
+ file selection dialog widget when it is called the first time. This
+ dialog will be returned by all subsequent calls to tix_filedialog.
+ An optional dlgclass parameter can be passed to specified what type
+ of file selection dialog widget is desired. Possible options are
+ tix FileSelectDialog or tixExFileSelectDialog.
+ """
+ if dlgclass is not None:
+ return self.tk.call('tix', 'filedialog', dlgclass)
+ else:
+ return self.tk.call('tix', 'filedialog')
+
+ def tix_getbitmap(self, name):
+ """Locates a bitmap file of the name name.xpm or name in one of the
+ bitmap directories (see the tix_addbitmapdir command above). By
+ using tix_getbitmap, you can avoid hard coding the pathnames of the
+ bitmap files in your application. When successful, it returns the
+ complete pathname of the bitmap file, prefixed with the character
+ '@'. The returned value can be used to configure the -bitmap
+ option of the TK and Tix widgets.
+ """
+ return self.tk.call('tix', 'getbitmap', name)
+
+ def tix_getimage(self, name):
+ """Locates an image file of the name name.xpm, name.xbm or name.ppm
+ in one of the bitmap directories (see the addbitmapdir command
+ above). If more than one file with the same name (but different
+ extensions) exist, then the image type is chosen according to the
+ depth of the X display: xbm images are chosen on monochrome
+ displays and color images are chosen on color displays. By using
+ tix_ getimage, you can advoid hard coding the pathnames of the
+ image files in your application. When successful, this command
+ returns the name of the newly created image, which can be used to
+ configure the -image option of the Tk and Tix widgets.
+ """
+ return self.tk.call('tix', 'getimage', name)
+
+ def tix_option_get(self, name):
+ """Gets the options manitained by the Tix
+ scheme mechanism. Available options include:
+
+ active_bg active_fg bg
+ bold_font dark1_bg dark1_fg
+ dark2_bg dark2_fg disabled_fg
+ fg fixed_font font
+ inactive_bg inactive_fg input1_bg
+ input2_bg italic_font light1_bg
+ light1_fg light2_bg light2_fg
+ menu_font output1_bg output2_bg
+ select_bg select_fg selector
+ """
+ # could use self.tk.globalgetvar('tixOption', name)
+ return self.tk.call('tix', 'option', 'get', name)
+
+ def tix_resetoptions(self, newScheme, newFontSet, newScmPrio=None):
+ """Resets the scheme and fontset of the Tix application to
+ newScheme and newFontSet, respectively. This affects only those
+ widgets created after this call. Therefore, it is best to call the
+ resetoptions command before the creation of any widgets in a Tix
+ application.
+
+ The optional parameter newScmPrio can be given to reset the
+ priority level of the Tk options set by the Tix schemes.
+
+ Because of the way Tk handles the X option database, after Tix has
+ been has imported and inited, it is not possible to reset the color
+ schemes and font sets using the tix config command. Instead, the
+ tix_resetoptions command must be used.
+ """
+ if newScmPrio is not None:
+ return self.tk.call('tix', 'resetoptions', newScheme, newFontSet, newScmPrio)
+ else:
+ return self.tk.call('tix', 'resetoptions', newScheme, newFontSet)
+
+class Tk(Tkinter.Tk, tixCommand):
+ """Toplevel widget of Tix which represents mostly the main window
+ of an application. It has an associated Tcl interpreter."""
+ def __init__(self, screenName=None, baseName=None, className='Tix'):
+ Tkinter.Tk.__init__(self, screenName, baseName, className)
+ tixlib = os.environ.get('TIX_LIBRARY')
+ self.tk.eval('global auto_path; lappend auto_path [file dir [info nameof]]')
+ if tixlib is not None:
+ self.tk.eval('global auto_path; lappend auto_path {%s}' % tixlib)
+ self.tk.eval('global tcl_pkgPath; lappend tcl_pkgPath {%s}' % tixlib)
+ # Load Tix - this should work dynamically or statically
+ # If it's static, lib/tix8.1/pkgIndex.tcl should have
+ # 'load {} Tix'
+ # If it's dynamic under Unix, lib/tix8.1/pkgIndex.tcl should have
+ # 'load libtix8.1.8.3.so Tix'
+ self.tk.eval('package require Tix')
+
+
+# The Tix 'tixForm' geometry manager
+class Form:
+ """The Tix Form geometry manager
+
+ Widgets can be arranged by specifying attachments to other widgets.
+ See Tix documentation for complete details"""
+
+ def config(self, cnf={}, **kw):
+ apply(self.tk.call, ('tixForm', self._w) + self._options(cnf, kw))
+
+ form = config
+
+ def __setitem__(self, key, value):
+ Form.form(self, {key: value})
+
+ def check(self):
+ return self.tk.call('tixForm', 'check', self._w)
+
+ def forget(self):
+ self.tk.call('tixForm', 'forget', self._w)
+
+ def grid(self, xsize=0, ysize=0):
+ if (not xsize) and (not ysize):
+ x = self.tk.call('tixForm', 'grid', self._w)
+ y = self.tk.splitlist(x)
+ z = ()
+ for x in y:
+ z = z + (self.tk.getint(x),)
+ return z
+ self.tk.call('tixForm', 'grid', self._w, xsize, ysize)
+
+ def info(self, option=None):
+ if not option:
+ return self.tk.call('tixForm', 'info', self._w)
+ if option[0] != '-':
+ option = '-' + option
+ return self.tk.call('tixForm', 'info', self._w, option)
+
+ def slaves(self):
+ return map(self._nametowidget,
+ self.tk.splitlist(
+ self.tk.call(
+ 'tixForm', 'slaves', self._w)))
+
+
+
+
+Tkinter.Widget.__bases__ = Tkinter.Widget.__bases__ + (Form,)
+
+class TixWidget(Tkinter.Widget):
+ """A TixWidget class is used to package all (or most) Tix widgets.
+
+ Widget initialization is extended in two ways:
+ 1) It is possible to give a list of options which must be part of
+ the creation command (so called Tix 'static' options). These cannot be
+ given as a 'config' command later.
+ 2) It is possible to give the name of an existing TK widget. These are
+ child widgets created automatically by a Tix mega-widget. The Tk call
+ to create these widgets is therefore bypassed in TixWidget.__init__
+
+ Both options are for use by subclasses only.
+ """
+ def __init__ (self, master=None, widgetName=None,
+ static_options=None, cnf={}, kw={}):
+ # Merge keywords and dictionary arguments
+ if kw:
+ cnf = _cnfmerge((cnf, kw))
+ else:
+ cnf = _cnfmerge(cnf)
+
+ # Move static options into extra. static_options must be
+ # a list of keywords (or None).
+ extra=()
+ if static_options:
+ for k,v in cnf.items()[:]:
+ if k in static_options:
+ extra = extra + ('-' + k, v)
+ del cnf[k]
+
+ self.widgetName = widgetName
+ Widget._setup(self, master, cnf)
+
+ # If widgetName is None, this is a dummy creation call where the
+ # corresponding Tk widget has already been created by Tix
+ if widgetName:
+ apply(self.tk.call, (widgetName, self._w) + extra)
+
+ # Non-static options - to be done via a 'config' command
+ if cnf:
+ Widget.config(self, cnf)
+
+ # Dictionary to hold subwidget names for easier access. We can't
+ # use the children list because the public Tix names may not be the
+ # same as the pathname component
+ self.subwidget_list = {}
+
+ # We set up an attribute access function so that it is possible to
+ # do w.ok['text'] = 'Hello' rather than w.subwidget('ok')['text'] = 'Hello'
+ # when w is a StdButtonBox.
+ # We can even do w.ok.invoke() because w.ok is subclassed from the
+ # Button class if you go through the proper constructors
+ def __getattr__(self, name):
+ if self.subwidget_list.has_key(name):
+ return self.subwidget_list[name]
+ raise AttributeError, name
+
+ def set_silent(self, value):
+ """Set a variable without calling its action routine"""
+ self.tk.call('tixSetSilent', self._w, value)
+
+ def subwidget(self, name):
+ """Return the named subwidget (which must have been created by
+ the sub-class)."""
+ n = self._subwidget_name(name)
+ if not n:
+ raise TclError, "Subwidget " + name + " not child of " + self._name
+ # Remove header of name and leading dot
+ n = n[len(self._w)+1:]
+ return self._nametowidget(n)
+
+ def subwidgets_all(self):
+ """Return all subwidgets."""
+ names = self._subwidget_names()
+ if not names:
+ return []
+ retlist = []
+ for name in names:
+ name = name[len(self._w)+1:]
+ try:
+ retlist.append(self._nametowidget(name))
+ except:
+ # some of the widgets are unknown e.g. border in LabelFrame
+ pass
+ return retlist
+
+ def _subwidget_name(self,name):
+ """Get a subwidget name (returns a String, not a Widget !)"""
+ try:
+ return self.tk.call(self._w, 'subwidget', name)
+ except TclError:
+ return None
+
+ def _subwidget_names(self):
+ """Return the name of all subwidgets."""
+ try:
+ x = self.tk.call(self._w, 'subwidgets', '-all')
+ return self.tk.split(x)
+ except TclError:
+ return None
+
+ def config_all(self, option, value):
+ """Set configuration options for all subwidgets (and self)."""
+ if option == '':
+ return
+ elif type(option) != type(''):
+ option = `option`
+ if type(value) != type(''):
+ value = `value`
+ names = self._subwidget_names()
+ for name in names:
+ self.tk.call(name, 'configure', '-' + option, value)
+
+# Subwidgets are child widgets created automatically by mega-widgets.
+# In python, we have to create these subwidgets manually to mirror their
+# existence in Tk/Tix.
+class TixSubWidget(TixWidget):
+ """Subwidget class.
+
+ This is used to mirror child widgets automatically created
+ by Tix/Tk as part of a mega-widget in Python (which is not informed
+ of this)"""
+
+ def __init__(self, master, name,
+ destroy_physically=1, check_intermediate=1):
+ if check_intermediate:
+ path = master._subwidget_name(name)
+ try:
+ path = path[len(master._w)+1:]
+ plist = string.splitfields(path, '.')
+ except:
+ plist = []
+
+ if (not check_intermediate) or len(plist) < 2:
+ # immediate descendant
+ TixWidget.__init__(self, master, None, None, {'name' : name})
+ else:
+ # Ensure that the intermediate widgets exist
+ parent = master
+ for i in range(len(plist) - 1):
+ n = string.joinfields(plist[:i+1], '.')
+ try:
+ w = master._nametowidget(n)
+ parent = w
+ except KeyError:
+ # Create the intermediate widget
+ parent = TixSubWidget(parent, plist[i],
+ destroy_physically=0,
+ check_intermediate=0)
+ TixWidget.__init__(self, parent, None, None, {'name' : name})
+ self.destroy_physically = destroy_physically
+
+ def destroy(self):
+ # For some widgets e.g., a NoteBook, when we call destructors,
+ # we must be careful not to destroy the frame widget since this
+ # also destroys the parent NoteBook thus leading to an exception
+ # in Tkinter when it finally calls Tcl to destroy the NoteBook
+ for c in self.children.values(): c.destroy()
+ if self.master.children.has_key(self._name):
+ del self.master.children[self._name]
+ if self.master.subwidget_list.has_key(self._name):
+ del self.master.subwidget_list[self._name]
+ if self.destroy_physically:
+ # This is bypassed only for a few widgets
+ self.tk.call('destroy', self._w)
+
+
+# Useful func. to split Tcl lists and return as a dict. From Tkinter.py
+def _lst2dict(lst):
+ dict = {}
+ for x in lst:
+ dict[x[0][1:]] = (x[0][1:],) + x[1:]
+ return dict
+
+# Useful class to create a display style - later shared by many items.
+# Contributed by Steffen Kremser
+class DisplayStyle:
+ """DisplayStyle - handle configuration options shared by
+ (multiple) Display Items"""
+
+ def __init__(self, itemtype, cnf={}, **kw ):
+ master = _default_root # global from Tkinter
+ if not master and cnf.has_key('refwindow'): master=cnf['refwindow']
+ elif not master and kw.has_key('refwindow'): master= kw['refwindow']
+ elif not master: raise RuntimeError, "Too early to create display style: no root window"
+ self.tk = master.tk
+ self.stylename = apply(self.tk.call, ('tixDisplayStyle', itemtype) +
+ self._options(cnf,kw) )
+
+ def __str__(self):
+ return self.stylename
+
+ def _options(self, cnf, kw ):
+ if kw and cnf:
+ cnf = _cnfmerge((cnf, kw))
+ elif kw:
+ cnf = kw
+ opts = ()
+ for k, v in cnf.items():
+ opts = opts + ('-'+k, v)
+ return opts
+
+ def delete(self):
+ self.tk.call(self.stylename, 'delete')
+ del(self)
+
+ def __setitem__(self,key,value):
+ self.tk.call(self.stylename, 'configure', '-%s'%key, value)
+
+ def config(self, cnf={}, **kw):
+ return _lst2dict(
+ self.tk.split(
+ apply(self.tk.call,
+ (self.stylename, 'configure') + self._options(cnf,kw))))
+
+ def __getitem__(self,key):
+ return self.tk.call(self.stylename, 'cget', '-%s'%key)
+
+
+######################################################
+### The Tix Widget classes - in alphabetical order ###
+######################################################
+
+class Balloon(TixWidget):
+ """Balloon help widget.
+
+ Subwidget Class
+ --------- -----
+ label Label
+ message Message"""
+
+ def __init__(self, master=None, cnf={}, **kw):
+ # static seem to be -installcolormap -initwait -statusbar -cursor
+ static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor']
+ TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label',
+ destroy_physically=0)
+ self.subwidget_list['message'] = _dummyLabel(self, 'message',
+ destroy_physically=0)
+
+ def bind_widget(self, widget, cnf={}, **kw):
+ """Bind balloon widget to another.
+ One balloon widget may be bound to several widgets at the same time"""
+ apply(self.tk.call,
+ (self._w, 'bind', widget._w) + self._options(cnf, kw))
+
+ def unbind_widget(self, widget):
+ self.tk.call(self._w, 'unbind', widget._w)
+
+class ButtonBox(TixWidget):
+ """ButtonBox - A container for pushbuttons.
+ Subwidgets are the buttons added with the add method.
+ """
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixButtonBox',
+ ['orientation', 'options'], cnf, kw)
+
+ def add(self, name, cnf={}, **kw):
+ """Add a button with given name to box."""
+
+ btn = apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = _dummyButton(self, name)
+ return btn
+
+ def invoke(self, name):
+ if self.subwidget_list.has_key(name):
+ self.tk.call(self._w, 'invoke', name)
+
+class ComboBox(TixWidget):
+ """ComboBox - an Entry field with a dropdown menu. The user can select a
+ choice by either typing in the entry subwdget or selecting from the
+ listbox subwidget.
+
+ Subwidget Class
+ --------- -----
+ entry Entry
+ arrow Button
+ slistbox ScrolledListBox
+ tick Button
+ cross Button : present if created with the fancy option"""
+
+ def __init__ (self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixComboBox',
+ ['editable', 'dropdown', 'fancy', 'options'],
+ cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+ self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
+ self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
+ 'slistbox')
+ try:
+ self.subwidget_list['tick'] = _dummyButton(self, 'tick')
+ self.subwidget_list['cross'] = _dummyButton(self, 'cross')
+ except TypeError:
+ # unavailable when -fancy not specified
+ pass
+
+ def add_history(self, str):
+ self.tk.call(self._w, 'addhistory', str)
+
+ def append_history(self, str):
+ self.tk.call(self._w, 'appendhistory', str)
+
+ def insert(self, index, str):
+ self.tk.call(self._w, 'insert', index, str)
+
+ def pick(self, index):
+ self.tk.call(self._w, 'pick', index)
+
+class Control(TixWidget):
+ """Control - An entry field with value change arrows. The user can
+ adjust the value by pressing the two arrow buttons or by entering
+ the value directly into the entry. The new value will be checked
+ against the user-defined upper and lower limits.
+
+ Subwidget Class
+ --------- -----
+ incr Button
+ decr Button
+ entry Entry
+ label Label"""
+
+ def __init__ (self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixControl', ['options'], cnf, kw)
+ self.subwidget_list['incr'] = _dummyButton(self, 'incr')
+ self.subwidget_list['decr'] = _dummyButton(self, 'decr')
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+ def decrement(self):
+ self.tk.call(self._w, 'decr')
+
+ def increment(self):
+ self.tk.call(self._w, 'incr')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+ def update(self):
+ self.tk.call(self._w, 'update')
+
+class DirList(TixWidget):
+ """DirList - 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.
+
+ Subwidget Class
+ --------- -----
+ hlist HList
+ hsb Scrollbar
+ vsb Scrollbar"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirList', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def chdir(self, dir):
+ self.tk.call(self._w, 'chdir', dir)
+
+class DirTree(TixWidget):
+ """DirTree - Directory Listing in a hierarchical view.
+ Displays a tree 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.
+
+ Subwidget Class
+ --------- -----
+ hlist HList
+ hsb Scrollbar
+ vsb Scrollbar"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirTree', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def chdir(self, dir):
+ self.tk.call(self._w, 'chdir', dir)
+
+class DirSelectBox(TixWidget):
+ """DirSelectBox - Motif style file select box.
+ It is generally used for
+ the user to choose a file. FileSelectBox stores the files mostly
+ recently selected into a ComboBox widget so that they can be quickly
+ selected again.
+
+ Subwidget Class
+ --------- -----
+ selection ComboBox
+ filter ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['dircbx'] = _dummyFileComboBox(self, 'dircbx')
+
+class ExFileSelectBox(TixWidget):
+ """ExFileSelectBox - MS Windows style file select box.
+ It provides an convenient method for the user to select files.
+
+ Subwidget Class
+ --------- -----
+ cancel Button
+ ok Button
+ hidden Checkbutton
+ types ComboBox
+ dir ComboBox
+ file ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixExFileSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden')
+ self.subwidget_list['types'] = _dummyComboBox(self, 'types')
+ self.subwidget_list['dir'] = _dummyComboBox(self, 'dir')
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['file'] = _dummyComboBox(self, 'file')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+
+ def filter(self):
+ self.tk.call(self._w, 'filter')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+
+# Should inherit from a Dialog class
+class DirSelectDialog(TixWidget):
+ """The DirSelectDialog widget presents the directories in the file
+ system in a dialog window. The user can use this dialog window to
+ navigate through the file system to select the desired directory.
+
+ Subwidgets Class
+ ---------- -----
+ dirbox DirSelectDialog"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixDirSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['dirbox'] = _dummyDirSelectBox(self, 'dirbox')
+ # cancel and ok buttons are missing
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+
+# Should inherit from a Dialog class
+class ExFileSelectDialog(TixWidget):
+ """ExFileSelectDialog - MS Windows style file select dialog.
+ It provides an convenient method for the user to select files.
+
+ Subwidgets Class
+ ---------- -----
+ fsbox ExFileSelectBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixExFileSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['fsbox'] = _dummyExFileSelectBox(self, 'fsbox')
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+class FileSelectBox(TixWidget):
+ """ExFileSelectBox - Motif style file select box.
+ It is generally used for
+ the user to choose a file. FileSelectBox stores the files mostly
+ recently selected into a ComboBox widget so that they can be quickly
+ selected again.
+
+ Subwidget Class
+ --------- -----
+ selection ComboBox
+ filter ComboBox
+ dirlist ScrolledListBox
+ filelist ScrolledListBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileSelectBox', ['options'], cnf, kw)
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+ self.subwidget_list['filter'] = _dummyComboBox(self, 'filter')
+ self.subwidget_list['selection'] = _dummyComboBox(self, 'selection')
+
+ def apply_filter(self): # name of subwidget is same as command
+ self.tk.call(self._w, 'filter')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+# Should inherit from a Dialog class
+class FileSelectDialog(TixWidget):
+ """FileSelectDialog - Motif style file select dialog.
+
+ Subwidgets Class
+ ---------- -----
+ btns StdButtonBox
+ fsbox FileSelectBox"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileSelectDialog',
+ ['options'], cnf, kw)
+ self.subwidget_list['btns'] = _dummyStdButtonBox(self, 'btns')
+ self.subwidget_list['fsbox'] = _dummyFileSelectBox(self, 'fsbox')
+
+ def popup(self):
+ self.tk.call(self._w, 'popup')
+
+ def popdown(self):
+ self.tk.call(self._w, 'popdown')
+
+class FileEntry(TixWidget):
+ """FileEntry - Entry field with button that invokes a FileSelectDialog.
+ The user can type in the filename manually. Alternatively, the user can
+ press the button widget that sits next to the entry, which will bring
+ up a file selection dialog.
+
+ Subwidgets Class
+ ---------- -----
+ button Button
+ entry Entry"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixFileEntry',
+ ['dialogtype', 'options'], cnf, kw)
+ self.subwidget_list['button'] = _dummyButton(self, 'button')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+ def invoke(self):
+ self.tk.call(self._w, 'invoke')
+
+ def file_dialog(self):
+ # XXX return python object
+ pass
+
+class HList(TixWidget):
+ """HList - Hierarchy display 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.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixHList',
+ ['columns', 'options'], cnf, kw)
+
+ def add(self, entry, cnf={}, **kw):
+ return apply(self.tk.call,
+ (self._w, 'add', entry) + self._options(cnf, kw))
+
+ def add_child(self, parent=None, cnf={}, **kw):
+ if not parent:
+ parent = ''
+ return apply(self.tk.call,
+ (self._w, 'addchild', parent) + self._options(cnf, kw))
+
+ def anchor_set(self, entry):
+ self.tk.call(self._w, 'anchor', 'set', entry)
+
+ def anchor_clear(self):
+ self.tk.call(self._w, 'anchor', 'clear')
+
+ def column_width(self, col=0, width=None, chars=None):
+ if not chars:
+ return self.tk.call(self._w, 'column', 'width', col, width)
+ else:
+ return self.tk.call(self._w, 'column', 'width', col,
+ '-char', chars)
+
+ def delete_all(self):
+ self.tk.call(self._w, 'delete', 'all')
+
+ def delete_entry(self, entry):
+ self.tk.call(self._w, 'delete', 'entry', entry)
+
+ def delete_offsprings(self, entry):
+ self.tk.call(self._w, 'delete', 'offsprings', entry)
+
+ def delete_siblings(self, entry):
+ self.tk.call(self._w, 'delete', 'siblings', entry)
+
+ def dragsite_set(self, index):
+ self.tk.call(self._w, 'dragsite', 'set', index)
+
+ def dragsite_clear(self):
+ self.tk.call(self._w, 'dragsite', 'clear')
+
+ def dropsite_set(self, index):
+ self.tk.call(self._w, 'dropsite', 'set', index)
+
+ def dropsite_clear(self):
+ self.tk.call(self._w, 'dropsite', 'clear')
+
+ def header_create(self, col, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'header', 'create', col) + self._options(cnf, kw))
+
+ def header_configure(self, col, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'header', 'configure', col)))
+ apply(self.tk.call, (self._w, 'header', 'configure', col)
+ + self._options(cnf, kw))
+
+ def header_cget(self, col, opt):
+ return self.tk.call(self._w, 'header', 'cget', col, opt)
+
+ def header_exists(self, col):
+ return self.tk.call(self._w, 'header', 'exists', col)
+
+ def header_delete(self, col):
+ self.tk.call(self._w, 'header', 'delete', col)
+
+ def header_size(self, col):
+ return self.tk.call(self._w, 'header', 'size', col)
+
+ def hide_entry(self, entry):
+ self.tk.call(self._w, 'hide', 'entry', entry)
+
+ def indicator_create(self, entry, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'indicator', 'create', entry) + self._options(cnf, kw))
+
+ def indicator_configure(self, entry, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'indicator', 'configure', entry)))
+ apply(self.tk.call,
+ (self._w, 'indicator', 'configure', entry) + self._options(cnf, kw))
+
+ def indicator_cget(self, entry, opt):
+ return self.tk.call(self._w, 'indicator', 'cget', entry, opt)
+
+ def indicator_exists(self, entry):
+ return self.tk.call (self._w, 'indicator', 'exists', entry)
+
+ def indicator_delete(self, entry):
+ self.tk.call(self._w, 'indicator', 'delete', entry)
+
+ def indicator_size(self, entry):
+ return self.tk.call(self._w, 'indicator', 'size', entry)
+
+ def info_anchor(self):
+ return self.tk.call(self._w, 'info', 'anchor')
+
+ def info_children(self, entry=None):
+ c = self.tk.call(self._w, 'info', 'children', entry)
+ return self.tk.splitlist(c)
+
+ def info_data(self, entry):
+ return self.tk.call(self._w, 'info', 'data', entry)
+
+ def info_exists(self, entry):
+ return self.tk.call(self._w, 'info', 'exists', entry)
+
+ def info_hidden(self, entry):
+ return self.tk.call(self._w, 'info', 'hidden', entry)
+
+ def info_next(self, entry):
+ return self.tk.call(self._w, 'info', 'next', entry)
+
+ def info_parent(self, entry):
+ return self.tk.call(self._w, 'info', 'parent', entry)
+
+ def info_prev(self, entry):
+ return self.tk.call(self._w, 'info', 'prev', entry)
+
+ def info_selection(self):
+ c = self.tk.call(self._w, 'info', 'selection')
+ return self.tk.splitlist(c)
+
+ def item_cget(self, entry, col, opt):
+ return self.tk.call(self._w, 'item', 'cget', entry, col, opt)
+
+ def item_configure(self, entry, col, cnf={}, **kw):
+ if cnf is None:
+ return _lst2dict(
+ self.tk.split(
+ self.tk.call(self._w, 'item', 'configure', entry, col)))
+ apply(self.tk.call, (self._w, 'item', 'configure', entry, col) +
+ self._options(cnf, kw))
+
+ def item_create(self, entry, col, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'item', 'create', entry, col) + self._options(cnf, kw))
+
+ def item_exists(self, entry, col):
+ return self.tk.call(self._w, 'item', 'exists', entry, col)
+
+ def item_delete(self, entry, col):
+ self.tk.call(self._w, 'item', 'delete', entry, col)
+
+ def nearest(self, y):
+ return self.tk.call(self._w, 'nearest', y)
+
+ def see(self, entry):
+ self.tk.call(self._w, 'see', entry)
+
+ def selection_clear(self, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'selection', 'clear') + self._options(cnf, kw))
+
+ def selection_includes(self, entry):
+ return self.tk.call(self._w, 'selection', 'includes', entry)
+
+ def selection_set(self, first, last=None):
+ self.tk.call(self._w, 'selection', 'set', first, last)
+
+ def show_entry(self, entry):
+ return self.tk.call(self._w, 'show', 'entry', entry)
+
+ def xview(self, *args):
+ apply(self.tk.call, (self._w, 'xview') + args)
+
+ def yview(self, *args):
+ apply(self.tk.call, (self._w, 'yview') + args)
+
+class InputOnly(TixWidget):
+ """InputOnly - Invisible widget.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixInputOnly', None, cnf, kw)
+
+class LabelEntry(TixWidget):
+ """LabelEntry - Entry field with label. Packages an entry widget
+ and a label into one mega widget. It can beused be used to simplify
+ the creation of ``entry-form'' type of interface.
+
+ Subwidgets Class
+ ---------- -----
+ label Label
+ entry Entry"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixLabelEntry',
+ ['labelside','options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+
+class LabelFrame(TixWidget):
+ """LabelFrame - Labelled Frame container. Packages a frame widget
+ and a label into one mega widget. To create widgets inside a
+ LabelFrame widget, one creates the new widgets relative to the
+ frame subwidget and manage them inside the frame subwidget.
+
+ Subwidgets Class
+ ---------- -----
+ label Label
+ frame Frame"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixLabelFrame',
+ ['labelside','options'], cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+ self.subwidget_list['frame'] = _dummyFrame(self, 'frame')
+
+
+class ListNoteBook(TixWidget):
+ """A ListNoteBook widget is very similar to the TixNoteBook widget:
+ it can be used to display many windows in a limited space using a
+ notebook metaphor. The notebook is divided into a stack of pages
+ (windows). At one time only one of these pages can be shown.
+ The user can navigate through these pages by
+ choosing the name of the desired page in the hlist subwidget."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixListNoteBook', ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['shlist'] = _dummyScrolledHList(self, 'vsb')
+
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name)
+ return self.subwidget_list[name]
+
+ def raise_page(self, name): # raise is a python keyword
+ self.tk.call(self._w, 'raise', name)
+
+class Meter(TixWidget):
+ """The Meter widget can be used to show the progress of a background
+ job which may take a long time to execute.
+ """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixMeter',
+ ['options'], cnf, kw)
+
+class NoteBook(TixWidget):
+ """NoteBook - Multi-page container widget (tabbed notebook metaphor).
+
+ Subwidgets Class
+ ---------- -----
+ nbframe NoteBookFrame
+ <pages> page widgets added dynamically with the add method"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self,master,'tixNoteBook', ['options'], cnf, kw)
+ self.subwidget_list['nbframe'] = TixSubWidget(self, 'nbframe',
+ destroy_physically=0)
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name)
+ return self.subwidget_list[name]
+
+ def delete(self, name):
+ self.tk.call(self._w, 'delete', name)
+
+ def page(self, name):
+ return self.subwidget(name)
+
+ def pages(self):
+ # Can't call subwidgets_all directly because we don't want .nbframe
+ names = self.tk.split(self.tk.call(self._w, 'pages'))
+ ret = []
+ for x in names:
+ ret.append(self.subwidget(x))
+ return ret
+
+ def raise_page(self, name): # raise is a python keyword
+ self.tk.call(self._w, 'raise', name)
+
+ def raised(self):
+ return self.tk.call(self._w, 'raised')
+
+class NoteBookFrame(TixWidget):
+ """Will be added when Tix documentation is available !!!"""
+ pass
+
+class OptionMenu(TixWidget):
+ """OptionMenu - creates a menu button of options.
+
+ Subwidget Class
+ --------- -----
+ menubutton Menubutton
+ menu Menu"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixOptionMenu', ['options'], cnf, kw)
+ self.subwidget_list['menubutton'] = _dummyMenubutton(self, 'menubutton')
+ self.subwidget_list['menu'] = _dummyMenu(self, 'menu')
+
+ def add_command(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', 'command', name) + self._options(cnf, kw))
+
+ def add_separator(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', 'separator', name) + self._options(cnf, kw))
+
+ def delete(self, name):
+ self.tk.call(self._w, 'delete', name)
+
+ def disable(self, name):
+ self.tk.call(self._w, 'disable', name)
+
+ def enable(self, name):
+ self.tk.call(self._w, 'enable', name)
+
+class PanedWindow(TixWidget):
+ """PanedWindow - Multi-pane container widget
+ allows the user to interactively manipulate the sizes of several
+ panes. The panes can be arranged either vertically or horizontally.The
+ user changes the sizes of the panes by dragging the resize handle
+ between two panes.
+
+ Subwidgets Class
+ ---------- -----
+ <panes> g/p widgets added dynamically with the add method."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixPanedWindow', ['orientation', 'options'], cnf, kw)
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = TixSubWidget(self, name,
+ check_intermediate=0)
+ return self.subwidget_list[name]
+
+ def panes(self):
+ names = self.tk.call(self._w, 'panes')
+ ret = []
+ for x in names:
+ ret.append(self.subwidget(x))
+ return ret
+
+class PopupMenu(TixWidget):
+ """PopupMenu widget can be used as a replacement of the tk_popup command.
+ The advantage of the Tix PopupMenu widget is it requires less application
+ code to manipulate.
+
+
+ Subwidgets Class
+ ---------- -----
+ menubutton Menubutton
+ menu Menu"""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixPopupMenu', ['options'], cnf, kw)
+ self.subwidget_list['menubutton'] = _dummyMenubutton(self, 'menubutton')
+ self.subwidget_list['menu'] = _dummyMenu(self, 'menu')
+
+ def bind_widget(self, widget):
+ self.tk.call(self._w, 'bind', widget._w)
+
+ def unbind_widget(self, widget):
+ self.tk.call(self._w, 'unbind', widget._w)
+
+ def post_widget(self, widget, x, y):
+ self.tk.call(self._w, 'post', widget._w, x, y)
+
+class ResizeHandle(TixWidget):
+ """Internal widget to draw resize handles on Scrolled widgets."""
+
+ def __init__(self, master, cnf={}, **kw):
+ # There seems to be a Tix bug rejecting the configure method
+ # Let's try making the flags -static
+ flags = ['options', 'command', 'cursorfg', 'cursorbg',
+ 'handlesize', 'hintcolor', 'hintwidth',
+ 'x', 'y']
+ # In fact, x y height width are configurable
+ TixWidget.__init__(self, master, 'tixResizeHandle',
+ flags, cnf, kw)
+
+ def attach_widget(self, widget):
+ self.tk.call(self._w, 'attachwidget', widget._w)
+
+ def detach_widget(self, widget):
+ self.tk.call(self._w, 'detachwidget', widget._w)
+
+ def hide(self, widget):
+ self.tk.call(self._w, 'hide', widget._w)
+
+ def show(self, widget):
+ self.tk.call(self._w, 'show', widget._w)
+
+class ScrolledHList(TixWidget):
+ """ScrolledHList - HList with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledHList', ['options'],
+ cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledListBox(TixWidget):
+ """ScrolledListBox - Listbox with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledListBox', ['options'], cnf, kw)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledText(TixWidget):
+ """ScrolledText - Text with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledText', ['options'], cnf, kw)
+ self.subwidget_list['text'] = _dummyText(self, 'text')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledTList(TixWidget):
+ """ScrolledTList - TList with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledTList', ['options'],
+ cnf, kw)
+ self.subwidget_list['tlist'] = _dummyTList(self, 'tlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class ScrolledWindow(TixWidget):
+ """ScrolledWindow - Window with automatic scrollbars."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixScrolledWindow', ['options'], cnf, kw)
+ self.subwidget_list['window'] = _dummyFrame(self, 'window')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class Select(TixWidget):
+ """Select - Container of button subwidgets. It can be used to provide
+ radio-box or check-box style of selection options for the user.
+
+ Subwidgets are buttons added dynamically using the add method."""
+
+ def __init__(self, master, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixSelect',
+ ['allowzero', 'radio', 'orientation', 'labelside',
+ 'options'],
+ cnf, kw)
+ self.subwidget_list['label'] = _dummyLabel(self, 'label')
+
+ def add(self, name, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'add', name) + self._options(cnf, kw))
+ self.subwidget_list[name] = _dummyButton(self, name)
+ return self.subwidget_list[name]
+
+ def invoke(self, name):
+ self.tk.call(self._w, 'invoke', name)
+
+class StdButtonBox(TixWidget):
+ """StdButtonBox - Standard Button Box (OK, Apply, Cancel and Help) """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixStdButtonBox',
+ ['orientation', 'options'], cnf, kw)
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['apply'] = _dummyButton(self, 'apply')
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['help'] = _dummyButton(self, 'help')
+
+ def invoke(self, name):
+ if self.subwidget_list.has_key(name):
+ self.tk.call(self._w, 'invoke', name)
+
+class TList(TixWidget):
+ """TList - Hierarchy display widget which 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.
+
+ Subwidgets - None"""
+
+ def __init__ (self,master=None,cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixTList', ['options'], cnf, kw)
+
+ def active_set(self, index):
+ self.tk.call(self._w, 'active', 'set', index)
+
+ def active_clear(self):
+ self.tk.call(self._w, 'active', 'clear')
+
+ def anchor_set(self, index):
+ self.tk.call(self._w, 'anchor', 'set', index)
+
+ def anchor_clear(self):
+ self.tk.call(self._w, 'anchor', 'clear')
+
+ def delete(self, from_, to=None):
+ self.tk.call(self._w, 'delete', from_, to)
+
+ def dragsite_set(self, index):
+ self.tk.call(self._w, 'dragsite', 'set', index)
+
+ def dragsite_clear(self):
+ self.tk.call(self._w, 'dragsite', 'clear')
+
+ def dropsite_set(self, index):
+ self.tk.call(self._w, 'dropsite', 'set', index)
+
+ def dropsite_clear(self):
+ self.tk.call(self._w, 'dropsite', 'clear')
+
+ def insert(self, index, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'insert', index) + self._options(cnf, kw))
+
+ def info_active(self):
+ return self.tk.call(self._w, 'info', 'active')
+
+ def info_anchor(self):
+ return self.tk.call(self._w, 'info', 'anchor')
+
+ def info_down(self, index):
+ return self.tk.call(self._w, 'info', 'down', index)
+
+ def info_left(self, index):
+ return self.tk.call(self._w, 'info', 'left', index)
+
+ def info_right(self, index):
+ return self.tk.call(self._w, 'info', 'right', index)
+
+ def info_selection(self):
+ c = self.tk.call(self._w, 'info', 'selection')
+ return self.tk.splitlist(c)
+
+ def info_size(self):
+ return self.tk.call(self._w, 'info', 'size')
+
+ def info_up(self, index):
+ return self.tk.call(self._w, 'info', 'up', index)
+
+ def nearest(self, x, y):
+ return self.tk.call(self._w, 'nearest', x, y)
+
+ def see(self, index):
+ self.tk.call(self._w, 'see', index)
+
+ def selection_clear(self, cnf={}, **kw):
+ apply(self.tk.call,
+ (self._w, 'selection', 'clear') + self._options(cnf, kw))
+
+ def selection_includes(self, index):
+ return self.tk.call(self._w, 'selection', 'includes', index)
+
+ def selection_set(self, first, last=None):
+ self.tk.call(self._w, 'selection', 'set', first, last)
+
+ def xview(self, *args):
+ apply(self.tk.call, (self._w, 'xview') + args)
+
+ def yview(self, *args):
+ apply(self.tk.call, (self._w, 'yview') + args)
+
+class Tree(TixWidget):
+ """Tree - The tixTree widget can be used to display hierachical
+ data in a tree form. The user can adjust
+ the view of the tree by opening or closing parts of the tree."""
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixTree',
+ ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def autosetmode(self):
+ self.tk.call(self._w, 'autosetmode')
+
+ def close(self, entrypath):
+ self.tk.call(self._w, 'close', entrypath)
+
+ def getmode(self, entrypath):
+ return self.tk.call(self._w, 'getmode', entrypath)
+
+ def open(self, entrypath):
+ self.tk.call(self._w, 'open', entrypath)
+
+ def setmode(self, entrypath, mode='none'):
+ self.tk.call(self._w, 'setmode', entrypath, mode)
+
+
+# Could try subclassing Tree for CheckList - would need another arg to init
+class CheckList(TixWidget):
+ """The CheckList widget
+ displays a list of items to be selected by the user. CheckList acts
+ similarly to the Tk checkbutton or radiobutton widgets, except it is
+ capable of handling many more items than checkbuttons or radiobuttons.
+ """
+
+ def __init__(self, master=None, cnf={}, **kw):
+ TixWidget.__init__(self, master, 'tixCheckList',
+ ['options'], cnf, kw)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+ def autosetmode(self):
+ self.tk.call(self._w, 'autosetmode')
+
+ def close(self, entrypath):
+ self.tk.call(self._w, 'close', entrypath)
+
+ def getmode(self, entrypath):
+ return self.tk.call(self._w, 'getmode', entrypath)
+
+ def open(self, entrypath):
+ self.tk.call(self._w, 'open', entrypath)
+
+ def getselection(self, mode='on'):
+ '''Mode can be on, off, default'''
+ self.tk.call(self._w, 'getselection', mode)
+
+ def getstatus(self, entrypath):
+ self.tk.call(self._w, 'getstatus', entrypath)
+
+ def setstatus(self, entrypath, mode='on'):
+ self.tk.call(self._w, 'setstatus', entrypath, mode)
+
+
+###########################################################################
+### The subclassing below is used to instantiate the subwidgets in each ###
+### mega widget. This allows us to access their methods directly. ###
+###########################################################################
+
+class _dummyButton(Button, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyCheckbutton(Checkbutton, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyEntry(Entry, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyFrame(Frame, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyLabel(Label, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyListbox(Listbox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyMenu(Menu, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyMenubutton(Menubutton, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrollbar(Scrollbar, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyText(Text, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrolledListBox(ScrolledListBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyHList(HList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyScrolledHList(ScrolledHList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyTList(TList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+class _dummyComboBox(ComboBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['entry'] = _dummyEntry(self, 'entry')
+ self.subwidget_list['arrow'] = _dummyButton(self, 'arrow')
+ # I'm not sure about this destroy_physically=0 in all cases;
+ # it may depend on if -dropdown is true; I've added as a trial
+ self.subwidget_list['slistbox'] = _dummyScrolledListBox(self,
+ 'slistbox',
+ destroy_physically=0)
+ self.subwidget_list['listbox'] = _dummyListbox(self, 'listbox',
+ destroy_physically=0)
+
+class _dummyDirList(DirList, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['hlist'] = _dummyHList(self, 'hlist')
+ self.subwidget_list['vsb'] = _dummyScrollbar(self, 'vsb')
+ self.subwidget_list['hsb'] = _dummyScrollbar(self, 'hsb')
+
+class _dummyDirSelectBox(DirSelectBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dirlist'] = _dummyDirList(self, 'dirlist')
+ self.subwidget_list['dircbx'] = _dummyFileComboBox(self, 'dircbx')
+
+class _dummyExFileSelectBox(ExFileSelectBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['hidden'] = _dummyCheckbutton(self, 'hidden')
+ self.subwidget_list['types'] = _dummyComboBox(self, 'types')
+ self.subwidget_list['dir'] = _dummyComboBox(self, 'dir')
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['file'] = _dummyComboBox(self, 'file')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+
+class _dummyFileSelectBox(FileSelectBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dirlist'] = _dummyScrolledListBox(self, 'dirlist')
+ self.subwidget_list['filelist'] = _dummyScrolledListBox(self, 'filelist')
+ self.subwidget_list['filter'] = _dummyComboBox(self, 'filter')
+ self.subwidget_list['selection'] = _dummyComboBox(self, 'selection')
+
+class _dummyFileComboBox(ComboBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['dircbx'] = _dummyComboBox(self, 'dircbx')
+
+class _dummyStdButtonBox(StdButtonBox, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=1):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+ self.subwidget_list['ok'] = _dummyButton(self, 'ok')
+ self.subwidget_list['apply'] = _dummyButton(self, 'apply')
+ self.subwidget_list['cancel'] = _dummyButton(self, 'cancel')
+ self.subwidget_list['help'] = _dummyButton(self, 'help')
+
+class _dummyNoteBookFrame(NoteBookFrame, TixSubWidget):
+ def __init__(self, master, name, destroy_physically=0):
+ TixSubWidget.__init__(self, master, name, destroy_physically)
+
+########################
+### Utility Routines ###
+########################
+
+# Returns the qualified path name for the widget. Normally used to set
+# default options for subwidgets. See tixwidgets.py
+def OptionName(widget):
+ return widget.tk.call('tixOptionName', widget._w)
+
+# Called with a dictionary argument of the form
+# {'*.c':'C source files', '*.txt':'Text Files', '*':'All files'}
+# returns a string which can be used to configure the fsbox file types
+# in an ExFileSelectBox. i.e.,
+# '{{*} {* - All files}} {{*.c} {*.c - C source files}} {{*.txt} {*.txt - Text Files}}'
+def FileTypeList(dict):
+ s = ''
+ for type in dict.keys():
+ s = s + '{{' + type + '} {' + type + ' - ' + dict[type] + '}} '
+ return s
+
+# Still to be done:
+class CObjView(TixWidget):
+ """This file implements the Canvas Object View widget. This is a base
+ class of IconView. It implements automatic placement/adjustment of the
+ scrollbars according to the canvas objects inside the canvas subwidget.
+ The scrollbars are adjusted so that the canvas is just large enough
+ to see all the objects.
+ """
+ pass
+
Added: external/tix-8.4.2.x/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,26 @@
+
+ Tix 8.4.2 for Tcl 8.4+
+
+ Tix Documentation Master Index
+
+ This file is the master index of all the documentation included in
+ this package. For additional information about Tix, please visit the
+ Tix Home Page at
+
+ http://tix.sourceforge.net/
+
+ or join the mailing lists there.
+
+ * ABOUT.html A brief description of Tix.
+ * docs/Release.html Release notes on this version of Tix.
+ * unix/README.txt Compiling and installing Tix under Unix.
+ * win/README.txt Compiling and installing Tix under Windows.
+ * docs/html/TixUser/TixUser.html Tix Users's Guide.
+ * Programming with Tix:
+ + Tix Programmer's Guide.
+ + Using Tix Stand Alone Modules (SAM).
+ * docs/FAQ.html The Tix Frequent Asked Questions.
+ * ChangeLog.txt Changes made to Tix since the previous release.
+ * man/index.html Programmer's Reference Manual.
+
+ Versions of Tcl/Tk prior to 8.4 are no longer supported.
Added: external/tix-8.4.2.x/aclocal.m4
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/aclocal.m4 Tue Mar 18 19:38:59 2008
@@ -0,0 +1,9 @@
+#
+# Include the TEA standard macro set
+#
+
+builtin(include,tclconfig/tcl.m4)
+
+#
+# Add here whatever m4 macros you want to define for your package
+#
Added: external/tix-8.4.2.x/configure
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/configure Tue Mar 18 19:38:59 2008
@@ -0,0 +1,11674 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59 for Tix 8.4.2.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME='Tix'
+PACKAGE_TARNAME='tix'
+PACKAGE_VERSION='8.4.2'
+PACKAGE_STRING='Tix 8.4.2'
+PACKAGE_BUGREPORT=''
+
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CYGPATH EXEEXT PKG_LIB_FILE PKG_STUB_LIB_FILE PKG_STUB_SOURCES PKG_STUB_OBJECTS PKG_TCL_SOURCES PKG_HEADERS PKG_INCLUDES PKG_LIBS PKG_CFLAGS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC TCL_LIBS TCL_DEFS TCL_EXTRA_CFLAGS TCL_LD_FLAGS TCL_SHLIB_LD_LIBS TK_VERSION TK_BIN_DIR TK_SRC_DIR TK_LIB_FILE TK_LIB_FLAG TK_LIB_SPEC TK_STUB_LIB_FILE TK_STUB_LIB_FLAG TK_STUB_LIB_SPEC TK_LIBS TK_XINCLUDES CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE RANLIB ac_ct_RANLIB EGREP MATH_LIBS PKG_SOURCES PKG_OBJECTS TCL_TOP_DIR_NATIVE TCL_GENERIC_DIR_NATIVE TCL_UNIX_DIR_NATIVE TCL_WIN_DIR_NATIVE TCL_BMAP_DIR_NATIVE TCL_TOOL_DIR_NATIVE TCL_PLATFORM_DIR_NATIVE TCL_INCLUDES TK_TOP_DIR_NATIVE TK_UNIX_DIR_NATIVE TK_WIN_DIR_NATIVE TK_GENERIC_DIR_NATIVE TK_XLIB_DIR_NATIVE TK_PLATFORM_DIR_NATIVE TK_INCLUDES CLEANFILES TCL_THREADS SHARED_BUILD AR CELIB_DIR LIBOBJS DL_LIBS CFLAGS_DEBUG CFLAGS_OPTIMIZE CFLAGS_WARNING STLIB_LD SHLIB_LD SHLIB_LD_LIBS SHLIB_CFLAGS LD_LIBRARY_PATH_VAR TCL_DBGX CFLAGS_DEFAULT LDFLAGS_DEFAULT MAKE_LIB MAKE_SHARED_LIB MAKE_STATIC_LIB MAKE_STUB_LIB RANLIB_STUB TCLSH_PROG WISH_PROG LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures Tix 8.4.2 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of Tix 8.4.2:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-threads build with threads
+ --enable-shared build and link with shared libraries (default: on)
+ --enable-64bit enable 64bit support (default: off)
+ --enable-64bit-vis enable 64bit Sparc VIS support (default: off)
+ --enable-wince enable Win/CE support (where applicable)
+ --enable-load allow dynamic loading and "load" command (default:
+ on)
+ --enable-symbols build with debugging symbols (default: off)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-tcl directory containing tcl configuration
+ (tclConfig.sh)
+ --with-tk directory containing tk configuration (tkConfig.sh)
+ --with-x use the X Window System
+ --with-celib=DIR use Windows/CE support library from DIR
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+Tix configure 8.4.2
+generated by GNU Autoconf 2.59
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Tix $as_me 8.4.2, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Call TEA_INIT as the first TEA_ macro to set up initial vars.
+# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
+# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
+#--------------------------------------------------------------------
+
+
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.5"
+
+ echo "$as_me:$LINENO: checking for correct TEA configuration" >&5
+echo $ECHO_N "checking for correct TEA configuration... $ECHO_C" >&6
+ if test x"${PACKAGE_NAME}" = x ; then
+ { { echo "$as_me:$LINENO: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&5
+echo "$as_me: error:
+The PACKAGE_NAME variable must be defined by your TEA configure.in" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test x"3.5" = x ; then
+ { { echo "$as_me:$LINENO: error:
+TEA version not specified." >&5
+echo "$as_me: error:
+TEA version not specified." >&2;}
+ { (exit 1); exit 1; }; }
+ elif test "3.5" != "${TEA_VERSION}" ; then
+ echo "$as_me:$LINENO: result: warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&5
+echo "${ECHO_T}warning: requested TEA version \"3.5\", have \"${TEA_VERSION}\"" >&6
+ else
+ echo "$as_me:$LINENO: result: ok (TEA ${TEA_VERSION})" >&5
+echo "${ECHO_T}ok (TEA ${TEA_VERSION})" >&6
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
+ # Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CYGPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CYGPATH"; then
+ ac_cv_prog_CYGPATH="$CYGPATH" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CYGPATH="cygpath -w"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_CYGPATH" && ac_cv_prog_CYGPATH="echo"
+fi
+fi
+CYGPATH=$ac_cv_prog_CYGPATH
+if test -n "$CYGPATH"; then
+ echo "$as_me:$LINENO: result: $CYGPATH" >&5
+echo "${ECHO_T}$CYGPATH" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+
+
+
+ # This package name must be replaced statically for AC_SUBST to work
+
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in tclconfig $srcdir/tclconfig; do
+ if test -f $ac_dir/install-sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f $ac_dir/install.sh; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in tclconfig $srcdir/tclconfig" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+
+#--------------------------------------------------------------------
+# Load the tclConfig.sh file
+#--------------------------------------------------------------------
+
+
+
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+
+# Check whether --with-tcl or --without-tcl was given.
+if test "${with_tcl+set}" = set; then
+ withval="$with_tcl"
+ with_tclconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Tcl configuration" >&5
+echo $ECHO_N "checking for Tcl configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_tclconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself" >&2;}
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&5
+echo "$as_me: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Windows, check in common installation locations
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ { echo "$as_me:$LINENO: WARNING: Can't find Tcl configuration definitions" >&5
+echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
+ exit 0
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ echo "$as_me:$LINENO: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo "${ECHO_T}found ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo $ECHO_N "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... $ECHO_C" >&6
+
+ if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . ${TCL_BIN_DIR}/tclConfig.sh
+ else
+ echo "$as_me:$LINENO: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
+echo "${ECHO_T}could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f ${TCL_BIN_DIR}/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tcl.framework installed in an arbitary location.
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
+ for i in "`cd ${TCL_BIN_DIR}; pwd`" \
+ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+ TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
+ TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
+ TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Load the tkConfig.sh file if necessary (Tk extension)
+#--------------------------------------------------------------------
+
+
+ #
+ # Ok, lets find the tk configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tk
+ #
+
+ if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+
+# Check whether --with-tk or --without-tk was given.
+if test "${with_tk+set}" = set; then
+ withval="$with_tk"
+ with_tkconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Tk configuration" >&5
+echo $ECHO_N "checking for Tk configuration... $ECHO_C" >&6
+ if test "${ac_cv_c_tkconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ case ${with_tkconfig} in
+ */tkConfig.sh )
+ if test -f ${with_tkconfig}; then
+ { echo "$as_me:$LINENO: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&5
+echo "$as_me: WARNING: --with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself" >&2;}
+ with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&5
+echo "$as_me: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tk.framework/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Windows, check in common installation locations
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TK_BIN_DIR="# no Tk configs found"
+ { echo "$as_me:$LINENO: WARNING: Can't find Tk configuration definitions" >&5
+echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
+ exit 0
+ else
+ no_tk=
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ echo "$as_me:$LINENO: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
+echo "${ECHO_T}found ${TK_BIN_DIR}/tkConfig.sh" >&6
+ fi
+ fi
+
+
+ echo "$as_me:$LINENO: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
+echo $ECHO_N "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... $ECHO_C" >&6
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+ echo "$as_me:$LINENO: result: loading" >&5
+echo "${ECHO_T}loading" >&6
+ . ${TK_BIN_DIR}/tkConfig.sh
+ else
+ echo "$as_me:$LINENO: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
+echo "${ECHO_T}could not find ${TK_BIN_DIR}/tkConfig.sh" >&6
+ fi
+
+ # eval is required to do the TK_DBGX substitution
+ eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+ eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+ # If the TK_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TK_LIB_SPEC will be set to the value
+ # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
+ # instead of TK_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f ${TK_BIN_DIR}/Makefile ; then
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tk.framework installed in an arbitary location.
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then
+ for i in "`cd ${TK_BIN_DIR}; pwd`" \
+ "`cd ${TK_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+ TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then
+ TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
+ TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TK_DBGX substitution
+ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+ eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+ eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+ eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+ # Ensure windowingsystem is defined
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ case ${TK_DEFS} in
+ *MAC_OSX_TK*)
+
+cat >>confdefs.h <<\_ACEOF
+#define MAC_OSX_TK 1
+_ACEOF
+
+ TEA_WINDOWINGSYSTEM="aqua"
+ ;;
+ *)
+ TEA_WINDOWINGSYSTEM="x11"
+ ;;
+ esac
+ elif test "${TEA_PLATFORM}" = "windows" ; then
+ TEA_WINDOWINGSYSTEM="win32"
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#-----------------------------------------------------------------------
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
+#-----------------------------------------------------------------------
+
+
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&5
+echo "$as_me: --prefix defaulting to TCL_PREFIX ${TCL_PREFIX}" >&6;}
+ prefix=${TCL_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --prefix defaulting to /usr/local" >&5
+echo "$as_me: --prefix defaulting to /usr/local" >&6;}
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&5
+echo "$as_me: --exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}" >&6;}
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ { echo "$as_me:$LINENO: --exec-prefix defaulting to ${prefix}" >&5
+echo "$as_me: --exec-prefix defaulting to ${prefix}" >&6;}
+ exec_prefix=$prefix
+ fi
+ fi
+
+
+#-----------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#-----------------------------------------------------------------------
+
+
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ # Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+all:
+ @echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+ eval ac_cv_prog_make_${ac_make}_set=yes
+else
+ eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ SET_MAKE=
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ exit(2);
+ exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ echo "$as_me:$LINENO: checking if the compiler understands -pipe" >&5
+echo $ECHO_N "checking if the compiler understands -pipe... $ECHO_C" >&6
+ OLDCC="$CC"
+ CC="$CC -pipe"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+CC="$OLDCC"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long l;
+ char c[sizeof (long)];
+ } u;
+ u.l = 1;
+ exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+ if test "${TEA_PLATFORM}" = "unix" ; then
+
+ #--------------------------------------------------------------------
+ # On a few very rare systems, all of the libm.a stuff is
+ # already in libc.a. Set compiler flags accordingly.
+ # Also, Linux requires the "ieee" library for math to work
+ # right (and it must appear before "-lm").
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for sin" >&5
+echo $ECHO_N "checking for sin... $ECHO_C" >&6
+if test "${ac_cv_func_sin+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define sin to an innocuous variant, in case <limits.h> declares sin.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define sin innocuous_sin
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char sin (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef sin
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char sin ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_sin) || defined (__stub___sin)
+choke me
+#else
+char (*f) () = sin;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != sin;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_sin=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_sin=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_sin" >&5
+echo "${ECHO_T}$ac_cv_func_sin" >&6
+if test $ac_cv_func_sin = yes; then
+ MATH_LIBS=""
+else
+ MATH_LIBS="-lm"
+fi
+
+ echo "$as_me:$LINENO: checking for main in -lieee" >&5
+echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
+if test "${ac_cv_lib_ieee_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lieee $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ieee_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_ieee_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ieee_main" >&6
+if test $ac_cv_lib_ieee_main = yes; then
+ MATH_LIBS="-lieee $MATH_LIBS"
+fi
+
+
+ #--------------------------------------------------------------------
+ # Interactive UNIX requires -linet instead of -lsocket, plus it
+ # needs net/errno.h to define the socket-related error codes.
+ #--------------------------------------------------------------------
+
+ echo "$as_me:$LINENO: checking for main in -linet" >&5
+echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
+if test "${ac_cv_lib_inet_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-linet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_inet_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_inet_main=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_inet_main" >&5
+echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
+if test $ac_cv_lib_inet_main = yes; then
+ LIBS="$LIBS -linet"
+fi
+
+ if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking net/errno.h usability" >&5
+echo $ECHO_N "checking net/errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <net/errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking net/errno.h presence" >&5
+echo $ECHO_N "checking net/errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <net/errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: net/errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: net/errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: net/errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: net/errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: net/errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: net/errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: net/errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: net/errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for net/errno.h" >&5
+echo $ECHO_N "checking for net/errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_net_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_net_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_net_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_net_errno_h" >&6
+
+fi
+if test $ac_cv_header_net_errno_h = yes; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NET_ERRNO_H 1
+_ACEOF
+
+fi
+
+
+
+ #--------------------------------------------------------------------
+ # Check for the existence of the -lsocket and -lnsl libraries.
+ # The order here is important, so that they end up in the right
+ # order in the command line generated by make. Here are some
+ # special considerations:
+ # 1. Use "connect" and "accept" to check for -lsocket, and
+ # "gethostbyname" to check for -lnsl.
+ # 2. Use each function name only once: can't redo a check because
+ # autoconf caches the results of the last check and won't redo it.
+ # 3. Use -lnsl and -lsocket only if they supply procedures that
+ # aren't already present in the normal libraries. This is because
+ # IRIX 5.2 has libraries, but they aren't needed and they're
+ # bogus: they goof up name resolution if used.
+ # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
+ # To get around this problem, check for both libraries together
+ # if -lsocket doesn't work by itself.
+ #--------------------------------------------------------------------
+
+ tcl_checkBoth=0
+ echo "$as_me:$LINENO: checking for connect" >&5
+echo $ECHO_N "checking for connect... $ECHO_C" >&6
+if test "${ac_cv_func_connect+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+char (*f) () = connect;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != connect;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_connect=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+echo "${ECHO_T}$ac_cv_func_connect" >&6
+if test $ac_cv_func_connect = yes; then
+ tcl_checkSocket=0
+else
+ tcl_checkSocket=1
+fi
+
+ if test "$tcl_checkSocket" = 1; then
+ echo "$as_me:$LINENO: checking for setsockopt" >&5
+echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6
+if test "${ac_cv_func_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define setsockopt innocuous_setsockopt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char setsockopt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef setsockopt
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_setsockopt) || defined (__stub___setsockopt)
+choke me
+#else
+char (*f) () = setsockopt;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != setsockopt;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_func_setsockopt" >&6
+if test $ac_cv_func_setsockopt = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
+echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char setsockopt ();
+int
+main ()
+{
+setsockopt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_setsockopt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_socket_setsockopt=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6
+if test $ac_cv_lib_socket_setsockopt = yes; then
+ LIBS="$LIBS -lsocket"
+else
+ tcl_checkBoth=1
+fi
+
+fi
+
+ fi
+ if test "$tcl_checkBoth" = 1; then
+ tk_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ echo "$as_me:$LINENO: checking for accept" >&5
+echo $ECHO_N "checking for accept... $ECHO_C" >&6
+if test "${ac_cv_func_accept+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define accept to an innocuous variant, in case <limits.h> declares accept.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define accept innocuous_accept
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char accept (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef accept
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char accept ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_accept) || defined (__stub___accept)
+choke me
+#else
+char (*f) () = accept;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != accept;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_accept=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_accept=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_accept" >&5
+echo "${ECHO_T}$ac_cv_func_accept" >&6
+if test $ac_cv_func_accept = yes; then
+ tcl_checkNsl=0
+else
+ LIBS=$tk_oldLibs
+fi
+
+ fi
+ echo "$as_me:$LINENO: checking for gethostbyname" >&5
+echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+char (*f) () = gethostbyname;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != gethostbyname;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
+if test $ac_cv_func_gethostbyname = yes; then
+ :
+else
+ echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gethostbyname ();
+int
+main ()
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_nsl_gethostbyname=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
+if test $ac_cv_lib_nsl_gethostbyname = yes; then
+ LIBS="$LIBS -lnsl"
+fi
+
+fi
+
+
+ # Don't perform the eval of the libraries here because DL_LIBS
+ # won't be set until we call TEA_CONFIG_CFLAGS
+
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
+
+
+
+
+ echo "$as_me:$LINENO: checking dirent.h" >&5
+echo $ECHO_N "checking dirent.h... $ECHO_C" >&6
+if test "${tcl_cv_dirent_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <dirent.h>
+int
+main ()
+{
+
+#ifndef _POSIX_SOURCE
+# ifdef __Lynx__
+ /*
+ * Generate compilation error to make the test fail: Lynx headers
+ * are only valid if really in the POSIX environment.
+ */
+
+ missing_procedure();
+# endif
+#endif
+DIR *d;
+struct dirent *entryPtr;
+char *p;
+d = opendir("foobar");
+entryPtr = readdir(d);
+p = entryPtr->d_name;
+closedir(d);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_dirent_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_dirent_h=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_dirent_h" >&5
+echo "${ECHO_T}$tcl_cv_dirent_h" >&6
+
+ if test $tcl_cv_dirent_h = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DIRENT_H 1
+_ACEOF
+
+ fi
+
+ if test "${ac_cv_header_errno_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking errno.h usability" >&5
+echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <errno.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking errno.h presence" >&5
+echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: errno.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: errno.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for errno.h" >&5
+echo $ECHO_N "checking for errno.h... $ECHO_C" >&6
+if test "${ac_cv_header_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_errno_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5
+echo "${ECHO_T}$ac_cv_header_errno_h" >&6
+
+fi
+if test $ac_cv_header_errno_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_ERRNO_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_float_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking float.h usability" >&5
+echo $ECHO_N "checking float.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <float.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking float.h presence" >&5
+echo $ECHO_N "checking float.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <float.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: float.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: float.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: float.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: float.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: float.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: float.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: float.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: float.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: float.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for float.h" >&5
+echo $ECHO_N "checking for float.h... $ECHO_C" >&6
+if test "${ac_cv_header_float_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_float_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_float_h" >&5
+echo "${ECHO_T}$ac_cv_header_float_h" >&6
+
+fi
+if test $ac_cv_header_float_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_FLOAT_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_values_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking values.h usability" >&5
+echo $ECHO_N "checking values.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <values.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking values.h presence" >&5
+echo $ECHO_N "checking values.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <values.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: values.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: values.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: values.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: values.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: values.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: values.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: values.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: values.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: values.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for values.h" >&5
+echo $ECHO_N "checking for values.h... $ECHO_C" >&6
+if test "${ac_cv_header_values_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_values_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_values_h" >&5
+echo "${ECHO_T}$ac_cv_header_values_h" >&6
+
+fi
+if test $ac_cv_header_values_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_VALUES_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_limits_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking limits.h usability" >&5
+echo $ECHO_N "checking limits.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <limits.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking limits.h presence" >&5
+echo $ECHO_N "checking limits.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: limits.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: limits.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: limits.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: limits.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: limits.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: limits.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: limits.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: limits.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for limits.h" >&5
+echo $ECHO_N "checking for limits.h... $ECHO_C" >&6
+if test "${ac_cv_header_limits_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_limits_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_limits_h" >&5
+echo "${ECHO_T}$ac_cv_header_limits_h" >&6
+
+fi
+if test $ac_cv_header_limits_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIMITS_H 1
+_ACEOF
+
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_LIMITS_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking stdlib.h usability" >&5
+echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <stdlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking stdlib.h presence" >&5
+echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for stdlib.h" >&5
+echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6
+if test "${ac_cv_header_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_stdlib_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6
+
+fi
+if test $ac_cv_header_stdlib_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtol" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtoul" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strtod" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ if test $tcl_ok = 0; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_STDLIB_H 1
+_ACEOF
+
+ fi
+ if test "${ac_cv_header_string_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking string.h usability" >&5
+echo $ECHO_N "checking string.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <string.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking string.h presence" >&5
+echo $ECHO_N "checking string.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for string.h" >&5
+echo $ECHO_N "checking for string.h... $ECHO_C" >&6
+if test "${ac_cv_header_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_string_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5
+echo "${ECHO_T}$ac_cv_header_string_h" >&6
+
+fi
+if test $ac_cv_header_string_h = yes; then
+ tcl_ok=1
+else
+ tcl_ok=0
+fi
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strstr" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "strerror" >/dev/null 2>&1; then
+ :
+else
+ tcl_ok=0
+fi
+rm -f conftest*
+
+
+ # See also memmove check below for a place where NO_STRING_H can be
+ # set and why.
+
+ if test $tcl_ok = 0; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_STRING_H 1
+_ACEOF
+
+ fi
+
+ if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking sys/wait.h usability" >&5
+echo $ECHO_N "checking sys/wait.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/wait.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking sys/wait.h presence" >&5
+echo $ECHO_N "checking sys/wait.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/wait.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: sys/wait.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: sys/wait.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: sys/wait.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: sys/wait.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: sys/wait.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: sys/wait.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: sys/wait.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for sys/wait.h" >&5
+echo $ECHO_N "checking for sys/wait.h... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_sys_wait_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+
+fi
+if test $ac_cv_header_sys_wait_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+
+ if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking dlfcn.h usability" >&5
+echo $ECHO_N "checking dlfcn.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <dlfcn.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking dlfcn.h presence" >&5
+echo $ECHO_N "checking dlfcn.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <dlfcn.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for dlfcn.h" >&5
+echo $ECHO_N "checking for dlfcn.h... $ECHO_C" >&6
+if test "${ac_cv_header_dlfcn_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_dlfcn_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5
+echo "${ECHO_T}$ac_cv_header_dlfcn_h" >&6
+
+fi
+if test $ac_cv_header_dlfcn_h = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DLFCN_H 1
+_ACEOF
+
+fi
+
+
+
+ # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+
+for ac_header in sys/param.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------ ##
+## Report this to the Tix lists. ##
+## ------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+ # Let the user call this, because if it triggers, they will
+ # need a compat/strtod.c that is correct. Users can also
+ # use Tcl_GetDouble(FromObj) instead.
+ #TEA_BUGGY_STRTOD
+ fi
+
+
+#-----------------------------------------------------------------------
+# __CHANGE__
+# Specify the C source files to compile in TEA_ADD_SOURCES,
+# public headers that need to be installed in TEA_ADD_HEADERS,
+# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
+# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
+# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
+# and PKG_TCL_SOURCES.
+#-----------------------------------------------------------------------
+
+# core sources
+
+ vars="tixClass.c tixCmds.c tixCompat.c tixError.c tixGeometry.c
+ tixInit.c tixList.c tixMethod.c tixOption.c tixScroll.c
+ tixSmpLs.c tixUtils.c tixWidget.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+# ditem sources
+
+ vars="tixDItem.c tixDiITxt.c tixDiImg.c tixDiStyle.c tixDiText.c
+ tixDiWin.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+# manager sources
+
+ vars="tixForm.c tixFormMisc.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+# widget sources
+
+ vars="tixGrid.c tixGrData.c tixGrFmt.c tixGrRC.c tixGrSel.c
+ tixGrSort.c tixGrUtl.c tixHList.c tixHLCol.c tixHLInd.c
+ tixHLHdr.c tixNBFrame.c tixTList.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+# misc sources
+
+ vars="tixImgCmp.c tixImgXpm.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+
+
+ vars=""
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ { { echo "$as_me:$LINENO: error: could not find header file '${srcdir}/$i'" >&5
+echo "$as_me: error: could not find header file '${srcdir}/$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_HEADERS="$PKG_HEADERS $i"
+ done
+
+
+
+ vars="-I. -I\"`${CYGPATH} ${srcdir}/generic`\""
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+
+
+
+ PKG_CFLAGS="$PKG_CFLAGS "
+
+
+
+ vars=""
+ for i in $vars; do
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find stub source file '$i'" >&5
+echo "$as_me: error: could not find stub source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
+ done
+
+
+
+
+ vars=""
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ { { echo "$as_me:$LINENO: error: could not find tcl source file '${srcdir}/$i'" >&5
+echo "$as_me: error: could not find tcl source file '${srcdir}/$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+ done
+
+
+
+#--------------------------------------------------------------------
+# __CHANGE__
+# Choose which headers you need. Extension authors should try very
+# hard to only rely on the Tcl public header files. Internal headers
+# contain private data structures and are subject to change without
+# notice.
+# This MUST be called after TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
+#--------------------------------------------------------------------
+
+# needed for tclPort.h and such ... can be corrected
+
+ echo "$as_me:$LINENO: checking for Tcl private include files" >&5
+echo $ECHO_N "checking for Tcl private include files... $ECHO_C" >&6
+
+ TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+ TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+ TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+ TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+ TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+ TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\"
+ TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\"
+ TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\"
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
+ else
+ TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ if test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+ TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
+ TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
+ ;;
+ esac
+ fi
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: result: Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&5
+echo "${ECHO_T}Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}" >&6
+
+
+ echo "$as_me:$LINENO: checking for Tk private include files" >&5
+echo $ECHO_N "checking for Tk private include files... $ECHO_C" >&6
+
+ TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+ TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+ TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+ TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+ TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+ TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
+ else
+ TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+ if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
+ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
+ fi
+ if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx"
+ fi
+ if test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then
+ TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi
+ ;;
+ esac
+ fi
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: result: Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" >&5
+echo "${ECHO_T}Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}" >&6
+
+
+#--------------------------------------------------------------------
+# For Unix/Tk builds, make sure that the X libraries/headers are found.
+#--------------------------------------------------------------------
+
+
+ if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+
+ echo "$as_me:$LINENO: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6
+
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+ withval="$with_x"
+
+fi;
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+ # Both variables are already set.
+ have_x=yes
+ else
+ if test "${ac_cv_have_x+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -fr conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat >Imakefile <<'_ACEOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+_ACEOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Intrinsic.h.
+ # First, try using that file with no special directory specified.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Intrinsic.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lXt $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+int
+main ()
+{
+XtMalloc (0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl; do
+ if test -r $ac_dir/libXt.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$as_me:$LINENO: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+ echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+fi
+
+ not_really_there=""
+ if test "$no_x" = ""; then
+ if test "$x_includes" = ""; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/XIntrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ not_really_there="yes"
+fi
+rm -f conftest.err conftest.$ac_ext
+ else
+ if test ! -r $x_includes/X11/Intrinsic.h; then
+ not_really_there="yes"
+ fi
+ fi
+ fi
+ if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
+ echo "$as_me:$LINENO: checking for X11 header files" >&5
+echo $ECHO_N "checking for X11 header files... $ECHO_C" >&6
+ found_xincludes="no"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ found_xincludes="yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ found_xincludes="no"
+fi
+rm -f conftest.err conftest.$ac_ext
+ if test "$found_xincludes" = "no"; then
+ dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
+ for i in $dirs ; do
+ if test -r $i/X11/Intrinsic.h; then
+ echo "$as_me:$LINENO: result: $i" >&5
+echo "${ECHO_T}$i" >&6
+ XINCLUDES=" -I$i"
+ found_xincludes="yes"
+ break
+ fi
+ done
+ fi
+ else
+ if test "$x_includes" != ""; then
+ XINCLUDES="-I$x_includes"
+ found_xincludes="yes"
+ fi
+ fi
+ if test found_xincludes = "no"; then
+ echo "$as_me:$LINENO: result: couldn't find any!" >&5
+echo "${ECHO_T}couldn't find any!" >&6
+ fi
+
+ if test "$no_x" = yes; then
+ echo "$as_me:$LINENO: checking for X11 libraries" >&5
+echo $ECHO_N "checking for X11 libraries... $ECHO_C" >&6
+ XLIBSW=nope
+ dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
+ for i in $dirs ; do
+ if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
+ echo "$as_me:$LINENO: result: $i" >&5
+echo "${ECHO_T}$i" >&6
+ XLIBSW="-L$i -lX11"
+ x_libraries="$i"
+ break
+ fi
+ done
+ else
+ if test "$x_libraries" = ""; then
+ XLIBSW=-lX11
+ else
+ XLIBSW="-L$x_libraries -lX11"
+ fi
+ fi
+ if test "$XLIBSW" = nope ; then
+ echo "$as_me:$LINENO: checking for XCreateWindow in -lXwindow" >&5
+echo $ECHO_N "checking for XCreateWindow in -lXwindow... $ECHO_C" >&6
+if test "${ac_cv_lib_Xwindow_XCreateWindow+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXwindow $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char XCreateWindow ();
+int
+main ()
+{
+XCreateWindow ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_Xwindow_XCreateWindow=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_Xwindow_XCreateWindow=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_Xwindow_XCreateWindow" >&5
+echo "${ECHO_T}$ac_cv_lib_Xwindow_XCreateWindow" >&6
+if test $ac_cv_lib_Xwindow_XCreateWindow = yes; then
+ XLIBSW=-lXwindow
+fi
+
+ fi
+ if test "$XLIBSW" = nope ; then
+ echo "$as_me:$LINENO: result: could not find any! Using -lX11." >&5
+echo "${ECHO_T}could not find any! Using -lX11." >&6
+ XLIBSW=-lX11
+ fi
+ if test x"${XLIBSW}" != x ; then
+ PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
+ fi
+
+ fi
+
+
+#--------------------------------------------------------------------
+# __CHANGE__
+# A few miscellaneous platform-specific items:
+#
+# Define a special symbol for Windows (BUILD_tix in this case) so
+# that we create the export library with the dll.
+#
+# Windows creates a few extra files that need to be cleaned up.
+# You can add more files to clean if your extension creates any extra
+# files.
+#
+# TEA_ADD any extra compiler/build info here.
+#--------------------------------------------------------------------
+
+if test "${TEA_PLATFORM}" = "windows" ; then
+ cat >>confdefs.h <<_ACEOF
+#define BUILD_tix 1
+_ACEOF
+
+ CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb *.pch"
+
+ vars="gdi32.lib user32.lib advapi32.lib comdlg32.lib"
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+
+
+
+ vars="tixWCmpt.c tixWinWm.c tixWinXpm.c tixWinDraw.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+
+ vars="-I. -I\"`${CYGPATH} ${srcdir}/win`\""
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+
+
+else
+ CLEANFILES="pkgIndex.tcl"
+
+ vars="tixInputO.c tixUnixMwm.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+
+ vars="tixUnixDraw.c tixUnixXpm.c tixUnixWm.c"
+ for i in $vars; do
+ case $i in
+ \$*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ { { echo "$as_me:$LINENO: error: could not find source file '$i'" >&5
+echo "$as_me: error: could not find source file '$i'" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[^.]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+
+
+
+
+ vars="-I. -I\"`${CYGPATH} ${srcdir}/unix`\""
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+
+
+fi
+if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+
+ vars="-I${TK_TOP_DIR_NATIVE}/macosx"
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+
+
+fi
+
+
+#--------------------------------------------------------------------
+# Check whether --enable-threads or --disable-threads was given.
+# So far only Tcl responds to this one.
+#--------------------------------------------------------------------
+
+
+ # Check whether --enable-threads or --disable-threads was given.
+if test "${enable_threads+set}" = set; then
+ enableval="$enable_threads"
+ tcl_ok=$enableval
+else
+ tcl_ok=yes
+fi;
+
+ if test "${enable_threads+set}" = set; then
+ enableval="$enable_threads"
+ tcl_ok=$enableval
+ else
+ tcl_ok=yes
+ fi
+
+ if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
+ TCL_THREADS=1
+
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ # We are always OK on Windows, so check what this platform wants:
+
+ # USE_THREAD_ALLOC tells us to try the special thread-based
+ # allocator that significantly reduces lock contention
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_THREAD_ALLOC 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+ if test "`uname -s`" = "SunOS" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+ fi
+
+cat >>confdefs.h <<\_ACEOF
+#define _THREAD_SAFE 1
+_ACEOF
+
+ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5
+echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pthread_mutex_init ();
+int
+main ()
+{
+pthread_mutex_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_pthread_pthread_mutex_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread_pthread_mutex_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread_pthread_mutex_init" >&6
+if test $ac_cv_lib_pthread_pthread_mutex_init = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = "no"; then
+ # Check a little harder for __pthread_mutex_init in the same
+ # library, as some systems hide it there until pthread.h is
+ # defined. We could alternatively do an AC_TRY_COMPILE with
+ # pthread.h, but that will work with libpthread really doesn't
+ # exist, like AIX 4.2. [Bug: 4359]
+ echo "$as_me:$LINENO: checking for __pthread_mutex_init in -lpthread" >&5
+echo $ECHO_N "checking for __pthread_mutex_init in -lpthread... $ECHO_C" >&6
+if test "${ac_cv_lib_pthread___pthread_mutex_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char __pthread_mutex_init ();
+int
+main ()
+{
+__pthread_mutex_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_pthread___pthread_mutex_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthread___pthread_mutex_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_mutex_init" >&5
+echo "${ECHO_T}$ac_cv_lib_pthread___pthread_mutex_init" >&6
+if test $ac_cv_lib_pthread___pthread_mutex_init = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthread"
+ else
+ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthreads" >&5
+echo $ECHO_N "checking for pthread_mutex_init in -lpthreads... $ECHO_C" >&6
+if test "${ac_cv_lib_pthreads_pthread_mutex_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthreads $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pthread_mutex_init ();
+int
+main ()
+{
+pthread_mutex_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_pthreads_pthread_mutex_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_pthreads_pthread_mutex_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_mutex_init" >&5
+echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_mutex_init" >&6
+if test $ac_cv_lib_pthreads_pthread_mutex_init = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthreads"
+ else
+ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc" >&5
+echo $ECHO_N "checking for pthread_mutex_init in -lc... $ECHO_C" >&6
+if test "${ac_cv_lib_c_pthread_mutex_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pthread_mutex_init ();
+int
+main ()
+{
+pthread_mutex_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_pthread_mutex_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_pthread_mutex_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_pthread_mutex_init" >&5
+echo "${ECHO_T}$ac_cv_lib_c_pthread_mutex_init" >&6
+if test $ac_cv_lib_c_pthread_mutex_init = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = "no"; then
+ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lc_r" >&5
+echo $ECHO_N "checking for pthread_mutex_init in -lc_r... $ECHO_C" >&6
+if test "${ac_cv_lib_c_r_pthread_mutex_init+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lc_r $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char pthread_mutex_init ();
+int
+main ()
+{
+pthread_mutex_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_c_r_pthread_mutex_init=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_c_r_pthread_mutex_init=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_mutex_init" >&5
+echo "${ECHO_T}$ac_cv_lib_c_r_pthread_mutex_init" >&6
+if test $ac_cv_lib_c_r_pthread_mutex_init = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -pthread"
+ else
+ TCL_THREADS=0
+ { echo "$as_me:$LINENO: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&5
+echo "$as_me: WARNING: Do not know how to find pthread lib on your system - thread support disabled" >&2;}
+ fi
+ fi
+ fi
+ fi
+ fi
+ else
+ TCL_THREADS=0
+ fi
+ # Do checking message here to not mess up interleaved configure output
+ echo "$as_me:$LINENO: checking for building with threads" >&5
+echo $ECHO_N "checking for building with threads... $ECHO_C" >&6
+ if test "${TCL_THREADS}" = 1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_THREADS 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes (default)" >&5
+echo "${ECHO_T}yes (default)" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ # TCL_THREADS sanity checking. See if our request for building with
+ # threads is the same as the way Tcl was built. If not, warn the user.
+ case ${TCL_DEFS} in
+ *THREADS=1*)
+ if test "${TCL_THREADS}" = "0"; then
+ { echo "$as_me:$LINENO: WARNING:
+ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+ that IS thread-enabled. It is recommended to use --enable-threads." >&5
+echo "$as_me: WARNING:
+ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+ that IS thread-enabled. It is recommended to use --enable-threads." >&2;}
+ fi
+ ;;
+ *)
+ if test "${TCL_THREADS}" = "1"; then
+ { echo "$as_me:$LINENO: WARNING:
+ --enable-threads requested, but building against a Tcl that is NOT
+ thread-enabled. This is an OK configuration that will also run in
+ a thread-enabled core." >&5
+echo "$as_me: WARNING:
+ --enable-threads requested, but building against a Tcl that is NOT
+ thread-enabled. This is an OK configuration that will also run in
+ a thread-enabled core." >&2;}
+ fi
+ ;;
+ esac
+
+
+
+#--------------------------------------------------------------------
+# The statement below defines a collection of symbols related to
+# building as a shared library instead of a static library.
+#--------------------------------------------------------------------
+
+
+ echo "$as_me:$LINENO: checking how to build libraries" >&5
+echo $ECHO_N "checking how to build libraries... $ECHO_C" >&6
+ # Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ tcl_ok=$enableval
+else
+ tcl_ok=yes
+fi;
+
+ if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ tcl_ok=$enableval
+ else
+ tcl_ok=yes
+ fi
+
+ if test "$tcl_ok" = "yes" ; then
+ echo "$as_me:$LINENO: result: shared" >&5
+echo "${ECHO_T}shared" >&6
+ SHARED_BUILD=1
+ else
+ echo "$as_me:$LINENO: result: static" >&5
+echo "${ECHO_T}static" >&6
+ SHARED_BUILD=0
+
+cat >>confdefs.h <<\_ACEOF
+#define STATIC_BUILD 1
+_ACEOF
+
+ fi
+
+
+
+#--------------------------------------------------------------------
+# This macro figures out what flags to use with the compiler/linker
+# when building shared/static debug/optimized objects. This information
+# can be taken from the tclConfig.sh file, but this figures it all out.
+#--------------------------------------------------------------------
+
+
+
+
+ # Step 0.a: Enable 64 bit support?
+
+ echo "$as_me:$LINENO: checking if 64bit support is requested" >&5
+echo $ECHO_N "checking if 64bit support is requested... $ECHO_C" >&6
+ # Check whether --enable-64bit or --disable-64bit was given.
+if test "${enable_64bit+set}" = set; then
+ enableval="$enable_64bit"
+ do64bit=$enableval
+else
+ do64bit=no
+fi;
+ echo "$as_me:$LINENO: result: $do64bit" >&5
+echo "${ECHO_T}$do64bit" >&6
+
+ # Step 0.b: Enable Solaris 64 bit VIS support?
+
+ echo "$as_me:$LINENO: checking if 64bit Sparc VIS support is requested" >&5
+echo $ECHO_N "checking if 64bit Sparc VIS support is requested... $ECHO_C" >&6
+ # Check whether --enable-64bit-vis or --disable-64bit-vis was given.
+if test "${enable_64bit_vis+set}" = set; then
+ enableval="$enable_64bit_vis"
+ do64bitVIS=$enableval
+else
+ do64bitVIS=no
+fi;
+ echo "$as_me:$LINENO: result: $do64bitVIS" >&5
+echo "${ECHO_T}$do64bitVIS" >&6
+
+ if test "$do64bitVIS" = "yes"; then
+ # Force 64bit on with VIS
+ do64bit=yes
+ fi
+
+ # Step 0.c: Cross-compiling options for Windows/CE builds?
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ echo "$as_me:$LINENO: checking if Windows/CE build is requested" >&5
+echo $ECHO_N "checking if Windows/CE build is requested... $ECHO_C" >&6
+ # Check whether --enable-wince or --disable-wince was given.
+if test "${enable_wince+set}" = set; then
+ enableval="$enable_wince"
+ doWince=$enableval
+else
+ doWince=no
+fi;
+ echo "$as_me:$LINENO: result: $doWince" >&5
+echo "${ECHO_T}$doWince" >&6
+ fi
+
+ # Step 1: set the variable "system" to hold the name and version number
+ # for the system.
+
+
+ echo "$as_me:$LINENO: checking system version" >&5
+echo $ECHO_N "checking system version... $ECHO_C" >&6
+if test "${tcl_cv_sys_version+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ tcl_cv_sys_version=windows
+ elif test -f /usr/lib/NextStep/software_version; then
+ tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
+ else
+ tcl_cv_sys_version=`uname -s`-`uname -r`
+ if test "$?" -ne 0 ; then
+ { echo "$as_me:$LINENO: WARNING: can't find uname command" >&5
+echo "$as_me: WARNING: can't find uname command" >&2;}
+ tcl_cv_sys_version=unknown
+ else
+ # Special check for weird MP-RAS system (uname returns weird
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+ tcl_cv_sys_version=MP-RAS-`awk '{print $3}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+ fi
+ fi
+ fi
+
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_sys_version" >&5
+echo "${ECHO_T}$tcl_cv_sys_version" >&6
+ system=$tcl_cv_sys_version
+
+
+ # Step 2: check for existence of -ldl library. This is needed because
+ # Linux can use either -ldl or -ldld for dynamic loading.
+
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ have_dl=yes
+else
+ have_dl=no
+fi
+
+
+ # Require ranlib early so we can override it in special cases below.
+
+
+
+ # Step 3: set configuration options based on system name and version.
+ # This is similar to Tcl's unix/tcl.m4 except that we've added a
+ # "windows" case.
+
+ do64bit_ok=no
+ LDFLAGS_ORIG="$LDFLAGS"
+ # When ld needs options to work in 64-bit mode, put them in
+ # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+ # is disabled by the user. [Bug 1016796]
+ LDFLAGS_ARCH=""
+ TCL_EXPORT_FILE_SUFFIX=""
+ UNSHARED_LIB_SUFFIX=""
+ TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+ ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+ TCL_LIB_VERSIONS_OK=ok
+ CFLAGS_DEBUG=-g
+ CFLAGS_OPTIMIZE=-O
+ if test "$GCC" = "yes" ; then
+ CFLAGS_OPTIMIZE=-O2
+ CFLAGS_WARNING="-Wall -Wno-implicit-int"
+ else
+ CFLAGS_WARNING=""
+ fi
+ TCL_NEEDS_EXP_FILE=0
+ TCL_BUILD_EXP_FILE=""
+ TCL_EXP_FILE=""
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STLIB_LD='${AR} cr'
+ LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+ case $system in
+ windows)
+ # This is a 2-stage check to make sure we have the 64-bit SDK
+ # We have to know where the SDK is installed.
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
+ if test "x${MSSDK}x" = "xx" ; then
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
+ fi
+ MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ { echo "$as_me:$LINENO: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&5
+echo "$as_me: WARNING: Could not find 64-bit $MACHINE SDK to enable 64bit mode" >&2;}
+ { echo "$as_me:$LINENO: WARNING: Ensure latest Platform SDK is installed" >&5
+echo "$as_me: WARNING: Ensure latest Platform SDK is installed" >&2;}
+ do64bit="no"
+ else
+ echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
+echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
+ do64bit_ok="yes"
+ fi
+ fi
+
+ if test "$doWince" != "no" ; then
+ if test "$do64bit" != "no" ; then
+ { { echo "$as_me:$LINENO: error: Windows/CE and 64-bit builds incompatible" >&5
+echo "$as_me: error: Windows/CE and 64-bit builds incompatible" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test "$GCC" = "yes" ; then
+ { { echo "$as_me:$LINENO: error: Windows/CE and GCC builds incompatible" >&5
+echo "$as_me: error: Windows/CE and GCC builds incompatible" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-celib
+
+ if test x"${no_celib}" = x ; then
+ # we reset no_celib in case something fails here
+ no_celib=true
+
+# Check whether --with-celib or --without-celib was given.
+if test "${with_celib+set}" = set; then
+ withval="$with_celib"
+ with_celibconfig=${withval}
+fi;
+ echo "$as_me:$LINENO: checking for Windows/CE celib directory" >&5
+echo $ECHO_N "checking for Windows/CE celib directory... $ECHO_C" >&6
+ if test "${ac_cv_c_celibconfig+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ # First check to see if --with-celibconfig was specified.
+ if test x"${with_celibconfig}" != x ; then
+ if test -d "${with_celibconfig}/inc" ; then
+ ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
+ else
+ { { echo "$as_me:$LINENO: error: ${with_celibconfig} directory doesn't contain inc directory" >&5
+echo "$as_me: error: ${with_celibconfig} directory doesn't contain inc directory" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+ # then check for a celib library
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ for i in \
+ ../celib-palm-3.0 \
+ ../celib \
+ ../../celib-palm-3.0 \
+ ../../celib \
+ `ls -dr ../celib-*3.[0-9]* 2>/dev/null` \
+ ${srcdir}/../celib-palm-3.0 \
+ ${srcdir}/../celib \
+ `ls -dr ${srcdir}/../celib-*3.[0-9]* 2>/dev/null` \
+ ; do
+ if test -d "$i/inc" ; then
+ ac_cv_c_celibconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+fi
+
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ { { echo "$as_me:$LINENO: error: Cannot find celib support library directory" >&5
+echo "$as_me: error: Cannot find celib support library directory" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ no_celib=
+ CELIB_DIR=${ac_cv_c_celibconfig}
+ CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+ echo "$as_me:$LINENO: result: found $CELIB_DIR" >&5
+echo "${ECHO_T}found $CELIB_DIR" >&6
+ fi
+ fi
+
+ # Set defaults for common evc4/PPC2003 setup
+ # Currently Tcl requires 300+, possibly 420+ for sockets
+ CEVERSION=420; # could be 211 300 301 400 420 ...
+ TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
+ ARCH=ARM; # could be ARM MIPS X86EM ...
+ PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
+ if test "$doWince" != "yes"; then
+ # If !yes then the user specified something
+ # Reset ARCH to allow user to skip specifying it
+ ARCH=
+ eval `echo $doWince | awk -F, '{ \
+ if (length($1)) { printf "CEVERSION=\"%s\"\n", $1; \
+ if ($1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
+ if (length($2)) { printf "TARGETCPU=\"%s\"\n", toupper($2) }; \
+ if (length($3)) { printf "ARCH=\"%s\"\n", toupper($3) }; \
+ if (length($4)) { printf "PLATFORM=\"%s\"\n", $4 }; \
+ }'`
+ if test "x${ARCH}" = "x" ; then
+ ARCH=$TARGETCPU;
+ fi
+ fi
+ OSVERSION=WCE$CEVERSION;
+ if test "x${WCEROOT}" = "x" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
+ if test ! -d "${WCEROOT}" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
+ fi
+ fi
+ if test "x${SDKROOT}" = "x" ; then
+ SDKROOT="C:/Program Files/Windows CE Tools"
+ if test ! -d "${SDKROOT}" ; then
+ SDKROOT="C:/Windows CE Tools"
+ fi
+ fi
+ WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+ SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+ if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+ { { echo "$as_me:$LINENO: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&5
+echo "$as_me: error: could not find PocketPC SDK or target compiler to enable WinCE mode $CEVERSION,$TARGETCPU,$ARCH,$PLATFORM" >&2;}
+ { (exit 1); exit 1; }; }
+ doWince="no"
+ else
+ # We could PATH_NOSPACE these, but that's not important,
+ # as long as we quote them when used.
+ CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
+ if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
+ CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
+ fi
+ CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
+ fi
+ fi
+
+ if test "$GCC" != "yes" ; then
+ if test "${SHARED_BUILD}" = "0" ; then
+ runtime=-MT
+ else
+ runtime=-MD
+ fi
+
+ if test "$do64bit" != "no" ; then
+ # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ CC="\"${PATH64}/cl.exe\""
+ CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+ RC="\"${MSSDK}/bin/rc.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
+ CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ # Avoid 'unresolved external symbol __security_cookie'
+ # errors, c.f. http://support.microsoft.com/?id=894573
+
+ vars="bufferoverflowU.lib"
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([^-].*\)\.lib$/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+
+
+ elif test "$doWince" != "no" ; then
+ CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
+ if test "${TARGETCPU}" = "X86"; then
+ CC="\"${CEBINROOT}/cl.exe\""
+ else
+ CC="\"${CEBINROOT}/cl${ARCH}.exe\""
+ fi
+ CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
+ RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
+ arch=`echo ${ARCH} | awk '{print tolower($0)}'`
+ defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
+ if test "${SHARED_BUILD}" = "1" ; then
+ # Static CE builds require static celib as well
+ defs="${defs} _DLL"
+ fi
+ for i in $defs ; do
+
+cat >>confdefs.h <<_ACEOF
+#define $i 1
+_ACEOF
+
+ done
+
+cat >>confdefs.h <<_ACEOF
+#define _WIN32_WCE $CEVERSION
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define UNDER_CE $CEVERSION
+_ACEOF
+
+ CFLAGS_DEBUG="-nologo -Zi -Od"
+ CFLAGS_OPTIMIZE="-nologo -Ox"
+ lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
+ lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
+ LINKBIN="\"${CEBINROOT}/link.exe\""
+
+ else
+ RC="rc"
+ lflags="-nologo"
+ LINKBIN="link"
+ CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ fi
+ fi
+
+ if test "$GCC" = "yes"; then
+ # mingw gcc mode
+ RC="windres"
+ CFLAGS_DEBUG="-g"
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ SHLIB_LD="$CC -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+ else
+ SHLIB_LD="${LINKBIN} -dll ${lflags}"
+ # link -lib only works when -lib is the first arg
+ STLIB_LD="${LINKBIN} -lib ${lflags}"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
+ PATHTYPE=-w
+ # For information on what debugtype is most useful, see:
+ # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+ # This essentially turns it all on.
+ LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
+ LDFLAGS_OPTIMIZE="-release"
+ if test "$doWince" != "no" ; then
+ LDFLAGS_CONSOLE="-link ${lflags}"
+ LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
+ else
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ fi
+ fi
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+ TCL_LIB_VERSIONS_OK=nodots
+ # Bogus to avoid getting this turned off
+ DL_OBJS="tclLoadNone.obj"
+ ;;
+ AIX-*)
+ if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
+ # AIX requires the _r compiler when gcc isn't being used
+ case "${CC}" in
+ *_r)
+ # ok ...
+ ;;
+ *)
+ CC=${CC}_r
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: Using $CC for compiling with threads" >&5
+echo "${ECHO_T}Using $CC for compiling with threads" >&6
+ fi
+ LIBS="$LIBS -lc"
+ SHLIB_CFLAGS=""
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+ # Check to enable 64-bit flags for compiler/linker on AIX 4+
+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -q64"
+ LDFLAGS_ARCH="-q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+ fi
+ fi
+
+ if test "`uname -m`" = "ia64" ; then
+ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ # AIX-5 has dl* in libc.so
+ DL_LIBS=""
+ if test "$GCC" = "yes" ; then
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ fi
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ else
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ else
+ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
+ fi
+ SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
+ fi
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+ case $LIBOBJS in
+ "tclLoadAix.$ac_objext" | \
+ *" tclLoadAix.$ac_objext" | \
+ "tclLoadAix.$ac_objext "* | \
+ *" tclLoadAix.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS tclLoadAix.$ac_objext" ;;
+esac
+
+ DL_LIBS="-lld"
+ fi
+
+ # On AIX <=v4 systems, libbsd.a has to be linked in to support
+ # non-blocking file IO. This library has to be linked in after
+ # the MATH_LIBS or it breaks the pow() function. The way to
+ # insure proper sequencing, is to add it to the tail of MATH_LIBS.
+ # This library also supplies gettimeofday.
+ #
+ # AIX does not have a timezone field in struct tm. When the AIX
+ # bsd library is used, the timezone global and the gettimeofday
+ # methods are to be avoided for timezone deduction instead, we
+ # deduce the timezone by comparing the localtime result on a
+ # known GMT value.
+
+ echo "$as_me:$LINENO: checking for gettimeofday in -lbsd" >&5
+echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
+if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char gettimeofday ();
+int
+main ()
+{
+gettimeofday ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gettimeofday=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bsd_gettimeofday=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gettimeofday" >&5
+echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
+if test $ac_cv_lib_bsd_gettimeofday = yes; then
+ libbsd=yes
+else
+ libbsd=no
+fi
+
+ if test $libbsd = yes; then
+ MATH_LIBS="$MATH_LIBS -lbsd"
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_DELTA_FOR_TZ 1
+_ACEOF
+
+ fi
+ ;;
+ BeOS*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -nostart"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+
+ #-----------------------------------------------------------
+ # Check for inet_ntoa in -lbind, for BeOS (which also needs
+ # -lsocket, even if the network functions are in -lnet which
+ # is always linked to, for compatibility.
+ #-----------------------------------------------------------
+ echo "$as_me:$LINENO: checking for inet_ntoa in -lbind" >&5
+echo $ECHO_N "checking for inet_ntoa in -lbind... $ECHO_C" >&6
+if test "${ac_cv_lib_bind_inet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbind $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char inet_ntoa ();
+int
+main ()
+{
+inet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bind_inet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_bind_inet_ntoa=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_bind_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_bind_inet_ntoa" >&6
+if test $ac_cv_lib_bind_inet_ntoa = yes; then
+ LIBS="$LIBS -lbind -lsocket"
+fi
+
+ ;;
+ BSD/OS-2.1*|BSD/OS-3*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="shlicc -r"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ BSD/OS-4.*)
+ SHLIB_CFLAGS="-export-dynamic -fPIC"
+ SHLIB_LD="cc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ HP-UX-*.11.*)
+ # Use updated header definitions where possible
+
+cat >>confdefs.h <<\_ACEOF
+#define _XOPEN_SOURCE_EXTENDED 1
+_ACEOF
+
+ # Needed by Tcl, but not most extensions
+ #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+ #LIBS="$LIBS -lxnet" # Use the XOPEN network library
+
+ SHLIB_SUFFIX=".sl"
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ fi
+
+ # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+ #CFLAGS="$CFLAGS +DAportable"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ hpux_arch=`${CC} -dumpmachine`
+ case $hpux_arch in
+ hppa64*)
+ # 64-bit gcc in use. Fix flags for GNU ld.
+ do64bit_ok=yes
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+ ;;
+ esac
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS +DD64"
+ LDFLAGS_ARCH="+DD64"
+ fi
+ fi
+ ;;
+ HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ SHLIB_SUFFIX=".sl"
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ tcl_ok=yes
+else
+ tcl_ok=no
+fi
+
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS=""
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ ;;
+ IRIX-5.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ ;;
+ IRIX-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mabi=n32"
+ LDFLAGS="$LDFLAGS -mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+ # Use to build 6.2 compatible binaries on 6.3.
+ CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -n32"
+ ;;
+ esac
+ LDFLAGS="$LDFLAGS -n32"
+ fi
+ ;;
+ IRIX64-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+
+ # Check to enable 64-bit flags for compiler/linker
+
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported by gcc" >&5
+echo "$as_me: WARNING: 64bit mode not supported by gcc" >&2;}
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS_ARCH="-64"
+ fi
+ fi
+ ;;
+ Linux*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
+ # when you inline the string and math operations. Turn this off to
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+
+ # The combo of gcc + glibc has a bug related
+ # to inlining of functions like strtod(). The
+ # -fno-builtin flag should address this problem
+ # but it does not work. The -fno-inline flag
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+ if test x"${USE_COMPAT}" != x ; then
+ CFLAGS="$CFLAGS -fno-inline"
+ fi
+
+ ;;
+ GNU*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+ ;;
+ Lynx*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ CFLAGS_OPTIMIZE=-02
+ SHLIB_LD="${CC} -shared "
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-mshared -ldl"
+ LD_FLAGS="-Wl,--export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
+ MP-RAS-02*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ MP-RAS-*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ NetBSD-*|FreeBSD-[1-2].*)
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+if test "${tcl_cv_ld_elf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ tcl_cv_ld_elf=yes
+else
+ tcl_cv_ld_elf=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
+echo "${ECHO_T}$tcl_cv_ld_elf" >&6
+ if test $tcl_cv_ld_elf = yes; then
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ else
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ fi
+
+ # Ancient FreeBSD doesn't handle version numbers with dots.
+
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ OpenBSD-*)
+ # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
+ case `machine` in
+ sparc|sparc64)
+ SHLIB_CFLAGS="-fPIC";;
+ *)
+ SHLIB_CFLAGS="-fpic";;
+ esac
+ SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ echo "$as_me:$LINENO: checking for ELF" >&5
+echo $ECHO_N "checking for ELF... $ECHO_C" >&6
+if test "${tcl_cv_ld_elf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef __ELF__
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ tcl_cv_ld_elf=yes
+else
+ tcl_cv_ld_elf=no
+fi
+rm -f conftest*
+
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_elf" >&5
+echo "${ECHO_T}$tcl_cv_ld_elf" >&6
+ if test $tcl_cv_ld_elf = yes; then
+ LDFLAGS=-Wl,-export-dynamic
+ else
+ LDFLAGS=""
+ fi
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ esac
+ ;;
+ Darwin-*)
+ CFLAGS_OPTIMIZE="-Os"
+ SHLIB_CFLAGS="-fno-common"
+ if test $do64bit = yes; then
+ do64bit_ok=yes
+ case `arch` in
+ ppc)
+ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5";;
+ i386)
+ CFLAGS="$CFLAGS -arch x86_64";;
+ *)
+ { echo "$as_me:$LINENO: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&5
+echo "$as_me: WARNING: Don't know how enable 64-bit on architecture \`arch\`" >&2;}
+ do64bit_ok=no;;
+ esac
+ else
+ # Check for combined 32-bit and 64-bit fat build
+ echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
+ echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
+ fat_32_64=yes
+ fi
+ # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
+ SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+ echo "$as_me:$LINENO: checking if ld accepts -single_module flag" >&5
+echo $ECHO_N "checking if ld accepts -single_module flag... $ECHO_C" >&6
+if test "${tcl_cv_ld_single_module+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_ld_single_module=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_ld_single_module=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$hold_ldflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_single_module" >&5
+echo "${ECHO_T}$tcl_cv_ld_single_module" >&6
+ if test $tcl_cv_ld_single_module = yes; then
+ SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+ fi
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dylib"
+ DL_OBJS="tclLoadDyld.o"
+ DL_LIBS=""
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int($2)}'`" -lt 4 -a \
+ "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int($2)}'`" -lt 4 && \
+ LDFLAGS="$LDFLAGS -prebind"
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+ echo "$as_me:$LINENO: checking if ld accepts -search_paths_first flag" >&5
+echo $ECHO_N "checking if ld accepts -search_paths_first flag... $ECHO_C" >&6
+if test "${tcl_cv_ld_search_paths_first+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_ld_search_paths_first=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_ld_search_paths_first=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$hold_ldflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_search_paths_first" >&5
+echo "${ECHO_T}$tcl_cv_ld_search_paths_first" >&6
+ if test $tcl_cv_ld_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+
+ # TEA specific: for Tk extensions, remove 64-bit arch flags from
+ # CFLAGS for combined 32-bit and 64-bit fat builds as neither TkAqua
+ # nor TkX11 can be built for 64-bit at present.
+ test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}" && \
+ CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`"
+ ;;
+ NEXTSTEP-*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="cc -nostdlib -r"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OS/390-*)
+ CFLAGS_OPTIMIZE="" # Optimizer is buggy
+
+cat >>confdefs.h <<\_ACEOF
+#define _OE_SOCKETS 1
+_ACEOF
+
+ ;;
+ OSF1-1.0|OSF1-1.1|OSF1-1.2)
+ # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
+ SHLIB_CFLAGS=""
+ # Hack: make package name same as library name
+ SHLIB_LD='ld -R -export :'
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadOSF.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-1.*)
+ # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
+ SHLIB_CFLAGS="-fPIC"
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD="ld -shared"
+ else
+ SHLIB_LD="ld -non_shared"
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-V*)
+ # Digital OSF/1
+ SHLIB_CFLAGS=""
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
+ else
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mieee"
+ else
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+ fi
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ fi
+
+ ;;
+ QNX-6*)
+ # QNX RTP
+ # This may work for all QNX, but it was only reported for v6.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ SCO_SV-3.2*)
+ # Note, dlopen is available only on SCO 3.2.5 and greater. However,
+ # this test works, since "uname -s" was non-standard in 3.2.4 and
+ # below.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ SINIX*5.4*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ SunOS-4*)
+ SHLIB_CFLAGS="-PIC"
+ SHLIB_LD="ld"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+ # SunOS can't handle version numbers with dots in them in library
+ # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
+ # requires an extra version number at the end of .so file names.
+ # So, the library has to have a name like libtcl75.so.1.0
+
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ SunOS-5.[0-6])
+ # Careful to not let 5.10+ fall into this case
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Note: need the LIBS below, otherwise Tk won't find Tcl's
+ # symbols when dynamically loaded into tclsh.
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ fi
+ ;;
+ SunOS-5*)
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _REENTRANT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$GCC" = "yes" ; then
+ if test "`gcc -dumpversion | awk -F. '{print $1}'`" -lt "3" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC < 3.2 on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ else
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ CFLAGS="$CFLAGS -xarch=v9a"
+ LDFLAGS_ARCH="-xarch=v9a"
+ else
+ CFLAGS="$CFLAGS -xarch=v9"
+ LDFLAGS_ARCH="-xarch=v9"
+ fi
+ # Solaris 64 uses this as well
+ #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+ fi
+ elif test "$arch" = "amd64 i386" ; then
+ if test "$GCC" = "yes" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported with GCC on $system" >&5
+echo "$as_me: WARNING: 64bit mode not supported with GCC on $system" >&2;}
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -xarch=amd64"
+ LDFLAGS="$LDFLAGS -xarch=amd64"
+ fi
+ else
+ { echo "$as_me:$LINENO: WARNING: 64bit mode not supported for $arch" >&5
+echo "$as_me: WARNING: 64bit mode not supported for $arch" >&2;}
+ fi
+ fi
+
+ # Note: need the LIBS below, otherwise Tk won't find Tcl's
+ # symbols when dynamically loaded into tclsh.
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "$do64bit_ok" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ # JH: static-libgcc is necessary for core Tcl, but may
+ # not be necessary for extensions.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
+ ;;
+ UNIX_SV* | UnixWare-5*)
+ SHLIB_CFLAGS="-KPIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+ # that don't grok the -Bexport option. Test that it does.
+ echo "$as_me:$LINENO: checking for ld accepts -Bexport flag" >&5
+echo $ECHO_N "checking for ld accepts -Bexport flag... $ECHO_C" >&6
+if test "${tcl_cv_ld_Bexport+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_ld_Bexport=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_ld_Bexport=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$hold_ldflags
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_ld_Bexport" >&5
+echo "${ECHO_T}$tcl_cv_ld_Bexport" >&6
+ if test $tcl_cv_ld_Bexport = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ fi
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ esac
+
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
+ { echo "$as_me:$LINENO: WARNING: 64bit support being disabled -- don't know magic for this platform" >&5
+echo "$as_me: WARNING: 64bit support being disabled -- don't know magic for this platform" >&2;}
+ fi
+
+ # Step 4: disable dynamic loading if requested via a command-line switch.
+
+ # Check whether --enable-load or --disable-load was given.
+if test "${enable_load+set}" = set; then
+ enableval="$enable_load"
+ tcl_ok=$enableval
+else
+ tcl_ok=yes
+fi;
+ if test "$tcl_ok" = "no"; then
+ DL_OBJS=""
+ fi
+
+ if test "x$DL_OBJS" != "x" ; then
+ BUILD_DLTEST="\$(DLTEST_TARGETS)"
+ else
+ echo "Can't figure out how to do dynamic loading or shared libraries"
+ echo "on this system."
+ SHLIB_CFLAGS=""
+ SHLIB_LD=""
+ SHLIB_SUFFIX=""
+ DL_OBJS="tclLoadNone.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS_ORIG"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ BUILD_DLTEST=""
+ fi
+ LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+ # If we're running gcc, then change the C flags for compiling shared
+ # libraries to the right flags for gcc, instead of those for the
+ # standard manufacturer compiler.
+
+ if test "$DL_OBJS" != "tclLoadNone.o" ; then
+ if test "$GCC" = "yes" ; then
+ case $system in
+ AIX-*)
+ ;;
+ BSD/OS*)
+ ;;
+ IRIX*)
+ ;;
+ NetBSD-*|FreeBSD-*)
+ ;;
+ Darwin-*)
+ ;;
+ SCO_SV-3.2*)
+ ;;
+ windows)
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ esac
+ fi
+ fi
+
+ if test "$SHARED_LIB_SUFFIX" = "" ; then
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+ fi
+ if test "$UNSHARED_LIB_SUFFIX" = "" ; then
+ UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # These must be called after we do the basic CFLAGS checks and
+ # verify any possible 64-bit or similar switches are necessary
+
+ echo "$as_me:$LINENO: checking for required early compiler flags" >&5
+echo $ECHO_N "checking for required early compiler flags... $ECHO_C" >&6
+ tcl_flags=""
+
+ if test "${tcl_cv_flag__isoc99_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__isoc99_source=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _ISOC99_SOURCE 1
+#include <stdlib.h>
+int
+main ()
+{
+char *p = (char *)strtoll; char *q = (char *)strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__isoc99_source=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__isoc99_source=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__isoc99_source}" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _ISOC99_SOURCE 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _ISOC99_SOURCE"
+ fi
+
+
+ if test "${tcl_cv_flag__largefile64_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile64_source=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGEFILE64_SOURCE 1
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 buf; int i = stat64("/", &buf);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile64_source=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__largefile64_source=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__largefile64_source}" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _LARGEFILE64_SOURCE 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _LARGEFILE64_SOURCE"
+ fi
+
+
+ if test "${tcl_cv_flag__largefile_source64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile_source64=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE64 1
+#include <sys/stat.h>
+int
+main ()
+{
+char *p = (char *)open64;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_flag__largefile_source64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_flag__largefile_source64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _LARGEFILE_SOURCE64 1
+_ACEOF
+
+ tcl_flags="$tcl_flags _LARGEFILE_SOURCE64"
+ fi
+
+ if test "x${tcl_flags}" = "x" ; then
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+ else
+ echo "$as_me:$LINENO: result: ${tcl_flags}" >&5
+echo "${ECHO_T}${tcl_flags}" >&6
+ fi
+
+
+ echo "$as_me:$LINENO: checking for 64-bit integer type" >&5
+echo $ECHO_N "checking for 64-bit integer type... $ECHO_C" >&6
+ if test "${tcl_cv_type_64bit+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+__int64 value = (__int64) 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_type_64bit=__int64
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_type_64bit="long long"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+switch (0) {
+ case 1: case (sizeof(${tcl_type_64bit})==sizeof(long)): ;
+ }
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_type_64bit=${tcl_type_64bit}
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "${tcl_cv_type_64bit}" = none ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_WIDE_INT_IS_LONG 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: using long" >&5
+echo "${ECHO_T}using long" >&6
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
+ # We actually want to use the default tcl.h checks in this
+ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+ echo "$as_me:$LINENO: result: using Tcl header defaults" >&5
+echo "${ECHO_T}using Tcl header defaults" >&6
+ else
+
+cat >>confdefs.h <<_ACEOF
+#define TCL_WIDE_INT_TYPE ${tcl_cv_type_64bit}
+_ACEOF
+
+ echo "$as_me:$LINENO: result: ${tcl_cv_type_64bit}" >&5
+echo "${ECHO_T}${tcl_cv_type_64bit}" >&6
+
+ # Now check for auxiliary declarations
+ echo "$as_me:$LINENO: checking for struct dirent64" >&5
+echo $ECHO_N "checking for struct dirent64... $ECHO_C" >&6
+if test "${tcl_cv_struct_dirent64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/dirent.h>
+int
+main ()
+{
+struct dirent64 p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_struct_dirent64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_struct_dirent64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_struct_dirent64" >&5
+echo "${ECHO_T}$tcl_cv_struct_dirent64" >&6
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT64 1
+_ACEOF
+
+ fi
+
+ echo "$as_me:$LINENO: checking for struct stat64" >&5
+echo $ECHO_N "checking for struct stat64... $ECHO_C" >&6
+if test "${tcl_cv_struct_stat64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+int
+main ()
+{
+struct stat64 p;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_struct_stat64=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_struct_stat64=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $tcl_cv_struct_stat64" >&5
+echo "${ECHO_T}$tcl_cv_struct_stat64" >&6
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_STAT64 1
+_ACEOF
+
+ fi
+
+
+
+for ac_func in open64 lseek64
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ echo "$as_me:$LINENO: checking for off64_t" >&5
+echo $ECHO_N "checking for off64_t... $ECHO_C" >&6
+ if test "${tcl_cv_type_off64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+off64_t offset;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ tcl_cv_type_off64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+tcl_cv_type_off64_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+ test "x${ac_cv_func_lseek64}" = "xyes" && \
+ test "x${ac_cv_func_open64}" = "xyes" ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPE_OFF64_T 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ fi
+
+
+
+#--------------------------------------------------------------------
+# Set the default compiler switches based on the --enable-symbols
+# option.
+#--------------------------------------------------------------------
+
+
+
+ echo "$as_me:$LINENO: checking for build with symbols" >&5
+echo $ECHO_N "checking for build with symbols... $ECHO_C" >&6
+ # Check whether --enable-symbols or --disable-symbols was given.
+if test "${enable_symbols+set}" = set; then
+ enableval="$enable_symbols"
+ tcl_ok=$enableval
+else
+ tcl_ok=no
+fi;
+ DBGX=""
+ if test "$tcl_ok" = "no"; then
+ CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
+ LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ else
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ if test "$tcl_ok" = "yes"; then
+ echo "$as_me:$LINENO: result: yes (standard debugging)" >&5
+echo "${ECHO_T}yes (standard debugging)" >&6
+ fi
+ fi
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ LDFLAGS_DEFAULT="${LDFLAGS}"
+ fi
+
+
+
+
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TCL_MEM_DEBUG 1
+_ACEOF
+
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ echo "$as_me:$LINENO: result: enabled symbols mem debugging" >&5
+echo "${ECHO_T}enabled symbols mem debugging" >&6
+ else
+ echo "$as_me:$LINENO: result: enabled $tcl_ok debugging" >&5
+echo "${ECHO_T}enabled $tcl_ok debugging" >&6
+ fi
+ fi
+
+
+#--------------------------------------------------------------------
+# Everyone should be linking against the Tcl stub library. If you
+# can't for some reason, remove this definition. If you aren't using
+# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
+# link against the non-stubbed Tcl library.
+#--------------------------------------------------------------------
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_TCL_STUBS 1
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_TK_STUBS 1
+_ACEOF
+
+
+#--------------------------------------------------------------------
+# This macro generates a line to use when building a library. It
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
+#--------------------------------------------------------------------
+
+
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
+ MAKE_STATIC_LIB="\${STLIB_LD} -out:\$@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\$@ \$(PKG_OBJECTS)"
+ MAKE_STUB_LIB="\${STLIB_LD} -out:\$@ \$(PKG_STUB_OBJECTS)"
+ else
+ MAKE_STATIC_LIB="\${STLIB_LD} \$@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \$@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
+ MAKE_STUB_LIB="\${STLIB_LD} \$@ \$(PKG_STUB_OBJECTS)"
+ fi
+
+ if test "${SHARED_BUILD}" = "1" ; then
+ MAKE_LIB="${MAKE_SHARED_LIB} "
+ else
+ MAKE_LIB="${MAKE_STATIC_LIB} "
+ fi
+
+ #--------------------------------------------------------------------
+ # Shared libraries and static libraries have different names.
+ # Use the double eval to make sure any variables in the suffix is
+ # substituted. (@@@ Might not be necessary anymore)
+ #--------------------------------------------------------------------
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ if test "${SHARED_BUILD}" = "1" ; then
+ # We force the unresolved linking of symbols that are really in
+ # the private libraries of Tcl and Tk.
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+ fi
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ else
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build their own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ if test "$GCC" = "yes"; then
+ PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+ fi
+ # These aren't needed on Windows (either MSVC or gcc)
+ RANLIB=:
+ RANLIB_STUB=:
+ else
+ RANLIB_STUB="${RANLIB}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ fi
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ RANLIB=:
+ else
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build their own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ fi
+
+ # These are escaped so that only CFLAGS is picked up at configure time.
+ # The other values will be substituted at make time.
+ CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
+ fi
+
+
+
+
+
+
+
+
+#--------------------------------------------------------------------
+# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
+# file during the install process. Don't run the TCLSH_PROG through
+# ${CYGPATH} because it's being used directly by make.
+# Require that we use a tclsh shell version 8.2 or later since earlier
+# versions have bugs in the pkg_mkIndex routine.
+#--------------------------------------------------------------------
+
+
+ echo "$as_me:$LINENO: checking for tclsh" >&5
+echo $ECHO_N "checking for tclsh... $ECHO_C" >&6
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ # tclConfig.sh is in Tcl build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+ fi
+ else
+ # tclConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+ fi
+ list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${TCLSH_PROG}" ; then
+ REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
+ fi
+ echo "$as_me:$LINENO: result: ${TCLSH_PROG}" >&5
+echo "${ECHO_T}${TCLSH_PROG}" >&6
+
+
+
+ echo "$as_me:$LINENO: checking for wish" >&5
+echo $ECHO_N "checking for wish... $ECHO_C" >&6
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
+ # tkConfig.sh is in Tk build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+ else
+ WISH_PROG="${TK_BIN_DIR}/wish"
+ fi
+ else
+ # tkConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+ else
+ WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+ fi
+ list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
+ `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
+ `ls -d ${TK_PREFIX}/bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${WISH_PROG}" ; then
+ REAL_TK_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}"
+ fi
+ echo "$as_me:$LINENO: result: ${WISH_PROG}" >&5
+echo "${ECHO_T}${WISH_PROG}" >&6
+
+
+
+#--------------------------------------------------------------------
+# Finally, substitute all of the various values into the Makefile.
+#--------------------------------------------------------------------
+
+ ac_config_files="$ac_config_files Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+# Transform confdefs.h into DEFS.
+# Protect against shell expansion while executing Makefile rules.
+# Protect against Makefile macro expansion.
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
+
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by Tix $as_me 8.4.2, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf at gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+Tix config.status 8.4.2
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at CYGPATH@,$CYGPATH,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at PKG_LIB_FILE@,$PKG_LIB_FILE,;t t
+s, at PKG_STUB_LIB_FILE@,$PKG_STUB_LIB_FILE,;t t
+s, at PKG_STUB_SOURCES@,$PKG_STUB_SOURCES,;t t
+s, at PKG_STUB_OBJECTS@,$PKG_STUB_OBJECTS,;t t
+s, at PKG_TCL_SOURCES@,$PKG_TCL_SOURCES,;t t
+s, at PKG_HEADERS@,$PKG_HEADERS,;t t
+s, at PKG_INCLUDES@,$PKG_INCLUDES,;t t
+s, at PKG_LIBS@,$PKG_LIBS,;t t
+s, at PKG_CFLAGS@,$PKG_CFLAGS,;t t
+s, at TCL_VERSION@,$TCL_VERSION,;t t
+s, at TCL_BIN_DIR@,$TCL_BIN_DIR,;t t
+s, at TCL_SRC_DIR@,$TCL_SRC_DIR,;t t
+s, at TCL_LIB_FILE@,$TCL_LIB_FILE,;t t
+s, at TCL_LIB_FLAG@,$TCL_LIB_FLAG,;t t
+s, at TCL_LIB_SPEC@,$TCL_LIB_SPEC,;t t
+s, at TCL_STUB_LIB_FILE@,$TCL_STUB_LIB_FILE,;t t
+s, at TCL_STUB_LIB_FLAG@,$TCL_STUB_LIB_FLAG,;t t
+s, at TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t
+s, at TCL_LIBS@,$TCL_LIBS,;t t
+s, at TCL_DEFS@,$TCL_DEFS,;t t
+s, at TCL_EXTRA_CFLAGS@,$TCL_EXTRA_CFLAGS,;t t
+s, at TCL_LD_FLAGS@,$TCL_LD_FLAGS,;t t
+s, at TCL_SHLIB_LD_LIBS@,$TCL_SHLIB_LD_LIBS,;t t
+s, at TK_VERSION@,$TK_VERSION,;t t
+s, at TK_BIN_DIR@,$TK_BIN_DIR,;t t
+s, at TK_SRC_DIR@,$TK_SRC_DIR,;t t
+s, at TK_LIB_FILE@,$TK_LIB_FILE,;t t
+s, at TK_LIB_FLAG@,$TK_LIB_FLAG,;t t
+s, at TK_LIB_SPEC@,$TK_LIB_SPEC,;t t
+s, at TK_STUB_LIB_FILE@,$TK_STUB_LIB_FILE,;t t
+s, at TK_STUB_LIB_FLAG@,$TK_STUB_LIB_FLAG,;t t
+s, at TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t
+s, at TK_LIBS@,$TK_LIBS,;t t
+s, at TK_XINCLUDES@,$TK_XINCLUDES,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at CPP@,$CPP,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at EGREP@,$EGREP,;t t
+s, at MATH_LIBS@,$MATH_LIBS,;t t
+s, at PKG_SOURCES@,$PKG_SOURCES,;t t
+s, at PKG_OBJECTS@,$PKG_OBJECTS,;t t
+s, at TCL_TOP_DIR_NATIVE@,$TCL_TOP_DIR_NATIVE,;t t
+s, at TCL_GENERIC_DIR_NATIVE@,$TCL_GENERIC_DIR_NATIVE,;t t
+s, at TCL_UNIX_DIR_NATIVE@,$TCL_UNIX_DIR_NATIVE,;t t
+s, at TCL_WIN_DIR_NATIVE@,$TCL_WIN_DIR_NATIVE,;t t
+s, at TCL_BMAP_DIR_NATIVE@,$TCL_BMAP_DIR_NATIVE,;t t
+s, at TCL_TOOL_DIR_NATIVE@,$TCL_TOOL_DIR_NATIVE,;t t
+s, at TCL_PLATFORM_DIR_NATIVE@,$TCL_PLATFORM_DIR_NATIVE,;t t
+s, at TCL_INCLUDES@,$TCL_INCLUDES,;t t
+s, at TK_TOP_DIR_NATIVE@,$TK_TOP_DIR_NATIVE,;t t
+s, at TK_UNIX_DIR_NATIVE@,$TK_UNIX_DIR_NATIVE,;t t
+s, at TK_WIN_DIR_NATIVE@,$TK_WIN_DIR_NATIVE,;t t
+s, at TK_GENERIC_DIR_NATIVE@,$TK_GENERIC_DIR_NATIVE,;t t
+s, at TK_XLIB_DIR_NATIVE@,$TK_XLIB_DIR_NATIVE,;t t
+s, at TK_PLATFORM_DIR_NATIVE@,$TK_PLATFORM_DIR_NATIVE,;t t
+s, at TK_INCLUDES@,$TK_INCLUDES,;t t
+s, at CLEANFILES@,$CLEANFILES,;t t
+s, at TCL_THREADS@,$TCL_THREADS,;t t
+s, at SHARED_BUILD@,$SHARED_BUILD,;t t
+s, at AR@,$AR,;t t
+s, at CELIB_DIR@,$CELIB_DIR,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at DL_LIBS@,$DL_LIBS,;t t
+s, at CFLAGS_DEBUG@,$CFLAGS_DEBUG,;t t
+s, at CFLAGS_OPTIMIZE@,$CFLAGS_OPTIMIZE,;t t
+s, at CFLAGS_WARNING@,$CFLAGS_WARNING,;t t
+s, at STLIB_LD@,$STLIB_LD,;t t
+s, at SHLIB_LD@,$SHLIB_LD,;t t
+s, at SHLIB_LD_LIBS@,$SHLIB_LD_LIBS,;t t
+s, at SHLIB_CFLAGS@,$SHLIB_CFLAGS,;t t
+s, at LD_LIBRARY_PATH_VAR@,$LD_LIBRARY_PATH_VAR,;t t
+s, at TCL_DBGX@,$TCL_DBGX,;t t
+s, at CFLAGS_DEFAULT@,$CFLAGS_DEFAULT,;t t
+s, at LDFLAGS_DEFAULT@,$LDFLAGS_DEFAULT,;t t
+s, at MAKE_LIB@,$MAKE_LIB,;t t
+s, at MAKE_SHARED_LIB@,$MAKE_SHARED_LIB,;t t
+s, at MAKE_STATIC_LIB@,$MAKE_STATIC_LIB,;t t
+s, at MAKE_STUB_LIB@,$MAKE_STUB_LIB,;t t
+s, at RANLIB_STUB@,$RANLIB_STUB,;t t
+s, at TCLSH_PROG@,$TCLSH_PROG,;t t
+s, at WISH_PROG@,$WISH_PROG,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ esac
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
Added: external/tix-8.4.2.x/configure.in
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/configure.in Tue Mar 18 19:38:59 2008
@@ -0,0 +1,205 @@
+#! /bin/bash -norc
+#
+# RCS: @(#) $Id: configure.in,v 1.6 2006/11/16 22:34:41 hobbs Exp $
+#
+#--------------------------------------------------------------------
+# Sample configure.in for Tcl Extensions. The only places you should
+# need to modify this file are marked by the string __CHANGE__
+#--------------------------------------------------------------------
+
+#-----------------------------------------------------------------------
+# __CHANGE__
+# Set your package name and version numbers here.
+#
+# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
+# set as provided. These will also be added as -D defs in your Makefile
+# so you can encode the package version directly into the source files.
+#-----------------------------------------------------------------------
+
+AC_INIT([Tix], [8.4.2])
+
+#--------------------------------------------------------------------
+# Call TEA_INIT as the first TEA_ macro to set up initial vars.
+# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
+# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
+#--------------------------------------------------------------------
+
+TEA_INIT([3.5])
+
+AC_CONFIG_AUX_DIR(tclconfig)
+
+#--------------------------------------------------------------------
+# Load the tclConfig.sh file
+#--------------------------------------------------------------------
+
+TEA_PATH_TCLCONFIG
+TEA_LOAD_TCLCONFIG
+
+#--------------------------------------------------------------------
+# Load the tkConfig.sh file if necessary (Tk extension)
+#--------------------------------------------------------------------
+
+TEA_PATH_TKCONFIG
+TEA_LOAD_TKCONFIG
+
+#-----------------------------------------------------------------------
+# Handle the --prefix=... option by defaulting to what Tcl gave.
+# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
+#-----------------------------------------------------------------------
+
+TEA_PREFIX
+
+#-----------------------------------------------------------------------
+# Standard compiler checks.
+# This sets up CC by using the CC env var, or looks for gcc otherwise.
+# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
+# the basic setup necessary to compile executables.
+#-----------------------------------------------------------------------
+
+TEA_SETUP_COMPILER
+
+#-----------------------------------------------------------------------
+# __CHANGE__
+# Specify the C source files to compile in TEA_ADD_SOURCES,
+# public headers that need to be installed in TEA_ADD_HEADERS,
+# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
+# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
+# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
+# and PKG_TCL_SOURCES.
+#-----------------------------------------------------------------------
+
+# core sources
+TEA_ADD_SOURCES([tixClass.c tixCmds.c tixCompat.c tixError.c tixGeometry.c
+ tixInit.c tixList.c tixMethod.c tixOption.c tixScroll.c
+ tixSmpLs.c tixUtils.c tixWidget.c])
+# ditem sources
+TEA_ADD_SOURCES([tixDItem.c tixDiITxt.c tixDiImg.c tixDiStyle.c tixDiText.c
+ tixDiWin.c])
+# manager sources
+TEA_ADD_SOURCES([tixForm.c tixFormMisc.c])
+# widget sources
+TEA_ADD_SOURCES([tixGrid.c tixGrData.c tixGrFmt.c tixGrRC.c tixGrSel.c
+ tixGrSort.c tixGrUtl.c tixHList.c tixHLCol.c tixHLInd.c
+ tixHLHdr.c tixNBFrame.c tixTList.c])
+# misc sources
+TEA_ADD_SOURCES([tixImgCmp.c tixImgXpm.c])
+
+TEA_ADD_HEADERS([])
+TEA_ADD_INCLUDES([-I. -I\"`${CYGPATH} ${srcdir}/generic`\"])
+TEA_ADD_CFLAGS([])
+TEA_ADD_STUB_SOURCES([])
+TEA_ADD_TCL_SOURCES([])
+
+#--------------------------------------------------------------------
+# __CHANGE__
+# Choose which headers you need. Extension authors should try very
+# hard to only rely on the Tcl public header files. Internal headers
+# contain private data structures and are subject to change without
+# notice.
+# This MUST be called after TEA_PATH_TCLCONFIG/TEA_LOAD_TCLCONFIG
+#--------------------------------------------------------------------
+
+# needed for tclPort.h and such ... can be corrected
+TEA_PRIVATE_TCL_HEADERS
+TEA_PRIVATE_TK_HEADERS
+
+#--------------------------------------------------------------------
+# For Unix/Tk builds, make sure that the X libraries/headers are found.
+#--------------------------------------------------------------------
+
+TEA_PATH_X
+
+#--------------------------------------------------------------------
+# __CHANGE__
+# A few miscellaneous platform-specific items:
+#
+# Define a special symbol for Windows (BUILD_tix in this case) so
+# that we create the export library with the dll.
+#
+# Windows creates a few extra files that need to be cleaned up.
+# You can add more files to clean if your extension creates any extra
+# files.
+#
+# TEA_ADD any extra compiler/build info here.
+#--------------------------------------------------------------------
+
+if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_DEFINE_UNQUOTED(BUILD_tix)
+ CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb *.pch"
+ TEA_ADD_LIBS([gdi32.lib user32.lib advapi32.lib comdlg32.lib])
+ TEA_ADD_SOURCES([tixWCmpt.c tixWinWm.c tixWinXpm.c tixWinDraw.c])
+ TEA_ADD_INCLUDES([-I. -I\"`${CYGPATH} ${srcdir}/win`\"])
+else
+ CLEANFILES="pkgIndex.tcl"
+ TEA_ADD_SOURCES([tixInputO.c tixUnixMwm.c])
+ TEA_ADD_SOURCES([tixUnixDraw.c tixUnixXpm.c tixUnixWm.c])
+ TEA_ADD_INCLUDES([-I. -I\"`${CYGPATH} ${srcdir}/unix`\"])
+fi
+if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TEA_ADD_INCLUDES([-I${TK_TOP_DIR_NATIVE}/macosx])
+fi
+AC_SUBST(CLEANFILES)
+
+#--------------------------------------------------------------------
+# Check whether --enable-threads or --disable-threads was given.
+# So far only Tcl responds to this one.
+#--------------------------------------------------------------------
+
+TEA_ENABLE_THREADS
+
+#--------------------------------------------------------------------
+# The statement below defines a collection of symbols related to
+# building as a shared library instead of a static library.
+#--------------------------------------------------------------------
+
+TEA_ENABLE_SHARED
+
+#--------------------------------------------------------------------
+# This macro figures out what flags to use with the compiler/linker
+# when building shared/static debug/optimized objects. This information
+# can be taken from the tclConfig.sh file, but this figures it all out.
+#--------------------------------------------------------------------
+
+TEA_CONFIG_CFLAGS
+
+#--------------------------------------------------------------------
+# Set the default compiler switches based on the --enable-symbols
+# option.
+#--------------------------------------------------------------------
+
+TEA_ENABLE_SYMBOLS
+
+#--------------------------------------------------------------------
+# Everyone should be linking against the Tcl stub library. If you
+# can't for some reason, remove this definition. If you aren't using
+# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
+# link against the non-stubbed Tcl library.
+#--------------------------------------------------------------------
+
+AC_DEFINE(USE_TCL_STUBS)
+AC_DEFINE(USE_TK_STUBS)
+
+#--------------------------------------------------------------------
+# This macro generates a line to use when building a library. It
+# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
+# and TEA_LOAD_TCLCONFIG macros above.
+#--------------------------------------------------------------------
+
+TEA_MAKE_LIB
+
+#--------------------------------------------------------------------
+# Find tclsh so that we can run pkg_mkIndex to generate the pkgIndex.tcl
+# file during the install process. Don't run the TCLSH_PROG through
+# ${CYGPATH} because it's being used directly by make.
+# Require that we use a tclsh shell version 8.2 or later since earlier
+# versions have bugs in the pkg_mkIndex routine.
+#--------------------------------------------------------------------
+
+TEA_PROG_TCLSH
+TEA_PROG_WISH
+
+#--------------------------------------------------------------------
+# Finally, substitute all of the various values into the Makefile.
+#--------------------------------------------------------------------
+
+AC_OUTPUT([Makefile])
Added: external/tix-8.4.2.x/demos/MkChoose.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/MkChoose.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,280 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: MkChoose.tcl,v 1.4 2004/03/28 02:44:56 hobbs Exp $
+#
+# MkChoose.tcl --
+#
+# This file implements the "Choosers" page in the widget demo
+#
+# This file has not been properly documented. It is NOT intended
+# to be used as an introductory demo program about Tix
+# programming. For such demos, please see the files in the
+# demos/samples directory or go to the "Samples" page in the
+# "widget demo"
+#
+#
+# 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.
+#
+
+proc MkChoosers {nb page} {
+ set w [$nb subwidget $page]
+
+ set name [tixOptionName $w]
+ option add *$name*TixLabelFrame*label.padX 4
+
+ tixLabelFrame $w.til -label "Chooser Widgets"
+ tixLabelFrame $w.cbx -label "tixComboBox"
+ tixLabelFrame $w.ctl -label "tixControl"
+ tixLabelFrame $w.sel -label "tixSelect"
+ tixLabelFrame $w.opt -label "tixOptionMenu"
+ tixLabelFrame $w.fil -label "tixFileEntry"
+ tixLabelFrame $w.fbx -label "tixFileSelectBox"
+ tixLabelFrame $w.tbr -label "Tool Bar"
+
+ MkTitle [$w.til subwidget frame]
+ MkCombo [$w.cbx subwidget frame]
+ MkControl [$w.ctl subwidget frame]
+ MkSelect [$w.sel subwidget frame]
+ MkOptMenu [$w.opt subwidget frame]
+ MkFileBox [$w.fbx subwidget frame]
+ MkFileEnt [$w.fil subwidget frame]
+ MkToolBar [$w.tbr subwidget frame]
+
+ #
+ # First column: comBox and selector
+ tixForm $w.cbx -top 0 -left 0 -right %33
+ tixForm $w.sel -left 0 -right &$w.cbx -top $w.cbx
+ tixForm $w.opt -left 0 -right &$w.cbx -top $w.sel -bottom -1
+
+ #
+ # Second column: title .. etc
+ tixForm $w.til -left $w.cbx -right %66 -top 0
+ tixForm $w.ctl -left $w.cbx -right &$w.til -top $w.til
+ tixForm $w.fil -left $w.cbx -right &$w.til -top $w.ctl
+ tixForm $w.tbr -left $w.cbx -right &$w.til -top $w.fil -bottom -1
+
+ #
+ # Third column: file selection
+ tixForm $w.fbx -left %66 -right -1 -top 0
+}
+
+#----------------------------------------------------------------------
+# ComboBox
+#----------------------------------------------------------------------
+proc MkCombo {w} {
+ set name [tixOptionName $w]
+ option add *$name*TixComboBox*label.width 10
+ option add *$name*TixComboBox*label.anchor e
+ option add *$name*TixComboBox*entry.width 14
+
+ tixComboBox $w.static -label "Static" \
+ -editable false
+ tixComboBox $w.editable -label "Editable" \
+ -editable true
+ tixComboBox $w.history -label "History" \
+ -editable true -history true -anchor e
+
+ $w.static insert end January
+ $w.static insert end February
+ $w.static insert end March
+ $w.static insert end April
+ $w.static insert end May
+ $w.static insert end June
+ $w.static insert end July
+ $w.static insert end August
+ $w.static insert end September
+ $w.static insert end October
+ $w.static insert end November
+ $w.static insert end December
+
+ $w.editable insert end "America"
+ $w.editable insert end "Britain"
+ $w.editable insert end "China"
+ $w.editable insert end "Denmark"
+ $w.editable insert end "Egypt"
+
+ $w.history insert end "/usr/bin/mail"
+ $w.history insert end "/etc/profile"
+ $w.history insert end "/home/d/doe/Mail/letter"
+
+ pack $w.static $w.editable $w.history -side top -padx 5 -pady 3
+}
+
+#----------------------------------------------------------------------
+# The Control widgets
+#----------------------------------------------------------------------
+set states {Alabama "New York" Pennsylvania Washington}
+
+proc stCmd {w by value} {
+ global states
+
+ set index [lsearch $states $value]
+ set len [llength $states]
+ set index [expr {$index + $by}]
+
+ if {$index < 0} {
+ set index [expr {$len -1}]
+ }
+ if {$index >= $len} {
+ set index 0
+ }
+
+ return [lindex $states $index]
+}
+
+proc stValidate {w value} {
+ global states
+
+ if {[lsearch $states $value] == -1} {
+ return [lindex $states 0]
+ } else {
+ return $value
+ }
+}
+
+proc MkControl {w} {
+ set name [tixOptionName $w]
+ option add *$name*TixControl*label.width 10
+ option add *$name*TixControl*label.anchor e
+ option add *$name*TixControl*entry.width 13
+
+
+ tixControl $w.simple -label Numbers
+
+ tixControl $w.spintext -label States \
+ -incrcmd [list stCmd $w.spintext 1] \
+ -decrcmd [list stCmd $w.spintext -1] \
+ -validatecmd [list stValidate .d] \
+ -value "Alabama"
+
+ pack $w.simple $w.spintext -side top -padx 5 -pady 3
+}
+
+#----------------------------------------------------------------------
+# The Select Widgets
+#----------------------------------------------------------------------
+proc MkSelect {w} {
+ set name [tixOptionName $w]
+ option add *$name*TixSelect*label.anchor c
+ option add *$name*TixSelect*orientation vertical
+ option add *$name*TixSelect*labelSide top
+
+ tixSelect $w.sel1 -label "Mere Mortals" -allowzero true -radio true
+ tixSelect $w.sel2 -label "Geeks" -allowzero true -radio false
+
+ $w.sel1 add eat -text Eat
+ $w.sel1 add work -text Work
+ $w.sel1 add play -text Play
+ $w.sel1 add party -text Party
+ $w.sel1 add sleep -text Sleep
+
+ $w.sel2 add eat -text Eat
+ $w.sel2 add prog1 -text Program
+ $w.sel2 add prog2 -text Program
+ $w.sel2 add prog3 -text Program
+ $w.sel2 add sleep -text Sleep
+
+ pack $w.sel1 $w.sel2 -side left -padx 5 -pady 3 -fill x
+}
+#----------------------------------------------------------------------
+# The OptMenu Widget
+#----------------------------------------------------------------------
+proc MkOptMenu {w} {
+ set name [tixOptionName $w]
+
+ option add *$name*TixOptionMenu*label.anchor e
+
+ tixOptionMenu $w.menu -label "File Format : " \
+ -options {
+ menubutton.width 15
+ }
+
+ $w.menu add command text -label "Plain Text"
+ $w.menu add command post -label "PostScript"
+ $w.menu add command format -label "Formatted Text"
+ $w.menu add command html -label "HTML"
+ $w.menu add separator sep
+ $w.menu add command tex -label "LaTeX"
+ $w.menu add command rtf -label "Rich Text Format"
+
+ pack $w.menu -padx 5 -pady 3 -fill x
+}
+
+#----------------------------------------------------------------------
+# FileEntry
+#----------------------------------------------------------------------
+proc MkFileEnt {w} {
+ set name [tixOptionName $w]
+
+ message $w.msg \
+ -relief flat -width 240 -anchor n\
+ -text {Press the "open file" icon button and a\
+TixFileSelectDialog will popup.}
+
+ tixFileEntry $w.ent -label "Select a file : "
+
+ pack $w.msg -side top -expand yes -fill both -padx 3 -pady 3
+ pack $w.ent -side top -fill x -padx 3 -pady 3
+}
+
+proc MkFileBox {w} {
+ set name [tixOptionName $w]
+
+ message $w.msg \
+ -relief flat -width 240 -anchor n\
+ -text {The TixFileSelectBox is Motif-style file selection\
+box with various enhancements. For example, you can adjust the\
+size of the two listboxes and your past selections are recorded.}
+
+ tixFileSelectBox $w.box
+
+ pack $w.msg -side top -expand yes -fill both -padx 3 -pady 3
+ pack $w.box -side top -fill x -padx 3 -pady 3
+}
+
+#----------------------------------------------------------------------
+# Tool Bar
+#----------------------------------------------------------------------
+proc MkToolBar {w} {
+ set name [tixOptionName $w]
+
+ option add $name*TixSelect*frame.borderWidth 1
+ message $w.msg -relief flat -width 240 -anchor n\
+ -text {The Select widget is also good for arranging buttons\
+ in a tool bar.}
+
+ frame $w.bar -bd 2 -relief raised
+ tixSelect $w.font -allowzero true -radio false -label {}
+ tixSelect $w.para -allowzero false -radio true -label {}
+
+ $w.font add bold -bitmap [tix getbitmap bold]
+ $w.font add italic -bitmap [tix getbitmap italic]
+ $w.font add underline -bitmap [tix getbitmap underlin]
+ $w.font add capital -bitmap [tix getbitmap capital]
+
+ $w.para add left -bitmap [tix getbitmap leftj]
+ $w.para add right -bitmap [tix getbitmap rightj]
+ $w.para add center -bitmap [tix getbitmap centerj]
+ $w.para add justify -bitmap [tix getbitmap justify]
+
+ pack $w.msg -side top -expand yes -fill both -padx 3 -pady 3
+ pack $w.bar -side top -fill x -padx 3 -pady 3
+ pack $w.para $w.font -in $w.bar -side left -padx 4 -pady 3
+}
+#----------------------------------------------------------------------
+# Title
+#----------------------------------------------------------------------
+proc MkTitle {w} {
+ set name [tixOptionName $w]
+
+ option add $name*TixSelect*frame.borderWidth 1
+ message $w.msg \
+ -relief flat -width 240 -anchor n\
+ -text {There are many types of "choose" widgets that allow\
+ the user to input different type of information.}
+
+ pack $w.msg -side top -expand yes -fill both -padx 3 -pady 3
+}
Added: external/tix-8.4.2.x/demos/MkDirLis.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/MkDirLis.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,69 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: MkDirLis.tcl,v 1.4 2004/03/28 02:44:56 hobbs Exp $
+#
+# MkDirLis.tcl --
+#
+# This file implements the "Directory List" page in the widget demo
+#
+# This file has not been properly documented. It is NOT intended
+# to be used as an introductory demo program about Tix
+# programming. For such demos, please see the files in the
+# demos/samples directory or go to the "Samples" page in the
+# "widget demo"
+#
+#
+# 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.
+#
+
+proc MkDirList {nb page} {
+ set w [$nb subwidget $page]
+
+ set name [tixOptionName $w]
+ option add *$name*TixLabelFrame*label.padX 4
+
+ tixLabelFrame $w.dir -label "tixDirList"
+ tixLabelFrame $w.fsbox -label "tixExFileSelectBox"
+ MkDirListWidget [$w.dir subwidget frame]
+ MkExFileWidget [$w.fsbox subwidget frame]
+
+ tixForm $w.dir -top 0 -left 0 -right %40 -bottom -1
+ tixForm $w.fsbox -top 0 -left %40 -right -1 -bottom -1
+}
+
+proc MkDirListWidget {w} {
+ set name [tixOptionName $w]
+
+ message $w.msg \
+ -relief flat -width 240 -anchor n\
+ -text "The TixDirList widget gives a graphical representation of\
+ the file system directory and makes it easy for the user\
+ to choose and access directories."
+
+ tixDirList $w.dirlist -options {
+ hlist.padY 1
+ hlist.width 25
+ hlist.height 16
+ }
+
+ pack $w.msg -side top -expand yes -fill both -padx 3 -pady 3
+ pack $w.dirlist -side top -padx 3 -pady 3
+}
+
+proc MkExFileWidget {w} {
+ set name [tixOptionName $w]
+
+ message $w.msg \
+ -relief flat -width 240 -anchor n\
+ -text {The TixExFileSelectBox widget is more user friendly \
+ than the Motif style FileSelectBox.}
+
+ tixExFileSelectBox $w.exfsbox -bd 2 -relief raised
+
+ pack $w.msg -side top -expand yes -fill both -padx 3 -pady 3
+ pack $w.exfsbox -side top -padx 3 -pady 3
+}
+
Added: external/tix-8.4.2.x/demos/MkSample.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/MkSample.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,270 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: MkSample.tcl,v 1.3 2001/12/09 05:34:59 idiscovery Exp $
+#
+# MkSample.tcl --
+#
+# This file implements the "Sample" page in the widget demo
+#
+# This file has not been properly documented. It is NOT intended
+# to be used as an introductory demo program about Tix
+# programming. For such demos, please see the files in the
+# demos/samples directory or go to the "Samples" page in the
+# "widget demo"
+#
+#
+# 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.
+#
+#
+#
+
+set tix_demo_running 1
+set samples_dir [file join $demo_dir samples]
+set sample_filename {}
+
+uplevel #0 source [list [file join $samples_dir AllSampl.tcl]]
+
+
+proc MkSample {nb page} {
+ global tixOption
+
+ #----------------------------------------------------------------------
+ set w [$nb subwidget $page]
+
+ set pane [tixPanedWindow $w.pane -orient horizontal]
+ pack $pane -expand yes -fill both
+
+ set f1 [$pane add 1 -expand 1]
+ set f2 [$pane add 2 -expand 3]
+ $f1 config -relief flat
+ $f2 config -relief flat
+
+ # Left pane: the Tree:
+ #
+ set lab [label $f1.lab -text "Select a sample program:" -anchor w]
+ set tree [tixTree $f1.slb \
+ -options {
+ hlist.selectMode single
+ hlist.width 40
+ }]
+ $tree config \
+ -command "Sample:Action $w $tree run" \
+ -browsecmd "Sample:Action $w $tree browse"
+
+ pack $lab -side top -fill x -padx 5 -pady 5
+ pack $tree -side top -fill both -expand yes -padx 5
+
+ # Right pane: the Text
+ #
+ set labe [tixLabelEntry $f2.lab -label "Source:" -options {
+ label.anchor w
+ }]
+
+ $labe subwidget entry config -state disabled
+
+ set stext [tixScrolledText $f2.stext]
+ set f3 [frame $f2.f3]
+
+ set run [button $f3.run -text "Run ..." \
+ -command "Sample:Action $w $tree run"]
+ set view [button $f3.view -text "View Source in Browser ..." \
+ -command "Sample:Action $w $tree view"]
+
+ pack $run $view -side left -fill y -pady 2
+
+ pack $labe -side top -fill x -padx 7 -pady 2
+ pack $f3 -side bottom -fill x -padx 7
+ pack $stext -side top -fill both -expand yes -padx 7
+
+ #
+ # Set up the text subwidget
+
+ set text [$stext subwidget text]
+ bind $text <Up> "%W yview scroll -1 unit"
+ bind $text <Down> "%W yview scroll 1 unit"
+ bind $text <Left> "%W xview scroll -1 unit"
+ bind $text <Right> "%W xview scroll 1 unit"
+ bind $text <Tab> {focus [tk_focusNext %W]; break}
+
+ bindtags $text "$text Text [winfo toplevel $text] all"
+
+ $text config -bg [$tree subwidget hlist cget -bg] \
+ -state disabled -font $tixOption(fixed_font) -wrap none
+
+ $run config -state disabled
+ $view config -state disabled
+
+ global demo
+ set demo(w:run) $run
+ set demo(w:view) $view
+ set demo(w:tree) $tree
+ set demo(w:lab1) $labe
+ set demo(w:stext) $stext
+
+ set hlist [$tree subwidget hlist]
+ $hlist config -separator "." -width 30 -drawbranch 0 \
+ -wideselect false
+
+ set style [tixDisplayStyle imagetext -refwindow $hlist \
+ -fg $tixOption(fg) -padx 4]
+
+ set file [tix getimage textfile]
+ set folder [tix getimage openfold]
+
+ ForAllSamples root "" \
+ [list AddSampleToHList $tree $hlist $style $file $folder]
+}
+
+# AddSampleToHList --
+#
+# A callback from ForAllSamples. Add all the possible sample files
+# into the Tree widget.
+#
+proc AddSampleToHList {tree hlist style file folder token type text dest} {
+ case $type {
+ d {
+ return [$hlist addchild $token -itemtype imagetext -style $style \
+ -image $folder -text $text]
+ }
+ done {
+ if {![tixStrEq $token ""]} {
+ $tree setmode $token close
+ $tree close $token
+ }
+ }
+ f {
+ return [$hlist addchild $token -itemtype imagetext \
+ -image $file -text $text -data [list $text $dest]]
+ }
+ }
+}
+
+proc Sample:Action {w slb action args} {
+ global samples demo_dir demo samples_dir
+
+ set hlist [$slb subwidget hlist]
+ set ent [$hlist info anchor]
+
+ if {$ent == ""} {
+ $demo(w:run) config -state disabled
+ $demo(w:view) config -state disabled
+ return
+ }
+ if {[$hlist info data $ent] == {}} {
+ # This is just a comment
+ $demo(w:run) config -state disabled
+ $demo(w:view) config -state disabled
+ return
+ } else {
+ $demo(w:run) config -state normal
+ $demo(w:view) config -state normal
+ }
+
+ set theSample [$hlist info data $ent]
+ set title [lindex $theSample 0]
+ set prog [lindex $theSample 1]
+
+ case $action {
+ "run" {
+ RunProg $title $prog
+ }
+ "view" {
+ LoadFile [file join $samples_dir $prog]
+ }
+ "browse" {
+ # Bring up a short description of the sample program
+ # in the scrolled text about
+
+ set text [$demo(w:stext) subwidget text]
+ uplevel #0 set sample_filename [list [file join $samples_dir $prog]]
+ tixWidgetDoWhenIdle ReadFileWhenIdle $text
+
+ $demo(w:lab1) subwidget entry config -state normal
+ $demo(w:lab1) subwidget entry delete 0 end
+ $demo(w:lab1) subwidget entry insert end [file join $samples_dir $prog]
+ $demo(w:lab1) subwidget entry xview end
+ $demo(w:lab1) subwidget entry config -state disabled
+ }
+ }
+}
+
+proc RunProg {title prog} {
+ global samples demo_dir demo samples_dir
+
+ set w .[lindex [split $prog .] 0]
+ set w [string tolower $w]
+
+ if [winfo exists $w] {
+ wm deiconify $w
+ raise $w
+ return
+ }
+
+ uplevel #0 source [list [file join $samples_dir $prog]]
+
+ toplevel $w
+ wm title $w $title
+ RunSample $w
+}
+
+
+proc LoadFile {filename} {
+ global tixOption
+
+ set tmp $filename
+ regsub -all . $filename _ tmp
+ set w [string tolower .$tmp]
+
+ if [winfo exists $w] {
+ wm deiconify $w
+ raise $w
+ return
+ }
+
+ toplevel $w
+ wm title $w "Source View: $filename"
+
+ button $w.b -text Close -command "destroy $w"
+ set t [tixScrolledText $w.text]
+ tixForm $w.b -left 0 -bottom -0 -padx 4 -pady 4
+ tixForm $w.text -left 0 -right -0 -top 0 -bottom $w.b
+
+ $t subwidget text config -highlightcolor [$t cget -bg] -bd 2 \
+ -bg [$t cget -bg] -font $tixOption(fixed_font)
+ if {$filename == {}} {
+ return
+ }
+
+ set text [$w.text subwidget text]
+ $text config -wrap none
+
+ ReadFile $text $filename
+}
+
+proc ReadFileWhenIdle {text} {
+ global sample_filename
+
+ if ![file isdir $sample_filename] {
+ ReadFile $text $sample_filename
+ }
+}
+
+proc ReadFile {text filename} {
+ set oldState [$text cget -state]
+ $text config -state normal
+ $text delete 0.0 end
+
+ set fd [open $filename {RDONLY}]
+ $text delete 1.0 end
+
+ while {![eof $fd]} {
+ $text insert end [gets $fd]\n
+ }
+ close $fd
+
+ $text see 1.0
+ $text config -state $oldState
+}
Added: external/tix-8.4.2.x/demos/MkScroll.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/MkScroll.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,160 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: MkScroll.tcl,v 1.3 2001/12/09 05:34:59 idiscovery Exp $
+#
+# MkScroll.tcl --
+#
+# This file implements the "Scrolled Widgets" page in the widget demo
+#
+# This file has not been properly documented. It is NOT intended
+# to be used as an introductory demo program about Tix
+# programming. For such demos, please see the files in the
+# demos/samples directory or go to the "Samples" page in the
+# "widget demo"
+#
+#
+# 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.
+#
+
+proc MkScroll {nb page} {
+ set w [$nb subwidget $page]
+
+ set name [tixOptionName $w]
+ option add *$name*TixLabelFrame*label.padX 4
+
+ tixLabelFrame $w.sls -label "tixScrolledListBox"
+ tixLabelFrame $w.swn -label "tixScrolledWindow"
+ tixLabelFrame $w.stx -label "tixScrolledText"
+ MkSList [$w.sls subwidget frame]
+
+ MkSText [$w.stx subwidget frame]
+ MkSWindow [$w.swn subwidget frame]
+
+ tixForm $w.sls -top 0 -left 0 -right %33 -bottom -1
+ tixForm $w.swn -top 0 -left $w.sls -right %66 -bottom -1
+ tixForm $w.stx -top 0 -left $w.swn -right -1 -bottom -1
+}
+
+#----------------------------------------------------------------------
+# ScrolledListBox
+#----------------------------------------------------------------------
+proc MkSList {w} {
+ frame $w.top -width 300 -height 330
+ frame $w.bot
+
+ message $w.top.msg \
+ -relief flat -width 200 -anchor n\
+ -text {This TixScrolledListBox is configured so that it uses\
+scrollbars only when it is necessary. Use the handles to\
+resize the listbox and watch the scrollbars automatically\
+appear and disappear.}
+
+ set list [tixScrolledListBox $w.top.list -scrollbar auto]
+ place $list -x 50 -y 150 -width 120 -height 80
+ $list subwidget listbox insert end Alabama
+ $list subwidget listbox insert end California
+ $list subwidget listbox insert end Montana
+ $list subwidget listbox insert end "New Jersy"
+ $list subwidget listbox insert end "New York"
+ $list subwidget listbox insert end Pennsylvania
+ $list subwidget listbox insert end Washington
+
+ set rh [tixResizeHandle $w.top.r -relief raised \
+ -handlesize 8 -gridded true -minwidth 50 -minheight 30]
+
+ button $w.bot.btn -text Reset -command "SList:Reset $rh $list"
+ pack propagate $w.top 0
+ pack $w.top.msg -fill x
+ pack $w.bot.btn -anchor c
+ pack $w.top -expand yes -fill both
+ pack $w.bot -fill both
+
+ bind $list <Map> "tixDoWhenIdle $rh attachwidget $list"
+}
+
+proc SList:Reset {rh list} {
+ place $list -x 50 -y 150 -width 120 -height 80
+ update
+ $rh attachwidget $list
+}
+
+#----------------------------------------------------------------------
+# ScrolledWindow
+#----------------------------------------------------------------------
+proc MkSWindow {w} {
+ global demo_dir
+ frame $w.top -width 330 -height 330
+ frame $w.bot
+
+ message $w.top.msg \
+ -relief flat -width 200 -anchor n\
+ -text {The TixScrolledWindow widget allows you\
+to scroll any kind of TK widget. It is more versatile\
+than a scrolled canvas widget}
+
+ set win [tixScrolledWindow $w.top.win -scrollbar auto]
+ set f [$win subwidget window]
+ set image [image create photo -file $demo_dir/bitmaps/tix.gif]
+
+ label $f.b1 -image $image
+
+ pack $f.b1 -expand yes -fill both
+
+ place $win -x 30 -y 150 -width 190 -height 120
+ set rh [tixResizeHandle $w.top.r -relief raised \
+ -handlesize 8 -gridded true -minwidth 50 -minheight 30]
+
+ button $w.bot.btn -text Reset -command "SWindow:Reset $rh $win"
+ pack propagate $w.top 0
+ pack $w.top.msg -fill x
+ pack $w.bot.btn -anchor c
+ pack $w.top -expand yes -fill both
+ pack $w.bot -fill both
+
+ bind $win <Map> "tixDoWhenIdle $rh attachwidget $win"
+}
+
+proc SWindow:Reset {rh win} {
+ place $win -x 30 -y 150 -width 190 -height 120
+ update
+ $rh attachwidget $win
+}
+
+#----------------------------------------------------------------------
+# ScrolledText
+#----------------------------------------------------------------------
+proc MkSText {w} {
+ frame $w.top -width 330 -height 330
+ frame $w.bot
+
+ message $w.top.msg \
+ -relief flat -width 200 -anchor n\
+ -text {The TixScrolledWindow widget allows you\
+to scroll any kind of TK widget. It is more versatile\
+than a scrolled canvas widget}
+
+ set win [tixScrolledText $w.top.win -scrollbar both]
+ $win subwidget text config -wrap none
+
+ place $win -x 30 -y 150 -width 190 -height 100
+ set rh [tixResizeHandle $w.top.r -relief raised \
+ -handlesize 8 -gridded true -minwidth 50 -minheight 30]
+
+ button $w.bot.btn -text Reset -command "SText:Reset $rh $win"
+ pack propagate $w.top 0
+ pack $w.top.msg -fill x
+ pack $w.bot.btn -anchor c
+ pack $w.top -expand yes -fill both
+ pack $w.bot -fill both
+
+ bind $win <Map> "tixDoWhenIdle $rh attachwidget $win"
+}
+
+proc SText:Reset {rh win} {
+ place $win -x 30 -y 150 -width 190 -height 100
+ update
+ $rh attachwidget $win
+}
Added: external/tix-8.4.2.x/demos/bitmaps/about.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/about.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+/* XPM */
+static char * about_xpm[] = {
+"50 40 7 1",
+" s None c None",
+". c black",
+"X c white",
+"o c gray70",
+"O c navy",
+"+ c red",
+"@ c yellow",
+" ",
+" ",
+" ",
+" ................................. ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXoo. ",
+" .XooooooooooooooooooooooooooooooXo. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXooXo. ",
+" ..oooooooooooooooooooooooooooooooXo. ",
+" ...............................XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo.++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo+++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo++++++ ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo+++ + ",
+" .OOOOO@@@@@OOOOOOOOOOOOOOOOOOO.Xo++. ",
+" .OOOOOOO at OOOOO@OOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOO@@OOO at OOO@OOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOO at O@OOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOOO at OOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOOO at OOOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOOO@OOOO at O@OOOOOOOO.XoXo. ",
+" .OOOOOOO at OOOO@@@OO at OOO@OOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XoXo. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo.. ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" OOOOOOOOOOOOOOOOOOOOOOOOOOOOO.X. ",
+" ............................. ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/bold.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/bold.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define bold_width 16
+#define bold_height 16
+static unsigned char bold_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0xfc, 0x0f, 0x18, 0x1c, 0x18, 0x18,
+ 0x18, 0x18, 0x18, 0x1c, 0xf8, 0x0f, 0xf8, 0x0f, 0x18, 0x18, 0x18, 0x30,
+ 0x18, 0x30, 0x18, 0x38, 0xfc, 0x3f, 0xfc, 0x1f};
Added: external/tix-8.4.2.x/demos/bitmaps/capital.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/capital.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define capital_width 16
+#define capital_height 16
+static unsigned char capital_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x08, 0x30, 0x0c, 0x30, 0x06,
+ 0x30, 0x03, 0xb0, 0x01, 0xf0, 0x00, 0xf0, 0x00, 0xf0, 0x01, 0xb0, 0x03,
+ 0x30, 0x07, 0x30, 0x0e, 0x30, 0x1c, 0x00, 0x00};
Added: external/tix-8.4.2.x/demos/bitmaps/centerj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/centerj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define centerj_width 16
+#define centerj_height 16
+static unsigned char centerj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xc0, 0x0d,
+ 0x00, 0x00, 0x58, 0x77, 0x00, 0x00, 0xb0, 0x3b, 0x00, 0x00, 0xdc, 0xf7,
+ 0x00, 0x00, 0xf0, 0x3e, 0x00, 0x00, 0xd8, 0x7e};
Added: external/tix-8.4.2.x/demos/bitmaps/code.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/code.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,22 @@
+/* XPM */
+static char * code_xpm[] = {
+"30 15 4 1",
+" c gray94",
+". c #c0c0ff",
+"X c #606060",
+"o c black",
+" ",
+" ............................X",
+" ............................X",
+" ...ooo............o.........X",
+" ..o...o...........o.........X",
+" ..o...............o.........X",
+" ..o......ooo...oooo..ooo....X",
+" ..o.....o...o.o...o.o...o...X",
+" ..o.....o...o.o...o.ooooo...X",
+" ..o.....o...o.o...o.o.......X",
+" ..o...o.o...o.o...o.o...o...X",
+" ...ooo...ooo...oooo..ooo....X",
+" ............................X",
+" ............................X",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
Added: external/tix-8.4.2.x/demos/bitmaps/combobox.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/combobox.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define combobox_width 32
+#define combobox_height 32
+static unsigned char combobox_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xfc, 0xff, 0xff, 0x3e, 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2a,
+ 0x04, 0x00, 0x80, 0x2a, 0x04, 0x00, 0x80, 0x2b, 0xfc, 0xff, 0xff, 0x3e,
+ 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a,
+ 0x28, 0x49, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x22,
+ 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x12, 0x22, 0x08, 0x00, 0x00, 0x22,
+ 0x08, 0x00, 0x00, 0x22, 0x08, 0x00, 0x00, 0x22, 0x28, 0x49, 0x02, 0x22,
+ 0x08, 0x00, 0x00, 0x3e, 0x08, 0x00, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x2a,
+ 0xf8, 0xff, 0xff, 0x3f, 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};
Added: external/tix-8.4.2.x/demos/bitmaps/combobox.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/combobox.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+/* XPM */
+static char * combobox_xpm[] = {
+"50 40 6 1",
+" s None c None",
+". c black",
+"X c white",
+"o c #FFFF80808080",
+"O c gray70",
+"+ c #808000008080",
+" ",
+" ",
+" ",
+" .................................... XXXXXXX ",
+" .ooooooooooooooooooooooooooooooooooX X . . ",
+" .ooooooooooooooooooooooooooooooooooX X . . ",
+" .oooo.oooooooooooooooooooooooooooooX X . . ",
+" .oo.o..oo.o.oo.o.ooooooooooooooooooX X . . ",
+" .o..o.o.o.oo.oo.oo.ooooooooooooooooX X ... . ",
+" .oo.oo.oo.o.oo.ooo.ooooooooooooooooX X . . ",
+" .ooooooooooooooooooooooooooooooooooX X . ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X...... ",
+" ",
+" ",
+" ",
+" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ",
+" X............................................ ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.O+OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OX OX. ",
+" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.X ..X. ",
+" X.O+O+O+OOO+O+OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.O++OOO+OO+++OOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.XXXXX. ",
+" X.O.....X..........................OOX.X .X. ",
+" X.OX...XXX.X.XX.XX.................OOX.X .X. ",
+" X.OX.X..X..X.XX..XX.X..............OOX.X .X. ",
+" X.O.X...X..X.X...X..X..............OOX.X .X. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOX.X .X. ",
+" X.OOOOOOOOO+OOO+OOOOO+OOOO+OOOOOOOOOOX.X .X. ",
+" X.O+++OO+OO+O+OO++O++OO+OO+OOOOOOOOOOX.X...X. ",
+" X.OO+OO++OO+O+OO+OOO+OO+O++OOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOO+OOOOO++OO+OOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.X .X. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.O .OX. ",
+" X.OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOX.OOOOX. ",
+" X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XXXXX. ",
+" X............................................ ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/drivea.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/drivea.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define drivea_width 32
+#define drivea_height 32
+static unsigned char drivea_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};
Added: external/tix-8.4.2.x/demos/bitmaps/drivea.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/drivea.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/exit.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/exit.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+/* XPM */
+static char * exit_xpm[] = {
+"50 40 5 1",
+" s None c None",
+". c black",
+"X c white",
+"o c #000080800000",
+"O c yellow",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ....................................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooOoooooooooooX. ",
+" .XoooooooooooooooooooooooOOooooooooooX. ",
+" .XoooooooooooooooooooooooOOOoooooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOOoooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOOooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOOoooooooX. ",
+" .XoooooOOOOOOOOOOOOOOOOOOOOOOooooooooX. ",
+" .XoooooooooooooooooooooooOOOoooooooooX. ",
+" .XoooooooooooooooooooooooOOooooooooooX. ",
+" .XoooooooooooooooooooooooOoooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XoooooooooooooooooooooooooooooooooooX. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. ",
+" ....................................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/filebox.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/filebox.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define filebox_width 32
+#define filebox_height 32
+static unsigned char filebox_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x3f, 0x04, 0x00, 0x00, 0x20,
+ 0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
+ 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xe4, 0x7f, 0xfe, 0x27,
+ 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25,
+ 0x24, 0x40, 0x02, 0x24, 0x24, 0x50, 0x02, 0x25, 0x24, 0x40, 0x02, 0x24,
+ 0x24, 0x50, 0x02, 0x25, 0xe4, 0x7f, 0xfe, 0x27, 0x04, 0x00, 0x00, 0x20,
+ 0xe4, 0xff, 0xff, 0x27, 0x24, 0x00, 0x00, 0x24, 0x24, 0x00, 0x00, 0x24,
+ 0xe4, 0xff, 0xff, 0x27, 0x04, 0x00, 0x00, 0x20, 0xfc, 0xff, 0xff, 0x3f,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
Added: external/tix-8.4.2.x/demos/bitmaps/filebox.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/filebox.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+/* XPM */
+static char * filebox_xpm[] = {
+"50 40 6 1",
+" s None c None",
+". c white",
+"X c gray80",
+"o c black",
+"O c #FFFF80808080",
+"+ c gray70",
+" ",
+" ",
+" ",
+" ............................................ ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooooooooooooooooooooooooooooooooooooo.XXo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.XXo ",
+" .XX......................................XXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXoooooooooooooooo.XXXXoooooooooooooooo.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XXo+++++++++++++++.XXXXo+++++++++++++++.XXo ",
+" .XX.................XXXX.................XXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXoXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXooXooXoXooXoXooXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXoooooooooooooooooooooooooooooooooooooo.Xo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" .XXoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Xo ",
+" .XX.......................................Xo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .ooooooooooooooooooooooooooooooooooooooooooo ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/harddisk.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/harddisk.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define drivea_width 32
+#define drivea_height 32
+static unsigned char drivea_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};
Added: external/tix-8.4.2.x/demos/bitmaps/harddisk.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/harddisk.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/italic.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/italic.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define italic_width 16
+#define italic_height 16
+static unsigned char italic_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x80, 0x3f, 0x00, 0x06, 0x00, 0x06,
+ 0x00, 0x03, 0x00, 0x03, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x00, 0xc0, 0x00,
+ 0x60, 0x00, 0x60, 0x00, 0xfc, 0x01, 0xfc, 0x01};
Added: external/tix-8.4.2.x/demos/bitmaps/justify.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/justify.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define justify_width 16
+#define justify_height 16
+static unsigned char justify_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xdb, 0x00, 0x00, 0x7c, 0xdb,
+ 0x00, 0x00, 0xbc, 0xf7, 0x00, 0x00, 0xdc, 0xde, 0x00, 0x00, 0x6c, 0xdf,
+ 0x00, 0x00, 0x6c, 0xef, 0x00, 0x00, 0xdc, 0xdf};
Added: external/tix-8.4.2.x/demos/bitmaps/leftj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/leftj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define leftj_width 16
+#define leftj_height 16
+static unsigned char leftj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0x6d, 0x00, 0x00, 0xdc, 0x01,
+ 0x00, 0x00, 0xec, 0x0e, 0x00, 0x00, 0xfc, 0x7e, 0x00, 0x00, 0xdc, 0x03,
+ 0x00, 0x00, 0x6c, 0x3b, 0x00, 0x00, 0x6c, 0x1f};
Added: external/tix-8.4.2.x/demos/bitmaps/netw.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/netw.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define netw_width 32
+#define netw_height 32
+static unsigned char netw_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};
Added: external/tix-8.4.2.x/demos/bitmaps/netw.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/netw.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/network.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/network.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#define netw_width 32
+#define netw_height 32
+static unsigned char netw_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};
Added: external/tix-8.4.2.x/demos/bitmaps/network.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/network.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/optmenu.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/optmenu.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+/* XPM */
+static char * optmenu_xpm[] = {
+"50 40 5 1",
+" s None c None",
+". c white",
+"X c gray80",
+"o c gray50",
+"O c black",
+" ",
+" ",
+" .............................. ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXOXOXXOXXOXXXXOOXXXXXXXXXXo ",
+" .XXXOXOXXOXOXXXOXXOXXXXXXXXXXo ",
+" .XXXXOXXOXXOXXXOXXXOXXXXXXXXXo ",
+" .XXXXOXXXOXXOOXXOXOXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo.............o ",
+" .............................o o ",
+" ..XXXOXXXXXOXXXXXXXXOXXXXXXXOo o ",
+" ..XXOXOXOXXOXOXXXOXXOXXXXXXXOo ...... o ",
+" ..XXXOXXXOXXOXXXOXXXOXXXXXXXOo . o o ",
+" ..XXOXXXOXXXOXOXXOXXOXXXXXXXOo . o o ",
+" ..XXXXXXXXXXXXXXXXXXXXXXXXXXOo .ooooo o ",
+" .OOOOOOOOOOOOOOOOOOOOOOOOOOOOo o ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo o ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXooooooooooooooo ",
+" .XXXXOXXXXXOXXXXXXXXXXXXXXXXXo ",
+" .XXXOXXXXXXXXXOXXXXXXXXXXXXXXo ",
+" .XXXXOXXOXXOXOXOXXXXXXXXXXXXXo ",
+" .XXXXXOXXOXOXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXOXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXOXOXXXXXXXOXOXXXXXOXXXXXXo ",
+" .XXXXXOXOXOXXOXXXXXOXXOXXXXXXo ",
+" .XXXXOXXOXOXOXXXOXOXOXXOXXXXXo ",
+" .XXXOXXXXOXXOXXXOXXOXXXXOXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" .XXXXXXXXXXXXXXXXXXXXXXXXXXXXo ",
+" oooooooooooooooooooooooooooooo ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/rightj.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/rightj.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define rightj_width 16
+#define rightj_height 16
+static unsigned char rightj_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xdb, 0x00, 0x00, 0x70, 0xdb,
+ 0x00, 0x00, 0x00, 0xef, 0x00, 0x00, 0xd8, 0xde, 0x00, 0x00, 0xc0, 0xdd,
+ 0x00, 0x00, 0xa0, 0xef, 0x00, 0x00, 0xd8, 0xde};
Added: external/tix-8.4.2.x/demos/bitmaps/select.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/select.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,52 @@
+/* XPM */
+static char * select_xpm[] = {
+"50 40 9 1",
+" s None c None",
+". c black",
+"X c gray95",
+"o c gray50",
+"O c gray70",
+"+ c navy",
+"@ c #000080800000",
+"# c #808000000000",
+"$ c white",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .............................................. ",
+" .XXXXXXXXXXooooooooooooXXXXXXXXXXXoXXXXXXXXXX. ",
+" .X ooOOOOOOOOOOXX oX o. ",
+" .X ooOOOOOOOOOOXX oX o. ",
+" .X ++++ ooOOOOOOOOOOXX ... oX @ o. ",
+" .X +++++ ooOOOOOOOOOOXX . . oX @@@ o. ",
+" .X +++ + ooOOOOOOOOOOXX . . oX @ @ o. ",
+" .X + + ooOO#####OOOXX . . oX @ @ o. ",
+" .X + + ooOO#OOO##OOXX . oX @ @ o. ",
+" .X + + ooO##OOOO##OXX . oX @ @ o. ",
+" .X ++ ++ ooO###OOO#OOXX . oX @ @ o. ",
+" .X +++++++ ooO#######OOXX . oX @ @ o. ",
+" .X + + ooO##O#OO#OOXX . oX @ @ o. ",
+" .X + ++ ooO##OOOOO#OXX . . oX @ @ o. ",
+" .X + + ooOO#OOOOO#OXX . . oX @ @@ o. ",
+" .X + ++ ooOO#OOOOO#OXX .... oX @@@@@ o. ",
+" .X ooOO######OOXX oX o. ",
+" .X ooOOOOOOOOOOXX $oX o. ",
+" .XoooooooooooXXXXXXXXXXXoooooooooooXooooooooo. ",
+" .............................................. ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};
Added: external/tix-8.4.2.x/demos/bitmaps/tix.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/demos/bitmaps/underlin.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/bitmaps/underlin.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define underline_width 16
+#define underline_height 16
+static unsigned char underline_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x38, 0x1c,
+ 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x30, 0x0c, 0x70, 0x0e,
+ 0xf0, 0x0f, 0xe0, 0x07, 0x00, 0x00, 0xf8, 0x1f};
Added: external/tix-8.4.2.x/demos/samples/AllSampl.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/AllSampl.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,201 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: AllSampl.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+#
+# AllSampl.tcl --
+#
+# This file is a directory of all the sample programs in the
+# demos/samples subdirectory.
+#
+#
+# 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 following data structures contains information about the requirements
+# of the sample programs, as well as the relationship/grouping of the sample
+# programs.
+#
+# Each element in an info list has four parts: type, name, group/filename, and
+# condition. A group or a file is loaded only if the conditions are met.
+#
+# types: "d" directory "f" file
+# conditions:
+# "i": an image type must exist
+# "c": a command must exist
+# "v": a variable must exist
+
+set root {
+ {d "File Selectors" file }
+ {d "Hierachical ListBox" hlist }
+ {d "Tabular ListBox" tlist {c tixTList}}
+ {d "Grid Widget" grid {c tixGrid}}
+ {d "Manager Widgets" manager }
+ {d "Scrolled Widgets" scroll }
+ {d "Miscellaneous Widgets" misc }
+ {d "Image Types" image }
+}
+
+set image {
+ {d "Compound Image" cmpimg }
+ {d "XPM Image" xpm {i pixmap}}
+}
+
+set cmpimg {
+ {f "In Buttons" CmpImg.tcl }
+ {f "In NoteBook" CmpImg2.tcl }
+ {f "Notebook Color Tabs" CmpImg4.tcl }
+ {f "Icons" CmpImg3.tcl }
+}
+
+set xpm {
+ {f "In Button" Xpm.tcl {i pixmap}}
+ {f "In Menu" Xpm1.tcl {i pixmap}}
+}
+
+set file {
+ {f DirList DirList.tcl }
+ {f DirTree DirTree.tcl }
+ {f DirSelectDialog DirDlg.tcl }
+ {f ExFileSelectDialog EFileDlg.tcl }
+ {f FileSelectDialog FileDlg.tcl }
+ {f FileEntry FileEnt.tcl }
+}
+
+set hlist {
+ {f HList HList1.tcl }
+ {f CheckList ChkList.tcl {c tixCheckList}}
+ {f "ScrolledHList (1)" SHList.tcl }
+ {f "ScrolledHList (2)" SHList2.tcl }
+ {f Tree Tree.tcl }
+ {f "Tree (Dynamic)" DynTree.tcl {v win}}
+}
+
+set tlist {
+ {f "ScrolledTList (1)" STList1.tcl {c tixTList}}
+ {f "ScrolledTList (2)" STList2.tcl {c tixTList}}
+}
+global tcl_platform
+# This demo hangs windows
+if {$tcl_platform(platform) != "windows"} {
+lappend tlist {f "TList File Viewer" STList3.tcl {c tixTList}}
+}
+
+set grid {
+ {f "Simple Grid" SGrid0.tcl {c tixGrid}}
+ {f "ScrolledGrid" SGrid1.tcl {c tixGrid}}
+ {f "Editable Grid" EditGrid.tcl {c tixGrid}}
+}
+
+set scroll {
+ {f ScrolledListBox SListBox.tcl }
+ {f ScrolledText SText.tcl }
+ {f ScrolledWindow SWindow.tcl }
+ {f "Canvas Object View" CObjView.tcl {c tixCObjView}}
+}
+
+set manager {
+ {f ListNoteBook ListNBK.tcl }
+ {f NoteBook NoteBook.tcl }
+ {f PanedWindow PanedWin.tcl }
+}
+
+set misc {
+ {f Balloon Balloon.tcl }
+ {f ButtonBox BtnBox.tcl }
+ {f ComboBox ComboBox.tcl }
+ {f Control Control.tcl }
+ {f LabelEntry LabEntry.tcl }
+ {f LabelFrame LabFrame.tcl }
+ {f Meter Meter.tcl {c tixMeter}}
+ {f OptionMenu OptMenu.tcl }
+ {f PopupMenu PopMenu.tcl }
+ {f Select Select.tcl }
+ {f StdButtonBox StdBBox.tcl }
+}
+
+# ForAllSamples --
+#
+# Iterates over all the samples that can be run on this platform.
+#
+# Arguments:
+# name: For outside callers, it must be "root"
+# token: An arbtrary string passed in by the caller.
+# command: Command prefix to be executed for each node
+# in the samples hierarchy. It should return the
+# token of the node that it has just created, if any.
+#
+proc ForAllSamples {name token command} {
+ global $name win
+
+ if {[tix platform] == "windows"} {
+ set win 1
+ }
+
+ foreach line [set $name] {
+ set type [lindex $line 0]
+ set text [lindex $line 1]
+ set dest [lindex $line 2]
+ set cond [lindex $line 3]
+
+ case [lindex $cond 0] {
+ c {
+ set cmd [lindex $cond 1]
+ if {[info command $cmd] != $cmd} {
+ if ![auto_load $cmd] {
+ continue
+ }
+ }
+ }
+ i {
+ if {[lsearch [image types] [lindex $cond 1]] == -1} {
+ continue
+ }
+ }
+ v {
+ set doit 1
+ foreach var [lrange $cond 1 end] {
+ if [uplevel #0 info exists [list $var]] {
+ set doit 0
+ break
+ }
+ }
+ if !$doit {
+ continue
+ }
+ }
+ }
+
+
+ if {$type == "d"} {
+ set tok [eval $command [list $token] $type [list $text] \
+ [list $dest]]
+ ForAllSamples $dest $tok $command
+ eval $command [list $tok] done xx xx
+ } else {
+ set tok [eval $command [list $token] $type [list $text] \
+ [list $dest]]
+ }
+ }
+}
+
+
+proc DoAll {hlist {path ""}} {
+ catch {
+ set theSample [$hlist info data $path]
+ if {$theSample != {}} {
+ set title [lindex $theSample 0]
+ set prog [lindex $theSample 1]
+
+ RunProg $title $prog
+ update
+ }
+ }
+
+ foreach p [$hlist info children $path] {
+ DoAll $hlist $p
+ }
+}
Added: external/tix-8.4.2.x/demos/samples/ArrowBtn.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/ArrowBtn.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,187 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ArrowBtn.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to write a new Tix widget class.
+#
+
+# ArrowBtn.tcl --
+#
+# Arrow Button: a sample Tix widget.
+#
+set arrow(n) [image create bitmap -data {
+ #define up_width 15
+ #define up_height 15
+ static unsigned char up_bits[] = {
+ 0x80, 0x00, 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, 0xfc, 0x1f,
+ 0xfe, 0x3f, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00};
+}]
+set arrow(w) [image create bitmap -data {
+ #define left_width 15
+ #define left_height 15
+ static unsigned char left_bits[] = {
+ 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0x7c, 0x00,
+ 0xfe, 0x3f, 0xff, 0x3f, 0xfe, 0x3f, 0x7c, 0x00, 0x78, 0x00, 0x70, 0x00,
+ 0x60, 0x00, 0x40, 0x00, 0x00, 0x00};
+}]
+set arrow(s) [image create bitmap -data {
+ #define down_width 15
+ #define down_height 15
+ static unsigned char down_bits[] = {
+ 0x00, 0x00, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01,
+ 0xc0, 0x01, 0xc0, 0x01, 0xfe, 0x3f, 0xfc, 0x1f, 0xf8, 0x0f, 0xf0, 0x07,
+ 0xe0, 0x03, 0xc0, 0x01, 0x80, 0x00};
+}]
+set arrow(e) [image create bitmap -data {
+ #define right_width 15
+ #define right_height 15
+ static unsigned char right_bits[] = {
+ 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f,
+ 0xfe, 0x3f, 0xfe, 0x7f, 0xfe, 0x3f, 0x00, 0x1f, 0x00, 0x0f, 0x00, 0x07,
+ 0x00, 0x03, 0x00, 0x01, 0x00, 0x00};
+}]
+
+tixWidgetClass tixArrowButton {
+ -classname TixArrowButton
+ -superclass tixPrimitive
+ -method {
+ flash invoke invert
+ }
+ -flag {
+ -direction -state
+ }
+ -configspec {
+ {-direction direction Direction e tixArrowButton:CheckDirection}
+ {-state state State normal}
+ }
+ -alias {
+ {-dir -direction}
+ }
+}
+
+proc tixArrowButton:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+ set data(count) 0
+}
+
+proc tixArrowButton:ConstructWidget {w} {
+ upvar #0 $w data
+ global arrow
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:button) [button $w.button -image $arrow($data(-direction))]
+ pack $data(w:button) -expand yes -fill both
+}
+
+proc tixArrowButton:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ bind $data(w:button) <1> "tixArrowButton:IncrCount $w"
+}
+
+proc tixArrowButton:IncrCount {w} {
+ upvar #0 $w data
+
+ incr data(count)
+}
+
+proc tixArrowButton:CheckDirection {dir} {
+ if {[lsearch {n w s e} $dir] != -1} {
+ return $dir
+ } else {
+ error "wrong direction value \"$dir\""
+ }
+}
+
+proc tixArrowButton:flash {w} {
+ upvar #0 $w data
+
+ $data(w:button) flash
+}
+
+proc tixArrowButton:invoke {w} {
+ upvar #0 $w data
+
+ $data(w:button) invoke
+}
+
+proc tixArrowButton:invert {w} {
+ upvar #0 $w data
+
+ set curDirection $data(-direction)
+ case $curDirection {
+ n {
+ set newDirection s
+ }
+ s {
+ set newDirection n
+ }
+ e {
+ set newDirection w
+ }
+ w {
+ set newDirection e
+ }
+ }
+ $w config -direction $newDirection
+}
+
+proc tixArrowButton:config-direction {w value} {
+ upvar #0 $w data
+ global arrow
+
+ $data(w:button) configure -image $arrow($value)
+}
+
+proc tixArrowButton:config-state {w value} {
+ upvar #0 $w data
+ global arrow
+
+ $data(w:button) configure -state $value
+}
+
+#----------------------------------------------------------------------
+#
+# Instantiate several widgets of the tixArrowButton class
+#
+#----------------------------------------------------------------------
+
+proc RunSample {w} {
+ set top [frame $w.top -border 1 -relief raised]
+ tixArrowButton $top.a -dir w
+ tixArrowButton $top.b -dir e
+
+ pack $top.a $top.b -side left -expand yes -fill both -padx 50 -pady 10
+
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> "exit"
+}
Added: external/tix-8.4.2.x/demos/samples/Balloon.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Balloon.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Balloon.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixBalloon widget, which provides
+# a interesting way to give help tips about elements in your user interface.
+# Your can display the help message in a "balloon" and a status bar widget.
+#
+proc RunSample {w} {
+
+ # Create the status bar widget
+ #
+ label $w.status -width 40 -relief sunken -bd 1
+ pack $w.status -side bottom -fill y -padx 2 -pady 1
+
+ # These are two a mysterious widgets that need some explanation
+ #
+ button $w.button1 -text " Something Unexpected " \
+ -command "destroy $w"
+ button $w.button2 -text " Something Else Unexpected " \
+ -command "destroy $w.button2"
+ pack $w.button1 $w.button2 -side top -expand yes
+
+ # Create the balloon widget and associate it with the widgets that we want
+ # to provide tips for:
+ tixBalloon $w.b -statusbar $w.status
+
+ $w.b bind $w.button1 -balloonmsg "Close window" \
+ -statusmsg "Press this button to close this window"
+ $w.b bind $w.button2 -balloonmsg "Self-destruct\nButton" \
+ -statusmsg "Press this button and it will get rid of itself"
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
Added: external/tix-8.4.2.x/demos/samples/BtnBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/BtnBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,57 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: BtnBox.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixButtonBox widget, which is a
+# group of TK buttons. You can use it to manage the buttons in a dialog box,
+# for example.
+#
+proc RunSample {w} {
+
+ # Create the label on the top of the dialog box
+ #
+ label $w.top -padx 20 -pady 10 -border 1 -relief raised -anchor c -text \
+ "This dialog box is\n a demostration of the\n tixButtonBox widget"
+
+ # Create the button box and add a few buttons in it. Set the
+ # -width of all the buttons to the same value so that they
+ # appear in the same size.
+ #
+ # Note that the -text, -underline, -command and -width options are all
+ # standard options of the button widgets.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text OK -underline 0 -command "destroy $w" -width 5
+ $w.box add close -text Close -underline 0 -command "destroy $w" -width 5
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ # "after 0" is used so that the key bindings won't interfere with
+ # tkTraverseMenu
+ #
+ bind [winfo toplevel $w] <Alt-o> \
+ "after 0 tkButtonInvoke [$w.box subwidget ok]"
+ bind [winfo toplevel $w] <Alt-c> \
+ "after 0 tkButtonInvoke [$w.box subwidget close]"
+ bind [winfo toplevel $w] <Escape> \
+ "after 0 tkButtonInvoke [$w.box subwidget close]"
+
+ focus [$w.box subwidget ok]
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/CObjView.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/CObjView.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,80 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CObjView.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This program demonstrates the use of the CObjView (Canvas Object
+# View) class.
+#
+# $Id: CObjView.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+
+proc RunSample {w} {
+ label $w.lab -justify left -text \
+"Click on the buttons to add or delete canvas
+objects randomally. Notice the scrollbars automatically
+adjust to include all objects in the scroll-region."
+
+ pack $w.lab -anchor c -padx 10 -pady 6 -side top
+ frame $w.f
+ pack $w.f -side bottom -fill y
+ tixCObjView $w.c
+ pack $w.c -expand yes -fill both -padx 4 -pady 2 -side top
+ button $w.add -command "CVDemo_Add $w.c" -text Add -width 6
+ button $w.del -command "CVDemo_Delete $w.c" -text Delete -width 6
+ button $w.exit -command "destroy $w" -text Exit -width 6
+ pack $w.add $w.del $w.exit -side left -padx 20 -pady 10 \
+ -anchor c -expand yes -in $w.f
+}
+
+proc CVDemo_Add {cov} {
+ # Generate four pseudo random numbers (x,y,w,h) to define the coordinates
+ # of a rectangle object in the canvas.
+ #
+ set colors {red green blue white black gray yellow}
+
+ set x [expr int(rand() * 400) - 120]
+ set y [expr int(rand() * 400) - 120]
+ set w [expr int(rand() * 120)]
+ set h [expr int(rand() * 120)]
+
+ # Create the canvas object
+ #
+ $cov subwidget canvas create rectangle $x $y [expr $x+$w] [expr $y+$h] \
+ -fill [lindex $colors [expr int(rand() * [llength $colors])]]
+
+ # Call the adjustscrollregion command to set the scroll bars so that all
+ # objects are included in the scroll-region
+ #
+ $cov adjustscrollregion
+}
+
+proc CVDemo_Delete {cov} {
+ set px [lindex [time update] 0]
+ set w [$cov subwidget canvas]
+ set items [$w find withtag all]
+
+ if [string compare $items ""] {
+ # There are items in the canvas, randomally delete one of them
+ # and re-adjust the scroll-region
+ #
+ set toDelete [expr $px % [llength $items]]
+ $w delete [lindex $items $toDelete]
+
+ $cov adjustscrollregion
+ }
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {after 10 exit}
+}
Added: external/tix-8.4.2.x/demos/samples/ChkList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/ChkList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,179 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ChkList.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This program demonstrates the use of the tixCheckList widget.
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ #------------------------------------------------------------
+ # Create the 1st CheckList (Multiple Selection)
+ #
+ set f [frame $top.f1]
+ pack $f -side left -expand yes -fill both -padx 4
+
+ set l [label $f.l -text "Choose languages: "]
+ pack $l -side top -fill x -padx 4 -pady 4
+
+ set c1 [tixCheckList $f.c -scrollbar auto]
+ pack $c1 -expand yes -fill both -padx 4 -pady 4
+
+ set b1 [button $f.btn -text "Results >>" -command "ChkList_Result $c1"]
+ pack $b1 -anchor c
+ #------------------------------------------------------------
+ # Create the 2nd CheckList (Single Selection, using the -radio option)
+ #
+ set f [frame $top.f2]
+ pack $f -side left -expand yes -fill both -padx 4
+
+ set l [label $f.l -text "Choose one language: "]
+ pack $l -side top -fill x -padx 4 -pady 4
+
+ set c2 [tixCheckList $f.c -scrollbar auto -radio true]
+ pack $c2 -expand yes -fill both -padx 4 -pady 4
+
+ # Fill up the two checklists with languages
+ #
+ set names(1) "Ada"
+ set names(2) "BCPL"
+ set names(3) "C"
+ set names(4) "Dylan"
+ set names(5) "Eiffel"
+ set names(6) "Fortran"
+ set names(7) "Incr Tcl"
+ set names(8) "Python"
+ set names(9) "Scheme"
+ set names(0) "TCL"
+
+ set h1 [$c1 subwidget hlist]
+ set h2 [$c2 subwidget hlist]
+
+ foreach ent {1 2 3 4 5 6 7 8 9 0} {
+ $h1 add $ent -itemtype imagetext -text $names($ent)
+ }
+
+ foreach ent {1 2 3 4 5 6 7 8 9 0} {
+ $h2 add $ent -itemtype imagetext -text $names($ent)
+ $c2 setstatus $ent off
+ }
+
+ $c1 setstatus 1 on
+ $c1 setstatus 2 on
+ $c1 setstatus 3 default
+ $c1 setstatus 4 off
+ $c1 setstatus 5 off
+ $c1 setstatus 6 on
+ $c1 setstatus 7 off
+ $c1 setstatus 8 on
+ $c1 setstatus 9 on
+ $c1 setstatus 0 default
+
+
+ #------------------------------------------------------------
+ # Create the 3nd CheckList (a tree). Also, we disable some
+ # sub-selections if the top-level selections are not selected.
+ # i.e., if the user doesn't like any functional languages,
+ # make sure he doesn't select Lisp.
+ #
+ set f [frame $top.f3]
+ pack $f -side left -expand yes -fill both -padx 4
+
+ set l [label $f.l -text "Choose languages: "]
+ pack $l -side top -fill x -padx 4 -pady 4
+
+ set c3 [tixCheckList $f.c -scrollbar auto -options {
+ hlist.indicator 1
+ hlist.indent 20
+ }]
+ pack $c3 -expand yes -fill both -padx 4 -pady 4
+
+ set h3 [$c3 subwidget hlist]
+
+ $h3 add 0 -itemtype imagetext -text "Functional Languages"
+ $h3 add 1 -itemtype imagetext -text "Imperative Languages"
+
+ $h3 add 0.0 -itemtype imagetext -text Lisp
+ $h3 add 0.1 -itemtype imagetext -text Scheme
+ $h3 add 1.0 -itemtype imagetext -text C
+ $h3 add 1.1 -itemtype imagetext -text Python
+
+ $c3 setstatus 0 on
+ $c3 setstatus 1 on
+ $c3 setstatus 0.0 off
+ $c3 setstatus 0.1 off
+ $c3 setstatus 1.0 on
+ $c3 setstatus 1.1 off
+
+ $c3 config -browsecmd "ChkList:Monitor $c3"
+ $c3 config -command "ChkList:Monitor $c3"
+
+ $c3 autosetmode
+
+ global chklist tixOption
+ set chklist(disabled) [tixDisplayStyle imagetext -fg $tixOption(disabled_fg) \
+ -refwindow [$c3 subwidget hlist]]
+ set chklist(normal) [tixDisplayStyle imagetext -fg black \
+ -refwindow [$c3 subwidget hlist]]
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+proc ChkList_Result {clist} {
+ tixDemo:Status "Selected items: [$clist getselection on]"
+ tixDemo:Status "Unselected items: [$clist getselection off]"
+ tixDemo:Status "Default items: [$clist getselection default]"
+}
+
+# This function monitors if any of the two "general groups"
+# (functional and imperative languages) are de-selected. If so, it
+# sets all the sub-selections to non-selectable by setting their -state
+# to disabled.
+#
+proc ChkList:Monitor {c3 ent} {
+ global chklist
+
+ set h [$c3 subwidget hlist]
+
+ if {[$c3 getstatus 0] == "on"} {
+ set state normal
+ } else {
+ set state disabled
+ }
+
+ $h entryconfig 0.0 -state $state -style $chklist($state)
+ $h entryconfig 0.1 -state $state -style $chklist($state)
+
+ if {[$c3 getstatus 1] == "on"} {
+ set state normal
+ } else {
+ set state disabled
+ }
+
+ $h entryconfig 1.0 -state $state -style $chklist($state)
+ $h entryconfig 1.1 -state $state -style $chklist($state)
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/CmpImg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/CmpImg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,64 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CmpImg.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the compound images: it uses compound
+# images to display a text string together with a pixmap inside
+# buttons
+#
+proc RunSample {w} {
+
+ set img0 [tix getimage network]
+ set img1 [tix getimage harddisk]
+
+ button $w.hdd -padx 4 -pady 1 -width 120
+ button $w.net -padx 4 -pady 1 -width 120
+
+ # Create the first image: we create a line, then put a string,
+ # a space and a image into this line, from left to right.
+ # The result: we have a one-line image that consists of three
+ # individual items
+ #
+ set hdd_img [image create compound -window $w.hdd]
+ $hdd_img add line
+ $hdd_img add text -text "Hard Disk" -underline 0
+ $hdd_img add space -width 7
+ $hdd_img add image -image $img1
+
+ # Put this image into the first button
+ #
+ $w.hdd config -image $hdd_img
+
+ # Create the second compound image. Very similar to what we did above
+ #
+ set net_img [image create compound -window $w.net]
+ $net_img add line
+ $net_img add text -text "Network" -underline 0
+ $net_img add space -width 7
+ $net_img add image -image $img0
+
+ $w.net config -image $net_img
+
+ # The button to close the window
+ #
+
+ button $w.clo -pady 1 -text Close -command "destroy $w"
+
+ pack $w.hdd $w.net $w.clo -side left -padx 10 -pady 10 -fill y -expand yes
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/CmpImg1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/CmpImg1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,182 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CmpImg1.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixNoteBook widget, which allows
+# you to lay out your interface using a "notebook" metaphore
+#
+
+proc RunSample {w} {
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ #
+ set name [tixOptionName $w]
+ option add *$name*TixControl*entry.width 10
+ option add *$name*TixControl*label.width 18
+ option add *$name*TixControl*label.anchor e
+ option add *$name*TixNoteBook*tabPadX 8
+
+ # Create the notebook widget and set its backpagecolor to gray.
+ # Note that the -backpagecolor option belongs to the "nbframe"
+ # subwidget.
+ tixNoteBook $w.nb -ipadx 6 -ipady 6
+ $w config -bg gray
+ $w.nb subwidget nbframe config -backpagecolor gray -tabpady 0
+
+ # Create the two tabs on the notebook. The -underline option
+ # puts a underline on the first character of the labels of the tabs.
+ # Keyboard accelerators will be defined automatically according
+ # to the underlined character.
+ #
+ global network_pixmap hard_disk_pixmap
+ set img0 [image create pixmap -data $network_pixmap]
+ set img1 [image create pixmap -data $hard_disk_pixmap]
+
+ set hd_img [image create compound -window [$w.nb subwidget nbframe]]
+ $hd_img add line
+ $hd_img add text -text "Hard Disk" -underline 0
+ $hd_img add space -width 7
+ $hd_img add image -image $img1
+
+ $w.nb add hard_disk -image $hd_img
+
+ set net_img [image create compound -window [$w.nb subwidget nbframe]]
+ $net_img add line
+ $net_img add text -text "Network" -underline 0
+ $net_img add space -width 7
+ $net_img add image -image $img0
+
+ $w.nb add network -image $net_img
+ # Create the first page
+ #
+ set f [$w.nb subwidget hard_disk]
+
+ tixControl $f.a -value 12 -label "Access Time: "
+ tixControl $f.w -value 400 -label "Write Throughput: "
+ tixControl $f.r -value 400 -label "Read Throughput: "
+ tixControl $f.c -value 1021 -label "Capacity: "
+ pack $f.a $f.w $f.r $f.c -side top -padx 20 -pady 2
+
+ # Create the second page
+ #
+ set f [$w.nb subwidget network]
+
+ tixControl $f.a -value 12 -label "Access Time: "
+ tixControl $f.w -value 400 -label "Write Throughput: "
+ tixControl $f.r -value 400 -label "Read Throughput: "
+ tixControl $f.c -value 1021 -label "Capacity: "
+ tixControl $f.u -value 10 -label "Users: "
+
+ pack $f.a $f.w $f.r $f.c $f.u -side top -padx 20 -pady 2
+ pack $w.nb -expand yes -fill both -padx 5 -pady 5
+
+}
+
+set network_pixmap {/* XPM */
+static char * netw_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 7 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #404040",
+"+ c blue",
+"@ c red",
+/* pixels */
+" ",
+" .............. ",
+" .XXXXXXXXXXXX. ",
+" .XooooooooooO. ",
+" .Xo.......XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++++o+XoO. ",
+" .Xo.++oo++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.+o++++XoO. ",
+" .Xo.++++++XoO. ",
+" .Xo.XXXXXXXoO. ",
+" .XooooooooooO. ",
+" .Xo at ooo....oO. ",
+" .............. .XooooooooooO. ",
+" .XXXXXXXXXXXX. .XooooooooooO. ",
+" .XooooooooooO. .OOOOOOOOOOOO. ",
+" .Xo.......XoO. .............. ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++++o+XoO. @ ",
+" .Xo.++oo++XoO. @ ",
+" .Xo.++++++XoO. @ ",
+" .Xo.+o++++XoO. @ ",
+" .Xo.++++++XoO. ..... ",
+" .Xo.XXXXXXXoO. .XXX. ",
+" .XooooooooooO.@@@@@@.X O. ",
+" .Xo at ooo....oO. .OOO. ",
+" .XooooooooooO. ..... ",
+" .XooooooooooO. ",
+" .OOOOOOOOOOOO. ",
+" .............. ",
+" "};}
+
+set hard_disk_pixmap {/* XPM */
+static char * drivea_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"32 32 5 1",
+/* colors */
+" s None c None",
+". c #000000000000",
+"X c white",
+"o c #c000c000c000",
+"O c #800080008000",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" .......................... ",
+" .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+" .XooooooooooooooooooooooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .Xooooooooooooooooo..oooO. ",
+" .XooooooooooooooooooooooO. ",
+" .Xoooooooo.......oooooooO. ",
+" .Xoo...................oO. ",
+" .Xoooooooo.......oooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .XooooooooooooooooooooooO. ",
+" .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+" .......................... ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};}
+
+
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/CmpImg2.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/CmpImg2.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,136 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CmpImg2.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use the compound image inside NoteBook
+# widgets. This file is basically a cross-over of NoteBook.tcl and CmpImg.tcl
+#
+proc RunSample {w} {
+
+ # Create the notebook widget and set its backpagecolor to gray.
+ # Note that the -backpagecolor option belongs to the "nbframe"
+ # subwidget.
+ tixNoteBook $w.nb -ipadx 6 -ipady 6
+ $w config -bg gray
+ $w.nb subwidget nbframe config -backpagecolor gray -tabpady 0
+
+ # Create the two compound images
+ #
+ #
+
+ # these are two Tix built-in images
+ #
+ set img0 [tix getimage network]
+ set img1 [tix getimage harddisk]
+
+ # Create the first image:
+ #
+ # Notice that the -window option must be set to the nbframe
+ # subwidget of the notebook because the image will be displayed
+ # in that widget.
+ #
+ set hdd_img [image create compound -window [$w.nb subwidget nbframe] \
+ -pady 0]
+ $hdd_img add line
+ $hdd_img add image -image $img1
+ $hdd_img add space -width 7
+ $hdd_img add text -text "Hard Disk" -underline 0
+
+ # Create the second compound image. Very similar to what we did above
+ #
+ set net_img [image create compound -window [$w.nb subwidget nbframe] \
+ -pady 0]
+ $net_img add line
+ $net_img add image -image $img0
+ $net_img add space -width 7
+ $net_img add text -text "Network" -underline 0
+
+ #
+ # Now create the pages
+ #
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ #
+ set name [tixOptionName $w]
+ option add *$name*TixControl*entry.width 10
+ option add *$name*TixControl*label.width 18
+ option add *$name*TixControl*label.anchor e
+
+ # Create the two tabs on the notebook. The -underline option
+ # puts a underline on the first character of the labels of the tabs.
+ # Keyboard accelerators will be defined automatically according
+ # to the underlined character.
+ #
+ $w.nb add hard_disk -image $hdd_img
+ $w.nb add network -image $net_img
+ pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top
+
+ #----------------------------------------
+ # Create the first page
+ #----------------------------------------
+ set f [$w.nb subwidget hard_disk]
+
+ # Create two frames: one for the common buttons, one for the
+ # other widgets
+ #
+ frame $f.f
+ frame $f.common
+ pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes
+ pack $f.common -side right -padx 2 -pady 2 -fill y
+
+ # Create the controls that only belong to this page
+ #
+ tixControl $f.f.a -value 12 -label "Access Time: "
+ tixControl $f.f.w -value 400 -label "Write Throughput: "
+ tixControl $f.f.r -value 400 -label "Read Throughput: "
+ tixControl $f.f.c -value 1021 -label "Capacity: "
+ pack $f.f.a $f.f.w $f.f.r $f.f.c -side top -padx 20 -pady 2
+
+ # Create the common buttons
+ #
+ CreateCommonButtons $w $f.common
+
+ #----------------------------------------
+ # Create the second page
+ #----------------------------------------
+ set f [$w.nb subwidget network]
+
+ frame $f.f
+ frame $f.common
+ pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes
+ pack $f.common -side right -padx 2 -pady 2 -fill y
+
+ tixControl $f.f.a -value 12 -label "Access Time: "
+ tixControl $f.f.w -value 400 -label "Write Throughput: "
+ tixControl $f.f.r -value 400 -label "Read Throughput: "
+ tixControl $f.f.c -value 1021 -label "Capacity: "
+ tixControl $f.f.u -value 10 -label "Users: "
+
+ pack $f.f.a $f.f.w $f.f.r $f.f.c $f.f.u -side top -padx 20 -pady 2
+
+ CreateCommonButtons $w $f.common
+}
+
+proc CreateCommonButtons {w f} {
+ button $f.ok -text OK -width 6 -command "destroy $w"
+ button $f.cancel -text Cancel -width 6 -command "destroy $w"
+
+ pack $f.ok $f.cancel -side top -padx 2 -pady 2
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/CmpImg3.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/CmpImg3.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,90 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CmpImg3.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# Demonstrates how to use compound images to display icons in a canvas widget.
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ label $top.lab -text "Drag the icons"
+ pack $top.lab -anchor c -side top -pady 4
+
+ # Create the canvas to display the icons
+ #
+ set c [canvas $top.c -relief sunken -bd 1]
+ pack $c -side top -expand yes -fill both -padx 4 -pady 4
+
+ # create several compound images in the canvas
+ #
+ set network [tix getimage network]
+ set harddisk [tix getimage harddisk]
+
+ set cmp_1 [image create compound -window $c -bd 1]
+ $cmp_1 add image -image $network
+ $cmp_1 add line
+ $cmp_1 add text -text " Network "
+
+ set cmp_2 [image create compound -window $c -bd 1]
+ $cmp_2 add image -image $harddisk
+ $cmp_2 add line
+ $cmp_2 add text -text " Hard disk "
+
+ set cmp_3 [image create compound -window $c -bd 1 \
+ -background #c0c0ff -relief raised \
+ -showbackground 1]
+ $cmp_3 add image -image $network
+ $cmp_3 add line
+ $cmp_3 add text -text " Network 2 "
+
+ $c create image 50 50 -image $cmp_1
+ $c create image 150 50 -image $cmp_2
+ $c create image 250 50 -image $cmp_3
+
+ bind $c <1> "itemStartDrag $c %x %y"
+ bind $c <B1-Motion> "itemDrag $c %x %y"
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+
+proc itemStartDrag {c x y} {
+ global lastX lastY
+ $c raise current
+
+ set lastX [$c canvasx $x]
+ set lastY [$c canvasy $y]
+}
+
+proc itemDrag {c x y} {
+ global lastX lastY
+ set x [$c canvasx $x]
+ set y [$c canvasy $y]
+ $c move current [expr $x-$lastX] [expr $y-$lastY]
+ set lastX $x
+ set lastY $y
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/CmpImg4.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/CmpImg4.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,125 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CmpImg4.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use the compound image to add
+# colors in Notebook tabs.
+#
+proc RunSample {w} {
+
+ # Create the notebook widget and set its backpagecolor to gray.
+ # Note that the -backpagecolor option belongs to the "nbframe"
+ # subwidget.
+ tixNoteBook $w.nb -ipadx 6 -ipady 6
+ # $w config -bg gray
+ # $w.nb subwidget nbframe config -backpagecolor gray -tabpady 0
+
+ # Create the two compound images --
+ #
+ # Create the first image:
+ #
+ # Notice that the -window option must be set to the nbframe
+ # subwidget of the notebook because the image will be displayed
+ # in that widget.
+ #
+ set hdd_img [image create compound -window [$w.nb subwidget nbframe] \
+ -pady 4 -padx 4 -bg #f09090 -showbackground 1]
+ $hdd_img add line
+ $hdd_img add text -text "Hard Disk" -underline 0 -padx 6 -pady 4
+
+ # Create the second compound image. Very similar to what we did above
+ #
+ set net_img [image create compound -window [$w.nb subwidget nbframe] \
+ -pady 4 -pady 4 -bg #9090f0 -showbackground 1]
+ $net_img add line
+ $net_img add text -text "Network" -underline 0 -padx 6 -pady 4
+
+ #
+ # Now create the pages
+ #
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ #
+ set name [tixOptionName $w]
+ option add *$name*TixControl*entry.width 10
+ option add *$name*TixControl*label.width 18
+ option add *$name*TixControl*label.anchor e
+
+ # Create the two tabs on the notebook. The -underline option
+ # puts a underline on the first character of the labels of the tabs.
+ # Keyboard accelerators will be defined automatically according
+ # to the underlined character.
+ #
+ $w.nb add hard_disk -image $hdd_img
+ $w.nb add network -image $net_img
+ pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top
+
+ #----------------------------------------
+ # Create the first page
+ #----------------------------------------
+ set f [$w.nb subwidget hard_disk]
+
+ # Create two frames: one for the common buttons, one for the
+ # other widgets
+ #
+ frame $f.f
+ frame $f.common
+ pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes
+ pack $f.common -side right -padx 2 -pady 2 -fill y
+
+ # Create the controls that only belong to this page
+ #
+ tixControl $f.f.a -value 12 -label "Access Time: "
+ tixControl $f.f.w -value 400 -label "Write Throughput: "
+ tixControl $f.f.r -value 400 -label "Read Throughput: "
+ tixControl $f.f.c -value 1021 -label "Capacity: "
+ pack $f.f.a $f.f.w $f.f.r $f.f.c -side top -padx 20 -pady 2
+
+ # Create the common buttons
+ #
+ CreateCommonButtons $w $f.common
+
+ #----------------------------------------
+ # Create the second page
+ #----------------------------------------
+ set f [$w.nb subwidget network]
+
+ frame $f.f
+ frame $f.common
+ pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes
+ pack $f.common -side right -padx 2 -pady 2 -fill y
+
+ tixControl $f.f.a -value 12 -label "Access Time: "
+ tixControl $f.f.w -value 400 -label "Write Throughput: "
+ tixControl $f.f.r -value 400 -label "Read Throughput: "
+ tixControl $f.f.c -value 1021 -label "Capacity: "
+ tixControl $f.f.u -value 10 -label "Users: "
+
+ pack $f.f.a $f.f.w $f.f.r $f.f.c $f.f.u -side top -padx 20 -pady 2
+
+ CreateCommonButtons $w $f.common
+}
+
+proc CreateCommonButtons {w f} {
+ button $f.ok -text OK -width 6 -command "destroy $w"
+ button $f.cancel -text Cancel -width 6 -command "destroy $w"
+
+ pack $f.ok $f.cancel -side top -padx 2 -pady 2
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/ComboBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/ComboBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,119 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ComboBox.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixComboBox widget, which is close
+# to the MS Window Combo Box control.
+#
+proc RunSample {w} {
+
+ # Create the comboboxes on the top of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ # $w.top.a is a drop-down combo box. It is not editable -- who wants
+ # to invent new months?
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of both comboboxes to
+ # be 10 so that their labels appear to be aligned.
+ #
+ tixComboBox $w.top.a -label "Month: " -dropdown true \
+ -command cbx:select_month -editable false -variable demo_month \
+ -options {
+ listbox.height 6
+ label.width 10
+ label.anchor e
+ }
+
+
+ # $w.top.b is a non-drop-down combo box. It is not editable: we provide
+ # four choices for the user, but he can enter an alternative year if he
+ # wants to.
+ #
+ # [Hint] Use the padY and anchor options of the label subwidget to
+ # aligh the label with the entry subwidget.
+ # [Hint] Notice that you should use padY (the NAME of the option) and not
+ # pady (the SWITCH of the option).
+ #
+ tixComboBox $w.top.b -label "Year: " -dropdown false \
+ -command cbx:select_year -editable true -variable demo_year \
+ -options {
+ listbox.height 4
+ label.padY 5
+ label.width 10
+ label.anchor ne
+ }
+
+ pack $w.top.a -side top -anchor w
+ pack $w.top.b -side top -anchor w
+
+ # Insert the choices into the combo boxes
+ #
+ $w.top.a insert end January
+ $w.top.a insert end February
+ $w.top.a insert end March
+ $w.top.a insert end April
+ $w.top.a insert end May
+ $w.top.a insert end June
+ $w.top.a insert end July
+ $w.top.a insert end August
+ $w.top.a insert end September
+ $w.top.a insert end October
+ $w.top.a insert end November
+ $w.top.a insert end December
+
+ $w.top.b insert end 1992
+ $w.top.b insert end 1993
+ $w.top.b insert end 1994
+ $w.top.b insert end 1995
+
+ # Use "tixSetSilent" to set the values of the combo box if you
+ # don't want your -command procedures (cbx:select_month and
+ # cbx:select_year) to be called.
+ #
+ tixSetSilent $w.top.a January
+ tixSetSilent $w.top.b 1995
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "cbx:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+proc cbx:select_year {args} {
+ tixDemo:Status "you have selected \"$args\""
+}
+
+proc cbx:select_month {s} {
+ tixDemo:Status "you have selected \"$s\""
+}
+
+proc cbx:okcmd {w} {
+ global demo_month demo_year
+
+ tixDemo:Status "The month selected is $demo_month of $demo_year"
+ destroy $w
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/Control.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Control.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,133 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Control.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixControl widget -- it is an
+# entry widget with up/down arrow buttons. You can use the arrow buttons
+# to adjust the value inside the entry widget.
+#
+# This example program uses three Control widgets. One lets you select
+# integer values; one lets you select floating point values and the last
+# one lets you select a few names.
+#
+proc RunSample {w} {
+
+ # Create the tixControls on the top of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ # $w.top.a allows only integer values
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of the Controls to
+ # be 16 so that their labels appear to be aligned.
+ #
+ global demo_maker demo_thrust demo_num_engins
+ set demo_maker P&W
+ set demo_thrust 20000.0
+ set demo_num_engins 2
+
+
+ tixControl $w.top.a -label "Number of Engines: " -integer true \
+ -variable demo_num_engins -min 1 -max 4\
+ -options {
+ entry.width 10
+ label.width 20
+ label.anchor e
+ }
+
+ tixControl $w.top.b -label "Thrust: " -integer false \
+ -min 10000.0 -max 60000.0 -step 500\
+ -variable demo_thrust \
+ -options {
+ entry.width 10
+ label.width 20
+ label.anchor e
+ }
+
+ tixControl $w.top.c -label "Engin Maker: " \
+ -incrcmd "ctl:adjust_maker $w.top.c +1" \
+ -decrcmd "ctl:adjust_maker $w.top.c -1" \
+ -validatecmd "ctl:validate_maker $w.top.c" \
+ -value "P&W" \
+ -options {
+ entry.width 10
+ label.width 20
+ label.anchor e
+ }
+
+ pack $w.top.a $w.top.b $w.top.c -side top -anchor w
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "ctl:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+set ctl_makers {GE P&W "Rolls Royce"}
+
+# This procedure gets called when the user presses the up/down arrow buttons.
+# We return the "previous" or "next" engin maker according to the "$by"
+# argument
+#
+proc ctl:adjust_maker {w by value} {
+ global ctl_makers
+
+ set index [lsearch $ctl_makers $value]
+ set len [llength $ctl_makers]
+ set index [expr $index $by]
+
+ if {$index < 0} {
+ set index [expr $len -1]
+ }
+ if {$index >= $len} {
+ set index 0
+ }
+
+ return [lindex $ctl_makers $index]
+}
+
+proc ctl:validate_maker {w value} {
+ global ctl_makers
+
+ if {[lsearch $ctl_makers $value] == -1} {
+ return [lindex $ctl_makers 0]
+ } else {
+ return $value
+ }
+}
+
+proc ctl:okcmd {w} {
+ global demo_maker demo_thrust demo_num_engins
+
+ tixDemo:Status "You selected $demo_num_engins engin(s) of thrust $demo_thrust made \
+by $demo_maker"
+
+ destroy $w
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/DirDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/DirDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,90 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirDlg.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixDirSelectDialog widget:
+# it allows the user to select a directory.
+#
+proc RunSample {w} {
+
+ # Create an entry for the user to input a directory. If he can't
+ # bother to type in the name, he can press the "Browse ..." button
+ # and call up the diretcory dialog
+ #
+ frame $w.top -border 1 -relief raised
+
+ tixLabelEntry $w.top.ent -label "Select A Directory:" -labelside top \
+ -options {
+ entry.width 25
+ entry.textVariable demo_ddlg_dirname
+ label.anchor w
+ }
+ bind [$w.top.ent subwidget entry] <Return> "ddlg:okcmd $w"
+
+ uplevel #0 set demo_ddlg_dirname {}
+
+ button $w.top.btn -text "Browse ..." -command "ddlg:browse"
+
+ pack $w.top.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
+ pack $w.top.btn -side left -anchor s -padx 4 -pady 4
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "ddlg:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+# Pop up a directory selection dialog
+#
+proc ddlg:browse {} {
+ set dialog .dirdlg_popup
+ if ![winfo exists $dialog] {
+ tixDirSelectDialog $dialog
+ }
+ $dialog config -command ddlg:select_dir
+
+ $dialog popup
+}
+
+proc ddlg:select_dir {dir} {
+ global demo_ddlg_dirname
+
+ set demo_ddlg_dirname $dir
+}
+
+proc ddlg:okcmd {w} {
+ global demo_ddlg_dirname
+
+ if {$demo_ddlg_dirname != {}} {
+ tixDemo:Status "You have selected the directory $demo_ddlg_dirname"
+ } else {
+ tixDemo:Status "You haven't selected any directory"
+ }
+
+ destroy $w
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/DirList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/DirList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,91 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirList.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixDirList widget -- you can
+# use it for the user to select a directory. For example, an installation
+# program can use the tixDirList widget to ask the user to select the
+# installation directory for an application.
+#
+proc RunSample {w} {
+
+ # Create the tixDirList and the tixLabelEntry widgets on the on the top
+ # of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ # Create the DirList widget. By default it will show the current
+ # directory (returned by [pwd])
+ #
+ #
+ tixDirList $w.top.dir
+
+ # When the user presses the ".." button, the selected directory
+ # is "transferred" into the entry widget
+ #
+ button $w.top.btn -text " >> " -pady 0 \
+ -command "dlist:copy_name $w.top.dir"
+
+ # We use a LabelEntry to hold the installation directory. The user
+ # can choose from the DirList widget, or he can type in the directory
+ # manually
+ #
+ tixLabelEntry $w.top.ent -label "Installation Directory:" -labelside top \
+ -options {
+ entry.width 25
+ entry.textVariable demo_dlist_dir
+ label.anchor w
+ }
+ bind [$w.top.ent subwidget entry] <Return> "dlist:okcmd $w"
+
+ uplevel #0 set demo_dlist_dir [list [pwd]]
+
+ pack $w.top.dir -side left -expand yes -fill both -padx 4 -pady 4
+ pack $w.top.btn -side left -anchor s -padx 4 -pady 4
+ pack $w.top.ent -side left -fill x -anchor s -padx 4 -pady 4
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "dlist:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+proc dlist:copy_name {w} {
+ global demo_dlist_dir
+
+ set demo_dlist_dir [$w cget -value]
+}
+
+proc dlist:okcmd {w} {
+ global demo_dlist_dir
+
+ tixDemo:Status "You have selected the directory $demo_dlist_dir"
+
+ destroy $w
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> "exit"
+}
Added: external/tix-8.4.2.x/demos/samples/DirTree.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/DirTree.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,92 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirTree.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixDirTree widget -- you can
+# use it for the user to select a directory. For example, an installation
+# program can use the tixDirList widget to ask the user to select the
+# installation directory for an application.
+#
+proc RunSample {w} {
+
+ # Create the tixDirTree and the tixLabelEntry widgets on the on the top
+ # of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ # Create the DirTree widget. By default it will show the current
+ # directory (returned by [pwd])
+ #
+ #
+ tixDirTree $w.top.dir -browsecmd "dtree:browse $w.top.ent"
+
+ # When the user presses the ".." button, the selected directory
+ # is "transferred" into the entry widget
+ #
+
+ # We use a LabelEntry to hold the installation directory. The user
+ # can choose from the DirTree widget, or he can type in the directory
+ # manually
+ #
+ tixLabelEntry $w.top.ent -label "Installation Directory:" -labelside top \
+ -options {
+ entry.width 25
+ entry.textVariable demo_dtree_dir
+ label.anchor w
+ }
+ bind [$w.top.ent subwidget entry] <Return> "dtree:okcmd $w"
+
+ uplevel #0 set demo_dtree_dir [list [pwd]]
+
+ pack $w.top.dir -side left -expand yes -fill both -padx 4 -pady 4
+ pack $w.top.ent -side left -fill x -anchor c -padx 4 -pady 4
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "dtree:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+proc dtree:browse {ent filename} {
+ uplevel #0 set demo_dtree_dir $filename
+
+}
+
+proc dtree:copy_name {w} {
+ global demo_dtree_dir
+
+ set demo_dtree_dir [$w cget -value]
+}
+
+proc dtree:okcmd {w} {
+ global demo_dtree_dir
+
+ tixDemo:Status "You have selected the directory $demo_dtree_dir"
+
+ destroy $w
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> "exit"
+}
Added: external/tix-8.4.2.x/demos/samples/DragDrop.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/DragDrop.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DragDrop.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the Drag+Drop features in Tix. Drag+Drop is still
+# experimental in Tix. Please don't use. For your eyes only.
+#
+#
+proc RunSample {w} {
+
+ text $w.d -height 5
+ $w.d insert end {Quick and dirty example:
+click on any node on on the directory lists and drag. You can see the
+cursor change its shape. The "dropsite" of the directory lists will be
+highlighted when you drag the cursor accorss the directory nodes.
+Nothing will happen when you drop. }
+
+ pack $w.d -padx 10 -pady 5
+
+ tixDirList $w.d1; pack $w.d1 -fill both -padx 10 -pady 5 \
+ -side left
+ tixDirList $w.d2; pack $w.d2 -fill both -padx 10 -pady 5 \
+ -side left
+
+ button $w.b -text "Close" -command "destroy $w"
+ pack $w.b -side left -anchor c -expand yes
+
+ $w.d1 subwidget hlist config -selectmode dragdrop
+ $w.d2 subwidget hlist config -selectmode dragdrop
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> "exit"
+}
+
Added: external/tix-8.4.2.x/demos/samples/DynTree.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/DynTree.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,149 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DynTree.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use the TixTree widget to display
+# dynamic hierachical data (the files in the Unix file system)
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Create a TixTree widget to display the hypothetical DOS disk drive
+ #
+ #
+ tixTree $w.top.a -options {
+ hlist.separator "/"
+ hlist.width 35
+ hlist.height 25
+ }
+
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+ set tree $w.top.a
+ set hlist [$tree subwidget hlist]
+
+ $tree config -opencmd "DynTree:OpenDir $tree"
+
+ # Add the root directory the TixTree widget
+ DynTree:AddDir $tree /
+
+ # The / directory is added in the "open" mode. The user can open it
+ # and then browse its subdirectories ...
+
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+proc DynTree:AddDir {tree dir} {
+ set hlist [$tree subwidget hlist]
+
+ if {$dir == "/"} {
+ set text /
+ } else {
+ set text [file tail $dir]
+ }
+
+ $hlist add $dir -itemtype imagetext \
+ -text $text -image [tix getimage folder]
+
+ catch {
+ # We need a catch here because the directory may not be readable by us
+ #
+ $tree setmode $dir none
+ if {[glob -nocomplain $dir/*] != {}} {
+ $tree setmode $dir open
+ }
+ }
+}
+
+
+# This command is called whenever the user presses the (+) indicator or
+# double clicks on a directory whose mode is "open". It loads the files
+# inside that directory into the Tree widget.
+#
+# Note we didn't specify the -closecmd option for the Tree widget, so it
+# performs the default action when the user presses the (-) indicator or
+# double clicks on a directory whose mode is "close": hide all of its child
+# entries
+#
+proc DynTree:OpenDir {tree dir} {
+ set PWD [pwd]
+ set hlist [$tree subwidget hlist]
+
+ if {[$hlist info children $dir] != {}} {
+ # We have already loaded this directory. Let's just
+ # show all the child entries
+ #
+ # Note: since we load the directory only once, it will not be
+ # refreshed if the you add or remove files from this
+ # directory.
+ #
+ foreach kid [$hlist info children $dir] {
+ $hlist show entry $kid
+ }
+ return
+ }
+
+ if [catch {cd $dir}] {
+ # We can't read that directory, better not do anything
+ cd $PWD
+ return
+ }
+
+ set files [lsort [glob -nocomplain *]]
+ foreach f $files {
+ if [file isdirectory $f] {
+ if {$dir == "/"} {
+ set subdir /$f
+ } else {
+ set subdir $dir/$f
+ }
+ DynTree:AddDir $tree $subdir
+ } else {
+ if {$dir == "/"} {
+ set file /$f
+ } else {
+ set file $dir/$f
+ }
+
+ $hlist add $file -itemtype imagetext \
+ -text $f -image [tix getimage file]
+ }
+ }
+
+ cd $PWD
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/EFileDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/EFileDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,104 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: EFileDlg.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixExFileSelectDialog widget --
+# This is a neat file selection dialog that will make your apps look
+# real good!
+#
+proc RunSample {w} {
+
+ # Create an entry for the user to input a filename. If he can't
+ # bother to type in the name, he can press the "Browse ..." button
+ # and call up the file dialog
+ #
+ frame $w.top -border 1 -relief raised
+
+ tixLabelEntry $w.top.ent -label "Select A File:" -labelside top \
+ -options {
+ entry.width 25
+ entry.textVariable demo_efdlg_filename
+ label.anchor w
+ }
+ bind [$w.top.ent subwidget entry] <Return> "efdlg:okcmd $w"
+
+ uplevel #0 set demo_efdlg_filename {}
+
+
+ button $w.top.btn -text "Browse ..." -command "efdlg:browse"
+
+ pack $w.top.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
+ pack $w.top.btn -side left -anchor s -padx 4 -pady 4
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "efdlg:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+# Pop up a file selection dialog
+#
+proc efdlg:browse {} {
+ # [Hint]
+ # The best way to use an ExFileSelectDialog is not to create one yourself
+ # but to call the command "tix filedialog". This command creates one file
+ # dialog box that is shared by different parts of the application.
+ # This way, your application can save resources because it doesn't
+ # need to create a lot of file dialog boxes even if it needs to input
+ # file names at a lot of different occasions.
+ #
+ set dialog [tix filedialog tixExFileSelectDialog]
+ $dialog config -command efdlg:select_file
+
+ $dialog subwidget fsbox config -filetypes {
+ {{*} {* -- All files}}
+ {{*.txt} {*.txt -- Text files}}
+ {{*.c} {*.c -- C source files}}
+ }
+
+ wm transient $dialog ""
+ $dialog popup
+}
+
+proc efdlg:select_file {file} {
+ global demo_efdlg_filename
+
+ set demo_efdlg_filename $file
+}
+
+proc efdlg:okcmd {w} {
+ global demo_efdlg_filename
+
+ if {$demo_efdlg_filename != {}} {
+ tixDemo:Status "You have selected the file $demo_efdlg_filename"
+ } else {
+ tixDemo:Status "You haven't selected any file"
+ }
+
+ destroy $w
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/EditGrid.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/EditGrid.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,281 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: EditGrid.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# Demonstrates the use of editable entries in a Grid widget.
+#
+
+proc RunSample {w} {
+ global editgrid
+
+ wm title $w "Doe Inc. Performance"
+ wm geometry $w 640x300
+
+ label $w.lab -justify left -text \
+"The left column is calculated automatically. To calculate the right column,
+press the \"Calculate\" button"
+ pack $w.lab -side top -anchor c -padx 3 -pady 3
+
+ # Create the buttons
+ #
+ set f [frame $w.f -relief flat]
+ pack $f -side right -fill y
+ set add [button $f.add -text "Add Row" -width 9 \
+ -command "EditGrid_addRow"]
+ set edit [button $f.edit -text "Edit" -width 9 \
+ -command "EditGrid_edit"]
+ set cal [button $f.cal -text "Calculate" -width 9 \
+ -command "EditGrid_calculate"]
+ set close [button $f.close -text "Close" -width 9 \
+ -command "destroy $w"]
+ pack $add -side top -padx 10
+ pack $edit -side top -padx 10
+ pack $cal -side top -padx 10 -pady 2
+ pack $close -side bottom -padx 10
+
+ # Create the grid and set options to make it editable.
+ #
+ tixScrolledGrid $w.g -bd 0
+ pack $w.g -expand yes -fill both -padx 3 -pady 3
+
+ set grid [$w.g subwidget grid]
+ $grid config \
+ -formatcmd "EditGrid_format $grid" \
+ -editnotifycmd "EditGrid_editNotify" \
+ -editdonecmd "EditGrid_editDone" \
+ -selectunit cell \
+ -selectmode single
+
+ # Insert some initial data
+ #
+ $grid set 0 1 -text "City #1"
+ $grid set 0 2 -text "City #2"
+ $grid set 0 3 -text "City #3"
+ $grid set 0 5 -text "Combined"
+
+ $grid set 2 0 -text "Population"
+ $grid set 4 0 -text "Avg. Income"
+
+ $grid set 2 1 -text 125
+ $grid set 2 2 -text 81
+ $grid set 2 3 -text 724
+
+ $grid set 4 1 -text 24432.12
+ $grid set 4 2 -text 18290.24
+ $grid set 4 3 -text 18906.34
+
+ # Global data used by other EditGrid_ procedures.
+ #
+ set editgrid(g) $grid
+ set editgrid(top) 1
+ set editgrid(bot) 3
+ set editgrid(result) 5
+
+ EditGrid_calPop
+ EditGrid_calIncome
+}
+
+# EditGrid_edit --
+#
+# Prompts the user to edit a cell.
+#
+proc EditGrid_edit {} {
+ global editgrid
+ set grid $editgrid(g)
+
+ set ent [$grid anchor get]
+ if [string comp $ent ""] {
+ $grid edit set [lindex $ent 0] [lindex $ent 1]
+ }
+}
+
+# EditGrid_addRow --
+#
+# Adds a new row to the table.
+#
+proc EditGrid_addRow {} {
+ global editgrid
+ set grid $editgrid(g)
+
+ $grid edit apply
+
+ $grid move row $editgrid(result) $editgrid(result) 1
+
+ incr editgrid(bot)
+ set editgrid(result) [expr $editgrid(bot) + 2]
+ $grid set 0 $editgrid(bot) -text "City #$editgrid(bot)"
+ $grid set 2 $editgrid(bot) -text 0
+ $grid set 4 $editgrid(bot) -text 0.0
+
+ EditGrid_calPop
+ EditGrid_calIncome
+}
+
+# EditGrid_calPop --
+#
+# Calculates the total population
+#
+proc EditGrid_calPop {} {
+ global editgrid
+ set grid $editgrid(g)
+
+ set pop 0
+
+ for {set i $editgrid(top)} {$i <= $editgrid(bot)} {incr i} {
+ incr pop [$grid entrycget 2 $i -text]
+ }
+
+ $grid set 2 $editgrid(result) -text $pop
+}
+
+# EditGrid_calIncome --
+#
+# Calculates the average income.
+#
+proc EditGrid_calIncome {} {
+ global editgrid
+ set grid $editgrid(g)
+
+ set income 0
+ set total_pop 0
+ for {set i $editgrid(top)} {$i <= $editgrid(bot)} {incr i} {
+ set pop [$grid entrycget 2 $i -text]
+ set inc [$grid entrycget 4 $i -text]
+ set income [expr $income + $pop.0 * $inc]
+ incr total_pop $pop
+ }
+
+ $grid set 4 $editgrid(result) -text [expr $income/$total_pop]
+
+}
+
+# EditGrid_calculate --
+#
+# Recalculates both columns.
+#
+proc EditGrid_calculate {} {
+ global editgrid
+ set grid $editgrid(g)
+
+ $grid edit apply
+ EditGrid_calIncome
+}
+
+# EditGrid_editNotify --
+#
+# Returns true if an entry can be edited.
+#
+proc EditGrid_editNotify {x y} {
+ global editgrid
+ set grid $editgrid(g)
+
+ if {$x == 2 || $x == 4} {
+ if {$y >= $editgrid(top) && $y <= $editgrid(bot)} {
+ set editgrid(oldValue) [$grid entrycget $x $y -text]
+ return 1
+ }
+ }
+ return 0
+}
+
+# EditGrid_editDone --
+#
+# Gets called when the user is done editing an entry.
+#
+proc EditGrid_editDone {x y} {
+ global editgrid
+ set grid $editgrid(g)
+
+ if {$x == 2} {
+ set pop [$grid entrycget $x $y -text]
+ if [catch {
+ format %d $pop
+ }] {
+ $grid entryconfig $x $y -text $editgrid(oldValue)
+ tk_dialog .editGridWarn "" \
+ "$pop is not an valid integer. Try again" \
+ warning 0 Ok
+ } else {
+ $grid entryconfig 4 $editgrid(result) -text "-"
+ EditGrid_calPop
+ }
+ } else {
+ set income [$grid entrycget $x $y -text]
+ if [catch {
+ format %f $income
+ }] {
+ $grid entryconfig $x $y -text $editgrid(oldValue)
+ tk_dialog .editGridWarn "" \
+ "$income is not an valid floating number. Try again" \
+ warning 0 Ok
+ } else {
+ $grid entryconfig 4 $editgrid(result) -text "-"
+ }
+ }
+}
+
+# EditGrid_format --
+#
+# This command is called whenever the background of the grid
+# needs to be reformatted. The x1, y1, x2, y2 sprcifies the four
+# corners of the area that needs to be reformatted.
+#
+proc EditGrid_format {w area x1 y1 x2 y2} {
+ global editgrid
+
+ set bg(s-margin) gray65
+ set bg(x-margin) gray65
+ set bg(y-margin) gray65
+ set bg(main) gray20
+
+ case $area {
+ main {
+ foreach col {2 4} {
+ $w format border $col 1 $col $editgrid(bot) \
+ -relief flat -filled 1 -yon 1 -yoff 1\
+ -bd 0 -bg #b0b0f0 -selectbackground #a0b0ff
+ $w format border $col 2 $col $editgrid(bot) \
+ -relief flat -filled 1 -yon 1 -yoff 1\
+ -bd 0 -bg #80b080 -selectbackground #80b0ff
+ }
+
+ $w format grid $x1 $y1 $x2 $y2 \
+ -relief raised -bd 1 -bordercolor $bg($area) -filled 0 -bg red\
+ -xon 1 -yon 1 -xoff 0 -yoff 0 -anchor se
+ }
+ y-margin {
+ $w format border $x1 $y1 $x2 $y2 \
+ -fill 1 -relief raised -bd 1 -bg $bg($area) \
+ -selectbackground gray80
+ }
+ default {
+ $w format border $x1 $y1 $x2 $y2 \
+ -filled 1 \
+ -relief raised -bd 1 -bg $bg($area) \
+ -selectbackground gray80
+ }
+ }
+
+# case $area {
+# {main y-margin} {
+# set y [expr $editgrid(bot) + 1]
+# $w format border 0 $y 100 $y -bg black -filled 1 -bd 0
+# }
+# }
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/FileDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/FileDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,98 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FileDlg.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixFileSelectDialog widget --
+# This is a neat file selection dialog that looks like the Motif
+# file-selection dialog widget. I know that Motif sucks, but
+# tixFileSelectDialog looks neat nevertheless.
+#
+proc RunSample {w} {
+
+ # Create an entry for the user to input a filename. If he can't
+ # bother to type in the name, he can press the "Browse ..." button
+ # and call up the file dialog
+ #
+ frame $w.top -border 1 -relief raised
+
+ tixLabelEntry $w.top.ent -label "Select A File:" -labelside top \
+ -options {
+ entry.width 25
+ entry.textVariable demo_fdlg_filename
+ label.anchor w
+ }
+ bind [$w.top.ent subwidget entry] <Return> "fdlg:okcmd $w"
+
+ uplevel #0 set demo_fdlg_filename {}
+
+
+ button $w.top.btn -text "Browse ..." -command "fdlg:browse"
+
+ pack $w.top.ent -side left -expand yes -fill x -anchor s -padx 4 -pady 4
+ pack $w.top.btn -side left -anchor s -padx 4 -pady 4
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "fdlg:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+# Pop up a file selection dialog
+#
+proc fdlg:browse {} {
+ # [Hint]
+ # The best way to use an FileSelectDialog is not to create one yourself
+ # but to call the command "tix filedialog". This command creates one file
+ # dialog box that is shared by different parts of the application.
+ # This way, your application can save resources because it doesn't
+ # need to create a lot of file dialog boxes even if it needs to input
+ # file names at a lot of different occasions.
+ #
+ set dialog [tix filedialog tixFileSelectDialog]
+ $dialog config -command fdlg:select_file
+
+ $dialog popup
+}
+
+proc fdlg:select_file {file} {
+ global demo_fdlg_filename
+
+ set demo_fdlg_filename $file
+}
+
+proc fdlg:okcmd {w} {
+ global demo_fdlg_filename
+
+ if {$demo_fdlg_filename != {}} {
+ tixDemo:Status "You have selected the file $demo_fdlg_filename"
+ } else {
+ tixDemo:Status "You haven't selected any file"
+ }
+
+ destroy $w
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/FileEnt.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/FileEnt.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,81 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FileEnt.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixFileEntry widget -- an
+# easy of letting the user select a filename
+#
+proc RunSample {w} {
+
+ # Create the tixFileEntry's on the top of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ global demo_fent_from demo_fent_to
+
+ tixFileEntry $w.top.a -label "Move File From: " \
+ -variable demo_fent_from \
+ -options {
+ entry.width 25
+ label.width 16
+ label.underline 10
+ label.anchor e
+ }
+
+ tixFileEntry $w.top.b -label "To: " \
+ -variable demo_fent_to \
+ -options {
+ entry.width 25
+ label.underline 0
+ label.width 16
+ label.anchor e
+ }
+
+ pack $w.top.a $w.top.b -side top -anchor w -pady 3
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "fent:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ # Let's set some nice bindings for keyboard accelerators
+ #
+ bind $w <Alt-f> "focus $w.top.a"
+ bind $w <Alt-t> "focus $w.top.b"
+ bind $w <Alt-o> "[$w.box subwidget ok] invoke; break"
+ bind $w <Alt-c> "[$w.box subwidget cancel] invoke; break"
+}
+
+proc fent:okcmd {w} {
+ global demo_fent_from demo_fent_to
+
+ # tixDemo:Status "You wanted to move file from $demo_fent_from to $demo_fent_to"
+
+ destroy $w
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/HList1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/HList1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,159 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: HList1.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixHList widget -- you can
+# use to display data in a tree structure. For example, your family tree
+#
+#
+proc RunSample {w} {
+
+ # Create the tixHList and the tixLabelEntry widgets on the on the top
+ # of the dialog box
+ #
+ # [Hint] We create the tixHList and and the scrollbar by ourself,
+ # but it is more convenient to use the tixScrolledHlist widget
+ # which does all the chores for us.
+ #
+ # [Hint] Use of the -browsecmd and -command options:
+ # We want to set the tixLabelEntry accordingly whenever the user
+ # single-clicks on an entry in the HList box. Also, when the user
+ # double-clicks, we want to print out the selection and close
+ # the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ tixHList $w.top.h -yscrollcommand "$w.top.s set" -separator / \
+ -browsecmd "hlist1:browse $w.top.h" \
+ -command "hlist1:activate $w.top.h"\
+ -wideselection false \
+ -indent 15
+ scrollbar $w.top.s -command "$w.top.h yview" -takefocus 0
+
+ # Some icons for our list entries
+ #
+ global folder1 folder2
+ set img1 [image create bitmap -data $folder1]
+ set img2 [image create bitmap -data $folder2]
+
+ # Put our directories into the HList entry
+ #
+ set h $w.top.h
+ set dirs {
+ /
+ /lib
+ /pkg
+ /usr
+ /usr/lib
+ /usr/local
+ /usr/local/lib
+ /pkg/lib
+ }
+ foreach d $dirs {
+ $h add $d -itemtype imagetext -text $d -image $img2 -data $d
+
+ # We only want the user to select the directories that
+ # ends by "lib"
+ if {![string match "*lib" $d]} {
+ $h entryconfig $d -state disabled -image $img1
+ }
+ }
+
+ # We use a LabelEntry to hold the installation directory. The user
+ # can choose from the DirList widget, or he can type in the directory
+ # manually
+ #
+ tixLabelEntry $w.top.e -label "Installation Directory:" -labelside top \
+ -options {
+ entry.width 25
+ entry.textVariable demo_hlist_dir
+ label.anchor w
+ }
+ bind [$w.top.e subwidget entry] <Return> "hlist:okcmd $w"
+
+ # Set the default value
+ #
+ uplevel #0 set demo_hlist_dir /usr/local/lib
+ $h anchor set /usr/local/lib
+ $h select set /usr/local/lib
+
+ pack $w.top.h -side left -expand yes -fill both -padx 2 -pady 2
+ pack $w.top.s -side left -fill y -pady 2
+ pack $w.top.e -side left -expand yes -fill x -anchor s -padx 4 -pady 2
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "hlist:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+# In an actual program, you may want to tell the user how much space he has
+# left in this directory
+#
+#
+proc hlist1:browse {w dir} {
+ global demo_hlist_dir
+
+ set demo_hlist_dir [$w entrycget $dir -data]
+}
+
+# In an actual program, you will install your favorit application
+# in the selected directory
+#
+proc hlist1:activate {w dir} {
+ global demo_hlist_dir
+
+ set demo_hlist_dir [$w entrycget $dir -data]
+ tixDemo:Status "You have selected the directory $demo_hlist_dir"
+
+ destroy [winfo toplevel $w]
+}
+
+proc hlist:okcmd {w} {
+ global demo_hlist_dir
+
+ tixDemo:Status "You have selected the directory $demo_hlist_dir"
+
+ destroy $w
+}
+
+set folder1 {
+#define foo_width 16
+#define foo_height 12
+static unsigned char foo_bits[] = {
+ 0x00, 0x00, 0x00, 0x3e, 0xfe, 0x41, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40,
+ 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0x02, 0x40, 0xfe, 0x7f, 0x00, 0x00};}
+
+set folder2 {
+#define foo_width 16
+#define foo_height 12
+static unsigned char foo_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x02, 0x40, 0x02, 0x44, 0xf2, 0x4f,
+ 0xf2, 0x5f, 0xf2, 0x4f, 0x02, 0x44, 0x02, 0x40, 0xfe, 0x7f, 0x00, 0x00};
+}
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/LabEntry.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/LabEntry.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,94 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: LabEntry.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixLabelEntry widget -- an entry that
+# come with a label at its side, so you don't need to create
+# extra frames on your own and do the messy hierarchical packing. This
+# example is adapted from the tixControl example, except now you don't
+# have arrow buttons to adjust the values for you ...
+#
+
+proc RunSample {w} {
+
+ # Create the tixLabelEntrys on the top of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ # $w.top.a allows only integer values
+ #
+ # [Hint] The -options switch sets the options of the subwidgets.
+ # [Hint] We set the label.width subwidget option of the Controls to
+ # be 16 so that their labels appear to be aligned.
+ #
+ global lent_demo_maker lent_demo_thrust lent_demo_num_engins
+ set lent_demo_maker P&W
+ set lent_demo_thrust 20000.0
+ set lent_demo_num_engins 2
+
+ tixLabelEntry $w.top.a -label "Number of Engines: " \
+ -options {
+ entry.width 10
+ label.width 20
+ label.anchor e
+ entry.textVariable lent_demo_num_engins
+ }
+
+ tixLabelEntry $w.top.b -label "Thrust: "\
+ -options {
+ entry.width 10
+ label.width 20
+ label.anchor e
+ entry.textVariable lent_demo_thrust
+ }
+
+ tixLabelEntry $w.top.c -label "Engin Maker: " \
+ -options {
+ entry.width 10
+ label.width 20
+ label.anchor e
+ entry.textVariable lent_demo_maker
+ }
+
+ pack $w.top.a $w.top.b $w.top.c -side top -anchor w
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "labe:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+proc labe:okcmd {w} {
+ global lent_demo_maker lent_demo_thrust lent_demo_num_engins
+
+ tixDemo:Status "You selected $lent_demo_num_engins engin(s) of thrust $lent_demo_thrust made \
+by $lent_demo_maker"
+
+ destroy $w
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/LabFrame.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/LabFrame.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,85 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: LabFrame.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixLabelFrame widget -- a frame that
+# come with a label at its side. It looks nifty when you use the set the
+# -labelside option to "acrosstop". Note that a lot of Tix widgets, such
+# as tixComboBox or tixControl, have the -labelside and -label options. So
+# you can use these options to achieve the same effect as in this file
+#
+
+proc RunSample {w} {
+
+ # Create the radiobuttons at the top of the dialog box, put them
+ # inside two tixLabelFrames:
+ #
+ frame $w.top -border 1 -relief raised
+
+ tixLabelFrame $w.top.a -label Font: -labelside acrosstop -options {
+ label.padX 5
+ }
+ tixLabelFrame $w.top.b -label Size: -labelside acrosstop -options {
+ label.padX 5
+ }
+
+ pack $w.top.a $w.top.b -side left -expand yes -fill both
+
+ # Create the radiobuttons inside the left frame.
+ #
+ # [Hint] You *must* create the new widgets inside the "frame"
+ # subwidget, *not* as immediate children of $w.top.a!
+ #
+ set f [$w.top.a subwidget frame]
+ foreach color {Red Green Blue Yellow Orange Purple} {
+ set lower [string tolower $color]
+ radiobutton $f.$lower -text $color -variable demo_color \
+ -relief flat -value $lower -bd 2 -pady 0 -width 7 -anchor w
+ pack $f.$lower -side top -pady 0 -anchor w -padx 6
+ }
+
+ # Create the radiobuttons inside the right frame.
+ #
+ set f [$w.top.b subwidget frame]
+ foreach point {8 10 12 14 18 24} {
+ set lower [string tolower $point]
+ radiobutton $f.$lower -text $point -variable demo_point \
+ -relief flat -value $lower -bd 2 -pady 0 -width 4 -anchor w
+ pack $f.$lower -side top -pady 0 -anchor w -padx 8
+ }
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "labf:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+proc labf:okcmd {w} {
+ destroy $w
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/ListNBK.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/ListNBK.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,86 @@
+#
+# $Id: ListNBK.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This program demonstrates the ListBoteBook widget, which is very similar
+# to a NoteBook widget but uses an HList instead of page tabs to list the
+# pages.
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ #----------------------------------------------------------------------
+ # Create the ListNoteBook with nice icons
+ #----------------------------------------------------------------------
+ tixListNoteBook $top.n -ipadx 6 -ipady 6
+
+ set img0 [tix getimage harddisk]
+ set img1 [tix getimage network]
+
+ $top.n subwidget hlist add hard_disk -itemtype imagetext \
+ -image $img0 -text "Hard Disk" -under 0
+ $top.n subwidget hlist add network -itemtype imagetext \
+ -image $img1 -text "Network" -under 0
+
+ $top.n add hard_disk
+ $top.n add network
+
+ #
+ # Create the widgets inside the two pages
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ #
+ set name [tixOptionName $w]
+ option add *$name*TixControl*entry.width 10
+ option add *$name*TixControl*label.width 18
+ option add *$name*TixControl*label.anchor e
+
+ set f [$top.n subwidget hard_disk]
+
+ tixControl $f.a -value 12 -label "Access Time: "
+ tixControl $f.w -value 400 -label "Write Throughput: "
+ tixControl $f.r -value 400 -label "Read Throughput: "
+ tixControl $f.c -value 1021 -label "Capacity: "
+ pack $f.a $f.w $f.r $f.c -side top -padx 20 -pady 2
+
+ set f [$top.n subwidget network]
+
+ tixControl $f.a -value 12 -label "Access Time: "
+ tixControl $f.w -value 400 -label "Write Throughput: "
+ tixControl $f.r -value 400 -label "Read Throughput: "
+ tixControl $f.c -value 1021 -label "Capacity: "
+ tixControl $f.u -value 10 -label "Users: "
+
+ pack $f.a $f.w $f.r $f.c $f.u -side top -padx 20 -pady 2
+
+ pack $top.n -expand yes -fill both -padx 5 -pady 5
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+#----------------------------------------------------------------------
+# Start-up code
+#----------------------------------------------------------------------
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/Meter.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Meter.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,77 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Meter.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This program demonstrates the use of the tixMeter widget -- it is
+# used to display the progress of a background job
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ # Create the Meter and the Label
+ #
+ label $top.lab -text "Work in progress ...."
+ tixMeter $top.met -value 0 -text 0%
+
+ pack $top.lab -side top -padx 50 -pady 10 -anchor c
+ pack $top.met -side top -padx 50 -pady 10 -anchor c
+
+
+ # Create the buttons
+ #
+ $box add cancel -text Cancel -command "destroy $w" \
+ -width 6 -under 0
+ $box add restart -text Restart -width 6 -under 0
+
+ $box subwidget restart config -command \
+ "Meter:Start $top.met [$box subwidget cancel] [$box subwidget restart]"
+
+ $box subwidget restart invoke
+}
+
+proc Meter:Start {meter cancel restart} {
+ $restart config -state disabled
+ $cancel config -text Cancel
+ after 40 Meter:BackgroundJob $meter 0 $cancel $restart
+}
+
+proc Meter:BackgroundJob {meter progress cancel restart} {
+ if ![winfo exists $meter] {
+ # the window has already been destroyed
+ #
+ return
+ }
+
+ set progress [expr $progress + 0.02]
+ set text [expr int($progress*100.0)]%
+
+ $meter config -value $progress -text $text
+
+ if {$progress < 1.0} {
+ after 40 Meter:BackgroundJob $meter $progress $cancel $restart
+ } else {
+ $cancel config -text OK -under 0
+ $restart config -state normal
+ }
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
Added: external/tix-8.4.2.x/demos/samples/NoteBook.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/NoteBook.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,102 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: NoteBook.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixNoteBook widget, which allows
+# you to lay out your interface using a "notebook" metaphore
+#
+
+proc RunSample {w} {
+
+ # We use these options to set the sizes of the subwidgets inside the
+ # notebook, so that they are well-aligned on the screen.
+ #
+ set name [tixOptionName $w]
+ option add *$name*TixControl*entry.width 10
+ option add *$name*TixControl*label.width 18
+ option add *$name*TixControl*label.anchor e
+
+ # Create the notebook widget and set its backpagecolor to gray.
+ # Note that the -backpagecolor option belongs to the "nbframe"
+ # subwidget.
+ tixNoteBook $w.nb -ipadx 6 -ipady 6
+ # $w config -bg gray
+ # $w.nb subwidget nbframe config -backpagecolor gray
+
+ # Create the two tabs on the notebook. The -underline option
+ # puts a underline on the first character of the labels of the tabs.
+ # Keyboard accelerators will be defined automatically according
+ # to the underlined character.
+ #
+ $w.nb add hard_disk -label "Hard Disk" -underline 0
+ $w.nb add network -label "Network" -underline 0
+ pack $w.nb -expand yes -fill both -padx 5 -pady 5 -side top
+
+ #----------------------------------------
+ # Create the first page
+ #----------------------------------------
+ set f [$w.nb subwidget hard_disk]
+
+ # Create two frames: one for the common buttons, one for the
+ # other widgets
+ #
+ frame $f.f
+ frame $f.common
+ pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes
+ pack $f.common -side right -padx 2 -pady 2 -fill y
+
+ # Create the controls that only belong to this page
+ #
+ tixControl $f.f.a -value 12 -label "Access Time: "
+ tixControl $f.f.w -value 400 -label "Write Throughput: "
+ tixControl $f.f.r -value 400 -label "Read Throughput: "
+ tixControl $f.f.c -value 1021 -label "Capacity: "
+ pack $f.f.a $f.f.w $f.f.r $f.f.c -side top -padx 20 -pady 2
+
+ # Create the common buttons
+ #
+ CreateCommonButtons $w $f.common
+
+ #----------------------------------------
+ # Create the second page
+ #----------------------------------------
+ set f [$w.nb subwidget network]
+
+ frame $f.f
+ frame $f.common
+ pack $f.f -side left -padx 2 -pady 2 -fill both -expand yes
+ pack $f.common -side right -padx 2 -pady 2 -fill y
+
+ tixControl $f.f.a -value 12 -label "Access Time: "
+ tixControl $f.f.w -value 400 -label "Write Throughput: "
+ tixControl $f.f.r -value 400 -label "Read Throughput: "
+ tixControl $f.f.c -value 1021 -label "Capacity: "
+ tixControl $f.f.u -value 10 -label "Users: "
+
+ pack $f.f.a $f.f.w $f.f.r $f.f.c $f.f.u -side top -padx 20 -pady 2
+
+ CreateCommonButtons $w $f.common
+}
+
+proc CreateCommonButtons {w f} {
+ button $f.ok -text OK -width 6 -command "destroy $w"
+ button $f.cancel -text Cancel -width 6 -command "destroy $w"
+
+ pack $f.ok $f.cancel -side top -padx 2 -pady 2
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
Added: external/tix-8.4.2.x/demos/samples/OptMenu.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/OptMenu.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,103 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: OptMenu.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixOptionMenu widget -- you can
+# use it for the user to choose from a fixed set of options
+#
+set opt_options {text formatted post html tex rtf}
+
+set opt_labels(text) "Plain Text"
+set opt_labels(formatted) "Formatted Text"
+set opt_labels(post) "PostScript"
+set opt_labels(html) "HTML"
+set opt_labels(tex) "LaTeX"
+set opt_labels(rtf) "Rich Text Format"
+
+proc RunSample {w} {
+ catch {uplevel #0 unset demo_opt_from}
+ catch {uplevel #0 unset demo_opt_to }
+
+ # Create the tixOptionMenu's on the top of the dialog box
+ #
+ frame $w.top -border 1 -relief raised
+
+ tixOptionMenu $w.top.from -label "From File Format : " \
+ -variable demo_opt_from \
+ -options {
+ label.width 19
+ label.anchor e
+ menubutton.width 15
+ }
+
+ tixOptionMenu $w.top.to -label "To File Format : " \
+ -variable demo_opt_to \
+ -options {
+ label.width 19
+ label.anchor e
+ menubutton.width 15
+ }
+
+ # Add the available options to the two OptionMenu widgets
+ #
+ # [Hint] You have to add the options first before you set the
+ # global variables "demo_opt_from" and "demo_opt_to". Otherwise
+ # the OptionMenu widget will complain about "unknown options"!
+ #
+ global opt_options opt_labels
+ foreach opt $opt_options {
+ $w.top.from add command $opt -label $opt_labels($opt)
+ $w.top.to add command $opt -label $opt_labels($opt)
+ }
+
+ uplevel #0 set demo_opt_from html
+ uplevel #0 set demo_opt_to post
+
+ pack $w.top.from $w.top.to -side top -anchor w -pady 3 -padx 6
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "opt:okcmd $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ # Let's set some nice bindings for keyboard accelerators
+ #
+ bind $w <Alt-f> "focus $w.top.from"
+ bind $w <Alt-t> "focus $w.top.to"
+ bind $w <Alt-o> "[$w.box subwidget ok] invoke; break"
+ bind $w <Alt-c> "[$w.box subwidget cancel] invoke; break"
+}
+
+proc opt:okcmd {w} {
+ global demo_opt_from demo_opt_to opt_labels
+
+ tixDemo:Status "You wanted to convert file from $opt_labels($demo_opt_from) to $opt_labels($demo_opt_to)"
+
+ destroy $w
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
Added: external/tix-8.4.2.x/demos/samples/PanedWin.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/PanedWin.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,112 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: PanedWin.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixPanedWindow widget. This program
+# is a dummy news reader: the user can adjust the sizes of the list
+# of artical names and the size of the text widget that shows the body
+# of the article
+#
+
+proc RunSample {w} {
+
+ # We create the frame at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Use a LabelEntry widget to show the name of the newsgroup
+ # [Hint] We disable the entry widget so that the user can't
+ # mess up with the name of the newsgroup
+ #
+ tixLabelEntry $w.top.name -label "Newsgroup: " -options {
+ entry.width 25
+ }
+ $w.top.name subwidget entry insert 0 "comp.lang.tcl"
+ $w.top.name subwidget entry config -state disabled
+
+ pack $w.top.name -side top -anchor c -fill x -padx 14 -pady 6
+ # Now use a PanedWindow to contain the list and text widgets
+ #
+ tixPanedWindow $w.top.pane -paneborderwidth 0
+ pack $w.top.pane -side top -expand yes -fill both -padx 10 -pady 10
+
+ set p1 [$w.top.pane add list -min 70 -size 100]
+ set p2 [$w.top.pane add text -min 70]
+
+ tixScrolledListBox $p1.list
+ $p1.list subwidget listbox config -font [tix option get fixed_font]
+
+ tixScrolledText $p2.text
+ $p2.text subwidget text config -font [tix option get fixed_font]
+
+ pack $p1.list -expand yes -fill both -padx 4 -pady 6
+ pack $p2.text -expand yes -fill both -padx 4 -pady 6
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 8
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 8
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ # Put the junk inside the listbox and the tetx widget
+ #
+ $p1.list subwidget listbox insert end \
+ " 12324 Re: TK is good for your health" \
+ "+ 12325 Re: TK is good for your health" \
+ "+ 12326 Re: Tix is even better for your health (Was: TK is good...)" \
+ " 12327 Re: Tix is even better for your health (Was: TK is good...)" \
+ "+ 12328 Re: Tix is even better for your health (Was: TK is good...)" \
+ " 12329 Re: Tix is even better for your health (Was: TK is good...)" \
+ "+ 12330 Re: Tix is even better for your health (Was: TK is good...)"
+
+ $p2.text subwidget text config -wrap none -bg \
+ [$p1.list subwidget listbox cget -bg]
+ $p2.text subwidget text insert end {
+Mon, 19 Jun 1995 11:39:52 comp.lang.tcl Thread 34 of 220
+Lines 353 A new way to put text and bitmaps together iNo responses
+ioi at blue.seas.upenn.edu Ioi K. Lam at University of Pennsylvania
+
+Hi,
+
+I have implemented a new image type called "compound". It allows you
+to glue together a bunch of bitmaps, images and text strings together
+to form a bigger image. Then you can use this image with widgets that
+support the -image option. This way you can display very fancy stuffs
+in your GUI. For example, you can display a text string string
+together with a bitmap, at the same time, inside a TK button widget. A
+screenshot of compound images can be found at the bottom of this page:
+
+ http://www.cis.upenn.edu/~ioi/tix/screenshot.html
+
+You can also you is in other places such as putting fancy bitmap+text
+in menus, tabs of tixNoteBook widgets, etc. This feature will be
+included in the next release of Tix (4.0b1). Count on it to make jazzy
+interfaces!}
+
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
+
Added: external/tix-8.4.2.x/demos/samples/PopMenu.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/PopMenu.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,73 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: PopMenu.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixPopupMenu widget.
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the button, then we'll bind the PopupMenu
+ # to both widgets. The result is, when you press the right mouse
+ # button over $w.top or $w.top.but, the PopupMenu will come up.
+ #
+
+ frame $w.top -relief raised -bd 1
+
+ button $w.top.but -text {Press the right mouse button over
+this button or its surrounding area}
+
+ pack $w.top.but -expand yes -fill both -padx 50 -pady 50
+
+ tixPopupMenu $w.top.p -title "Popup Test"
+ $w.top.p bind $w.top
+ $w.top.p bind $w.top.but
+
+ # Set the entries inside the PopupMenu widget.
+ # [Hint] You have to manipulate the "menu" subwidget.
+ # $w.top.p itself is NOT a menu widget.
+ # [Hint] Watch carefully how the sub-menu is created
+ #
+ set menu [$w.top.p subwidget menu]
+ $menu add command -label Desktop -under 0
+ $menu add command -label Select -under 0
+ $menu add command -label Find -under 0
+ $menu add command -label System -under 1
+ $menu add command -label Help -under 0
+ $menu add cascade -label More -menu $menu.m1
+ menu $menu.m1
+ $menu.m1 add command -label Hello
+
+ pack $w.top.but -side top -padx 40 -pady 50
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
Added: external/tix-8.4.2.x/demos/samples/SGrid0.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SGrid0.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,135 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SGrid0.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# A very simple demonstration of the tixGrid widget
+#
+
+proc RunSample {w} {
+ wm title $w "The First Grid Example"
+ wm geometry $w 480x300
+
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ label $top.lab -text "This widget is still under alpha
+Please ignore the debug messages
+Not all features have been implemented" -justify left
+ pack $top.lab -side top -anchor c -padx 3 -pady 3
+
+ MakeGrid $top
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+# This command is called whenever the background of the grid needs to
+# be reformatted. The x1, y1, x2, y2 specifies the four corners of the area
+# that needs to be reformatted.
+#
+# area:
+# x-margin: the horizontal margin
+# y-margin: the vertical margin
+# s-margin: the overlap area of the x- and y-margins
+# main: The rest
+#
+proc SimpleFormat {w area x1 y1 x2 y2} {
+
+ global margin
+ set bg(s-margin) gray65
+ set bg(x-margin) gray65
+ set bg(y-margin) gray65
+ set bg(main) gray20
+
+ case $area {
+ main {
+ # The "grid" format is consecutive boxes without 3d borders
+ #
+ $w format grid $x1 $y1 $x2 $y2 \
+ -relief raised -bd 1 -bordercolor $bg($area) -filled 0 -bg red\
+ -xon 1 -yon 1 -xoff 0 -yoff 0 -anchor se
+ }
+ {x-margin y-margin s-margin} {
+ # border specifies consecutive 3d borders
+ #
+ $w format border $x1 $y1 $x2 $y2 \
+ -fill 1 -relief raised -bd 1 -bg $bg($area) \
+ -selectbackground gray80
+ }
+ }
+}
+
+# Print a number in $ format
+#
+#
+proc Dollar {s} {
+ set n [string len $s]
+ set start [expr $n % 3]
+ if {$start == 0} {
+ set start 3
+ }
+
+ set str ""
+ for {set i 0} {$i < $n} {incr i} {
+ if {$start == 0} {
+ append str ","
+ set start 3
+ }
+ incr start -1
+ append str [string index $s $i]
+ }
+ return $str
+}
+
+proc MakeGrid {w} {
+ # Create the grid
+ #
+ tixScrolledGrid $w.g -bd 0
+ pack $w.g -expand yes -fill both -padx 3 -pady 3
+
+ set grid [$w.g subwidget grid]
+ $grid config -formatcmd "SimpleFormat $grid"
+
+
+ # Set the size of the columns
+ #
+ $grid size col 0 -size 10char
+ $grid size col 1 -size auto
+ $grid size col 2 -size auto
+ $grid size col 3 -size auto
+ $grid size col 4 -size auto
+
+ # set the default size of the column and rows. these sizes will be used
+ # if the size of a row or column has not be set via the "size col ?"
+ # command
+ $grid size col default -size 5char
+ $grid size row default -size 1.1char -pad0 3
+
+ for {set x 0} {$x < 10} {incr x} {
+ for {set y 0} {$y < 10} {incr y} {
+ $grid set $x $y -itemtype text -text ($x,$y)
+ }
+ }
+}
+
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/SGrid1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SGrid1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,215 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SGrid1.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# Demonstrates the tixGrid widget
+#
+
+proc RunSample {w} {
+ wm title $w "Doe Inc. Performance"
+ wm geometry $w 640x300
+
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ label $top.lab -text "This widget is still under alpha
+Please ignore the debug messages
+Not all features have been implemented" -justify left
+ pack $top.lab -side top -anchor c -padx 3 -pady 3
+
+ MakeGrid $top
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+# This command is called whenever the background of the grid needs to
+# be reformatted. The x1, y1, x2, y2 sprcifies the four corners of the area
+# that needs to be reformatted.
+#
+proc gformat {w area x1 y1 x2 y2} {
+ set bg(s-margin) gray65
+ set bg(x-margin) gray65
+ set bg(y-margin) gray65
+ set bg(main) gray20
+
+ case $area {
+ main {
+ for {set y [expr ($y1/2) * 2]} {$y <= $y2} {incr y 2} {
+ $w format border $x1 $y $x2 $y \
+ -relief flat -filled 1\
+ -bd 0 -bg #80b080 -selectbackground #80b0ff
+ }
+ $w format grid $x1 $y1 $x2 $y2 \
+ -relief raised -bd 1 -bordercolor $bg($area) -filled 0 -bg red\
+ -xon 1 -yon 1 -xoff 0 -yoff 0 -anchor se
+ }
+ y-margin {
+ $w format border $x1 $y1 $x2 $y2 \
+ -fill 1 -relief raised -bd 1 -bg $bg($area) \
+ -selectbackground gray80
+ }
+
+ default {
+ $w format border $x1 $y1 $x2 $y2 \
+ -filled 1 \
+ -relief raised -bd 1 -bg $bg($area) \
+ -selectbackground gray80
+ }
+ }
+}
+
+# Print a number in $ format
+#
+#
+proc Dollar {s} {
+ set n [string len $s]
+ set start [expr $n % 3]
+ if {$start == 0} {
+ set start 3
+ }
+
+ set str ""
+ for {set i 0} {$i < $n} {incr i} {
+ if {$start == 0} {
+ append str ","
+ set start 3
+ }
+ incr start -1
+ append str [string index $s $i]
+ }
+ return $str
+}
+
+proc MakeGrid {w} {
+
+ # data format {year revenue profit}
+ #
+ set data {
+ {1970 1000000000 1000000}
+ {1971 1100000000 2000000}
+ {1972 1200000000 3000000}
+ {1973 1300000000 4000000}
+ {1974 1400000000 5000000}
+ {1975 1500000000 6000000}
+ {1976 1600000000 7000000}
+ {1977 1700000000 8000000}
+ {1978 1800000000 9000000}
+ {1979 1900000000 10000000}
+ {1980 2000000000 11000000}
+ {1981 2100000000 22000000}
+ {1982 2200000000 33000000}
+ {1983 2300000000 44000000}
+ {1984 2400000000 55000000}
+ {1985 3500000000 36000000}
+ {1986 4600000000 57000000}
+ {1987 5700000000 68000000}
+ {1988 6800000000 79000000}
+ {1989 7900000000 90000000}
+ {1990 13000000000 111000000}
+ {1991 14100000000 122000000}
+ {1992 16200000000 233000000}
+ {1993 28300000000 344000000}
+ {1994 29400000000 455000000}
+ {1995 38500000000 536000000}
+ }
+
+ set headers {
+ "Revenue ($)"
+ "Rev. Growth (%)"
+ "Profit ($)"
+ "Profit Growth (%)"
+ }
+
+ # Create the grid
+ #
+ tixScrolledGrid $w.g -bd 0
+ pack $w.g -expand yes -fill both -padx 3 -pady 3
+
+ set grid [$w.g subwidget grid]
+ $grid config -formatcmd "gformat $grid"
+
+ # Set the size of the columns
+ #
+ $grid size col 0 -size 10char
+ $grid size col 1 -size auto
+ $grid size col 2 -size auto
+ $grid size col 3 -size auto
+ $grid size col 4 -size auto
+
+ # set the default size of the column and rows. these sizes will be used
+ # if the size of a row or column has not be set via the "size col ?"
+ # command
+ $grid size col default -size 5char
+ $grid size row default -size 1.1char -pad0 3
+
+ set margin [tixDisplayStyle text -refwindow $grid \
+ -anchor c -padx 3 -font [tix option get bold_font]]
+ set dollar [tixDisplayStyle text -refwindow $grid \
+ -anchor e]
+
+ # Create the headers
+ #
+ set x 1
+ foreach h $headers {
+ $grid set $x 0 -itemtype text -text $h -style $margin
+ incr x
+ }
+
+ # Insert the data, year by year
+ #
+ set lastRevn {}
+ set lastProf {}
+ set i 1
+ foreach line $data {
+ set year [lindex $line 0]
+ set revn [lindex $line 1]
+ set prof [lindex $line 2]
+
+ if {$lastRevn != {}} {
+ set rgrowth \
+ [format %4.2f [expr ($revn.0-$lastRevn)/$lastRevn*100.0]]
+ } else {
+ set rgrowth "-"
+ }
+ if {$lastProf != {}} {
+ set pgrowth \
+ [format %4.2f [expr ($prof.0-$lastProf)/$lastProf*100.0]]
+ } else {
+ set pgrowth "-"
+ }
+
+ $grid set 0 $i -itemtype text -style $margin -text $year
+ $grid set 1 $i -itemtype text -style $dollar -text [Dollar $revn]
+ $grid set 2 $i -itemtype text -style $dollar -text $rgrowth
+ $grid set 3 $i -itemtype text -style $dollar -text [Dollar $prof]
+ $grid set 4 $i -itemtype text -style $dollar -text $pgrowth
+
+ set lastRevn $revn.0
+ set lastProf $prof.0
+
+ incr i
+ }
+}
+
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/SHList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SHList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,111 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SHList.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixScrolledHList widget.
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Put a simple hierachy into the HList (two levels). Use colors and
+ # separator widgets (frames) to make the list look fancy
+ #
+ tixScrolledHList $w.top.a
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+
+ # This is our little relational database
+ #
+ set bosses {
+ {jeff "Jeff Waxman"}
+ {john "John Lee"}
+ {peter "Peter Kenson"}
+ }
+
+ set employees {
+ {alex john "Alex Kellman"}
+ {alan john "Alan Adams"}
+ {andy peter "Andreas Crawford"}
+ {doug jeff "Douglas Bloom"}
+ {jon peter "Jon Baraki"}
+ {chris jeff "Chris Geoffrey"}
+ {chuck jeff "Chuck McLean"}
+ }
+
+ set hlist [$w.top.a subwidget hlist]
+
+ # Let configure the appearance of the HList subwidget
+ #
+ $hlist config -separator "." -width 25 -drawbranch 0 -indent 10
+
+ set index 0
+ foreach line $bosses {
+ if {$index != 0} {
+ frame $hlist.sep$index -bd 2 -height 2 -width 150 -relief sunken \
+ -bg [$hlist cget -bg]
+
+ $hlist addchild {} -itemtype window \
+ -window $hlist.sep$index -state disabled
+ }
+ $hlist add [lindex $line 0] -itemtype text \
+ -text [lindex $line 1]
+ incr index
+ }
+
+ foreach line $employees {
+ # "." is the separator character we chose above
+ #
+ set entrypath [lindex $line 1].[lindex $line 0]
+ # ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
+ # parent entryPath / child's name
+
+ $hlist add $entrypath -text [lindex $line 2]
+
+ # [Hint] Make sure the [lindex $line 1].[lindex $line 0] you choose
+ # are unique names. If you cannot be sure of this (because of
+ # the structure of your database, e.g.) you can use the
+ # "addchild" widget command instead:
+ #
+ # $hlist addchild [lindex $line 1] -text [lindex $line 2]
+ # ^^^^^^^^^^^^^^^^
+ # parent entryPath
+
+ }
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind .demo <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/SHList2.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SHList2.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,159 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SHList2.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use multiple columns and multiple styles
+# in the tixHList widget
+#
+# In a tixHList widget, you can have one ore more columns.
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Put a simple hierachy into the HList (two levels). Use colors and
+ # separator widgets (frames) to make the list look fancy
+ #
+ tixScrolledHList $w.top.a -options {
+ hlist.columns 3
+ hlist.header true
+ }
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+ set hlist [$w.top.a subwidget hlist]
+
+ # Create the title for the HList widget
+ # >> Notice that we have set the hlist.header subwidget option to true
+ # so that the header is displayed
+ #
+
+ # First some styles for the headers
+ set style(header) [tixDisplayStyle text -refwindow $hlist \
+ -fg black -anchor c \
+ -padx 8 -pady 2\
+ -font [tix option get bold_font ]]
+
+ $hlist header create 0 -itemtype text -text Name \
+ -style $style(header)
+ $hlist header create 1 -itemtype text -text Position \
+ -style $style(header)
+
+ # Notice that we use 3 columns in the hlist widget. This way when the user
+ # expands the windows wide, the right side of the header doesn't look
+ # chopped off. The following line ensures that the 3 column header is
+ # not shown unless the hlist window is wider than its contents.
+ #
+ $hlist column width 2 0
+
+ # This is our little relational database
+ #
+ set boss {doe "John Doe" Director}
+
+ set managers {
+ {jeff "Jeff Waxman" Manager}
+ {john "John Lee" Manager}
+ {peter "Peter Kenson" Manager}
+ }
+
+ set employees {
+ {alex john "Alex Kellman" Clerk}
+ {alan john "Alan Adams" Clerk}
+ {andy peter "Andreas Crawford" Salesman}
+ {doug jeff "Douglas Bloom" Clerk}
+ {jon peter "Jon Baraki" Salesman}
+ {chris jeff "Chris Geoffrey" Clerk}
+ {chuck jeff "Chuck McLean" Cleaner}
+ }
+
+ set style(mgr_name) [tixDisplayStyle text -refwindow $hlist \
+ -font [tix option get bold_font ]]
+ set style(mgr_posn) [tixDisplayStyle text -refwindow $hlist \
+ -padx 8]
+
+ set style(empl_name) [tixDisplayStyle text -refwindow $hlist \
+ -font [tix option get bold_font ]]
+ set style(empl_posn) [tixDisplayStyle text -refwindow $hlist \
+ -padx 8 ]
+
+ # Let configure the appearance of the HList subwidget
+ #
+ $hlist config -separator "." -width 25 -drawbranch 0 -indent 10
+ $hlist column width 0 -char 20
+
+ # Create the boss
+ #
+ $hlist add . -itemtype text -text [lindex $boss 1] \
+ -style $style(mgr_name)
+ $hlist item create . 1 -itemtype text -text [lindex $boss 2] \
+ -style $style(mgr_posn)
+
+ # Create the managers
+ #
+ set index 0
+ foreach line $managers {
+ set row [$hlist add .[lindex $line 0] -itemtype text \
+ -text [lindex $line 1] -style $style(mgr_name)]
+ $hlist item create $row 1 -itemtype text -text [lindex $line 2] \
+ -style $style(mgr_posn)
+ incr index
+ }
+
+ foreach line $employees {
+ # "." is the separator character we chose above
+ #
+ set entrypath .[lindex $line 1].[lindex $line 0]
+ # ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
+ # parent entryPath / child's name
+
+ set row [$hlist add $entrypath -text [lindex $line 2] \
+ -style $style(empl_name)]
+ $hlist item create $row 1 -itemtype text -text [lindex $line 3] \
+ -style $style(empl_posn)
+
+ # [Hint] Make sure the .[lindex $line 1].[lindex $line 0] you choose
+ # are unique names. If you cannot be sure of this (because of
+ # the structure of your database, e.g.) you can use the
+ # "addchild" widget command instead:
+ #
+ # $hlist addchild [lindex $line 1] -text [lindex $line 2]
+ # ^^^^^^^^^^^^^^^^
+ # parent entryPath
+
+ }
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind .demo <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/SListBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SListBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,85 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SListBox.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixScrolledListBox widget.
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the two ScrolledListBox widgets
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # The first ScrolledListBox widget always shows both scrollbars
+ #
+ tixScrolledListBox $w.top.a -scrollbar both
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+ # The second ScrolledListBox widget shows the scrollbars only when
+ # needed.
+ #
+ # [Hint] See how you can use the -options switch to set the options
+ # for the subwidgets
+ #
+ tixScrolledListBox $w.top.b -scrollbar auto -options {
+ listbox.font 8x13
+ }
+ pack $w.top.b -expand yes -fill both -padx 10 -pady 10 -side left
+
+ # Put the elements inside the two listboxes: notice that you need
+ # to insert inside the "listbox" subwidget of the ScrolledListBox.
+ # $w.top.a itself does NOT have an "insert" command.
+ #
+ $w.top.a subwidget listbox insert 0 \
+ 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" \
+ Ohio Oklahoma Oregon Pennsylvania "Rhode Island" \
+ "South Carolina" "South Dakota" \
+ Tennessee Texas Utah Vermont Virginia Washington \
+ "West Virginia" Wisconsin Wyoming
+
+ $w.top.a subwidget listbox config -cursor left_ptr
+ raise [$w.top.a subwidget listbox ]
+ $w.top.b subwidget listbox insert 0 \
+ Alabama Alaska Arizona Arkansas California \
+ Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois \
+ Indiana Iowa Kansas Kentucky
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/STList1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/STList1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,57 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: STList1.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# Demonstrates the scrolled tlist widget
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ # Create the scrolled tlist
+ #
+ tixScrolledTList $top.st -options {
+ tlist.orient vertical
+ tlist.selectMode single
+ }
+ pack $top.st -expand yes -fill both -padx 10 -pady 10
+
+ # Insert a list of numbers into the tlist subwidget
+ #
+ set tlist [$top.st subwidget tlist]
+
+ set numbers {
+ one two three fours five six seven eight nine ten eleven
+ twelve thirdteen fourteen
+ }
+
+ foreach num $numbers {
+ $tlist insert end -itemtype imagetext -text $num \
+ -image [tix getimage openfold]
+ }
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/STList2.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/STList2.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,85 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: STList2.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# Demonstrates the scrolled tlist widget
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ # Create the Paned Window to contain two scrolled tlist's
+ #
+ set p [tixPanedWindow $top.p -orient horizontal]
+ pack $p -expand yes -fill both -padx 4 -pady 4
+
+ set p1 [$p add pane1 -expand 1]
+ set p2 [$p add pane2 -expand 1]
+
+ $p1 config -relief flat
+ $p2 config -relief flat
+
+ # Create a TList with vertical orientation
+ #
+ tixScrolledTList $p1.st -options {
+ tlist.orient vertical
+ tlist.selectMode single
+ }
+ label $p1.lab -text "Vertical Orientation"
+
+ pack $p1.lab -anchor c -side top -pady 2
+ pack $p1.st -expand yes -fill both -padx 10 -pady 10
+
+ # Create a TList with horizontal orientation
+ #
+ tixScrolledTList $p2.st -options {
+ tlist.orient horizontal
+ tlist.selectMode single
+ }
+ label $p2.lab -text "Horizontal Orientation"
+
+ pack $p2.lab -anchor c -side top -pady 2
+ pack $p2.st -expand yes -fill both -padx 10 -pady 10
+
+ # Insert a list of numbers into the two tlist subwidget's
+ #
+ set vt [$p1.st subwidget tlist]
+ set ht [$p2.st subwidget tlist]
+
+ set numbers {
+ one two three fours five six seven eight nine ten eleven
+ twelve thirdteen fourteen
+ }
+
+ foreach num $numbers {
+ $vt insert end -itemtype imagetext -text $num \
+ -image [tix getimage openfold]
+ $ht insert end -itemtype imagetext -text $num \
+ -image [tix getimage openfold]
+ }
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/STList3.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/STList3.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,112 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: STList3.tcl,v 1.4 2004/03/28 02:44:56 hobbs Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# Demonstrates the use of DirTree with the TList
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+ # Create the Paned Window to contain the dirtree and scrolled tlist
+ #
+ set p [tixPanedWindow $top.p -orient horizontal]
+ pack $p -expand yes -fill both -padx 4 -pady 4
+
+ set p1 [$p add pane1 -expand 1]
+ set p2 [$p add pane2 -expand 4]
+
+ $p1 config -relief flat
+ $p2 config -relief flat
+
+ # Create a DirTree
+ #
+ tixDirTree $p1.dirtree -options {
+ hlist.width 28
+ }
+
+ pack $p1.dirtree -expand yes -fill both -padx 4 -pady 4
+
+
+ # Create a TList
+ # NOTE: we set the width of the tlist to 60 characters, since we'll have
+ # quite a few files to display
+ #
+ tixScrolledTList $p2.st -options {
+ tlist.orient vertical
+ tlist.selectMode single
+ tlist.width 60
+ tlist.height 25
+ }
+ pack $p2.st -expand yes -fill both -padx 4 -pady 4
+
+ set tlist [$p2.st subwidget tlist]
+
+ # setup the callbacks: when the user selects a directory, we'll display
+ # its content in the tlist widget
+ $p1.dirtree config \
+ -browsecmd [list TList:listdir $tlist] \
+ -command [list TList:listdir $tlist]
+
+ # List the directory now
+ #
+ TList:listdir $tlist [pwd]
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command [list destroy $w] -width 6
+ $box add cancel -text Cancel -command [list destroy $w] -width 6
+}
+
+proc TList:listdir {w dir} {
+ $w delete 0 end
+
+ if {[catch {glob -nocomplain -directory $dir *} entries]} {
+ # The user has entered an invalid directory
+ # %% todo: prompt error, go back to last succeed directory
+ return
+ }
+
+ set files ""
+ foreach fname [lsort -dictionary $entries] {
+ if {[file isdirectory $fname]} {
+ set image [tix getimage folder]
+ } else {
+ lappend files [file tail $fname]
+ continue
+ }
+ $w insert end -itemtype imagetext \
+ -text [file tail $fname] -image $image
+ }
+
+ foreach fname $files {
+ switch -glob -- $fname {
+ {*.[ch]} { set image [tix getimage srcfile] }
+ *.tcl -
+ *.o { set image [tix getimage file] }
+ default { set image [tix getimage textfile] }
+ }
+ $w insert end -itemtype imagetext -text $fname -image $image
+ }
+}
+
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/SText.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SText.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,75 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SText.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixScrolledText widget.
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the ScrolledText widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Create a Scrolled Text widget.
+ #
+ tixScrolledText $w.top.a
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ # Put the junk inside the text subwidget of the ScrolledText widget
+ #
+ $w.top.a subwidget text insert end {
+Mon, 19 Jun 1995 11:39:52 comp.lang.tcl Thread 34 of 220
+Lines 353 A new way to put text and bitmaps together
+ioi at xpi.com Ioi K. Lam at Expert Interface Technologies
+
+Hi,
+
+I have implemented a new image type called "compound". It allows you
+to glue together a bunch of bitmaps, images and text strings together
+to form a bigger image. Then you can use this image with widgets that
+support the -image option. This way you can display very fancy stuffs
+in your GUI. For example, you can display a text string string
+together with a bitmap, at the same time, inside a TK button widget. A
+screenshot of compound images can be found at the bottom of this page:
+
+ http://www.xpi.com/tix/screenshot.html
+
+You can also you is in other places such as putting fancy bitmap+text
+in menus, tabs of tixNoteBook widgets, etc. This feature will be
+included in the next release of Tix (4.0b1). Count on it to make jazzy
+interfaces!}
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/SWindow.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/SWindow.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,89 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SWindow.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixScrolledWindow widget.
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the ScrolledWindow widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Create a complex window inside the ScrolledWindow widget.
+ # ScrolledWindow are very convenient: unlink the canvas widget,
+ # you don't need to specify the scroll-redions for the
+ # ScrolledWindow. It will automatically adjust itself to fit
+ # size of the "window" subwidget
+ #
+ # [Hint] Be sure you create and pack new widgets inside the
+ # "window" subwidget and NOT inside $w.top.a itself!
+ #
+ tixScrolledWindow $w.top.a
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+ set f [$w.top.a subwidget window]
+ tixNoteBook $f.nb
+ pack $f.nb -expand yes -fill both -padx 20 -pady 20
+
+
+ $f.nb add image -label "Image" -underline 0
+ $f.nb add buttons -label "Buttons" -underline 0
+
+ # The first page: an image
+ #
+ global demo_dir
+ set p [$f.nb subwidget image]
+ set im [image create photo -file $demo_dir/bitmaps/tix.gif]
+ label $p.lab -image $im
+ pack $p.lab -padx 20 -pady 20
+
+ # The second page: buttons
+ #
+ set p [$f.nb subwidget buttons]
+ button $p.b1 -text "Welcome" -width 8
+ button $p.b2 -text "to" -width 8
+ button $p.b3 -text "the" -width 8
+ button $p.b4 -text "World" -width 8
+ button $p.b5 -text "of" -width 8
+ button $p.b6 -text "Tix" -width 8
+
+ pack $p.b1 $p.b2 $p.b3 $p.b4 $p.b5 $p.b6 -anchor c -side top
+
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ wm geometry $w 240x220
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/Sample.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Sample.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,36 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Sample.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# REPLACE WITH DESCRIPTION OF THIS DEMO.
+#
+
+proc RunSample {w} {
+ set top [frame $w.f -bd 1 -relief raised]
+ set box [tixButtonBox $w.b -bd 1 -relief raised]
+
+ pack $box -side bottom -fill both
+ pack $top -side top -fill both -expand yes
+
+
+ # Create the buttons
+ #
+ $box add ok -text Ok -command "destroy $w" -width 6
+ $box add cancel -text Cancel -command "destroy $w" -width 6
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/Select.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Select.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,114 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Select.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixSelect widget.
+#
+proc RunSample {w} {
+ global demo_dir
+
+ # Create the frame on the top of the dialog box with two tixSelect
+ # widgets inside.
+ #
+ frame $w.top
+
+ # There can be one and only type of justification for any piece of text.
+ # So we set -radio to be true. Also, -allowzero is set to false: the user
+ # cannot select a "none" justification
+ #
+ tixSelect $w.top.just -allowzero false -radio true \
+ -label "Justification: "\
+ -options {
+ label.width 15
+ label.padx 4
+ label.anchor e
+ }
+
+ # The user can select one or many or none of the font attributes in
+ # the font Select widget, so we set -radio to false (can select one or
+ # many) and -allowzero to true (can select none)
+ #
+ tixSelect $w.top.font -allowzero true -radio false \
+ -label "Font: " \
+ -options {
+ label.width 15
+ label.padx 4
+ label.anchor e
+ }
+
+ pack $w.top.just $w.top.font -side top -expand yes -anchor c \
+ -padx 4 -pady 4
+
+ # Add the choices of available font attributes
+ #
+ #
+ $w.top.font add bold -bitmap @$demo_dir/bitmaps/bold.xbm
+ $w.top.font add italic -bitmap @$demo_dir/bitmaps/italic.xbm
+ $w.top.font add underline -bitmap @$demo_dir/bitmaps/underlin.xbm
+ $w.top.font add capital -bitmap @$demo_dir/bitmaps/capital.xbm
+
+ # Add the choices of available justification types
+ #
+ #
+ $w.top.just add left -bitmap @$demo_dir/bitmaps/leftj.xbm
+ $w.top.just add right -bitmap @$demo_dir/bitmaps/rightj.xbm
+ $w.top.just add center -bitmap @$demo_dir/bitmaps/centerj.xbm
+ $w.top.just add justified -bitmap @$demo_dir/bitmaps/justify.xbm
+
+ $w.top.font config -variable sel_font
+ $w.top.just config -variable sel_just
+
+ # Set the default value of the two Select widgets
+ #
+ #
+ global sel_just sel_font
+ set sel_just justified
+ set sel_font {bold underline}
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -width 6\
+ -command "sel:cmd $w; destroy $w"
+
+ $w.box add apply -text Apply -underline 0 -width 6\
+ -command "sel:cmd $w"
+
+ $w.box add cancel -text Cancel -underline 0 -width 6\
+ -command "destroy $w"
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+# This procedure is called whenever the user pressed the OK or the Apply button
+#
+#
+proc sel:cmd {w} {
+ global sel_font sel_just
+
+ tixDemo:Status "The justification is $sel_just"
+
+ if {$sel_font == {}} {
+ tixDemo:Status "The font is normal"
+ } else {
+ tixDemo:Status "The font is $sel_font"
+ }
+
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind .demo <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/StdBBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/StdBBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,65 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: StdBBox.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of the tixStdButtonBox widget, which is a
+# group of "Standard" buttons for Motif-like dialog boxes.
+#
+proc RunSample {w} {
+
+ # Create the label on the top of the dialog box
+ #
+ label $w.top -padx 20 -pady 10 -border 1 -relief raised -text \
+ "This dialog box is\n a demostration of the\n tixStdButtonBox widget" \
+ -justify center -anchor c
+
+ # Create the button box. We also do some manipulation of the
+ # button widgets inside: we disable the help button and change
+ # the label string of the "apply" button to "Filter"
+ #
+ # Note that the -text, -underline, -command and -width options are all
+ # standard options of the button widgets.
+ #
+ tixStdButtonBox $w.box
+ $w.box subwidget ok config \
+ -command "tixDemo:Status {OK pressed}; destroy $w"
+ $w.box subwidget apply config -text "Filter" -underline 0 \
+ -command "tixDemo:Status {Filter pressed}"
+ $w.box subwidget cancel config \
+ -command "tixDemo:Status {Cancel pressed}; destroy $w"
+ $w.box subwidget help config -state disabled
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes -anchor c
+
+
+ # "after 0" is used so that the key bindings won't interfere with
+ # tkTraverseMenu
+ #
+ bind [winfo toplevel $w] <Alt-o> \
+ "after 0 tkButtonInvoke [$w.box subwidget ok]"
+ bind [winfo toplevel $w] <Alt-f> \
+ "after 0 tkButtonInvoke [$w.box subwidget apply]"
+ bind [winfo toplevel $w] <Alt-c> \
+ "after 0 tkButtonInvoke [$w.box subwidget cancel]"
+ bind [winfo toplevel $w] <Escape> \
+ "after 0 tkButtonInvoke [$w.box subwidget cancel]"
+
+ focus [$w.box subwidget apply]
+}
+
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
Added: external/tix-8.4.2.x/demos/samples/Tree.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Tree.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,91 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Tree.tcl,v 1.4 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates how to use the TixTree widget to display
+# hierachical data (A hypothetical DOS disk drive).
+#
+
+proc RunSample {w} {
+
+ # We create the frame and the ScrolledHList widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ # Create a TixTree widget to display the hypothetical DOS disk drive
+ #
+ #
+ tixTree $w.top.a -options {
+ separator "\\"
+ }
+
+ pack $w.top.a -expand yes -fill both -padx 10 -pady 10 -side left
+
+ set tree $w.top.a
+ set hlist [$w.top.a subwidget hlist]
+
+ # STEP (1) Add the directories into the TixTree widget (using the
+ # hlist subwidget)
+
+ set directories {
+ C:
+ C:\\Dos
+ C:\\Windows
+ C:\\Windows\\System
+ }
+
+ foreach d $directories {
+ set text [lindex [split $d \\] end]
+ $hlist add $d -itemtype imagetext \
+ -text $text -image [tix getimage folder]
+ }
+
+ # STEP (2) Use the "autosetmode" method of TixTree to indicate
+ # which entries can be opened or closed. The
+ # "autosetmode" command will call the "setmode" method
+ # to set the mode of each entry to the following:
+ #
+ # "open" : the entry has some children and the children are
+ # currently visible
+ # "close": the entry has some children and the children are
+ # currently INvisible
+ # "none": the entry does not have children.
+ #
+ # If you don't like the "autosetmode" method, you can always call
+ # "setmode" yourself, but that takes more work.
+
+ $tree autosetmode
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> {if {"%W" == ".demo"} exit}
+}
+
Added: external/tix-8.4.2.x/demos/samples/Xpm.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Xpm.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,89 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Xpm.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of XPM images.
+#
+
+proc RunSample {w} {
+
+ set hard_disk_pixmap {/* XPM */
+ static char * drivea_xpm[] = {
+ /* width height ncolors chars_per_pixel */
+ "32 32 5 1",
+ /* colors */
+ " s None c None",
+ ". c #000000000000",
+ "X c white",
+ "o c #c000c000c000",
+ "O c #800080008000",
+ /* pixels */
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " .......................... ",
+ " .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+ " .XooooooooooooooooooooooO. ",
+ " .Xooooooooooooooooo..oooO. ",
+ " .Xooooooooooooooooo..oooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .Xoooooooo.......oooooooO. ",
+ " .Xoo...................oO. ",
+ " .Xoooooooo.......oooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+ " .......................... ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+ }
+
+ frame $w.top -relief raised -bd 1
+ button $w.top.b -image [image create pixmap -data $hard_disk_pixmap]
+ pack $w.top -expand yes -fill both
+ pack $w.top.b -expand yes -padx 20 -pady 20
+
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind $w <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/samples/Xpm1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/samples/Xpm1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,108 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Xpm1.tcl,v 1.3 2001/12/09 05:31:07 idiscovery Exp $
+#
+# Tix Demostration Program
+#
+# This sample program is structured in such a way so that it can be
+# executed from the Tix demo program "widget": it must have a
+# procedure called "RunSample". It should also have the "if" statment
+# at the end of this file so that it can be run as a standalone
+# program using tixwish.
+
+# This file demonstrates the use of XPM images in the menu.
+#
+
+proc RunSample {w} {
+
+ set hard_disk_pixmap {/* XPM */
+ static char * drivea_xpm[] = {
+ /* width height ncolors chars_per_pixel */
+ "32 32 5 1",
+ /* colors */
+ " s None c None",
+ ". c #000000000000",
+ "X c white",
+ "o c #c000c000c000",
+ "O c #800080008000",
+ /* pixels */
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " .......................... ",
+ " .XXXXXXXXXXXXXXXXXXXXXXXo. ",
+ " .XooooooooooooooooooooooO. ",
+ " .Xooooooooooooooooo..oooO. ",
+ " .Xooooooooooooooooo..oooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .Xoooooooo.......oooooooO. ",
+ " .Xoo...................oO. ",
+ " .Xoooooooo.......oooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .XooooooooooooooooooooooO. ",
+ " .oOOOOOOOOOOOOOOOOOOOOOOO. ",
+ " .......................... ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " ",
+ " "};
+ }
+ # We create the frame and the ScrolledText widget
+ # at the top of the dialog box
+ #
+ frame $w.top -relief raised -bd 1
+
+ set m [frame $w.top.menu -relief raised -bd 2]
+ set mb [menubutton $m.mb -text Options -menu $m.mb.m]
+ set menu [menu $mb.m]
+
+ pack $m -side top -fill x
+ pack $mb -side left -fill y
+
+ # Put the label there
+ #
+ set lab [label $w.top.label -text "Go to the \"Options\" menu" -anchor c]
+ pack $lab -padx 40 -pady 40 -fill both -expand yes
+
+ set image [image create pixmap -data $hard_disk_pixmap]
+ $menu add command -image $image \
+ -command "$lab config -image $image"
+
+ # Use a ButtonBox to hold the buttons.
+ #
+ tixButtonBox $w.box -orientation horizontal
+ $w.box add ok -text Ok -underline 0 -command "destroy $w" \
+ -width 6
+ $w.box add cancel -text Cancel -underline 0 -command "destroy $w" \
+ -width 6
+
+ pack $w.box -side bottom -fill x
+ pack $w.top -side top -fill both -expand yes
+
+ wm geometry $w 300x300
+}
+
+
+# This "if" statement makes it possible to run this script file inside or
+# outside of the main demo program "widget".
+#
+if {![info exists tix_demo_running]} {
+ wm withdraw .
+ set w .demo
+ toplevel $w; wm transient $w ""
+ RunSample $w
+ bind .demo <Destroy> exit
+}
+
Added: external/tix-8.4.2.x/demos/tclIndex
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/tclIndex Tue Mar 18 19:38:59 2008
@@ -0,0 +1,55 @@
+# Tcl autoload index file, version 2.0
+# This file is generated by the "auto_mkindex" command
+# and sourced to set up indexing information for one or
+# more commands. Typically each line is a command that
+# sets an element in the auto_index array, where the
+# element name is the name of a command and the value is
+# a script that loads the command.
+
+set auto_index(MkChoosers) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkCombo) [list source [file join $dir MkChoose.tcl]]
+set auto_index(stCmd) [list source [file join $dir MkChoose.tcl]]
+set auto_index(stValidate) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkControl) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkSelect) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkOptMenu) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkFileEnt) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkFileBox) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkToolBar) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkTitle) [list source [file join $dir MkChoose.tcl]]
+set auto_index(MkDirList) [list source [file join $dir MkDirLis.tcl]]
+set auto_index(MkDirListWidget) [list source [file join $dir MkDirLis.tcl]]
+set auto_index(MkExFileWidget) [list source [file join $dir MkDirLis.tcl]]
+set auto_index(MkManager) [list source [file join $dir MkManag.tcl]]
+set auto_index(MkPanedWindow) [list source [file join $dir MkManag.tcl]]
+set auto_index(MkNoteBook) [list source [file join $dir MkManag.tcl]]
+set auto_index(CreateCommonButtons) [list source [file join $dir MkManag.tcl]]
+set auto_index(MkSample) [list source [file join $dir MkSample.tcl]]
+set auto_index(AddSampleToHList) [list source [file join $dir MkSample.tcl]]
+set auto_index(Sample:Action) [list source [file join $dir MkSample.tcl]]
+set auto_index(RunProg) [list source [file join $dir MkSample.tcl]]
+set auto_index(LoadFile) [list source [file join $dir MkSample.tcl]]
+set auto_index(ReadFileWhenIdle) [list source [file join $dir MkSample.tcl]]
+set auto_index(ReadFile) [list source [file join $dir MkSample.tcl]]
+set auto_index(MkScroll) [list source [file join $dir MkScroll.tcl]]
+set auto_index(MkSList) [list source [file join $dir MkScroll.tcl]]
+set auto_index(SList:Reset) [list source [file join $dir MkScroll.tcl]]
+set auto_index(MkSWindow) [list source [file join $dir MkScroll.tcl]]
+set auto_index(SWindow:Reset) [list source [file join $dir MkScroll.tcl]]
+set auto_index(MkSText) [list source [file join $dir MkScroll.tcl]]
+set auto_index(SText:Reset) [list source [file join $dir MkScroll.tcl]]
+set auto_index(tixDemo:MkMainWindow) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MkMainMenu) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MkMainNoteBook) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(txiDemo:CreatePage) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MkMainStatus) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:Status) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MkWelcome) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MkWelcomeBar) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MkWelcomeText) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:MainTextFont) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:FileOpen) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:FileOpen:Doit) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:BalloonHelp) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:SelfTest) [list source [file join $dir tixwidgets.tcl]]
+set auto_index(tixDemo:Exit) [list source [file join $dir tixwidgets.tcl]]
Added: external/tix-8.4.2.x/demos/tixwidgets.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/tixwidgets.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,344 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# tixDemo --
+#
+# This is a demo program of all the available Tix widgets. If
+# have installed Tix properly, you can execute this program
+# by changing to this directory and executing
+# the following in csh
+#
+# % env TIX_LIBRARY=../library tixwish tixwidgets.tcl
+#
+# Or this in sh
+#
+# $ TIX_LIBRARY=../library tixwish tixwidgets.tcl
+#
+#----------------------------------------------------------------------
+#
+# This file has not been properly documented. It is NOT intended
+# to be used as an introductory demo program about Tix
+# programming. For such demos, please see the files in the
+# demos/samples directory or go to the "Samples" page in the
+# "widget demo"
+#
+#
+# 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.
+#
+
+package require Tix
+tix initstyle
+
+tk appname "TixDemo#[pid]"
+
+proc tixDemo:MkMainWindow {w} {
+ global demo auto_path demo_dir
+
+ # add this directory to the auto_path
+ lappend auto_path $demo_dir
+ tix addbitmapdir [file join $demo_dir bitmaps]
+
+ toplevel $w
+ wm title $w "Tix Widget Demonstration"
+ wm geometry $w 830x566+100+100
+
+ set demo(balloon) [tixBalloon .demos_balloon]
+
+ set menu [tixDemo:MkMainMenu $w]
+ set frame2 [tixDemo:MkMainNoteBook $w]
+ set frame3 [tixDemo:MkMainStatus $w]
+
+ $w configure -menu $menu
+
+ pack $frame3 -side bottom -fill x
+ pack $frame2 -side top -expand yes -fill both -padx 4 -pady 4
+
+ $demo(balloon) config -statusbar $demo(statusbar)
+ set demo(notebook) $frame2
+}
+
+proc tixDemo:MkMainMenu {top} {
+ global useBallons
+
+ set m [menu $top.menu -tearoff 0]
+ $m add cascade -label "File" -menu $m.file -underline 0
+ $m add cascade -label "Help" -menu $m.help -underline 0
+
+ menu $m.file -tearoff 0
+ $m.file add command -label "Open ... " -command tixDemo:FileOpen \
+ -underline 1 -accelerator "Ctrl+O"
+ $m.file add sep
+ $m.file add command -label "Exit " -command tixDemo:Exit \
+ -underline 1 -accelerator "Ctrl+X"
+
+ menu $m.help -tearoff 0
+ $m.help add checkbutton -under 0 -label "Balloon Help " \
+ -variable useBallons -onvalue 1 -offvalue 0
+
+ trace variable useBallons w tixDemo:BalloonHelp
+
+ set useBallons 1
+
+ return $m
+}
+
+# Create the main display area of the widget programm. This area should
+# utilize the "tixNoteBook" widget once it is available. But now
+# we use the cheap substitute "tixStackWindow"
+#
+proc tixDemo:MkMainNoteBook {top} {
+ global demo
+ set hasGL 0
+
+ option add *TixNoteBook.tagPadX 6
+ option add *TixNoteBook.tagPadY 4
+ option add *TixNoteBook.borderWidth 2
+
+ set w [tixNoteBook $top.f2 -ipadx 5 -ipady 5]
+
+ $w add wel -createcmd [list tixDemo:CreatePage tixDemo:MkWelcome $w wel] \
+ -label "Welcome" -under 0
+ $w add cho -createcmd [list tixDemo:CreatePage MkChoosers $w cho] \
+ -label "Choosers" -under 0
+ $w add scr -createcmd [list tixDemo:CreatePage MkScroll $w scr] \
+ -label "Scrolled Widgets" -under 0
+# There currently is no MkManag.tcl that this expects ?!? - JH
+# $w add mgr -createcmd [list tixDemo:CreatePage MkManager $w mgr] \
+# -label "Manager Widgets" -under 0
+ $w add dir -createcmd [list tixDemo:CreatePage MkDirList $w dir] \
+ -label "Directory List" -under 0
+ $w add exp -createcmd [list tixDemo:CreatePage MkSample $w exp] \
+ -label "Run Sample Programs" -under 0
+
+ if {$hasGL} {
+ $w add glw -createcmd [list MkGL $w glw] -tag "GL Widgets"
+ }
+
+ return $w
+}
+
+proc tixDemo:CreatePage {command w name} {
+ tixBusy $w on
+ set code [catch {$command $w $name} err]
+ tixBusy $w off
+ return -code $code $err
+}
+
+proc tixDemo:MkMainStatus {top} {
+ global demo demo_dir
+
+ set w [frame $top.f3 -relief raised -bd 1]
+ set demo(statusbar) \
+ [label $w.status -relief sunken -bd 1]
+
+ tixForm $demo(statusbar) -padx 3 -pady 3 -left 0 -right %70
+ $w.status configure -text [file native $demo_dir]
+ return $w
+}
+
+proc tixDemo:Status {msg} {
+ global demo
+
+ $demo(statusbar) configure -text $msg
+}
+
+
+proc tixDemo:MkWelcome {nb page} {
+ set w [$nb subwidget $page]
+
+ set bar [tixDemo:MkWelcomeBar $w]
+ set text [tixDemo:MkWelcomeText $w]
+
+ pack $bar -side top -fill x -padx 2 -pady 2
+ pack $text -side top -fill both -expand yes
+}
+
+proc tixDemo:MkWelcomeBar {top} {
+ global demo
+
+ set w [frame $top.bar -bd 2 -relief groove]
+
+ # Create and configure comboBox 1
+ #
+ tixComboBox $w.cbx1 -command [list tixDemo:MainTextFont $top] \
+ -options {
+ entry.width 15
+ listbox.height 3
+ }
+ tixComboBox $w.cbx2 -command [list tixDemo:MainTextFont $top] \
+ -options {
+ entry.width 4
+ listbox.height 3
+ }
+ set demo(welfont) $w.cbx1
+ set demo(welsize) $w.cbx2
+
+ $w.cbx1 insert end "Courier"
+ $w.cbx1 insert end "Helvetica"
+ $w.cbx1 insert end "Lucida"
+ $w.cbx1 insert end "Times Roman"
+
+ $w.cbx2 insert end 8
+ $w.cbx2 insert end 10
+ $w.cbx2 insert end 12
+ $w.cbx2 insert end 14
+ $w.cbx2 insert end 18
+
+ $w.cbx1 pick 1
+ $w.cbx2 pick 3
+
+ # Pack the comboboxes together
+ #
+ pack $w.cbx1 $w.cbx2 -side left -padx 4 -pady 4
+
+ $demo(balloon) bind $w.cbx1\
+ -msg "Choose\na font" -statusmsg "Choose a font for this page"
+ $demo(balloon) bind $w.cbx2\
+ -msg "Point size" -statusmsg "Choose the font size for this page"
+
+
+ tixDoWhenIdle tixDemo:MainTextFont $top
+ return $w
+}
+
+proc tixDemo:MkWelcomeText {top} {
+ global demo tix_version
+
+ set w [tixScrolledWindow $top.f3 -scrollbar auto]
+ set win [$w subwidget window]
+
+ label $win.title -font [list times -18 bold] \
+ -bd 0 -width 30 -anchor n\
+ -text "Welcome to TIX version $tix_version"
+
+ message $win.msg -font [list helvetica -14 bold] \
+ -bd 0 -width 400 -anchor n\
+ -text "\
+Tix $tix_version is a library of mega-widgets based on TK. This program \
+demonstrates the widgets in the Tix widget. You can choose the pages \
+in this window to look at the corresponding widgets. \
+To quit this program, choose the \"File | Exit\" command."
+
+
+ pack $win.title -expand yes -fill both -padx 10 -pady 10
+ pack $win.msg -expand yes -fill both -padx 10 -pady 10
+ set demo(welmsg) $win.msg
+ return $w
+}
+
+proc tixDemo:MainTextFont {w args} {
+ global demo
+
+ if {![info exists demo(welmsg)]} {
+ return
+ }
+
+ set font [$demo(welfont) cget -value]
+ set point [$demo(welsize) cget -value]
+
+ case $font {
+ "Courier" {
+ set f courier
+ }
+ "Helvetica" {
+ set f helvetica
+ }
+ "Lucida" {
+ set f lucida
+ }
+ default {
+ set f times
+ }
+ }
+
+ set xfont [list $f -$point]
+ if [catch {$demo(welmsg) config -font $xfont} err] {
+ puts \a$err
+ }
+}
+
+proc tixDemo:FileOpen {} {
+ global demo demo_dir
+ set filedlg [tix filedialog tixExFileSelectDialog]
+ if {![info exists demo(filedialog)]} {
+ $filedlg subwidget fsbox config -pattern *.tcl
+ $filedlg subwidget fsbox config -directory [file join $demo_dir samples]
+ $filedlg config -command tixDemo:FileOpen:Doit
+ set demo(filedialog) $filedlg
+ }
+ $filedlg config -title "Open Tix Sample Programs"
+ wm transient $filedlg ""
+ wm deiconify $filedlg
+ after idle raise $filedlg
+ $filedlg popup
+ tixPushGrab $filedlg
+}
+
+proc tixDemo:FileOpen:Doit {filename} {
+ global demo
+
+ tixPopGrab
+ LoadFile $filename
+ $demo(filedialog) popdown
+}
+
+#----------------------------------------------------------------------
+# Balloon Help
+#----------------------------------------------------------------------
+proc tixDemo:BalloonHelp {args} {
+ global demo useBallons
+
+ if {$useBallons} {
+ $demo(balloon) config -state "both"
+ } else {
+ $demo(balloon) config -state "none"
+ }
+}
+
+#----------------------------------------------------------------------
+# Self-testing
+#
+# The following code are called by the Tix test suite. It opens
+# every page in the demo program.
+#----------------------------------------------------------------------
+proc tixDemo:SelfTest {} {
+ global demo testConfig
+
+ if ![info exists testConfig] {
+ return
+ }
+
+ tixDemo:MkMainWindow .widget
+
+ update
+ foreach p [$demo(notebook) pages] {
+ $demo(notebook) raise $p
+ update
+ }
+
+ destroy .widget
+}
+
+proc tixDemo:Exit {} {
+ destroy .widget
+}
+
+#----------------------------------------------------------------------
+# Start!
+#----------------------------------------------------------------------
+
+if {![info exists testConfig]} {
+ #
+ # If the testConfig variable exists, we are driven by the regression
+ # test. In that case, don't open the main window. The test program will
+ # call Widget:SelfTest
+ #
+ set kids [winfo children .]
+ wm withdraw .
+ set ::demo_dir [file normalize [file dirname [info script]]]
+ tixDemo:MkMainWindow .widget
+ wm transient .widget ""
+ if {[llength $kids] < 1} {bind .widget <Destroy> "exit"}
+}
Added: external/tix-8.4.2.x/demos/widget
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/demos/widget Tue Mar 18 19:38:59 2008
@@ -0,0 +1,449 @@
+#!/bin/sh
+# the next line restarts using wish \
+exec wish "$0" "$@"
+
+# widget --
+#
+# This script demonstrates the various widgets provided by Tix,
+# along with many of the features of the Tix library. This file
+# only contains code to generate the main window for the
+# application, which invokes individual demonstrations. The
+# code for the actual demonstrations is contained in separate
+# ".tcl" files in the samples/ subdirectory, which are sourced
+# by this script as needed.
+#
+# Copyright (c) 1992-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-2000 Scriptics Corporation.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+# $Id: widget,v 1.6 2004/03/28 02:44:56 hobbs Exp $
+
+package require Tix
+eval destroy [winfo child .]
+wm title . "Tix Widget Tour"
+set tix_demo_running 1
+set demo_dir [file dirname [info script]]
+tix addbitmapdir [file join $demo_dir bitmaps]
+
+# createMainWindow --
+#
+# Creates the main window, consisting of a menu bar and a text
+# widget that explains how to use the program, plus lists all of
+# the demos as hypertext items.
+
+proc createMainWindow {} {
+ global tcl_platform old_cursor
+
+ switch $tcl_platform(platform) {
+ "windows" {
+ set font {Arial 12}
+ }
+ "unix" {
+ set font {Helvetica 12}
+ }
+ default {
+ set font {Helvetica 12}
+ }
+ }
+
+ menu .menuBar -tearoff 0
+ .menuBar add cascade -menu .menuBar.file -label "File" -underline 0
+ menu .menuBar.file -tearoff 0
+
+ # On the Mac use the specia .apple menu for the about item
+ if {$tcl_platform(platform) eq "macintosh"} {
+ .menuBar add cascade -menu .menuBar.apple
+ menu .menuBar.apple -tearoff 0
+ .menuBar.apple add command -label "About ..." -command "aboutBox"
+ } else {
+ .menuBar.file add command -label "About ..." -command "aboutBox"
+ .menuBar.file add sep
+ }
+
+ .menuBar.file add command -label "Exit" -command "exit"
+ . configure -menu .menuBar
+
+ frame .statusBar
+ label .statusBar.lab -text " " -relief sunken -bd 1 \
+ -font -*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* -anchor w
+ label .statusBar.foo -width 8 -relief sunken -bd 1 \
+ -font -*-Helvetica-Medium-R-Normal--*-120-*-*-*-*-*-* -anchor w
+ pack .statusBar.lab -side left -padx 2 -expand yes -fill both
+ pack .statusBar.foo -side left -padx 2
+ pack .statusBar -side bottom -fill x -pady 2
+
+ frame .textFrame
+ scrollbar .s -orient vertical -command {.t yview} -highlightthickness 0 \
+ -takefocus 1
+ pack .s -in .textFrame -side right -fill y
+ text .t -yscrollcommand {.s set} -wrap word -width 55 -height 30 \
+ -font $font \
+ -setgrid 1 -highlightthickness 0 -padx 4 -pady 2 -takefocus 0
+ pack .t -in .textFrame -expand y -fill both -padx 1
+ pack .textFrame -expand yes -fill both
+
+ if {$tcl_platform(platform) eq "windows"} {
+ #
+ # Make the scrollbar look win32
+ #
+
+ .textFrame config -bd 2 -relief sunken
+ .t config -bd 0
+ pack .t -padx 0
+ }
+
+ set old_cursor [.t cget -cursor]
+
+ # Create a bunch of tags to use in the text widget, such as those for
+ # section titles and demo descriptions. Also define the bindings for
+ # tags.
+
+ .t tag configure title -font {Helvetica 18 bold} -justify center
+ .t tag configure header -font {Helvetica 14 bold}
+
+ # We put some "space" characters to the left and right of each
+ # demo description so that the descriptions are highlighted only
+ # when the mouse cursor is right over them (but not when the
+ # cursor is to their left or right)
+ #
+ .t tag configure demospace -lmargin1 1c -lmargin2 1c -spacing1 1
+ .t tag configure codeicon -lmargin1 1c -lmargin2 1c
+
+ if {[winfo depth .] == 1} {
+ .t tag configure demo -lmargin1 1c -lmargin2 1c \
+ -underline 1
+ .t tag configure visited -lmargin1 1c -lmargin2 1c \
+ -underline 1
+ .t tag configure hot -background black -foreground white
+ } else {
+ .t tag configure demo -lmargin1 1c -lmargin2 1c \
+ -foreground blue -underline 1
+ .t tag configure visited -lmargin1 1c -lmargin2 1c \
+ -foreground #303080 -underline 1
+ .t tag configure hot -foreground red -underline 1
+ }
+ .t tag bind demo <ButtonRelease-1> {
+ invoke [.t index {@%x,%y}]
+ }
+ .t tag bind codeicon <ButtonRelease-1> {
+ showCode [.t index [list {@%x,%y} +2 chars]]
+ }
+ global lastLine
+ set lastLine ""
+ .t tag bind demo <Enter> {
+ set lastLine [.t index {@%x,%y linestart}]
+ .t tag add hot [list $lastLine +3 chars] \
+ [list $lastLine lineend -1 chars]
+ .t config -cursor hand2
+ showStatus run [.t index {@%x,%y}]
+ }
+ .t tag bind demo <Leave> {
+ .t tag remove hot 1.0 end
+ .t config -cursor $old_cursor
+ .statusBar.lab config -text ""
+ }
+ .t tag bind demo <Motion> {
+ set newLine [.t index {@%x,%y linestart}]
+ if {[string compare $newLine $lastLine] != 0} {
+ .t tag remove hot 1.0 end
+ set lastLine $newLine
+
+ set tags [.t tag names {@%x,%y}]
+ set i [lsearch -glob $tags demo-*]
+ if {$i >= 0} {
+ .t tag add hot [list $lastLine +3 chars] \
+ [list $lastLine lineend -1 chars]
+ }
+ }
+ showStatus run [.t index {@%x,%y}]
+ }
+
+ .t tag bind codeicon <Enter> {
+ .t config -cursor hand2
+ }
+ .t tag bind codeicon <Leave> {
+ .t config -cursor $old_cursor
+ }
+ .t tag bind codeicon <Motion> {
+ set tags [.t tag names [list {@%x,%y} +2 chars]]
+ set i [lsearch -glob $tags demo-*]
+ if {$i >= 0} {
+ showStatus code [.t index [list {@%x,%y} +2 chars]]
+ } else {
+ showStatus code ""
+ }
+ }
+
+ # Create the text for the text widget.
+
+ .t insert end "Tix Widget Tour\n" title
+ addNewLine .t
+ addText .t {
+ This program demonstrates the features of the Tix
+ library. Click on one of the highlighted lines below to run
+ the sample program and click on the
+ }
+ addSpace .t
+ .t image create end -image [tix getimage code]
+ addSpace .t
+ addText .t {
+ icon to view its source code.
+ }
+
+ addNewLine .t
+ addNewLine .t
+
+ addHeader .t "Hierachical ListBox"
+
+ addDemo .t HList1.tcl "Simple HList"
+ addDemo .t ChkList.tcl "CheckList"
+ addDemo .t SHList.tcl "ScrolledHList (1)"
+ addDemo .t SHList2.tcl "ScrolledHList (2)"
+ addDemo .t Tree.tcl "Simple Tree"
+
+ # TODO
+ # addDemo .t "Dynamic Tree" DynTree.tcl
+
+ addHeader .t "Tabular ListBox"
+
+ addDemo .t STList1.tcl "ScrolledTList (1)"
+ addDemo .t STList2.tcl "ScrolledTList (2)"
+ addDemo .t STList3.tcl "TList File Viewer"
+
+ addHeader .t "Grid Widget"
+
+ addDemo .t SGrid0.tcl "Simple Grid"
+ addDemo .t SGrid1.tcl "ScrolledGrid"
+ addDemo .t EditGrid.tcl "Editable Grid"
+
+ addHeader .t "Manager Widgets"
+
+ addDemo .t ListNBK.tcl ListNoteBook
+ addDemo .t NoteBook.tcl NoteBook
+ addDemo .t PanedWin.tcl PanedWindow
+
+ addHeader .t "Scrolled Widgets"
+
+ addDemo .t SListBox.tcl ScrolledListBox
+ addDemo .t SText.tcl ScrolledText
+ addDemo .t SWindow.tcl ScrolledWindow
+ addDemo .t CObjView.tcl "Canvas Object View"
+
+ addHeader .t "Miscellaneous Widgets"
+
+ addDemo .t Balloon.tcl Balloon
+ addDemo .t BtnBox.tcl ButtonBox
+ addDemo .t ComboBox.tcl ComboBox
+ addDemo .t Control.tcl Control
+ addDemo .t LabEntry.tcl LabelEntry
+ addDemo .t LabFrame.tcl LabelFrame
+ addDemo .t Meter.tcl Meter
+ addDemo .t OptMenu.tcl OptionMenu
+ addDemo .t PopMenu.tcl PopupMenu
+ addDemo .t Select.tcl Select
+ addDemo .t StdBBox.tcl StdButtonBox
+
+ addHeader .t "Image Types"
+
+ addDemo .t CmpImg.tcl "Compound image in buttons"
+ addDemo .t CmpImg3.tcl "Compound image in icons"
+ #addDemo .t CmpImg2.tcl "Compound image in notebook"
+ #addDemo .t CmpImg4.tcl \
+ # "Create color tabs in notebook using compound image"
+
+ addDemo .t Xpm.tcl "XPM pixmap image in buttons"
+ addDemo .t Xpm1.tcl "XPM pixmap image in menu"
+
+ .t configure -state disabled
+ focus .s
+
+ #
+ # Because .t is disabled and not focused, we have to do the
+ # following hacks to make the scrolling work well
+ #
+ bind .s <MouseWheel> {
+ .t yview scroll [expr {- (%D / 120) * 2}] units
+ }
+ bind .s <Up> {
+ .t yview scroll -1 units
+ }
+ bind .s <Down> {
+ .t yview scroll 1 units
+ }
+ bind .s <Prior> {
+ .t yview scroll -1 page
+ }
+ bind .s <Next> {
+ .t yview scroll 1 page
+ }
+ bind .s <Home> {
+ .t yview 1.0
+ }
+ bind .s <End> {
+ .t yview end
+ }
+}
+
+# invoke --
+# This procedure is called when the user clicks on a demo description.
+# It is responsible for invoking the demonstration.
+#
+# Arguments:
+# index - The index of the character that the user clicked on.
+
+proc invoke {index} {
+ global demo_dir
+
+ # Find out which sample to run
+ set tags [.t tag names $index]
+ set i [lsearch -glob $tags demo-*]
+ if {$i < 0} {
+ return
+ }
+ set demo [string range [lindex $tags $i] 5 end]
+ set title [string trim [.t get [list $index linestart +3 chars] \
+ [list $index lineend]]]
+ # Get the name of this sample
+ set w .[lindex [split $demo .] 0]
+ set w [string tolower $w]
+
+ if [winfo exists $w] {
+ wm deiconify $w
+ raise $w
+ return
+ }
+
+ # Load the sample if it's not running
+ set cursor [.t cget -cursor]
+ .t configure -cursor watch
+ update
+ uplevel #0 [list source [file join $demo_dir samples $demo]]
+
+ toplevel $w
+ wm title $w $title
+ RunSample $w
+
+ update
+ .t configure -cursor $cursor
+
+ .t tag add visited "$index linestart +1 chars" "$index lineend -1 chars"
+}
+
+# showStatus --
+#
+# Show the name of the demo program in the status bar. This procedure
+# is called when the user moves the cursor over a demo description.
+#
+
+proc showStatus {which index} {
+ set tags [.t tag names $index]
+ set i [lsearch -glob $tags demo-*]
+ set cursor [.t cget -cursor]
+ if {$i < 0} {
+ .statusBar.lab config -text " "
+ set newcursor xterm
+ } else {
+ set demo [string range [lindex $tags $i] 5 end]
+ if {"$which" == "run"} {
+ set text "Run the \"$demo\" sample program"
+ } else {
+ set text "Show code of the \"$demo\" sample program"
+ }
+ .statusBar.lab config -text $text
+ set newcursor hand2
+ }
+ if [string compare $cursor $newcursor] {
+ .t config -cursor $newcursor
+ }
+}
+
+# showCode --
+# This procedure is called when the user clicks on the "code" icon.
+# It is responsible for displaying the code of the selected sample program.
+#
+# Arguments:
+# index - The index of the character that the user clicked on.
+
+proc showCode {index} {
+ global demo_dir
+
+ set tags [.t tag names $index]
+ set i [lsearch -glob $tags demo-*]
+ if {$i < 0} {
+ return
+ }
+ set cursor [.t cget -cursor]
+ .t configure -cursor watch
+ update
+ set demo [string range [lindex $tags $i] 5 end]
+
+ # Create the .code window
+ if {![winfo exists .code]} {
+ toplevel .code
+ frame .code.f
+ tixScrolledText .code.st
+ button .code.close -text Close -width 6 -command "wm withdraw .code"
+ pack .code.f -side bottom -fill x
+ pack .code.st -side top -fill both -expand yes
+ pack .code.close -in .code.f -side right -padx 10 -pady 10
+ }
+ set text [.code.st subwidget text]
+ $text delete 1.0 end
+ set fd [open [file join $demo_dir samples $demo]]
+ set data [read $fd]
+ close $fd
+ $text insert end $data
+
+ wm deiconify .code
+ wm title .code [file nativename [file join $demo_dir samples $demo]]
+ update
+ .t configure -cursor $cursor
+}
+
+proc addText {t text} {
+ regsub -all \n+ $text " " text
+ regsub -all {[ ]+} $text " " text
+ $t insert end [string trim $text]
+}
+
+proc addHeader {t text} {
+ addNewLine $t
+ $t insert end [string trim $text] header
+ addNewLine $t
+}
+
+proc addNewLine {t} {
+ $t insert end "\n" {demospace}
+}
+
+proc addSpace {t} {
+ $t insert end " " {demospace}
+}
+
+proc addDemo {t name text} {
+ $t insert end " " demospace
+ $t image create end -image [tix getimage code]
+ $t tag add codeicon [list end -2 chars] [list end -1 chars]
+ $t insert end " " demospace
+ $t insert end $text [list demo demo-$name]
+ $t insert end " " demospace
+ addNewLine $t
+}
+
+# aboutBox --
+#
+# Pops up a message box with an "about" message
+#
+proc aboutBox {} {
+ tk_messageBox -icon info -type ok -title "About Widget Tour" -message \
+"Tix widget tour\n\nCopyright (c) 2000-2001 Tix Project Group."
+}
+
+#
+# Start the program
+#
+
+createMainWindow
Added: external/tix-8.4.2.x/docs/FAQ.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/FAQ.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,399 @@
+<HTML>
+
+<!-- $Id: FAQ.html,v 1.5 2004/12/24 01:27:22 hobbs Exp $ -->
+<HEAD>
+<TITLE>Tix Frequently Asked Questions</TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+<center><h1>Tix Frequently Asked Questions</h1></center>
+
+
+<hr>
+
+<h3>
+ Legal Issues
+</h3>
+<DL>
+<DT> <b><a name=legal.1> [L.1] </a>
+ Is Tix free software?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ Tix is distributed under the same license as Tcl/Tk (a.k.a. BSD
+ style license). Application developers can freely redistribute
+ Tix along with their products. <p>
+
+<p>
+</DL>
+<hr>
+<h3>
+ General Questions About Using The Tix Library
+</h3>
+<DL>
+<DT> <b><a name=general.1> [G.1] </a>
+ What does the "<code>-disablecallback</code>"
+ option do?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ Many Tix widgets have both a <code>-value</code> option and a
+ <code>-command</code> option. Any modification of the
+ <code>-value</code> will cause the <code>-command</code> callback
+ to be executed. Sometimes this is undesirable. For example,
+ calling "<code>config -value</code>" inside the callback procedure
+ will cause the callback to be re-entered and thus an infinite
+ recursion. <p>
+
+ The <code>-disablecallback</code> can be used to advoid this
+ problem. When this option is set, the <code>-command</code>
+ callback will not be executed even if the -value of a widget is
+ changed. Therefore, if you need to modify the -value of a widget
+ inside its callback, do this:
+
+ <blockquote><pre>
+ proc my_callback {w} {
+ $w config -disablecallback true
+ $w config value blah
+ $w config -disablecallback false
+ }
+ </pre></blockquote>
+
+ If you find this too troublesome, you can call the command tixSetSilent:
+
+ <blockquote><pre>
+ proc my_callback {w} {
+ tixSetSilent $w blah
+ }
+ </pre></blockquote>
+
+<p>
+<DT> <b><a name=general.2> [G.2] </a>
+ How do I set the width of the entry subwidget inside the tixControl widget?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ You can use the option database or the -options flag to set the
+ configuration options of the subwidgets. E.g: <pre>
+
+option add *TixControl*entry.width 10
+</pre>
+
+ OR
+
+<pre>
+tixControl .c -options {
+ entry.width 10
+}
+</pre>
+
+<p>
+<DT> <b><a name=general.6> [G.6] </a>
+
+ I am not using the tixForm geometry manager, but it is giving me
+errors about TixForm. What happened?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ When you get error messages like this:
+
+<pre> (TixForm) Error:Trying to use more than one geometry
+ manager for the same master window.
+ Giving up after 50 iterations.</pre>
+
+ Most likely, the problem is when using tixLabelFrame widgets, you
+ packed to the wrong frame: <p>
+
+ This is WRONG:
+
+<pre> tixLabelFrame .d
+ button .d.b
+ pack .d.b </pre>
+
+This is the correct way:
+
+<pre> tixLabelFrame .d
+ set f [.d subwidget frame]
+ button $f.b
+ pack $f.b
+ pack .d </pre>
+
+ Remember you don't pack directly into a TixLabelFrame
+ widget. Instead, you should pack into its <code>frame</code>
+ subwidget.
+
+<p>
+<DT> <b><a name=general.7> [G.7] </a>
+ How do I generate the <code>tclIndex</code> file for Tix?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ Tix <code>tclIndex</code> files cannot be generated using the
+ standard auto_mkindex procedure. You must use the tixindex program
+ in the <code>tools/</code> subdirectory in the Tix
+ distribution. The syntax is
+ <pre> tixindex *.tcl
+ </pre>
+
+<p>
+<DT> <b><a name=general.8> [G.8] </a>
+ Can I ignore the default arguments passed by the various
+ <code>-command</code> and <code>-browsecmd</code> options?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+ You can use the <code>tixBreak</code> command. For example:
+<pre> tixFileSelectDialog .c -command "puts foo; tixBreak" </pre>
+
+<p>
+<DT> <b><a name=general.9> [G.9] </a>
+ What does <code>tixWidgetDoWhenIdle</code> do?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ It does the same thing as tixDoWhileIdle (and "after -idle"). The
+ difference is it takes its second argument as the name of a widget
+ and executes this command only if the widget exists: i.e.:
+
+
+<pre> tixWidgetDoWhenIdle tixComboBox::Update $w blah blah ..</pre>
+
+ will execute tixComboBox::Update only if $w exists. $w may be
+ destroyed after tixWidgetDoWhenIdle is called but before an idle
+ event happens.
+
+<p>
+<DT> <b><a name=general.feature_req> [G.10] </a>
+ Why isn't such a feature in Tix? Will it be implemented?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ Generally requests for new features are welcomed. You can submit
+ your requests to <a href=http://tix.sourceforge.net> http://tix.sourceforge.net </a> and
+ we'll be happy to hear from you. <p>
+
+ We can't guarantee to implement the requested features
+ immediately. Usually it depends on how important the features. If
+ the feature is requested by more people, it will usually get done
+ faster.
+
+ However, some frequently requested features probably won't be
+ imlemented. Usually these features are cosmetic changes and:
+
+ <ul>
+ <li> they do not add new capability to the widgets
+ <li> they are not universally liked
+ <li> they confuse the user.
+ </ul>
+
+ <p>
+ Some examples are:
+
+ <ul>
+
+ <li> <b>Different foreground and background colors for the
+ NoteBook tabs</b>: having a lot of colors may antagonize the users
+ that are "color haters"; also, the different colors don't make it
+ easier for the user to locate the desired tab.
+
+ <li> <b>Ring-binder metaphore for the NoteBook widget</b>: a waste
+ of screen real estate.
+
+ <li> <b>Rows of tabs for the NoteBook widget</b>: the user may be
+ confused when the rows of tabs are switched. If you need to have a
+ lot of tabs for the notebook, use the ListNoteBook widget instead.
+
+ </ul>
+
+
+<p>
+<DT> <b><a name=general.softwares> [G.11] </a>
+ Who are using Tix in their software?
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+See <A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A>
+
+
+<p>
+<DT> <b><a name=general.twice> [G.12] </a>
+
+ I am using a DirList widget. When the user clicks on an item, the
+ procedure of my <code>-browsecmd</code> gets called
+ twice. However, I just want it to be called once.
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ The <code>-browsecmd</code> procedure is triggered by three types
+ of events: <code><1></code>,
+ <code><ButtonRelease-1></code>, and
+ <code><B1-Motion></code>. When the user clicks on an entry,
+ a <code><1></code> and a
+ <code><ButtonRelease-1></code> event will happen in rapid
+ session, which causes your <code>-browsecmd</code> procedure to be
+ called twice. <p>
+
+ A crude fix for this problem is to ignore all the
+ <code><ButtonRelease-1></code> events. You can find out the
+ event that triggers the <code>-browsecmd</code> procedure by the
+ <code>tixEvent</code> command. Here is an example:
+
+ <blockquote><pre>
+ tixDirList .c -browsecmd Browse
+
+ proc Browse {args} {
+ if {[tixEvent type] == "<code><ButtonRelease-1></code>"} {
+ return
+ }
+ # ....
+ }
+ </pre></blockquote>
+
+ However, the above solution is not perfect. For example, if the
+ user clicks down the button at entry one, drags it over entries
+ two and three and release it on top of entry three, the following
+ events may be caused: <p>
+
+ <ol>
+ <li> <code><1></code> on entry one.
+ <li> <code><B1-Motion></code> on entry two.
+ <li> <code><ButtonRelease-1></code> on entry three.
+ </ol> <p>
+
+ Therefore, if you use the above method, the browse event on entry
+ three will be lost! <p>
+
+ To devise a better solution, it's better to understand the basic
+ design conventions of a Tix-based GUI. Suppose we have a list of
+ entries displayed in a listbox (or DirList, or HList). When the
+ user clicks on an entry, the GUI usually responds by displaying a
+ "<b>detailed view</b>" of the entry. For example, if we put a list
+ of file names in a listbox, when the user clicks on a file name,
+ we display the contents of the file in a text window. If the user
+ then clicks on another file name, the text window will load in the
+ contents of the new file. <p>
+
+ Now what happens if the user clicks on the same entry twice? Do we
+ reload the contents of the file into the text window? This is
+ usually unnecessary, inefficient and probably not what the user
+ wants to do. The Tix convention is, when the user clicks on the
+ same entry again, the detail view is not updated. If the user
+ wants to force an update (e.g, the user knows the file's contents
+ has been changed and wants to see the new version), he or she can
+ double-click on the entry and the application will respond by
+ redisplaying the detail view (reloading the file). <p>
+
+ To implement this policy, the Browse procedure should be modified
+ as the following:
+
+ <blockquote><pre>
+ proc Browse {args} {
+ global currentView
+
+ set ent [tixEvent value]
+ if {$ent == $currentView} {
+ # We have already displayed the detailed view of $ent.
+ #
+ return
+ } else {
+ set currentView $ent
+ DisplayDetail $ent
+ }
+ }
+ </pre></blockquote> <p>
+
+<p>
+<DT> <b><a name=general.destroy> [G.13] </a>
+
+ I get an error <i>"can't read data(-value): no such element in
+ array</i>" when I use the tixExFileSelectDialog.
+</b><p>
+<DD>
+<b> ANSWER: </b>
+
+ If you use tixExFileSelectDialog like this:
+
+<pre>
+ tixExFileSelectDialog .f -command foo
+
+ foo {filename} {
+ destroy .f
+ do some other stuff ...
+ }
+</pre>
+
+ it will cause a Tcl error because the dialog assumes that it still
+ exists after calling your command. This usually result in errors like
+ this:
+
+<pre>
+ can't read "data(-value)": no such element in array
+ while executing
+ "set data(-selection) $data(-value)..."
+ (procedure "tixComboBox::SetValue" line 30)
+</pre>
+
+
+ This "feature" is built into many Tix widgets and can't be fixed
+ easily. To work around the problem, never destroy widgets inside
+ -command calls. Usually you should unmap toplevel windows
+ instead. If you must destroy widgets, do it with an "after"
+ command. For example, the foo procedure should be rewritten as:
+
+<pre>
+ foo {filename} {
+ wm withdraw .f
+ do some other stuff ...
+
+ after idle {if [winfo exists .f] {destroy .f}}
+ }
+</pre>
+
+ Execute the "after" command at the very end of the
+ -command. Otherwise the idle handler may be activated by some
+ "update" calls.
+
+<p>
+</DL>
+<hr>
+<h3>
+ Question About Porting to Specific Platforms/Software
+</h3>
+<DL>
+<DT> <b><a name=port.1> [P.1] </a>
+ The configure script gave me strange errors.
+</b><p>
+<DD>
+<b> ANSWER: </b>
+ The problem may be you have several operating systems sharing the
+ same file system. Some people encounter error messages like this:
+
+<blockquote><pre>
+# ./configure --prefix=/usr/vendor/tcl
+loading cache ./config.cache
+checking for a BSD compatible install... /usr/bin/installbsd -c
+checking for ranlib... ranlib
+checking how to run the C preprocessor... cc -E
+checking for unistd.h... ./configure[603]: "${ac_cv_header_$ac_safe+set}": bad
+substitution
+</pre></blockquote>
+
+ The problem is at line 2, configure loaded in ./config.cache,
+ which may have been created by a different operating system, with
+ settings only usuable for that operating system. To get around
+ this, you should type
+
+<blockquote><pre>
+make distclean
+./configure
+make all
+</pre></blockquote>
Added: external/tix-8.4.2.x/docs/FAQ.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/FAQ.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,342 @@
+$Id: FAQ.txt,v 1.4 2004/12/24 01:27:22 hobbs Exp $
+
+
+ TIX FREQUENTLY ASKED QUESTIONS
+
+ TABLE OF CONTENTS
+
+ Legal Issues
+
+ + [L.1] Is Tix free software?
+
+ General Questions About Using The Tix Library
+
+ + [G.1] What does the "-disablecallback" option do?
+ + [G.2] How do I set the width of the entry subwidget inside
+ the tixControl widget?
+ + [G.3] What is the "setslient" method?
+ + [G.4] Is there a Tix interface builder in the works?
+ + [G.5] Can you tell me about the syntax of tixForm
+ + [G.6] I am not using the tixForm geometry manager, but it is
+ giving me errors about TixForm. What happened?
+ + [G.7] How do I generate the tclIndex file for Tix?
+ + [G.8] Can I ignore the default arguments passed by the
+ various -command and -broeswcmd options?
+ + [G.9] What does tixWidgetDoWhenIdle do?
+ + [G.10] Why isn't such a feature in Tix? Will it be
+ implemented?
+ + [G.11] Who are using Tix in their software?
+ + [G.12] I am using a DirList widget. When the user clicks on
+ an item, the procedure of my -browsecmd gets called twice.
+ However, I just want it to be called once.
+ + [G.13] I get an error "can't read data(-value): no such
+ element in array" when I use the tixExFileSelectDialog.
+
+ Question About Porting to Specific Platforms/Software
+
+ + [P.1] The configure script gave me strange errors.
+
+ _________________________________________________________________
+
+ LEGAL ISSUES
+
+ [L.1] Is Tix free software?
+
+ ANSWER: Tix is distributed under the same license as Tcl/Tk
+ (a.k.a. BSD style license). Application developers can freely
+ redistribute Tix along with their products.
+
+ _________________________________________________________________
+
+ GENERAL QUESTIONS ABOUT USING THE TIX LIBRARY
+
+ [G.1] What does the "-disablecallback" option do?
+
+ ANSWER: Many Tix widgets have both a -value option and a
+ -command option. Any modification of the -value will cause the
+ -command callback to be executed. Sometimes this is
+ undesirable. For example, calling "config -value" inside the
+ callback procedure will cause the callback to be re-entered and
+ thus an infinite recursion.
+
+ The -disablecallback can be used to advoid this problem. When
+ this option is set, the -command callback will not be executed
+ even if the -value of a widget is changed. Therefore, if you
+ need to modify the -value of a widget inside its callback, do
+ this:
+
+ proc my_callback {w} {
+ $w config -disablecallback true
+ $w config value blah
+ $w config -disablecallback false
+ }
+
+ If you find this too troublesome, you can call the command
+ tixSetSilent:
+
+ proc my_callback {w} {
+ tixSetSilent $w blah
+ }
+
+ [G.2] How do I set the width of the entry subwidget inside the
+ tixControl widget?
+
+ ANSWER: You can use the option database or the -options flag to
+ set the configuration options of the subwidgets. E.g:
+
+option add *TixControl*entry.width 10
+
+ OR
+
+tixControl .c -options {
+ entry.width 10
+}
+
+ [G.3] What is the "setslient" method?
+
+ ANSWER: This is an obsolete method. You could use it to achieve
+ the same effect as the -disablecallback option. selsilent used
+ to be a widget command for the ComboBox, Control, etc. It has
+ been removed since Tix 4.0a4 and replaced by the tixSetSilent
+ command. Please note that tixSetSilent is not a widget command
+ but an external procedure.
+
+ [G.4] Is there a Tix interface builder in the works?
+
+ ANSWER: Yes. But I don't know when it will be finished.
+ (probably in 96).
+
+ [G.5] Can you tell me about the syntax of tixForm
+
+ ANSWER: Please see the file man/Form.html or man/Form.n.
+
+ [G.6] I am not using the tixForm geometry manager, but it is giving me
+ errors about TixForm. What happened?
+
+ ANSWER: When you get error messages like this:
+
+ (TixForm) Error:Trying to use more than one geometry
+ manager for the same master window.
+ Giving up after 50 iterations.
+
+ Most likely, the problem is when using tixLabelFrame widgets, you
+ packed to the wrong frame:
+
+ This is WRONG:
+
+ tixLabelFrame .d
+ button .d.b
+ pack .d.b
+
+ This is the correct way:
+
+ tixLabelFrame .d
+ set f [.d subwidget frame]
+ button $f.b
+ pack $f.b
+ pack .d
+
+ Remember you don't pack directly into a TixLabelFrame widget. Instead,
+ you should pack into its frame subwidget.
+
+ [G.7] How do I generate the tclIndex file for Tix?
+
+ ANSWER: Tix tclIndex files cannot be generated using the
+ standard auto_mkindex procedure. You must use the tixindex
+ program in the tools/ subdirectory in the Tix distribution. The
+ syntax is
+
+ tixindex *.tcl
+
+ [G.8] Can I ignore the default arguments passed by the various
+ -command and -broeswcmd options?
+
+ ANSWER: You can use the tixBreak command. For example:
+
+ tixFileSelectDialog .c -command "puts foo; tixBreak"
+
+ [G.9] What does tixWidgetDoWhenIdle do?
+
+ ANSWER: It does the same thing as tixDoWhileIdle (and "after
+ -idle"). The difference is it takes its second argument as the
+ name of a widget and executes this command only if the widget
+ exists: i.e.:
+
+ tixWidgetDoWhenIdle tixComboBox::Update $w blah blah ..
+
+ will execute tixComboBox::Update only if $w exists. $w may be
+ destroyed after tixWidgetDoWhenIdle is called but before an
+ idle event happens.
+
+ [G.10] Why isn't such a feature in Tix? Will it be implemented?
+
+ ANSWER: Generally requests for new features are welcomed. You
+ can submit your requests to http://tix.sourceforge.net forums
+ and we'll be happy to hear from you.
+
+ We can't guarantee to implement the requested features
+ immediately. Usually it depends on how important the features.
+ If the feature is requested by more people, it will usually get
+ done faster. However, some frequently requested features
+ probably won't be imlemented. Usually these features are
+ cosmetic changes and:
+
+ + they do not add new capability to the widgets
+ + they are not universally liked
+ + they confuse the user.
+
+ Some examples are:
+
+ + Different foreground and background colors for the NoteBook
+ tabs: having a lot of colors may antagonize the users that
+ are "color haters"; also, the different colors don't make it
+ easier for the user to locate the desired tab.
+ + Ring-binder metaphore for the NoteBook widget: a waste of
+ screen real estate.
+ + Rows of tabs for the NoteBook widget: the user may be
+ confused when the rows of tabs are switched. If you need to
+ have a lot of tabs for the notebook, use the ListNoteBook
+ widget instead.
+
+ [G.11] Who are using Tix in their software?
+
+ ANSWER: See http://tix.sourceforge.net
+
+ [G.12] I am using a DirList widget. When the user clicks on an item,
+ the procedure of my -browsecmd gets called twice. However, I
+ just want it to be called once.
+
+ ANSWER: The -browsecmd procedure is triggered by three types of
+ events: <1>, <ButtonRelease-1>, and <B1-Motion>. When the user
+ clicks on an entry, a <1> and a <ButtonRelease-1> event will
+ happen in rapid session, which causes your -browsecmd procedure
+ to be called twice.
+
+ A crude fix for this problem is to ignore all the
+ <ButtonRelease-1> events. You can find out the event that
+ triggers the -browsecmd procedure by the tixEvent command. Here
+ is an example:
+
+ tixDirList .c -browsecmd Browse
+
+ proc Browse {args} {
+ if {[tixEvent type] == "<ButtonRelease-1>"} {
+ return
+ }
+ # ....
+ }
+
+ However, the above solution is not perfect. For example, if the user
+ clicks down the button at entry one, drags it over entries two
+ and three and release it on top of entry three, the following
+ events may be caused:
+
+ 1. <1> on entry one.
+ 2. <B1-Motion> on entry two.
+ 3. <ButtonRelease-1> on entry three.
+
+ Therefore, if you use the above method, the browse event on
+ entry three will be lost!
+
+ To devise a better solution, it's better to understand the
+ basic design conventions of a Tix-based GUI. Suppose we have a
+ list of entries displayed in a listbox (or DirList, or HList).
+ When the user clicks on an entry, the GUI usually responds by
+ displaying a "detailed view" of the entry. For example, if we
+ put a list of file names in a listbox, when the user clicks on
+ a file name, we display the contents of the file in a text
+ window. If the user then clicks on another file name, the text
+ window will load in the contents of the new file.
+
+ Now what happens if the user clicks on the same entry twice? Do
+ we reload the contents of the file into the text window? This
+ is usually unnecessary, inefficient and probably not what the
+ user wants to do. The Tix convention is, when the user clicks
+ on the same entry again, the detail view is not updated. If the
+ user wants to force an update (e.g, the user knows the file's
+ contents has been changed and wants to see the new version), he
+ or she can double-click on the entry and the application will
+ respond by redisplaying the detail view (reloading the file).
+
+ To implement this policy, the Browse procedure should be
+ modified as the following:
+
+ proc Browse {args} {
+ global currentView
+
+ set ent [tixEvent value]
+ if {$ent == $currentView} {
+ # We have already displayed the detailed view of $ent.
+ #
+ return
+ } else {
+ set currentView $ent
+ DisplayDetail $ent
+ }
+ }
+
+ [G.13] I get an error "can't read data(-value): no such element in
+ array" when I use the tixExFileSelectDialog.
+
+ ANSWER: If you use tixExFileSelectDialog like this:
+
+ tixExFileSelectDialog .f -command foo
+
+ foo {filename} {
+ destroy .f
+ do some other stuff ...
+ }
+
+ it will cause a Tcl error because the dialog assumes that it still
+ exists after calling your command. This usually result in
+ errors like this:
+
+ can't read "data(-value)": no such element in array
+ while executing
+ "set data(-selection) $data(-value)..."
+ (procedure "tixComboBox::SetValue" line 30)
+
+ This "feature" is built into many Tix widgets and can't be fixed
+ easily. To work around the problem, never destroy widgets
+ inside -command calls. Usually you should unmap toplevel
+ windows instead. If you must destroy widgets, do it with an
+ "after" command. For example, the foo procedure should be
+ rewritten as:
+
+ foo {filename} {
+ wm withdraw .f
+ do some other stuff ...
+
+ after idle {if [winfo exists .f] {destroy .f}}
+ }
+
+ Execute the "after" command at the very end of the -command. Otherwise
+ the idle handler may be activated by some "update" calls.
+
+ _________________________________________________________________
+
+ QUESTION ABOUT PORTING TO SPECIFIC PLATFORMS/SOFTWARE
+
+ [P.1] The configure script gave me strange errors.
+
+ ANSWER: The problem may be you have several operating systems
+ sharing the same file system. Some people encounter error
+ messages like this:
+
+# ./configure --prefix=/usr/vendor/tcl
+loading cache ./config.cache
+checking for a BSD compatible install... /usr/bin/installbsd -c
+checking for ranlib... ranlib
+checking how to run the C preprocessor... cc -E
+checking for unistd.h... ./configure[603]: "${ac_cv_header_$ac_safe+set}": bad
+substitution
+
+ The problem is at line 2, configure loaded in ./config.cache, which
+ may have been created by a different operating system, with
+ settings only usuable for that operating system. To get around
+ this, you should type
+
+make distclean
+./configure
+make all
+
Added: external/tix-8.4.2.x/docs/Files.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Files.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,192 @@
+$Id: Files.txt,v 1.3 2004/12/24 01:54:03 hobbs Exp $
+
+This document describes the operating system independent file handling
+capability in Tix. This is pertinent up to Tix 8.2, but isn't 100%
+correct for Tix 8.4, where the FS handling was simplified using more
+Tcl core file routines. In general, this should all no longer be
+relevant for Tix 8.4 users. Use Tcl core routines instead.
+
+1. The problem:
+
+ (A) Handling user inputs. In various Tix widgets, the user may enter
+ a text string to refer to a file, a directory or a file pattern.
+
+ File:
+ tixFileEntry
+ tixFileSelectBox, the Selection part
+
+ Directory:
+ tixDirBox
+ tixExFileSelectBox, the "Directory" part
+
+ Pattern:
+ tixFileSelectBox, the "Pattern" part
+ tixExFileSelectBox, the "File" part
+
+ (B) Interfacing with application
+
+ These widgets support a -directory option
+
+ tixDirList
+ tixDirTree
+ tixFileSelectBox
+ tixExFileSelectBox
+
+ These widgets support a -pattern option
+ tixFileSelectBox
+ tixExFileSelectBox
+
+ (C) Displaying the file system in a single hierarchy
+
+ tixDirList
+ tixDirTree
+
+2. Issues:
+
+ (A) Unix:
+ Tilde expansion
+
+ (B) Windows:
+ No single file system hierarchy.
+
+ (C) Both:
+ Need to translate relative pathnames, "." and ".."
+
+3. Reusuability:
+
+ Many widgets need to list directory, glob, display hierarchy. We
+ don't want to rewrite the same code again and again.
+
+
+4. API.
+
+ (A) Types of API
+
+ External interface: Takes an input from the user or from the
+ application and translate it to a canonical form.
+
+ Internal interface: operate on filenames that are in canonical
+ forms. There are run-time checking whether the filenames arein
+ canonical forms.
+
+ We have the two types of interfaces so that we don't need to
+ perform needless translations from "user form" to "canonical
+ form".
+
+
+ (B) API Consistency
+
+ External API always takes a filename in the native format and
+ return file names in the native format.
+
+
+ (C) Errors
+
+ User errors are reported in an error dialog. Application errors
+ triggers a TCL error return code.
+
+ There should be in-line comments stating whether an input is from
+ user or application.
+
+5. VPATH: virtual hierarchical path
+
+ Unix:
+
+ In Unix, a VPATH is the same as a file pathname.
+
+ Windows:
+
+ In Windows 3.1, a VPATH is "xx\" followed by a normalized DOS
+ file pathname. "xx" by itself is "My computer" and refers to the
+ root directory of the C: drive.
+
+ In Windows 95, a VPATH is "xx\xx\" followed by a normalized DOS
+ file pathname. "xx" by itself is "Desktop" and refers to
+ "C:\Windows\Desktop". "xx\xx" by itself is "My computer" and
+ refers to the root directory of the C: drive.
+
+ Normalization do not go into the virtual prefix. E.g.: the VPATH for
+ "C:\Windows\..\..\" is "xx\xx\C:", not "xx\xx".
+
+
+6. Normalization:
+
+ tixFSNorm context text defFile flagsVar errorMsgVar
+
+ This is the main function that translate a user input to
+ normalized (canonical) form.
+
+ Parameters:
+ context:VPATH
+ The "current directory" under which the translation
+ occurs. It is used only if text refers to a relative
+ pathname.
+
+ if context is the empty string, then text must refer to an
+ absolute path.
+
+ text:string
+ The (user/application) input that needs to be
+ normalized. The exact mode of translation depends on the
+ flags
+
+ defFile:string
+ If the input is a directory, append this to the directory.
+
+ flagsVar: ref to array
+ flag(noPattern): we don't want patterns. Treat all wild
+ card characters as normal file names
+
+ Return value:
+ No error occurs: errorMsg is not set and a list of three
+ elements is returned:
+
+ index 0: the normalized path of the input
+ index 1: the VPATH of the directory.
+ index 2: file(s) in the directory.
+ index 3: pattern(s) in the directory.
+
+ Either index 1 or 2, or both, are empty strings. They cannot
+ be both non-empty.
+
+ A Normalized path:
+
+ 1) is absolute
+ 2) has no double slashes
+ 3) has no trailing slashes
+ 4) has no relative pathnames
+ 5) has no tildes
+
+
+ file normalize directory
+
+ This is mainly used to check the validity of -directory option
+ of the widgets.
+
+ Parameter:
+ directory:
+ Must be an existing absolute path.
+
+ Return value:
+ Returns normalized path. Error given when directory is not an
+ existing absolute path
+
+
+7. VPATH translation:
+
+ tixFSVPath pathname: returns the VPATH of pathname
+ tixFSPath VPATH: returns the pathname of VPATH
+
+
+8. Valid file names:
+
+ Should prompt to user about invalid filenames (E.g. In Windows,
+ names cannot contain "*")
+
+9. Creation prompt:
+
+ If user enters a file or directory that doesn't exist, promt to ask
+ whether he wants to create it.
+
+
+10.
Added: external/tix-8.4.2.x/docs/Release-8.0.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.0.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,235 @@
+$Id: Release-8.0.0.txt,v 1.1 2000/10/10 21:02:26 idiscovery Exp $
+
+============
+BUILDING TIX
+============
+1. You must have a recent source distribution of Tcl/Tk installed (we
+ have tested with 8.0.4 and 8.0.5).
+
+2. For Unix, You should be able to change to unix/tk8.0; then,
+ configure and compile with:
+ ./configure
+ make > make.log 2 > make.errs
+
+ Before running "make", you can edit the Makefile and change the -O
+ compile option to -O2 for slightly better performance with gcc/egcs.
+
+ You may find the configure options --prefix, --with-tcl, --with-tk
+ etc. useful. For example, I have a copy of the egcs compiler
+ installed as /d2a/exper/bin/gcc, the tcl8.0.4 and tk8.0.4 source
+ distributions at /d2a/src/tcl-tk/tcl8.0.4 and
+ /d2a/src/tcl-tk/tk8.0.4 respectively, and prefer to install Tix to
+ /d2a/exper, so I use something like this:
+
+ env PATH=/d2a/exper/bin:$PATH ./configure \
+ --prefix=/d2a/exper --enable-gcc --enable-shared \
+ --with-tcl=/d2a/src/tcl-tk/tcl8.0.4 \
+ --with-tk=/d2a/src/tcl-tk/tk8.0.4
+
+ [If you reassign the PATH variable like this, remember to do the
+ same thing with all the "make" commands as well.]
+
+ If the compile failed for some reason, you can look at the files
+ make.errs and make.log for clues.
+
+3. If the compile is successful, you should now be able to run it:
+ ./tixwish
+ source ../../demos/widget
+ This will bring up a demo window with lots of Tix megawidgets.
+
+4. You can now run the test suite if you wish and install Tix:
+ make tests [optional]
+ make install
+ [If the "make tests" fails with a complaint like this:
+ ld.so: open error 2 for /libtix4180.so.1.0
+ edit Makefile and remove the line that assigns a value to
+ LD_LIBRARY_PATH for the "tests" target (I had to do this on SunOS)].
+
+5. For WinNT, read win/README.
+
+========================
+NOTES ON FUTURE RELEASES
+========================
+
+1. If you are interested in a support contract for Tix please contact me
+ by email at ram at netcom.com.
+
+2. I plan to make at least one more release of Tix, though the timeframe
+ is uncertain. Among the changes planned:
+ -- performance improvements
+ -- cleanup various obsolete elements from code and docs (there is a
+ lot of clutter in many files).
+ -- more bug fixes
+
+3. Support for all versions of Tcl/Tk preceding 8.0 is now discontinued.
+
+====================
+CHANGES in 4.1.0.007
+====================
+
+1. tix.h:TIX_RELEASE changed to 4.1.0.007
+
+2. Changed all uses of strdup to tixStrdup (changes to several files)
+ and moved declaration of tixStrDup to tixInt.h to avoid various
+ compiler warnings. Also, removed check for strdup() from files
+ 'configure' and 'configure.in' in unix/tk8.0 since it is no longer
+ needed.
+
+3. The following erroneous code crashes Tix:
+ # test Tix crash
+ package require Tix
+ tixWidgetClass ab {
+ -alias {-dir -direction}
+ }
+ The problem is that the argument to -alias is supposed to be a list
+ of pairs. Added a check in tixClass.c:InitAlias() for this.
+
+4. Changes to suppress egcs warnings:
+ -- Uncommented prototype for tixStrDup() in tix.h
+ -- In tixGrData.c, changed many occurrences of "(char*)i" to
+ FIX(i) which has better casts.
+
+5. Replaced generic/{tixItcl.[ch],tixMethod.c} with fixed versions for
+ dealing properly with namespaces. Also fixed 'level' bug in
+ tixItcl.c:TixItclSetGlobalNameSp(); see test code below.
+
+6. For very long lists, tixTree was showing stray vertical lines and
+ indicators. Caused by overflows in window coordinates which are
+ limited to 16-bit values in X. Fixed by adding bounds checks in
+ tixHList.c:DrawElements().
+
+7. An initial "see" command on a tixHList before the window is mapped
+ was not updating the scrollbar; fixed by adding UpdateScrollbars()
+ call in tixHList.c:WidgetDisplay().
+
+8. Removed directories win/tcl7.x and unix/tk4.x (versions of Tcl/Tk
+ earlier than 8.0 are no longer supported).
+
+9. There is a problem with compound images which causes a crash upon
+ exit, illustrated by the following script:
+ ------------
+ set i [image create compound -window .]
+ $i add text -text Hello
+ exit
+ ------------
+ This now appears to be fixed by changes to tixImgCmp.c
+
+10. An incompatibility between Tix and Jan Nijtmans Img extension has
+ been fixed.
+
+11. Fixed a bug in tests/library/TestLib.tcl:TestBlock that was causing
+ the button test in tests/general/event0.tcl to fail. Running
+ "make tests" under unix/tk8.0 now produces no errors with one
+ exception: The label-entry test in tests/general/labentry.tcl
+ sometimes fails for unknown reasons that appear to be related to
+ the way focus events are generated when a window is created directly
+ underneath the current pointer.
+
+ [NOTE: the fs.tcl tests attempt to locate home directories of all
+ users on your system, so if you have a non-existent home directory
+ (this happens on Red Hat Linux 5.2 because the home directory
+ /var/adm of user 'adm' does not exist), this test will report a
+ failure.]
+
+12. Some cosmetic changes to a few files in the test suite for better
+ readability.
+
+13. The Tix Programming Guide is now included in the release; see
+ docs/pguide-tix4.0.ps. Note that we have not made any changes to
+ this document and have not been able to locate the original
+ TeX/LaTeX file.
+
+14. tix.h: Changed the definition of strcasecmp to be the same as in
+ tk8.0.5/win/tkWinPort.h
+
+15. Added the BUILD_tix mechanism to tix.h.
+
+16. tixInt.h:
+ -- Changed EXTERN to extern. The EXTERN macro is used in Tcl
+ to implement the DLL import/export mechanism and should
+ therefore be used _ONLY_ to declare functions exported from a
+ package.
+ -- Removed some stuff within "#if 0 ... #endif"
+
+================
+ACKNOWLEDGEMENTS:
+================
+
+Thanks to the following people for reporting bugs and/or providing
+patches:
+-- Bruce Stephens <bruce at cenderis.demon.co.uk>
+-- Ric Klaren <klaren at telin.nl>
+-- Jean-Paul Dzisiak <JP.Dzisiak at ulg.ac.be>
+-- Jan Nijtmans <Jan.Nijtmans at wxs.nl>
+
+========================
+NOTES ON THE 'level' BUG:
+========================
+
+Both the 005 and 007 releases print:
+
+0
+1
+2
+1 a 2 b 3 c
+
+with the following code fragment. But 006 prints incorrect values:
+
+0
+2
+4
+
+One patch to 006 floating around replaces tixItcl.[ch] and tixMethod.c
+and prints these incorrect values:
+
+0
+1
+1
+
+Here is the code fragment:
+
+------------------------------------------------------------------------
+tixWidgetClass class1 {
+ -classname Class2
+ -superclass tixPrimitive
+ -method {
+ foo
+ }
+}
+
+proc class1:foo {w} {
+ puts [info level]
+ set a(1) a
+ set a(2) b
+ set a(3) c
+ $w.a baa a
+}
+proc class1:ConstructWidget {w} {
+ upvar \#0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ class2 $w.a
+ pack $w.a
+ set data(w:a) $w.a
+}
+
+tixWidgetClass class2 {
+ -classname Class2
+ -superclass tixPrimitive
+ -method {
+ baa
+ }
+}
+
+proc class2:baa {w var} {
+ puts [info level]
+ upvar 1 $var a
+ puts [array get a]
+}
+
+class1 .foo
+puts [info level]
+.foo foo
+
+------------------------------------------------------------------------
Added: external/tix-8.4.2.x/docs/Release-8.0.1.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.0.1.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,72 @@
+$Id: Release-8.0.1.txt,v 1.2 2000/10/11 05:36:04 idiscovery Exp $
+
+============
+BUILDING TIX
+============
+1. You must have a recent source distribution of Tcl/Tk installed (we
+ have tested with 8.0.4 and 8.0.5).
+
+2. For Unix, You should be able to change to unix/tk8.0; then,
+ configure and compile with:
+ ./configure
+ make > make.log
+
+ Before running "make", you can edit the Makefile and change the -O
+ compile option to -O2 for slightly better performance with gcc/egcs.
+
+ You may find the configure options --prefix, --with-tcl, --with-tk
+ etc. useful. For example, I have a copy of the egcs compiler
+ installed as /d2a/exper/bin/gcc, the tcl8.0.5 and tk8.0.5 source
+ distributions at /d2a/src/tcl-tk/tcl8.0.5 and
+ /d2a/src/tcl-tk/tk8.0.5 respectively, and prefer to install Tix to
+ /d2a/exper, so I use something like this:
+
+ env PATH=/d2a/exper/bin:$PATH ./configure \
+ --prefix=/d2a/exper --enable-gcc --enable-shared \
+ --with-tcl=/d2a/src/tcl-tk/tcl8.0.5 \
+ --with-tk=/d2a/src/tcl-tk/tk8.0.5
+
+ [If you reassign the PATH variable like this, remember to do the
+ same thing with all the "make" commands as well.]
+
+ If the compile failed for some reason, you can look at the files
+ make.errs and make.log for clues.
+
+3. If the compile is successful, you should now be able to run it:
+ ./tixwish
+ source ../../demos/widget
+ This will bring up a demo window with lots of Tix megawidgets.
+
+4. You can now run the test suite if you wish and install Tix:
+ make tests [optional]
+ make install
+ [If the "make tests" fails with a complaint like this:
+ ld.so: open error 2 for /libtix4180.so.1.0
+ edit Makefile and remove the line that assigns a value to
+ LD_LIBRARY_PATH for the "tests" target (I had to do this on SunOS)].
+
+5. For WinNT, read win/README.
+
+========================
+NOTES ON FUTURE RELEASES
+========================
+
+1. If you are interested in support see the web site at:
+ http://www.sourceforge.net
+
+2. Support for all versions of Tcl/Tk preceding 8.0 is now discontinued.
+
+====================
+CHANGES in tix-8.0.1
+====================
+
+1. Restored missing files from Tix-4.1.0.006.
+
+2. Changed documentation to reflect http://www.sourceforge.net
+
+3. The Tix Programming Guide in HTML is now included in the release; see
+ docs/tix-book. Note that we have not made any changes to
+ this document and have not been able to locate the original
+ TeX/LaTeX file.
+
+
Added: external/tix-8.4.2.x/docs/Release-8.0.2.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.0.2.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,67 @@
+$Id: Release-8.0.2.txt,v 1.1 2000/11/01 00:52:59 idiscovery Exp $
+
+============
+BUILDING TIX
+============
+1. You must have a recent source distribution of Tcl/Tk installed (we
+ have tested with 8.0.4 and 8.0.5).
+
+2. For Unix, You should be able to change to unix/tk8.0; then,
+ configure and compile with:
+ ./configure
+ make > make.log
+
+ Before running "make", you can edit the Makefile and change the -O
+ compile option to -O2 for slightly better performance with gcc/egcs.
+
+ You may find the configure options --prefix, --with-tcl, --with-tk
+ etc. useful. For example, I have a copy of the egcs compiler
+ installed as /d2a/exper/bin/gcc, the tcl8.0.5 and tk8.0.5 source
+ distributions at /d2a/src/tcl-tk/tcl8.0.5 and
+ /d2a/src/tcl-tk/tk8.0.5 respectively, and prefer to install Tix to
+ /d2a/exper, so I use something like this:
+
+ env PATH=/d2a/exper/bin:$PATH ./configure \
+ --prefix=/d2a/exper --enable-gcc --enable-shared \
+ --with-tcl=/d2a/src/tcl-tk/tcl8.0.5 \
+ --with-tk=/d2a/src/tcl-tk/tk8.0.5
+
+ [If you reassign the PATH variable like this, remember to do the
+ same thing with all the "make" commands as well.]
+
+ If the compile failed for some reason, you can look at the files
+ make.errs and make.log for clues.
+
+3. If the compile is successful, you should now be able to run it:
+ ./tixwish
+ source ../../demos/widget
+ This will bring up a demo window with lots of Tix megawidgets.
+
+4. You can now run the test suite if you wish and install Tix:
+ make tests [optional]
+ make install
+ [If the "make tests" fails with a complaint like this:
+ ld.so: open error 2 for /libtix4180.so.1.0
+ edit Makefile and remove the line that assigns a value to
+ LD_LIBRARY_PATH for the "tests" target (I had to do this on SunOS)].
+
+5. For WinNT, read win/README.
+
+========================
+NOTES ON FUTURE RELEASES
+========================
+
+1. If you are interested in support see the web site at:
+ http://www.sourceforge.net
+
+2. Support for all versions of Tcl/Tk preceding 8.0 is now discontinued.
+
+====================
+CHANGES in tix-8.0.2
+====================
+
+1. Many bug fixes from egroups.com mailing lists - thanks to everyone
+who contributed.
+
+2. Added parentheses to library code.
+
Added: external/tix-8.4.2.x/docs/Release-8.1.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.1.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,88 @@
+$Id: Release-8.1.0.txt,v 1.1 2000/11/03 03:20:42 idiscovery Exp $
+
+============
+BUILDING TIX
+============
+1. You must have a recent source distribution of Tcl/Tk installed (we
+ have tested with and 8.0.5 and 8.2.3). Stubs are not yet supported.
+
+2. For Unix, Change to unix, then
+
+sh configure
+
+ DO NOT make yet.
+
+ You may find the configure options --prefix, and
+ --with-tclconfig, --with-tkconfig useful. For help on the options, run
+ sh configure --help
+
+ For example, I prefer to install Tix to
+ /home/tmp, so I use something like this:
+
+ sh ./configure \
+ --prefix=/home/tmp --enable-gcc --enable-shared \
+ --with-tclconfig=../../tcl8.2.3 \
+ --with-tkconfig=../../tk8.2.3
+
+ Next, choose the subdirectory that corresponds to your Tcl version,
+ and change to that directory
+ cd tk8.2
+
+ Configure and compile with:
+
+ ./configure
+ make > make.log
+
+ or in the example above
+
+ sh ./configure \
+ --prefix=/home/tmp --enable-gcc --enable-shared \
+ --with-tclconfig=../../../tcl8.2.3 \
+ --with-tkconfig=../../../tk8.2.3
+
+
+ Before running "make", you can edit the Makefile and change the -O
+ compile option to -O2 for slightly better performance with gcc/egcs.
+
+ If the compile failed for some reason, you can look at the file
+ make.log for clues.
+
+3. If the compile is successful, you should now be able to run it:
+
+ ./tixwish
+ cd ../../tests
+ source Driver.tcl
+ This will bring up a demo window with lots of Tix megawidgets.
+
+4. You can now run the test suite if you wish and install Tix:
+ make tests [optional]
+ make install
+
+ Then install in the unix/ directory
+
+ cd ..
+ make install
+
+
+
+
+========================
+NOTES ON FUTURE RELEASES
+========================
+
+1. If you are interested in support see the web site at:
+ http://www.sourceforge.net
+
+2. Support for all versions of Tcl/Tk preceding 8.0 is now discontinued.
+
+====================
+CHANGES in tix-8.1.0
+====================
+
+1. Added RedHat's Source Navigator's approach to configure.
+
+2. Changed Tix version number to 8.1
+
+
+
+
Added: external/tix-8.4.2.x/docs/Release-8.1.1.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.1.1.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,20 @@
+$Id: Release-8.1.1.txt,v 1.2 2000/11/23 02:26:57 idiscovery Exp $
+
+Release notes for 8.1.1
+
+ See Release-8.1.0.txt
+
+Changes for 8.1.1
+
+ 1) Added tixDebug procedure. To activate debugging messages, use
+ tix configure -debug
+ 2) Minor bug fixes.
+ 3) Bulletproofed ComboBox.tcl against a bug showing up under Python.
+ 4) Fixed Windows to properly handle TCL_STORAGE_CLASS with USE_TCL_STUBS
+ 5) Fixed TkConsole declarations in tixWinMain.c
+ 6) Added winDumpExts.c for 8.3 - should change to use Tcl 8.3's method.
+ 7) Rewrote the patches to Tkinter.py so it will work with or without Tix.
+ 8) Updated README files to say that Tix should now build under 8.3,
+ but it's not "supported" in that it hasn't been tested on it yet.
+
+
Added: external/tix-8.4.2.x/docs/Release-8.1.2.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.1.2.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,30 @@
+# -*- mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# $Id: Release-8.1.2.txt,v 1.2 2001/12/09 04:52:04 idiscovery Exp $
+
+Release notes for 8.1.2
+
+ See also Release-8.1.1.txt
+
+Changes for 8.1.2
+
+ 1) Added lib/pref/WmDefault.* files, a Package for making Tix
+ apps use the CDE/GNOME/KDE/Windows scheme
+ 2) Many minor bug fixes to the library files.
+ 3) Removed font and color overrides from the demos, so that
+ the native look and feel would be preserved.
+ 4) In the past, the interactive initialization file was inconsistent,
+ and on Windows, $env(HOME) is undefined or most users don't even
+ know where there HOME is (Profiles\User\Application Data\)!
+ So a site wide initialization file tixwishrc.tcl is now used,
+ which must be in the same directory as the executable. To restore
+ the past behaviour, simply add the following line to that file:
+ if {[file isfile [set file ~/.tixwishrc]]} {source $file}
+ 5) On Windows, initialize the console even if there is no script.
+ The problem here is that frozen/wrapped exes never have a script.
+ To invoke this, simply set the environment variable TIX_CONSOLE
+ to 1 if you want the console shown, and -1 if you want it hidden.
+ 6) Added pkgIndex.tcl for Windows to the install.
+ 7) Removed the patches to Tkinter.py as it is now standard in Python.
+ 8) Updated README files to say that Tix should now build under 8.3.
+
+
Added: external/tix-8.4.2.x/docs/Release-8.1.3.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.1.3.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,24 @@
+$Id: Release-8.1.3.txt,v 1.2 2001/12/09 04:49:12 idiscovery Exp $
+
+Release notes for 8.1.3
+
+ See also Release-8.1.2.txt
+
+Changes for 8.1.3
+
+ 1) Added a starting User Manual in html and pdf.
+ Changed the programming guide from ps to pdf.
+ 2) Minor bug fixes to the windows install files.
+ 3) Minor bug fixes to lib/pref/WmDefault.* files,
+ a Package for making Tix apps use the CDE/GNOME/KDE/Windows scheme.
+ GNOME is still barely supported because of the difficulty
+ of finding and parsing sawfish definition files.
+ 4) Added index.html files to help users find the documentation.
+ 5) Updated old /README and /docs/FAQ file, and added Roadmap.html.
+ 6) Fixed bug with -debug in library/Init.tcl
+ 7) Chamged demos/widget to demos/tixwidgets.tcl
+ 8) Made sure default target for windows make is all not install.
+ 9) Begin removing subwidget optiondb for things like *entries,
+ *scrollbars, *text, .background, etc - remove them next from schemes.
+
+
Added: external/tix-8.4.2.x/docs/Release-8.2.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.2.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,83 @@
+# -*- mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# $Id: Release-8.2.0.txt,v 1.2 2002/01/24 09:12:08 idiscovery Exp $
+
+ --- Tix 8.2.0 Release Notes ---
+
+
+OVERVIEW
+========
+
+ We appreciate your help in testing Tix. Please follow these steps:
+
+ + Read license.terms in this directory for licensing terms and
+ a disclaimer of all liabilities
+ + Read this document
+ + Download Tix source release
+ + Build Tix
+ + Run the Tix regression test suite and demos
+ + Install Tix (with care)
+ + Build/run your local apps using Tix
+ + Send us feedback
+
+CHANGES
+=======
+
+ For a full list of the changes, see ChangeLog.txt in the parent
+ directory. Here's a list of the major changes and improvements:
+
+ + Improved support for Tcl namespaces and Itcl
+ + Revamped build system for Unix and Windows
+ + You can now compile Tix using cygwin as well as VC++
+ + Better support for native look-and-feel on Windows (incomplete)
+ + Preliminary support for ::tk namespace using ExposePrivateCommand (tk8.4)
+ + Some features have been deactivated and may be restored in
+ future release:
+
+ + Embedded TK (ET). See http://hwaci.com for the successor to ET.
+
+
+DOWNLOAD TIX
+============
+
+ The sources to this release of Tix can be downloaded from
+
+ http://tix.sourceforge.net/
+
+ You also need to download Tcl and Tk sources from
+
+ http://tcl.activestate.com/
+
+
+BUILD TIX
+=========
+
+ Please read the files win/README.txt and unix/README.txt.
+
+ Because of major changes in the build system, you may run into
+ difficulties when building Tix. Do not despair. If you have
+ questions, bug reports or, better yet, bug fixes, please send post
+ them on http://tix.sourceforge.net.
+
+RUN TESTS AND DEMOS
+===================
+
+ Refer to the win/README.txt and unix/README.txt files for
+ instructions. You just need to type "make test" and "make
+ rundemos" in most cases.
+
+INSTALL TIX (WITH CARE)
+=======================
+
+ Refer to the win/README.txt and unix/README.txt files for
+ instructions.
+
+FEEDBACK
+========
+
+ Please send us feedback so that we know about the quality of this
+ release. If it works fine, consider sending us a message such as
+ "it works" and noting the versions of OS, Tcl/Tk and other
+ relevant components. If you encounter problems, please let us know
+ so that we can fix them.
+
+ Again, thank you for helping with Tix testing.
Added: external/tix-8.4.2.x/docs/Release-8.4.0.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release-8.4.0.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,100 @@
+ --- Tix 8.4.0 Release Notes ---
+
+CHANGES
+=======
+
+ For a full list of the changes, see ChangeLog in the parent
+ directory. Here's a list of the major changes and improvements:
+
+ + Complete rewrite of the build system to use TEA
+ + Separation of Tix package require and Tix style usage
+ + Code cleanup to use Tcl 8.4 as a base version
+
+ The python binding has not been updated and may require some
+ maintenance work to function with this release.
+
+
+DOWNLOAD TIX
+============
+
+ The sources to this release of Tix can be downloaded from
+
+ http://tix.sourceforge.net/
+
+ You also need to download Tcl and Tk sources from
+
+ http://www.tck.tk/
+
+BUILD TIX
+=========
+
+1. Uncompress and unpack the distribution
+
+ ON UNIX / OS X:
+ gzip -cd Tix<version>.tar.gz | tar xf -
+
+ ON WINDOWS:
+ use something like WinZip to unpack the archive.
+
+ Because of major changes in the build system, you may run into
+ difficulties when building Tix. Do not despair. If you have
+ questions, bug reports or, better yet, bug fixes, please send post
+ them on http://tix.sourceforge.net.
+
+2. Configure
+
+ ON UNIX / OS X:
+ cd Tix<version>
+ ./configure
+
+ Tix uses information left in tkConfig.sh when you built tk. This
+ file will be found in $exec_prefix/lib/. You might set the --prefix and
+ --exec-prefix options of configure if you don't want the default
+ (/usr/local). If building on multiple unix platforms, the following is
+ recommended to isolate build conflicts:
+ mkdir <builddir>/<platform>
+ cd !$
+ /path/to/Tix<version>/configure
+
+ ON WINDOWS:
+
+ Version 8.4 added support for building in the cygwin environment on
+ Windows based on TEA (http://www.tcl.tk/doc/tea/). You can retrieve
+ cygwin from:
+ http://sources.redhat.com/cygwin/
+
+ Inside the cygwin environment, you build the same as on Unix.
+
+ Otherwise, hack makefile.vc until it works and compile. It has problems
+ executing wish from a path with a space in it, but the DLL builds just
+ fine. A DLL should be available where you found this archive.
+
+3. Make and Install
+
+ ON UNIX, OS X or WINDOWS (with cygwin):
+ make
+ make test (OPTIONAL)
+ make install
+
+ ON WINDOWS (makefile.vc):
+ nmake -f makefile.vc
+ nmake -f makefile.vc test (OPTIONAL)
+ nmake -f makefile.vc install
+
+RUN TESTS AND DEMOS
+===================
+
+ Refer to the win/README.txt and unix/README.txt files for
+ instructions. You just need to type "make test" and "make
+ rundemos" in most cases.
+
+FEEDBACK
+========
+
+ Please send us feedback so that we know about the quality of this
+ release. If it works fine, consider sending us a message such as
+ "it works" and noting the versions of OS, Tcl/Tk and other
+ relevant components. If you encounter problems, please let us know
+ so that we can fix them.
+
+ Again, thank you for helping with Tix testing.
Added: external/tix-8.4.2.x/docs/Release.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/Release.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,34 @@
+<HTML>
+
+<!-- $Id: Release.html,v 1.5 2004/12/24 01:54:03 hobbs Exp $ -->
+
+<HEAD>
+<TITLE>Tix 8.4 Release Notes</TITLE>
+</HEAD>
+<BODY>
+<H1>Tix 8.4 Release Notes</H1>
+
+ This is a list of all the release notes of the Tix library for
+ version 8.1 and greater.
+
+<H3>Contents</H3>
+<DL>
+<DD>8.1</DD>
+<ul>
+ <li> <a href="Release-8.1.0.txt">Release-8.1.0.txt : Release 8.1.0</a>
+ <li> <a href="Release-8.1.1.txt">Release-8.1.1.txt : Release 8.1.1</a>
+ <li> <a href="Release-8.1.2.txt">Release-8.1.2.txt : Release 8.1.2</a>
+</ul>
+<DD>8.2</DD>
+<ul>
+ <li> <a href="Release-8.2.0.txt">Release-8.2.0.txt : Release 8.2.0</a>
+</ul>
+<DD>8.4</DD>
+<ul>
+ <li> <a href="Release-8.4.0.txt">Release-8.4.0.txt : Release 8.4.0</a>
+</ul>
+</DL>
+
+
+</BODY>
+</HTML>
Added: external/tix-8.4.2.x/docs/html/TixBook/TixBook.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/TixBook.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,81 @@
+<HEAD>
+<TITLE>Tix Programming Guide</TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif_gr.gif"> <IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif_gr.gif"> <A NAME=tex2html3 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html2 HREF=tableofcontents3_1.html>Contents</A>
+<HR> <P>
+<P>
+<CENTER><H1>The Tix Programming Guide</H1>
+<P><b>
+Tix Group,<BR><i><A HREF="http://tix.sourceforge.net">http://tix.sourceforge.net</A>
+</i>
+</b><P>
+<P><b>
+<P>
+<IMG SRC="../gif/tix/tix32.gif">
+<P>
+</b><P>
+</CENTER>
+<P>
+<P>Fri Nov 30 00:51:12 PST 2001
+.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html4 HREF=tableofcontents3_1.html#SECTION00010000000000000000>Contents</A>
+<LI> <A NAME=tex2html5 HREF=sectionstar3_2.html#SECTION00020000000000000000> Preface</A>
+<UL>
+<LI> <A NAME=tex2html6 HREF=subsectionstar3_2_1.html#SECTION00021000000000000000> About This Manual<A NAME=01> </A></A>
+<LI> <A NAME=tex2html7 HREF=subsectionstar3_2_2.html#SECTION00022000000000000000> About This Document<A NAME=02> </A></A>
+<LI> <A NAME=tex2html8 HREF=subsectionstar3_2_3.html#SECTION00023000000000000000> Organization of This Manual<A NAME=03> </A><A NAME=04> </A></A>
+</UL>
+<LI> <A NAME=tex2html9 HREF=section3_3.html#SECTION00030000000000000000> Introduction<A NAME=1> </A></A>
+<UL>
+<LI> <A NAME=tex2html10 HREF=subsection3_3_1.html#SECTION00031000000000000000> What is Tix<A NAME=11> </A></A>
+<LI> <A NAME=tex2html11 HREF=subsection3_3_2.html#SECTION00032000000000000000> Getting Started: the TixControl Widget<A NAME=12> </A></A>
+<LI> <A NAME=tex2html12 HREF=subsection3_3_3.html#SECTION00033000000000000000> Accessing The Components Inside Mega Widgets<A NAME=13> </A></A>
+<LI> <A NAME=tex2html13 HREF=subsection3_3_4.html#SECTION00034000000000000000> Another Tix Widget: TixComboBox<A NAME=14> </A></A>
+<LI> <A NAME=tex2html14 HREF=subsection3_3_5.html#SECTION00035000000000000000> The TixSelect Widget<A NAME=15> </A></A>
+</UL>
+<LI> <A NAME=tex2html15 HREF=section3_4.html#SECTION00040000000000000000> Container Widgets<A NAME=2> </A></A>
+<UL>
+<LI> <A NAME=tex2html16 HREF=subsection3_4_1.html#SECTION00041000000000000000> TixNoteBook<A NAME=21> </A></A>
+<LI> <A NAME=tex2html17 HREF=subsection3_4_2.html#SECTION00042000000000000000> PanedWindow<A NAME=22> </A></A>
+<LI> <A NAME=tex2html18 HREF=subsection3_4_3.html#SECTION00043000000000000000> The Family of Scrolled Widgets<A NAME=23> </A></A>
+</UL>
+<LI> <A NAME=tex2html19 HREF=section3_5.html#SECTION00050000000000000000> Tabular Listbox and Display Items<A NAME=3> </A></A>
+<UL>
+<LI> <A NAME=tex2html20 HREF=subsection3_5_1.html#SECTION00051000000000000000> tixTList - The Tix Tabular Listbox Widget<A NAME=31> </A></A>
+<LI> <A NAME=tex2html21 HREF=subsection3_5_2.html#SECTION00052000000000000000> Display Items<A NAME=32> </A></A>
+<LI> <A NAME=tex2html22 HREF=subsection3_5_3.html#SECTION00053000000000000000> Creating Display Items in the TixTList Widget<A NAME=33> </A></A>
+</UL>
+<LI> <A NAME=tex2html23 HREF=section3_6.html#SECTION00060000000000000000> Hierarchical Listbox<A NAME=4> </A></A>
+<UL>
+<LI> <A NAME=tex2html24 HREF=subsection3_6_1.html#SECTION00061000000000000000> TixHList - The Tix Hierarchical Listbox Widget<A NAME=41> </A></A>
+<LI> <A NAME=tex2html25 HREF=subsection3_6_2.html#SECTION00062000000000000000> Creating Collapsible Tree Structures with TixTree<A NAME=42> </A></A>
+</UL>
+<LI> <A NAME=tex2html26 HREF=section3_7.html#SECTION00070000000000000000> Selecting Files and Directories<A NAME=5> </A></A>
+<UL>
+<LI> <A NAME=tex2html27 HREF=subsection3_7_1.html#SECTION00071000000000000000> File Selection Dialog Widgets<A NAME=51> </A></A>
+<LI> <A NAME=tex2html28 HREF=subsection3_7_2.html#SECTION00072000000000000000> Selecting Directories with the TixDirTree and TixDirList Widgets<A NAME=52> </A></A>
+</UL>
+<LI> <A NAME=tex2html29 HREF=section3_8.html#SECTION00080000000000000000> Tix Object Oriented Programming<A NAME=6> </A></A>
+<UL>
+<LI> <A NAME=tex2html30 HREF=subsection3_8_1.html#SECTION00081000000000000000> Introduction to Tix Object Oriented Programming<A NAME=61> </A></A>
+<LI> <A NAME=tex2html31 HREF=subsection3_8_2.html#SECTION00082000000000000000> Widget Class Declaration<A NAME=62> </A></A>
+<LI> <A NAME=tex2html32 HREF=subsection3_8_3.html#SECTION00083000000000000000> Writing Methods<A NAME=63> </A></A>
+<LI> <A NAME=tex2html33 HREF=subsection3_8_4.html#SECTION00084000000000000000> Standard Initialization Methods<A NAME=64> </A></A>
+<LI> <A NAME=tex2html34 HREF=subsection3_8_5.html#SECTION00085000000000000000> Declaring and Using Variables<A NAME=65> </A></A>
+<LI> <A NAME=tex2html35 HREF=subsection3_8_6.html#SECTION00086000000000000000> Summary of Widget Instance Initialization<A NAME=66> </A></A>
+<LI> <A NAME=tex2html36 HREF=subsection3_8_7.html#SECTION00087000000000000000> Loading the New Classes<A NAME=67> </A></A>
+</UL>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/images.pl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/images.pl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+# LaTeX2HTML 0.5.3 (Wed Jan 26 1994)
+# Associate image original text (scrambled) with physical files.
+
+
+1;
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/labels.pl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/labels.pl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,131 @@
+# LaTeX2HTML 0.5.3 (Wed Jan 26 1994)
+# Associate symbolic labels with physical files.
+
+$external_labels{"65"} ="$URL/subsection3_8_5.html";
+$external_labels{"335"} ="$URL/subsubsection3_5_3_5.html";
+$external_labels{"137"} ="$URL/subsubsection3_3_3_7.html";
+$external_labels{"3"} ="$URL/section3_5.html";
+$external_labels{"12"} ="$URL/subsubsection3_3_2_1.html";
+$external_labels{"642"} ="$URL/subsubsection3_8_4_4.html";
+$external_labels{"514"} ="$URL/subsubsection3_7_1_4.html";
+$external_labels{"111"} ="$URL/subsubsection3_3_5_1.html";
+$external_labels{"31"} ="$URL/subsection3_5_1.html";
+$external_labels{"24"} ="$URL/subsection3_4_2.html";
+$external_labels{"17"} ="$URL/subsubsection3_3_3_6.html";
+$external_labels{"652"} ="$URL/subsubsection3_8_5_3.html";
+$external_labels{"121"} ="$URL/subsubsection3_3_2_1.html";
+$external_labels{"43"} ="$URL/subsubsection3_6_1_1.html";
+$external_labels{"36"} ="$URL/subsubsection3_5_3_4.html";
+$external_labels{"29"} ="$URL/subsubsection3_4_3_2.html";
+$external_labels{"336"} ="$URL/subsubsection3_5_3_6.html";
+$external_labels{"131"} ="$URL/subsubsection3_3_3_1.html";
+$external_labels{"62"} ="$URL/subsubsection3_8_2_1.html";
+$external_labels{"55"} ="$URL/subsection3_7_2.html";
+$external_labels{"643"} ="$URL/subsubsection3_8_4_5.html";
+$external_labels{"6412"} ="$URL/subsubsectionstar3_8_4_3.html";
+$external_labels{"6122"} ="$URL/subsubsectionstar3_8_1_4.html";
+$external_labels{"515"} ="$URL/subsubsectionstar3_7_1_5.html";
+$external_labels{"211"} ="$URL/subsubsection3_4_1_1.html";
+$external_labels{"141"} ="$URL/subsubsection3_3_4_1.html";
+$external_labels{"112"} ="$URL/subsubsectionstar3_3_5_3.html";
+$external_labels{"02"} ="$URL/subsectionstar3_2_2.html";
+$external_labels{"67"} ="$URL/subsection3_8_7.html";
+$external_labels{"1511"} ="$URL/subsubsectionstar3_3_5_2.html";
+$external_labels{"1221"} ="$URL/subsubsectionstar3_3_2_3.html";
+$external_labels{"221"} ="$URL/subsubsection3_4_2_1.html";
+$external_labels{"21"} ="$URL/subsection3_4_1.html";
+$external_labels{"151"} ="$URL/subsubsection3_3_5_1.html";
+$external_labels{"122"} ="$URL/subsubsection3_3_2_2.html";
+$external_labels{"14"} ="$URL/subsection3_3_4.html";
+$external_labels{"2"} ="$URL/section3_4.html";
+$external_labels{"33"} ="$URL/subsection3_5_3.html";
+$external_labels{"231"} ="$URL/subsubsection3_4_3_1.html";
+$external_labels{"26"} ="$URL/subsubsection3_4_2_2.html";
+$external_labels{"19"} ="$URL/subsubsection3_3_4_1.html";
+$external_labels{"132"} ="$URL/subsubsection3_3_3_2.html";
+$external_labels{"6"} ="$URL/section3_8.html";
+$external_labels{"52"} ="$URL/subsection3_7_2.html";
+$external_labels{"45"} ="$URL/subsubsection3_6_1_2.html";
+$external_labels{"212"} ="$URL/subsubsection3_4_1_2.html";
+$external_labels{"113"} ="$URL/subsubsection3_3_5_5.html";
+$external_labels{"142"} ="$URL/subsubsection3_3_4_2.html";
+$external_labels{"64"} ="$URL/subsection3_8_4.html";
+$external_labels{"321"} ="$URL/subsubsection3_5_2_1.html";
+$external_labels{"222"} ="$URL/subsubsection3_4_2_2.html";
+$external_labels{"152"} ="$URL/subsubsection3_3_5_5.html";
+$external_labels{"123"} ="$URL/subsubsection3_3_2_4.html";
+$external_labels{"04"} ="$URL/subsectionstar3_2_3.html";
+$external_labels{"11"} ="$URL/subsubsection3_3_1_1.html";
+$external_labels{"331"} ="$URL/subsubsection3_5_3_1.html";
+$external_labels{"232"} ="$URL/subsubsection3_4_3_2.html";
+$external_labels{"133"} ="$URL/subsubsection3_3_3_3.html";
+$external_labels{"6521"} ="$URL/subsubsectionstar3_8_5_4.html";
+$external_labels{"23"} ="$URL/subsection3_4_3.html";
+$external_labels{"16"} ="$URL/subsubsection3_3_3_5.html";
+$external_labels{"411"} ="$URL/subsubsection3_6_1_1.html";
+$external_labels{"213"} ="$URL/subsubsection3_4_1_3.html";
+$external_labels{"114"} ="$URL/subsubsection3_3_5_7.html";
+$external_labels{"143"} ="$URL/subsubsection3_3_4_3.html";
+$external_labels{"1"} ="$URL/section3_3.html";
+$external_labels{"6411"} ="$URL/subsubsectionstar3_8_4_2.html";
+$external_labels{"6121"} ="$URL/subsubsectionstar3_8_1_3.html";
+$external_labels{"42"} ="$URL/subsection3_6_2.html";
+$external_labels{"35"} ="$URL/subsubsection3_5_3_2.html";
+$external_labels{"28"} ="$URL/subsubsection3_4_3_1.html";
+$external_labels{"322"} ="$URL/subsubsection3_5_2_2.html";
+$external_labels{"223"} ="$URL/subsubsection3_4_2_3.html";
+$external_labels{"153"} ="$URL/subsubsection3_3_5_6.html";
+$external_labels{"TableofContents"} ="$URL/tableofcontents3_1.html";
+$external_labels{"61"} ="$URL/subsubsection3_8_1_1.html";
+$external_labels{"54"} ="$URL/subsubsectionstar3_7_1_5.html";
+$external_labels{"5"} ="$URL/section3_7.html";
+$external_labels{"47"} ="$URL/subsection3_6_2.html";
+$external_labels{"332"} ="$URL/subsubsection3_5_3_2.html";
+$external_labels{"1513"} ="$URL/subsubsectionstar3_3_5_4.html";
+$external_labels{"134"} ="$URL/subsubsection3_3_3_4.html";
+$external_labels{"01"} ="$URL/subsectionstar3_2_1.html";
+$external_labels{"66"} ="$URL/subsection3_8_6.html";
+$external_labels{"511"} ="$URL/subsubsection3_7_1_1.html";
+$external_labels{"412"} ="$URL/subsubsection3_6_1_2.html";
+$external_labels{"214"} ="$URL/subsubsection3_4_1_4.html";
+$external_labels{"144"} ="$URL/subsubsection3_3_4_4.html";
+$external_labels{"13"} ="$URL/subsection3_3_3.html";
+$external_labels{"224"} ="$URL/subsubsection3_4_2_4.html";
+$external_labels{"154"} ="$URL/subsubsection3_3_5_7.html";
+$external_labels{"Contents"} ="$URL/subsection3_8_7.html";
+$external_labels{"32"} ="$URL/subsection3_5_2.html";
+$external_labels{"25"} ="$URL/subsubsection3_4_2_1.html";
+$external_labels{"18"} ="$URL/subsection3_3_4.html";
+$external_labels{"333"} ="$URL/subsubsection3_5_3_3.html";
+$external_labels{"135"} ="$URL/subsubsection3_3_3_5.html";
+$external_labels{"51"} ="$URL/subsubsection3_7_1_1.html";
+$external_labels{"44"} ="$URL/subsubsection3_6_1_2.html";
+$external_labels{"6511"} ="$URL/subsubsectionstar3_8_5_2.html";
+$external_labels{"611"} ="$URL/subsubsection3_8_1_1.html";
+$external_labels{"512"} ="$URL/subsubsection3_7_1_2.html";
+$external_labels{"413"} ="$URL/subsubsection3_6_1_3.html";
+$external_labels{"63"} ="$URL/subsection3_8_3.html";
+$external_labels{"56"} ="$URL/subsection3_7_2.html";
+$external_labels{"4"} ="$URL/section3_6.html";
+$external_labels{"621"} ="$URL/subsubsection3_8_2_1.html";
+$external_labels{"03"} ="$URL/subsectionstar3_2_3.html";
+$external_labels{"631"} ="$URL/subsubsection3_8_3_1.html";
+$external_labels{"6123"} ="$URL/subsubsectionstar3_8_1_5.html";
+$external_labels{"334"} ="$URL/subsubsection3_5_3_4.html";
+$external_labels{"22"} ="$URL/subsection3_4_2.html";
+$external_labels{"15"} ="$URL/subsection3_3_5.html";
+$external_labels{"136"} ="$URL/subsubsection3_3_3_6.html";
+$external_labels{"641"} ="$URL/subsubsection3_8_4_1.html";
+$external_labels{"612"} ="$URL/subsubsection3_8_1_2.html";
+$external_labels{"513"} ="$URL/subsubsection3_7_1_3.html";
+$external_labels{"414"} ="$URL/subsubsection3_6_1_4.html";
+$external_labels{"41"} ="$URL/subsection3_6_1.html";
+$external_labels{"34"} ="$URL/subsubsection3_5_2_2.html";
+$external_labels{"27"} ="$URL/subsubsection3_4_3_1.html";
+$external_labels{"1512"} ="$URL/subsubsectionstar3_3_5_3.html";
+$external_labels{"110"} ="$URL/subsection3_3_5.html";
+$external_labels{"651"} ="$URL/subsubsection3_8_5_1.html";
+$external_labels{"53"} ="$URL/subsubsection3_7_1_3.html";
+$external_labels{"46"} ="$URL/subsection3_6_2.html";
+
+1;
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/section3_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/section3_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,62 @@
+<HEAD>
+<TITLE> Introduction<A NAME=1> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html200 HREF=subsection3_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html198 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html192 HREF=subsectionstar3_2_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html202 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html201 HREF=subsection3_3_1.html> What is Tix</A>
+<B>Up:</B> <A NAME=tex2html199 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html193 HREF=subsectionstar3_2_3.html> Organization of This </A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00030000000000000000> Introduction<A NAME=1> </A></A></H1>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html203 HREF=subsection3_3_1.html#SECTION00031000000000000000> What is Tix<A NAME=11> </A></A>
+<UL>
+<LI> <A NAME=tex2html204 HREF=subsubsection3_3_1_1.html#SECTION00031100000000000000> Tix for Application Programmers<A NAME=111> </A></A>
+<LI> <A NAME=tex2html205 HREF=subsubsection3_3_1_2.html#SECTION00031200000000000000> Tix for Widget Developers<A NAME=112> </A></A>
+</UL>
+<LI> <A NAME=tex2html206 HREF=subsection3_3_2.html#SECTION00032000000000000000> Getting Started: the TixControl Widget<A NAME=12> </A></A>
+<UL>
+<LI> <A NAME=tex2html207 HREF=subsubsection3_3_2_1.html#SECTION00032100000000000000> Creating a TixControl Widget<A NAME=121> </A></A>
+<LI> <A NAME=tex2html208 HREF=subsubsection3_3_2_2.html#SECTION00032200000000000000> Accessing The Value of a TixControl Widget<A NAME=122> </A></A>
+<LI> <A NAME=tex2html209 HREF=subsubsectionstar3_3_2_3.html#SECTION00032300000000000000> Disabling Callbacks Temporarily<A NAME=1221> </A></A>
+<LI> <A NAME=tex2html210 HREF=subsubsection3_3_2_4.html#SECTION00032400000000000000> Validating User Inputs<A NAME=123> </A></A>
+</UL>
+<LI> <A NAME=tex2html211 HREF=subsection3_3_3.html#SECTION00033000000000000000> Accessing The Components Inside Mega Widgets<A NAME=13> </A></A>
+<UL>
+<LI> <A NAME=tex2html212 HREF=subsubsection3_3_3_1.html#SECTION00033100000000000000> Subwidgets<A NAME=131> </A></A>
+<LI> <A NAME=tex2html213 HREF=subsubsection3_3_3_2.html#SECTION00033200000000000000> Subwidget Names<A NAME=132> </A></A>
+<LI> <A NAME=tex2html214 HREF=subsubsection3_3_3_3.html#SECTION00033300000000000000> The <tt>subwidget</tt> Method<A NAME=133> </A></A>
+<LI> <A NAME=tex2html215 HREF=subsubsection3_3_3_4.html#SECTION00033400000000000000> Chaining the <tt>subwidget</tt> Method<A NAME=134> </A></A>
+<LI> <A NAME=tex2html216 HREF=subsubsection3_3_3_5.html#SECTION00033500000000000000> Configuring Subwidget Options Using the <tt>-options</tt> Switch<A NAME=135> </A></A>
+<LI> <A NAME=tex2html217 HREF=subsubsection3_3_3_6.html#SECTION00033600000000000000> Configuring Subwidget Options Using the Tk Option Database<A NAME=136> </A></A>
+<LI> <A NAME=tex2html218 HREF=subsubsection3_3_3_7.html#SECTION00033700000000000000> Caution: Restricted Access<A NAME=137> </A></A>
+</UL>
+<LI> <A NAME=tex2html219 HREF=subsection3_3_4.html#SECTION00034000000000000000> Another Tix Widget: TixComboBox<A NAME=14> </A></A>
+<UL>
+<LI> <A NAME=tex2html220 HREF=subsubsection3_3_4_1.html#SECTION00034100000000000000> Creating a TixComboBox Widget<A NAME=141> </A></A>
+<LI> <A NAME=tex2html221 HREF=subsubsection3_3_4_2.html#SECTION00034200000000000000> Controlling the Style of the TixComboBox<A NAME=142> </A></A>
+<LI> <A NAME=tex2html222 HREF=subsubsection3_3_4_3.html#SECTION00034300000000000000> Static Options<A NAME=143> </A></A>
+<LI> <A NAME=tex2html223 HREF=subsubsection3_3_4_4.html#SECTION00034400000000000000> Monitoring the User's Browsing Actions<A NAME=144> </A></A>
+</UL>
+<LI> <A NAME=tex2html224 HREF=subsection3_3_5.html#SECTION00035000000000000000> The TixSelect Widget<A NAME=15> </A></A>
+<UL>
+<LI> <A NAME=tex2html225 HREF=subsubsection3_3_5_1.html#SECTION00035100000000000000> Creating A TixSelect Widget<A NAME=151> </A></A>
+<LI> <A NAME=tex2html226 HREF=subsubsectionstar3_3_5_2.html#SECTION00035200000000000000> Label and Orientation<A NAME=1511> </A></A>
+<LI> <A NAME=tex2html227 HREF=subsubsectionstar3_3_5_3.html#SECTION00035300000000000000> Creating the Button Subwidgets and Configuring
+Their Appearance<A NAME=1512> </A></A>
+<LI> <A NAME=tex2html228 HREF=subsubsectionstar3_3_5_4.html#SECTION00035400000000000000> Accessing the Button Subwidgets<A NAME=1513> </A></A>
+<LI> <A NAME=tex2html229 HREF=subsubsection3_3_5_5.html#SECTION00035500000000000000> Specifying Selection Rules<A NAME=152> </A></A>
+<LI> <A NAME=tex2html230 HREF=subsubsection3_3_5_6.html#SECTION00035600000000000000> Accessing the Value of a TixSelect Widget<A NAME=153> </A></A>
+<LI> <A NAME=tex2html231 HREF=subsubsection3_3_5_7.html#SECTION00035700000000000000> Specifying Complex Selection Rules<A NAME=154> </A></A>
+</UL>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/section3_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/section3_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,53 @@
+<HEAD>
+<TITLE> Container Widgets<A NAME=2> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html571 HREF=subsection3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html569 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html563 HREF=subsubsection3_3_5_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html573 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html572 HREF=subsection3_4_1.html> TixNoteBook</A>
+<B>Up:</B> <A NAME=tex2html570 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html564 HREF=subsubsection3_3_5_7.html> Specifying Complex Selection </A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00040000000000000000> Container Widgets<A NAME=2> </A></A></H1>
+<P>
+ In addition to providing some nice-looking interface elements, Tix
+ offers some useful ways to organize the elements that you create.
+ It does this by providing <em>container widgets</em>, which are widgets
+ designed to contain whatever you want to put into them.
+<P>
+ Different container widgets have different policies as to how they
+ arrange the widgets inside them. In this chapter, we'll talk about
+ TixNoteBook, which arranges its subwidgets using a notebook metaphor,
+ TixPanedWindow, which arranges its subwidgets in non-overlapping
+ horizontal or vertical panes, and a family of ``Scrolled Widgets'', which
+ attach scrollbars to their subwidgets.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html574 HREF=subsection3_4_1.html#SECTION00041000000000000000> TixNoteBook<A NAME=21> </A></A>
+<UL>
+<LI> <A NAME=tex2html575 HREF=subsubsection3_4_1_1.html#SECTION00041100000000000000> Adding Pages to a TixNoteBook<A NAME=211> </A></A>
+<LI> <A NAME=tex2html576 HREF=subsubsection3_4_1_2.html#SECTION00041200000000000000> Keyboard Accelerators<A NAME=212> </A></A>
+<LI> <A NAME=tex2html577 HREF=subsubsection3_4_1_3.html#SECTION00041300000000000000> Delaying the Creation of New Pages<A NAME=213> </A></A>
+<LI> <A NAME=tex2html578 HREF=subsubsection3_4_1_4.html#SECTION00041400000000000000> Changing Page Tabs and Deleting Pages<A NAME=214> </A></A>
+</UL>
+<LI> <A NAME=tex2html579 HREF=subsection3_4_2.html#SECTION00042000000000000000> PanedWindow<A NAME=22> </A></A>
+<UL>
+<LI> <A NAME=tex2html580 HREF=subsubsection3_4_2_1.html#SECTION00042100000000000000> Adding Panes Inside a TixPanedWindow Widget<A NAME=221> </A></A>
+<LI> <A NAME=tex2html581 HREF=subsubsection3_4_2_2.html#SECTION00042200000000000000> Putting Widgets Inside the Panes<A NAME=222> </A></A>
+<LI> <A NAME=tex2html582 HREF=subsubsection3_4_2_3.html#SECTION00042300000000000000> Setting the Order of the Panes<A NAME=223> </A></A>
+<LI> <A NAME=tex2html583 HREF=subsubsection3_4_2_4.html#SECTION00042400000000000000> Changing the Sizes of the Panes<A NAME=224> </A></A>
+</UL>
+<LI> <A NAME=tex2html584 HREF=subsection3_4_3.html#SECTION00043000000000000000> The Family of Scrolled Widgets<A NAME=23> </A></A>
+<UL>
+<LI> <A NAME=tex2html585 HREF=subsubsection3_4_3_1.html#SECTION00043100000000000000> The Scrolled Listbox Widget<A NAME=231> </A></A>
+<LI> <A NAME=tex2html586 HREF=subsubsection3_4_3_2.html#SECTION00043200000000000000> Other Scrolled Widgets<A NAME=232> </A></A>
+</UL>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/section3_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/section3_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,37 @@
+<HEAD>
+<TITLE> Tabular Listbox and Display Items<A NAME=3> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html740 HREF=subsection3_5_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html738 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html732 HREF=subsubsection3_4_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html742 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html741 HREF=subsection3_5_1.html> tixTList - The </A>
+<B>Up:</B> <A NAME=tex2html739 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html733 HREF=subsubsection3_4_3_2.html> Other Scrolled Widgets</A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00050000000000000000> Tabular Listbox and Display Items<A NAME=3> </A></A></H1>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html743 HREF=subsection3_5_1.html#SECTION00051000000000000000> tixTList - The Tix Tabular Listbox Widget<A NAME=31> </A></A>
+<LI> <A NAME=tex2html744 HREF=subsection3_5_2.html#SECTION00052000000000000000> Display Items<A NAME=32> </A></A>
+<UL>
+<LI> <A NAME=tex2html745 HREF=subsubsection3_5_2_1.html#SECTION00052100000000000000> Advantages of Display Items<A NAME=321> </A></A>
+<LI> <A NAME=tex2html746 HREF=subsubsection3_5_2_2.html#SECTION00052200000000000000> Display Items and Display Styles<A NAME=322> </A></A>
+</UL>
+<LI> <A NAME=tex2html747 HREF=subsection3_5_3.html#SECTION00053000000000000000> Creating Display Items in the TixTList Widget<A NAME=33> </A></A>
+<UL>
+<LI> <A NAME=tex2html748 HREF=subsubsection3_5_3_1.html#SECTION00053100000000000000> Creating Display Items<A NAME=331> </A></A>
+<LI> <A NAME=tex2html749 HREF=subsubsection3_5_3_2.html#SECTION00053200000000000000> Setting the Styles of the Display Items<A NAME=332> </A></A>
+<LI> <A NAME=tex2html750 HREF=subsubsection3_5_3_3.html#SECTION00053300000000000000> Configuring and Deleting the Items<A NAME=333> </A></A>
+<LI> <A NAME=tex2html751 HREF=subsubsection3_5_3_4.html#SECTION00053400000000000000> Choosing the Orientation and Number of Rows or Columns<A NAME=334> </A></A>
+<LI> <A NAME=tex2html752 HREF=subsubsection3_5_3_5.html#SECTION00053500000000000000> Event Handling<A NAME=335> </A></A>
+<LI> <A NAME=tex2html753 HREF=subsubsection3_5_3_6.html#SECTION00053600000000000000> Selection<A NAME=336> </A></A>
+</UL>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/section3_6.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/section3_6.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,30 @@
+<HEAD>
+<TITLE> Hierarchical Listbox<A NAME=4> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html885 HREF=subsection3_6_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html883 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html877 HREF=subsubsection3_5_3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html887 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html886 HREF=subsection3_6_1.html> TixHList - The </A>
+<B>Up:</B> <A NAME=tex2html884 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html878 HREF=subsubsection3_5_3_6.html> Selection</A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00060000000000000000> Hierarchical Listbox<A NAME=4> </A></A></H1>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html888 HREF=subsection3_6_1.html#SECTION00061000000000000000> TixHList - The Tix Hierarchical Listbox Widget<A NAME=41> </A></A>
+<UL>
+<LI> <A NAME=tex2html889 HREF=subsubsection3_6_1_1.html#SECTION00061100000000000000> Creating a Hierarchical List<A NAME=411> </A></A>
+<LI> <A NAME=tex2html890 HREF=subsubsection3_6_1_2.html#SECTION00061200000000000000> Creating Entries in a HList Widget<A NAME=412> </A></A>
+<LI> <A NAME=tex2html891 HREF=subsubsection3_6_1_3.html#SECTION00061300000000000000> Controlling the Layout of the Entries<A NAME=413> </A></A>
+<LI> <A NAME=tex2html892 HREF=subsubsection3_6_1_4.html#SECTION00061400000000000000> Handling the Selection and User Event<A NAME=414> </A></A>
+</UL>
+<LI> <A NAME=tex2html893 HREF=subsection3_6_2.html#SECTION00062000000000000000> Creating Collapsible Tree Structures with TixTree<A NAME=42> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/section3_7.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/section3_7.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+<HEAD>
+<TITLE> Selecting Files and Directories<A NAME=5> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html968 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html966 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html960 HREF=subsection3_6_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html970 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html969 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<B>Up:</B> <A NAME=tex2html967 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html961 HREF=subsection3_6_2.html> Creating Collapsible Tree </A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00070000000000000000> Selecting Files and Directories<A NAME=5> </A></A></H1>
+<P>
+One task that an application has to perform frequently is to ask the user
+ to select files or directories. To select files, you can use the Tix <em>File Selection Widgets</em>: TixFileSelectDialog and
+ TixExFileSelectDialog. To select directories, you can use the Tix <em>Directory Selection Widgets</em>: TixDirList and TixDirTree.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html971 HREF=subsection3_7_1.html#SECTION00071000000000000000> File Selection Dialog Widgets<A NAME=51> </A></A>
+<UL>
+<LI> <A NAME=tex2html972 HREF=subsubsection3_7_1_1.html#SECTION00071100000000000000> Using the TixFileSelectDialog Widget<A NAME=511> </A></A>
+<LI> <A NAME=tex2html973 HREF=subsubsection3_7_1_2.html#SECTION00071200000000000000> The Subwidget in the TixFileSelectDialog<A NAME=512> </A></A>
+<LI> <A NAME=tex2html974 HREF=subsubsection3_7_1_3.html#SECTION00071300000000000000> The TixExFileSelectDialog Widget<A NAME=513> </A></A>
+<LI> <A NAME=tex2html975 HREF=subsubsection3_7_1_4.html#SECTION00071400000000000000> Specifying File Types for TixExFileSelectDialog<A NAME=514> </A></A>
+<LI> <A NAME=tex2html976 HREF=subsubsectionstar3_7_1_5.html#SECTION00071500000000000000> 5.1.5 The <b><tt>tix filedialog</tt></b> Command<A NAME=515> </A></A>
+</UL>
+<LI> <A NAME=tex2html977 HREF=subsection3_7_2.html#SECTION00072000000000000000> Selecting Directories with the TixDirTree and TixDirList Widgets<A NAME=52> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/section3_8.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/section3_8.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,59 @@
+<HEAD>
+<TITLE> Tix Object Oriented Programming<A NAME=6> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1062 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1060 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1056 HREF=subsection3_7_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1064 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1063 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<B>Up:</B> <A NAME=tex2html1061 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html1057 HREF=subsection3_7_2.html> Selecting Directories with </A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00080000000000000000> Tix Object Oriented Programming<A NAME=6> </A></A></H1>
+<P>
+<em>This chapter is intended for experienced programmers who want to
+ create new Tix widgets. If you just want use the Tix widgets in your
+ applications, you can skip this chapter.</em>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html1065 HREF=subsection3_8_1.html#SECTION00081000000000000000> Introduction to Tix Object Oriented Programming<A NAME=61> </A></A>
+<UL>
+<LI> <A NAME=tex2html1066 HREF=subsubsection3_8_1_1.html#SECTION00081100000000000000> Widget Classes and Widget Instances<A NAME=611> </A></A>
+<LI> <A NAME=tex2html1067 HREF=subsubsection3_8_1_2.html#SECTION00081200000000000000> What is in a Widget Instance<A NAME=612> </A></A>
+<LI> <A NAME=tex2html1068 HREF=subsubsectionstar3_8_1_3.html#SECTION00081300000000000000> Variables<A NAME=6121> </A></A>
+<LI> <A NAME=tex2html1069 HREF=subsubsectionstar3_8_1_4.html#SECTION00081400000000000000> Methods<A NAME=6122> </A></A>
+<LI> <A NAME=tex2html1070 HREF=subsubsectionstar3_8_1_5.html#SECTION00081500000000000000> Component Widgets<A NAME=6123> </A></A>
+</UL>
+<LI> <A NAME=tex2html1071 HREF=subsection3_8_2.html#SECTION00082000000000000000> Widget Class Declaration<A NAME=62> </A></A>
+<UL>
+<LI> <A NAME=tex2html1072 HREF=subsubsection3_8_2_1.html#SECTION00082100000000000000> Using the tixWidgetClass Command<A NAME=621> </A></A>
+</UL>
+<LI> <A NAME=tex2html1073 HREF=subsection3_8_3.html#SECTION00083000000000000000> Writing Methods<A NAME=63> </A></A>
+<UL>
+<LI> <A NAME=tex2html1074 HREF=subsubsection3_8_3_1.html#SECTION00083100000000000000> Declaring Public Methods<A NAME=631> </A></A>
+</UL>
+<LI> <A NAME=tex2html1075 HREF=subsection3_8_4.html#SECTION00084000000000000000> Standard Initialization Methods<A NAME=64> </A></A>
+<UL>
+<LI> <A NAME=tex2html1076 HREF=subsubsection3_8_4_1.html#SECTION00084100000000000000> The InitWidgetRec Method<A NAME=641> </A></A>
+<LI> <A NAME=tex2html1077 HREF=subsubsectionstar3_8_4_2.html#SECTION00084200000000000000> Chaining Methods<A NAME=6411> </A></A>
+<LI> <A NAME=tex2html1078 HREF=subsubsectionstar3_8_4_3.html#SECTION00084300000000000000> The tixChainMethod call<A NAME=6412> </A></A>
+<LI> <A NAME=tex2html1079 HREF=subsubsection3_8_4_4.html#SECTION00084400000000000000> The ConstructWidget Method<A NAME=642> </A></A>
+<LI> <A NAME=tex2html1080 HREF=subsubsection3_8_4_5.html#SECTION00084500000000000000> The SetBindings Method<A NAME=643> </A></A>
+</UL>
+<LI> <A NAME=tex2html1081 HREF=subsection3_8_5.html#SECTION00085000000000000000> Declaring and Using Variables<A NAME=65> </A></A>
+<UL>
+<LI> <A NAME=tex2html1082 HREF=subsubsection3_8_5_1.html#SECTION00085100000000000000> Initialization of Public Variables<A NAME=651> </A></A>
+<LI> <A NAME=tex2html1083 HREF=subsubsectionstar3_8_5_2.html#SECTION00085200000000000000> Type Checker<A NAME=6511> </A></A>
+<LI> <A NAME=tex2html1084 HREF=subsubsection3_8_5_3.html#SECTION00085300000000000000> Public Variable Configuration Methods<A NAME=652> </A></A>
+<LI> <A NAME=tex2html1085 HREF=subsubsectionstar3_8_5_4.html#SECTION00085400000000000000> Configuration Methods and Public Variable Initialization<A NAME=6521> </A></A>
+</UL>
+<LI> <A NAME=tex2html1086 HREF=subsection3_8_6.html#SECTION00086000000000000000> Summary of Widget Instance Initialization<A NAME=66> </A></A>
+<LI> <A NAME=tex2html1087 HREF=subsection3_8_7.html#SECTION00087000000000000000> Loading the New Classes<A NAME=67> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/sectionstar3_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/sectionstar3_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,25 @@
+<HEAD>
+<TITLE> Preface</TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html155 HREF=subsectionstar3_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html153 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html147 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html157 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html156 HREF=subsectionstar3_2_1.html> About This Manual</A>
+<B>Up:</B> <A NAME=tex2html154 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html148 HREF=tableofcontents3_1.html>Contents</A>
+<HR> <P>
+<A NAME=Contents> </A><H1><A NAME=SECTION00020000000000000000> Preface</A></H1>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html158 HREF=subsectionstar3_2_1.html#SECTION00021000000000000000> About This Manual<A NAME=01> </A></A>
+<LI> <A NAME=tex2html159 HREF=subsectionstar3_2_2.html#SECTION00022000000000000000> About This Document<A NAME=02> </A></A>
+<LI> <A NAME=tex2html160 HREF=subsectionstar3_2_3.html#SECTION00023000000000000000> Organization of This Manual<A NAME=03> </A><A NAME=04> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,24 @@
+<HEAD>
+<TITLE> What is Tix<A NAME=11> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html240 HREF=subsubsection3_3_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html238 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html232 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html242 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html241 HREF=subsubsection3_3_1_1.html> Tix for Application </A>
+<B>Up:</B> <A NAME=tex2html239 HREF=section3_3.html> Introduction</A>
+<B> Previous:</B> <A NAME=tex2html233 HREF=section3_3.html> Introduction</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00031000000000000000> What is Tix<A NAME=11> </A></A></H2>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html243 HREF=subsubsection3_3_1_1.html#SECTION00031100000000000000> Tix for Application Programmers<A NAME=111> </A></A>
+<LI> <A NAME=tex2html244 HREF=subsubsection3_3_1_2.html#SECTION00031200000000000000> Tix for Widget Developers<A NAME=112> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,36 @@
+<HEAD>
+<TITLE> Getting Started: the TixControl Widget<A NAME=12> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html273 HREF=subsubsection3_3_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html271 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html265 HREF=subsubsection3_3_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html275 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html274 HREF=subsubsection3_3_2_1.html> Creating a TixControl </A>
+<B>Up:</B> <A NAME=tex2html272 HREF=section3_3.html> Introduction</A>
+<B> Previous:</B> <A NAME=tex2html266 HREF=subsubsection3_3_1_2.html> Tix for Widget </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00032000000000000000> Getting Started: the TixControl Widget<A NAME=12> </A></A></H2>
+<P>
+<em>Pre-requisites: you should be familiar with Tk widgets and
+ programming, or read the Tk book along with this book</em>
+<P>
+Before delving into the deep philosophy of the Tix widgets, let us
+ first have a quick example to demonstrate the usefulness and
+ convenience of an Tix widget: the TixControl is basically an entry
+ widget that displays a value. Next to the entry, there are two up
+ and down arrow buttons for you to adjust the value inside the entry
+ widget.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html276 HREF=subsubsection3_3_2_1.html#SECTION00032100000000000000> Creating a TixControl Widget<A NAME=121> </A></A>
+<LI> <A NAME=tex2html277 HREF=subsubsection3_3_2_2.html#SECTION00032200000000000000> Accessing The Value of a TixControl Widget<A NAME=122> </A></A>
+<LI> <A NAME=tex2html278 HREF=subsubsectionstar3_3_2_3.html#SECTION00032300000000000000> Disabling Callbacks Temporarily<A NAME=1221> </A></A>
+<LI> <A NAME=tex2html279 HREF=subsubsection3_3_2_4.html#SECTION00032400000000000000> Validating User Inputs<A NAME=123> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,29 @@
+<HEAD>
+<TITLE> Accessing The Components Inside Mega Widgets<A NAME=13> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html330 HREF=subsubsection3_3_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html328 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html322 HREF=subsubsection3_3_2_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html332 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html331 HREF=subsubsection3_3_3_1.html> Subwidgets</A>
+<B>Up:</B> <A NAME=tex2html329 HREF=section3_3.html> Introduction</A>
+<B> Previous:</B> <A NAME=tex2html323 HREF=subsubsection3_3_2_4.html> Validating User Inputs</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00033000000000000000> Accessing The Components Inside Mega Widgets<A NAME=13> </A></A></H2>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html333 HREF=subsubsection3_3_3_1.html#SECTION00033100000000000000> Subwidgets<A NAME=131> </A></A>
+<LI> <A NAME=tex2html334 HREF=subsubsection3_3_3_2.html#SECTION00033200000000000000> Subwidget Names<A NAME=132> </A></A>
+<LI> <A NAME=tex2html335 HREF=subsubsection3_3_3_3.html#SECTION00033300000000000000> The <tt>subwidget</tt> Method<A NAME=133> </A></A>
+<LI> <A NAME=tex2html336 HREF=subsubsection3_3_3_4.html#SECTION00033400000000000000> Chaining the <tt>subwidget</tt> Method<A NAME=134> </A></A>
+<LI> <A NAME=tex2html337 HREF=subsubsection3_3_3_5.html#SECTION00033500000000000000> Configuring Subwidget Options Using the <tt>-options</tt> Switch<A NAME=135> </A></A>
+<LI> <A NAME=tex2html338 HREF=subsubsection3_3_3_6.html#SECTION00033600000000000000> Configuring Subwidget Options Using the Tk Option Database<A NAME=136> </A></A>
+<LI> <A NAME=tex2html339 HREF=subsubsection3_3_3_7.html#SECTION00033700000000000000> Caution: Restricted Access<A NAME=137> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,40 @@
+<HEAD>
+<TITLE> Another Tix Widget: TixComboBox<A NAME=14> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html423 HREF=subsubsection3_3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html421 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html415 HREF=subsubsection3_3_3_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html425 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html424 HREF=subsubsection3_3_4_1.html> Creating a TixComboBox </A>
+<B>Up:</B> <A NAME=tex2html422 HREF=section3_3.html> Introduction</A>
+<B> Previous:</B> <A NAME=tex2html416 HREF=subsubsection3_3_3_7.html> Caution: Restricted Access</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00034000000000000000> Another Tix Widget: TixComboBox<A NAME=14> </A></A></H2>
+<P>
+The <em>TixComboBox</em> widget is very similar to the ComboBox widgets
+ available in MS Windows and Motif 2.0. A TixComboBox consists of an entry
+ widget and a listbox widget. Usually, the ComboBox contains a list of
+ possible values for the user to select. The user may also choose an
+ alternative value by typing it in the entry widget. Figure 1-8
+ shows two ComboBoxes for the user to choose fonts and
+ character sizes. You can see fro the figure that a listbox is popped down
+ from the ComboBox for fonts for the user to choose among a list of
+ possible fonts.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/intro/combo.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html426 HREF=subsubsection3_3_4_1.html#SECTION00034100000000000000> Creating a TixComboBox Widget<A NAME=141> </A></A>
+<LI> <A NAME=tex2html427 HREF=subsubsection3_3_4_2.html#SECTION00034200000000000000> Controlling the Style of the TixComboBox<A NAME=142> </A></A>
+<LI> <A NAME=tex2html428 HREF=subsubsection3_3_4_3.html#SECTION00034300000000000000> Static Options<A NAME=143> </A></A>
+<LI> <A NAME=tex2html429 HREF=subsubsection3_3_4_4.html#SECTION00034400000000000000> Monitoring the User's Browsing Actions<A NAME=144> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_3_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+<HEAD>
+<TITLE> The TixSelect Widget<A NAME=15> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html478 HREF=subsubsection3_3_5_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html476 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html472 HREF=subsubsection3_3_4_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html480 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html479 HREF=subsubsection3_3_5_1.html> Creating A TixSelect </A>
+<B>Up:</B> <A NAME=tex2html477 HREF=section3_3.html> Introduction</A>
+<B> Previous:</B> <A NAME=tex2html473 HREF=subsubsection3_3_4_4.html> Monitoring the User's </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00035000000000000000> The TixSelect Widget<A NAME=15> </A></A></H2>
+<P>
+The TixSelect widget figure 1-10 provides you the same
+ kind of facility that is available with the Tk <tt>radiobutton</tt> and
+ <tt>checkbutton</tt> widgets. That is, TixSelect allows the user to
+ select one or a few values out of many choices. However, TixSelect
+ is superior because it allows you to layout the choices in much less
+ space than what is required by the Tk <tt>radiobutton</tt>
+ widgets. Also, TixSelect supports complicated selection
+ rules. Because of these reasons, TixSelect is a primary choice for
+ implementing toolbar buttons, which often have strict space
+ requirements and complicated selection rules.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/intro/select.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html481 HREF=subsubsection3_3_5_1.html#SECTION00035100000000000000> Creating A TixSelect Widget<A NAME=151> </A></A>
+<LI> <A NAME=tex2html482 HREF=subsubsectionstar3_3_5_2.html#SECTION00035200000000000000> Label and Orientation<A NAME=1511> </A></A>
+<LI> <A NAME=tex2html483 HREF=subsubsectionstar3_3_5_3.html#SECTION00035300000000000000> Creating the Button Subwidgets and Configuring
+Their Appearance<A NAME=1512> </A></A>
+<LI> <A NAME=tex2html484 HREF=subsubsectionstar3_3_5_4.html#SECTION00035400000000000000> Accessing the Button Subwidgets<A NAME=1513> </A></A>
+<LI> <A NAME=tex2html485 HREF=subsubsection3_3_5_5.html#SECTION00035500000000000000> Specifying Selection Rules<A NAME=152> </A></A>
+<LI> <A NAME=tex2html486 HREF=subsubsection3_3_5_6.html#SECTION00035600000000000000> Accessing the Value of a TixSelect Widget<A NAME=153> </A></A>
+<LI> <A NAME=tex2html487 HREF=subsubsection3_3_5_7.html#SECTION00035700000000000000> Specifying Complex Selection Rules<A NAME=154> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+<HEAD>
+<TITLE> TixNoteBook<A NAME=21> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html595 HREF=subsubsection3_4_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html593 HREF=section3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html587 HREF=section3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html597 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html596 HREF=subsubsection3_4_1_1.html> Adding Pages to </A>
+<B>Up:</B> <A NAME=tex2html594 HREF=section3_4.html> Container Widgets</A>
+<B> Previous:</B> <A NAME=tex2html588 HREF=section3_4.html> Container Widgets</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00041000000000000000> TixNoteBook<A NAME=21> </A></A></H2>
+<P>
+When your need to put a lot of information into your interface, you
+ may find out that your window has to grow intolerably big in order
+ to hold all the information. Having a window that's 10000
+ pixels wide and 5000 pixels high doesn't seem to be the perfect
+ solution. Of course, you can ``chop up'' your big window into a set
+ of smaller dialog boxes, but the user will most likely find it
+ impossible to manage 20 different dialog boxes on their desktop.
+<P>
+ The TixNoteBook (fig 2-1) widget comes into rescue. It
+ allows you to pack a large interface into manageable ``pages'' using a
+ notebook metaphor: it contains multiple pages with anything you want on
+ them, displays one at a time, and attaches a tab to each page so the user
+ can bring it forward with a single click on the tab.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/container/notebook.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html598 HREF=subsubsection3_4_1_1.html#SECTION00041100000000000000> Adding Pages to a TixNoteBook<A NAME=211> </A></A>
+<LI> <A NAME=tex2html599 HREF=subsubsection3_4_1_2.html#SECTION00041200000000000000> Keyboard Accelerators<A NAME=212> </A></A>
+<LI> <A NAME=tex2html600 HREF=subsubsection3_4_1_3.html#SECTION00041300000000000000> Delaying the Creation of New Pages<A NAME=213> </A></A>
+<LI> <A NAME=tex2html601 HREF=subsubsection3_4_1_4.html#SECTION00041400000000000000> Changing Page Tabs and Deleting Pages<A NAME=214> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,40 @@
+<HEAD>
+<TITLE> PanedWindow<A NAME=22> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html652 HREF=subsubsection3_4_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html650 HREF=section3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html644 HREF=subsubsection3_4_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html654 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html653 HREF=subsubsection3_4_2_1.html> Adding Panes Inside </A>
+<B>Up:</B> <A NAME=tex2html651 HREF=section3_4.html> Container Widgets</A>
+<B> Previous:</B> <A NAME=tex2html645 HREF=subsubsection3_4_1_4.html> Changing Page Tabs </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00042000000000000000> PanedWindow<A NAME=22> </A></A></H2>
+<P>
+The <em>TixPanedWindow</em> widget arranges arranges its subwidgets in
+ non-overlapping panes. As we can see in figure 2-4, the
+ PanedWindow widget puts a resize handle between the panes for the
+ user to manipulate the sizes of the panes interactively. The panes
+ can be arranged either vertically (figure 2-4) or
+ horizontally (2-4).
+<P>Each individual pane may have upper and lower limits of its
+ size. The user changes the sizes of the panes by dragging the resize
+ handle between two panes.
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/container/pane_vert.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/container/pane_horz.gif"><BR CLEAR=LEFT><CENTER>(Figure 2-4) The TixPane Widget<A NAME=24> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html655 HREF=subsubsection3_4_2_1.html#SECTION00042100000000000000> Adding Panes Inside a TixPanedWindow Widget<A NAME=221> </A></A>
+<LI> <A NAME=tex2html656 HREF=subsubsection3_4_2_2.html#SECTION00042200000000000000> Putting Widgets Inside the Panes<A NAME=222> </A></A>
+<LI> <A NAME=tex2html657 HREF=subsubsection3_4_2_3.html#SECTION00042300000000000000> Setting the Order of the Panes<A NAME=223> </A></A>
+<LI> <A NAME=tex2html658 HREF=subsubsection3_4_2_4.html#SECTION00042400000000000000> Changing the Sizes of the Panes<A NAME=224> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_4_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+<HEAD>
+<TITLE> The Family of Scrolled Widgets<A NAME=23> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html707 HREF=subsubsection3_4_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html705 HREF=section3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html701 HREF=subsubsection3_4_2_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html709 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html708 HREF=subsubsection3_4_3_1.html> The Scrolled Listbox </A>
+<B>Up:</B> <A NAME=tex2html706 HREF=section3_4.html> Container Widgets</A>
+<B> Previous:</B> <A NAME=tex2html702 HREF=subsubsection3_4_2_4.html> Changing the Sizes </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00043000000000000000> The Family of Scrolled Widgets<A NAME=23> </A></A></H2>
+<P>
+With plain Tcl/Tk, the widgets do not automatically come with
+ scrollbars. If you want to use scrollbars with the text, canvas or
+ listbox widgets, you will need to create scrollbars separately and
+ attach them to the widgets. This can be a lot of hassle because you
+ would almost always need scrollbars for these widgets. Sometimes you
+ will wonder why you need to write the same boring code again and
+ again just to get the scrollbars to working.
+<P>The Tix scrolled widgets are here to make your life easier. With a
+ single command such as <tt>tixScrolledListBox</tt> or <tt>tixScrolledText</tt>, you can create a listbox or text widget that comes
+ automatically with scrollbars attached.
+<P>Another advantage of the Tix scrolled widgets is that you can
+ specify their scrolling policy so that the scrollbars appear only
+ when they are needed. This feature is especially useful if you are
+ displaying a lot of widgets and running out of screen real estate.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html710 HREF=subsubsection3_4_3_1.html#SECTION00043100000000000000> The Scrolled Listbox Widget<A NAME=231> </A></A>
+<LI> <A NAME=tex2html711 HREF=subsubsection3_4_3_2.html#SECTION00043200000000000000> Other Scrolled Widgets<A NAME=232> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,46 @@
+<HEAD>
+<TITLE> tixTList - The Tix Tabular Listbox Widget<A NAME=31> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html762 HREF=subsection3_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html760 HREF=section3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html754 HREF=section3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html764 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html763 HREF=subsection3_5_2.html> Display Items</A>
+<B>Up:</B> <A NAME=tex2html761 HREF=section3_5.html> Tabular Listbox and </A>
+<B> Previous:</B> <A NAME=tex2html755 HREF=section3_5.html> Tabular Listbox and </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00051000000000000000> tixTList - The Tix Tabular Listbox Widget<A NAME=31> </A></A></H2>
+<P>
+<em>TixTList</em> is the Tabular Listbox Widget. It displays a list of
+ items in a tabular format. For example the TixTList widget in figure
+ 3-1 displays files in a directory in rows and columns.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/tlist/tlist.gif">
+ </CENTER>
+</blockquote>
+<P><blockquote> <P><CENTER><IMG SRC="../gif/tix/tlist/joe.gif">
+ </CENTER>
+</blockquote>
+<P>
+ TixTList does all what the standard Tk listbox widget can do, i.e,
+ it displays a list of items. However, TixTList is superior to the
+ listbox widget is many respects. First, TixTList allows you to
+ display the items in a two dimensional format. This way, you can
+ display more items at a time. Usually, the user can locate the
+ desired items much faster in a two dimensional list than the one
+ dimensional list displayed by the Tk listbox widget.
+<P>
+ In addition, while the Tk listbox widget can only display text items,
+ the TixTList widget can display a multitude of types of items: text,
+ images and widgets. Also, while you can use only one font and one color
+ in a listbox widget, you can use many different fonts and colors in a
+ TixTList widget. In figure 3-1, we use graphical images
+ inside a tixTList widget to represent file objects. In figure 3-2
+, we display the names of all employees of a hypothetical
+ company. Notice the use of a bold font to highlight all employees whose
+ first name is Joe. <P><HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,59 @@
+<HEAD>
+<TITLE> Display Items<A NAME=32> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html773 HREF=subsubsection3_5_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html771 HREF=section3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html765 HREF=subsection3_5_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html775 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html774 HREF=subsubsection3_5_2_1.html> Advantages of Display </A>
+<B>Up:</B> <A NAME=tex2html772 HREF=section3_5.html> Tabular Listbox and </A>
+<B> Previous:</B> <A NAME=tex2html766 HREF=subsection3_5_1.html> tixTList - The </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00052000000000000000> Display Items<A NAME=32> </A></A></H2>
+<P>
+Before we rush to discuss how to create the items inside a TixTList
+ widget, let's first spend some time on a very important topic about
+ the Tix library: the repationship between the display items and
+ their host widgets.
+<P>
+ We can better define the terms by taking a quick preview of the
+ TixHList widget, which will be covered in details in the next
+ chapter. Let's compare the items displayed on the two widgets in
+ figure 3-3. If we take a close look at the item
+ that shows the <tt>usr</tt> directory in the TixTList widget on the left
+ versus the TixHList widget on the right, we can see that this item
+ appears exactly the same on both widgets.
+<P>
+ If fact, all the items in these two widgets are of the <em>same</em> type:
+ they all display an image next to a textual name. The only difference
+ between these two widgets is how these items are arranged. The TixTList
+ widget arranges the items in rows and columns, while the TixHList widget
+ arranges the items in a hierachical format.
+<P>
+ With this observation in mind, we can see a separation of tasks
+ berween the widgets and the items they display. We call the TixHList
+ and TixTList widgets in figure 3-3 <em>host
+ widgets</em>: their task is to arrange the items according to their
+ particular rules. However, they don't really care what these items
+ display; they just treat the items as rectangle boxes. In contrast,
+ these items, which are called <em>display items</em> in Tix
+ terminology, controls the visual information they display, such as
+ the images, text strings, colors, fonts, etc. However, they don't
+ really care where on the host widget they will appear.
+<P>
+<blockquote> <P><P>
+<P><CENTER><IMG SRC="../gif/tix/tlist/widgets.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html776 HREF=subsubsection3_5_2_1.html#SECTION00052100000000000000> Advantages of Display Items<A NAME=321> </A></A>
+<LI> <A NAME=tex2html777 HREF=subsubsection3_5_2_2.html#SECTION00052200000000000000> Display Items and Display Styles<A NAME=322> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_5_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,28 @@
+<HEAD>
+<TITLE> Creating Display Items in the TixTList Widget<A NAME=33> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html804 HREF=subsubsection3_5_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html802 HREF=section3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html798 HREF=subsubsection3_5_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html806 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html805 HREF=subsubsection3_5_3_1.html> Creating Display Items</A>
+<B>Up:</B> <A NAME=tex2html803 HREF=section3_5.html> Tabular Listbox and </A>
+<B> Previous:</B> <A NAME=tex2html799 HREF=subsubsection3_5_2_2.html> Display Items and </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00053000000000000000> Creating Display Items in the TixTList Widget<A NAME=33> </A></A></H2>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html807 HREF=subsubsection3_5_3_1.html#SECTION00053100000000000000> Creating Display Items<A NAME=331> </A></A>
+<LI> <A NAME=tex2html808 HREF=subsubsection3_5_3_2.html#SECTION00053200000000000000> Setting the Styles of the Display Items<A NAME=332> </A></A>
+<LI> <A NAME=tex2html809 HREF=subsubsection3_5_3_3.html#SECTION00053300000000000000> Configuring and Deleting the Items<A NAME=333> </A></A>
+<LI> <A NAME=tex2html810 HREF=subsubsection3_5_3_4.html#SECTION00053400000000000000> Choosing the Orientation and Number of Rows or Columns<A NAME=334> </A></A>
+<LI> <A NAME=tex2html811 HREF=subsubsection3_5_3_5.html#SECTION00053500000000000000> Event Handling<A NAME=335> </A></A>
+<LI> <A NAME=tex2html812 HREF=subsubsection3_5_3_6.html#SECTION00053600000000000000> Selection<A NAME=336> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_6_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_6_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+<HEAD>
+<TITLE> TixHList - The Tix Hierarchical Listbox Widget<A NAME=41> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html902 HREF=subsubsection3_6_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html900 HREF=section3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html894 HREF=section3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html904 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html903 HREF=subsubsection3_6_1_1.html> Creating a Hierarchical </A>
+<B>Up:</B> <A NAME=tex2html901 HREF=section3_6.html> Hierarchical Listbox</A>
+<B> Previous:</B> <A NAME=tex2html895 HREF=section3_6.html> Hierarchical Listbox</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00061000000000000000> TixHList - The Tix Hierarchical Listbox Widget<A NAME=41> </A></A></H2>
+<P>
+<em>TixHList</em> is the Tix Hierarchical Listbox Widget. You can use it to
+ display any data that have a hierarchical structure. For example, the
+ HList widget in figure 4-1 displays a Unix file system
+ directory tree; the HList widget in figure 4-1 displays the
+ corporate hierarchy of a hypothetical company. As shown in these two
+ figures, the entries inside the TixHList widget are indented can be
+ optionally connected by branch lines according to their positions in the
+ hierarchy.
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/hlist/dirtree.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/hlist/hlist1.gif"><BR CLEAR=LEFT><CENTER>(Figure 4-1) Examples of the TixHList Widget<A NAME=41> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html905 HREF=subsubsection3_6_1_1.html#SECTION00061100000000000000> Creating a Hierarchical List<A NAME=411> </A></A>
+<LI> <A NAME=tex2html906 HREF=subsubsection3_6_1_2.html#SECTION00061200000000000000> Creating Entries in a HList Widget<A NAME=412> </A></A>
+<LI> <A NAME=tex2html907 HREF=subsubsection3_6_1_3.html#SECTION00061300000000000000> Controlling the Layout of the Entries<A NAME=413> </A></A>
+<LI> <A NAME=tex2html908 HREF=subsubsection3_6_1_4.html#SECTION00061400000000000000> Handling the Selection and User Event<A NAME=414> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_6_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_6_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,72 @@
+<HEAD>
+<TITLE> Creating Collapsible Tree Structures with TixTree<A NAME=42> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html957 HREF=section3_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html955 HREF=section3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html951 HREF=subsubsection3_6_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html959 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html958 HREF=section3_7.html> Selecting Files and </A>
+<B>Up:</B> <A NAME=tex2html956 HREF=section3_6.html> Hierarchical Listbox</A>
+<B> Previous:</B> <A NAME=tex2html952 HREF=subsubsection3_6_1_4.html> Handling the Selection </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00062000000000000000> Creating Collapsible Tree Structures with TixTree<A NAME=42> </A></A></H2>
+<P>
+The TixTree widget is based on the TixScrolledHList widget; you can
+ use it to create a collapsible hierarchical structure so that the
+ user can conveniently navigate through a large number of list
+ entries. As shown in figure 4-7, the TixTree puts
+ the little ``<tt>+</tt>'' and ``<tt>-</tt>'' icons next to the branches of
+ an HList entry that has descendants. These two icons are knows as
+ the open and close icons, respectively. When the user presses the
+ open icon next to an entry, its immediate children of an entry will
+ be displayed. Conversely, when the user presses the close icon, the
+ entry's children will become hidden.
+<P>
+ Program 4-6 shows how to create a collapsible tree. We
+ first create a TixTree widget. Then we add the entries in your
+ hierarchical structure into its <tt>hlist</tt> subwidget using the add
+ method of this subwidget. When we are finished with adding the entries,
+ we just call the <tt>autosetmode</tt> method of the TixTree widget, which
+ will automatically adds the open and close icons next to the entries who
+ have children.
+<P>
+<P><blockquote> <P><tt> set folder [tix getimage folder]<BR>
+tixTree .tree -command Command -options {<BR>
+ hlist.separator /<BR>
+ hlist.itemType imagetext<BR>
+ hlist.drawBranch true<BR>
+ hlist.indent 18<BR>
+}<BR>
+pack .tree -expand yes -fill both<BR>
+set hlist [.tree subwidget hlist]<BR>
+<BR>
+foreach directory {/ /usr /usr/bin /usr/local /etc /etc/rc.d} {<BR>
+ $hlist add $directory -image $folder -text $directory<BR>
+}<BR>
+.tree autosetmode<BR>
+<BR>
+proc Command {entry} {<BR>
+ puts "you have selected $entry"<BR>
+}</tt>
+<P></blockquote>
+<P><CENTER>(Figure 4-6) Creating a Collapsible Hierarchy<A NAME=46> </A>
+ </CENTER>
+<P>
+<blockquote> <P>
+<P><CENTER><IMG SRC="../gif/tix/hlist/hlist_ex3.gif">
+ </CENTER>
+</blockquote>
+<P>
+ Note that in program 4-6 we use the <tt>-command</tt> option of the TixTree
+ widget, not the <tt>-command</tt> option of its <tt>hlist</tt> subwidget. This
+ is because the TixTree actually used the <tt>-command</tt> option of its
+ <tt>hlist</tt> subwidget to process some low-level events. In general, if
+ both a mega-widget and its subwidget have the options of the same name,
+ you would always use the option that belongs to the mega-widget.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_7_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_7_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,41 @@
+<HEAD>
+<TITLE> File Selection Dialog Widgets<A NAME=51> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html986 HREF=subsubsection3_7_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html984 HREF=section3_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html978 HREF=section3_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html988 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html987 HREF=subsubsection3_7_1_1.html> Using the TixFileSelectDialog </A>
+<B>Up:</B> <A NAME=tex2html985 HREF=section3_7.html> Selecting Files and </A>
+<B> Previous:</B> <A NAME=tex2html979 HREF=section3_7.html> Selecting Files and </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00071000000000000000> File Selection Dialog Widgets<A NAME=51> </A></A></H2>
+<P>
+There are two file dialog widgets inside Tix: the
+ TixFileSelectDialog (figure 5-2) is similar to the
+ FileSelectionDialog widget in Motif; TixExFileSelectDialog (figure
+ 5-3) looks like its conunterpart in MS Windows. Both
+ widgets let the user navigate through the file system directories
+ and select a file.
+<P>
+ One advanced feature of both types of file selection boxes is they use
+ ComboBoxes to store the files, directories and patterns the user has
+ selected in the past. If the user wants to select the same files again,
+ he can simply open the ComboBoxes and click on his past inputs. This
+ saves a lot of keystrokes and is especially useful when the user needs to
+ switch among several files or directories.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html989 HREF=subsubsection3_7_1_1.html#SECTION00071100000000000000> Using the TixFileSelectDialog Widget<A NAME=511> </A></A>
+<LI> <A NAME=tex2html990 HREF=subsubsection3_7_1_2.html#SECTION00071200000000000000> The Subwidget in the TixFileSelectDialog<A NAME=512> </A></A>
+<LI> <A NAME=tex2html991 HREF=subsubsection3_7_1_3.html#SECTION00071300000000000000> The TixExFileSelectDialog Widget<A NAME=513> </A></A>
+<LI> <A NAME=tex2html992 HREF=subsubsection3_7_1_4.html#SECTION00071400000000000000> Specifying File Types for TixExFileSelectDialog<A NAME=514> </A></A>
+<LI> <A NAME=tex2html993 HREF=subsubsectionstar3_7_1_5.html#SECTION00071500000000000000> 5.1.5 The <b><tt>tix filedialog</tt></b> Command<A NAME=515> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_7_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_7_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,53 @@
+<HEAD>
+<TITLE> Selecting Directories with the TixDirTree and TixDirList Widgets<A NAME=52> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1053 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1051 HREF=section3_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1047 HREF=subsubsectionstar3_7_1_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1055 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1054 HREF=section3_8.html> Tix Object Oriented </A>
+<B>Up:</B> <A NAME=tex2html1052 HREF=section3_7.html> Selecting Files and </A>
+<B> Previous:</B> <A NAME=tex2html1048 HREF=subsubsectionstar3_7_1_5.html> 5.1.5 The tix </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00072000000000000000> Selecting Directories with the TixDirTree and TixDirList Widgets<A NAME=52> </A></A></H2>
+<P>
+There are two Tix widgets for selecting a directory: TixDirList (figure 5-6
+) and TixDirTree (figure 5-6). Both of them
+ display the directories in a hierarchical format. The display in the
+ TixDirList widget is more compact: it shows only the parent- and
+ child-directories of a particular directory. The TixDirTree widget, on
+ the other hand, can display the whole tree structure of the file system.
+<P>
+The programming interface of these two widgets are the same and you can
+ choose the which one to use depending on your application. As shown in
+ the following example, you can use the <tt>-directory</tt> option of the
+ TixDirList widget to specify a directory to display. In the example, we
+ set <tt>-directory</tt> to be <tt>/home/ioi/dev</tt>. As a result, the
+ TixDirList widget displays all the subdirectories and all the ancestor
+ directories of <tt>/home/ioi/dev</tt>. You can use the <tt>-command</tt> and
+ <tt>-browsecmd</tt> options to handle the user events: a double click or
+ Return key-stroke will trigger the <tt>-command</tt> option and a single
+ click or space bar key stroke will trigger the <tt>-browsecmd</tt>
+ option. Normally, you would handle both type of events in the same
+ manner, as we have done in program 5-5
+<P>
+<blockquote> <P><tt> tixDirList .d -value /home/ioi/dev <BR> -command "selectDir" -browsecmd "selectDir"<BR>
+pack .d<BR>
+<BR>
+proc selectDir {dir} {<BR>
+ puts "now you select $dir"<BR>
+}</tt>
+</blockquote>
+<P><CENTER>(Figure 5-5) Using the TixDirList widget<A NAME=55> </A>
+ </CENTER>
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/hlist/dirtree.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/hlist/dirlist.gif"><BR CLEAR=LEFT><CENTER>(Figure 5-6) The DirTree and DirList Widgets<A NAME=56> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,53 @@
+<HEAD>
+<TITLE> Introduction to Tix Object Oriented Programming<A NAME=61> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1096 HREF=subsubsection3_8_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1094 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1088 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1098 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1097 HREF=subsubsection3_8_1_1.html> Widget Classes and </A>
+<B>Up:</B> <A NAME=tex2html1095 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1089 HREF=section3_8.html> Tix Object Oriented </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00081000000000000000> Introduction to Tix Object Oriented Programming<A NAME=61> </A></A></H2>
+<P>
+Tix comes with a simple object oriented programming (OOP) framework,
+ the <em>Tix Intrinsics</em>, for writing mega-widgets. The Tix
+ Intrinsics is not a general purpose OOP system and it does not
+ support some features found in general purpose OOP systems such as
+ <tt>[incr Tcl]</tt>. However, the Tix Intrinsics is specially designed
+ for writing mega-widgets. It provides a simple and efficient
+ interface for creating mega-widgets so that you can avoid the
+ complexity and overheads of the general purpose OOP extensions to
+ Tcl.
+<P>The hard thing about programming with mega-widgets is to make sure
+ that each instance you create can handle its own activities. Events
+ must be directed to the right widget, procedures must act on data
+ that is internal to that widget, and users should be able to change
+ the options associated with the widget. For instance, we'll show an
+ arrow widget that needs to know what direction it's pointing; this
+ requires each instance of the widget to have its own variable.
+<P>Furthermore, each widget should respond properly to changes
+ requested by the application programmer during the program's run.
+ The whole reason people use Tcl/Tk is because they can alter things
+ on the fly.
+<P>The advantage of an object-oriented programming system is that you
+ can easily associate a widget with its own data and procedures
+ (methods). This chapter shows how to do that, and how to configure
+ data both at the time the widget is initialized and later during the
+ program.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html1099 HREF=subsubsection3_8_1_1.html#SECTION00081100000000000000> Widget Classes and Widget Instances<A NAME=611> </A></A>
+<LI> <A NAME=tex2html1100 HREF=subsubsection3_8_1_2.html#SECTION00081200000000000000> What is in a Widget Instance<A NAME=612> </A></A>
+<LI> <A NAME=tex2html1101 HREF=subsubsectionstar3_8_1_3.html#SECTION00081300000000000000> Variables<A NAME=6121> </A></A>
+<LI> <A NAME=tex2html1102 HREF=subsubsectionstar3_8_1_4.html#SECTION00081400000000000000> Methods<A NAME=6122> </A></A>
+<LI> <A NAME=tex2html1103 HREF=subsubsectionstar3_8_1_5.html#SECTION00081500000000000000> Component Widgets<A NAME=6123> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+<HEAD>
+<TITLE> Widget Class Declaration<A NAME=62> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1165 HREF=subsubsection3_8_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1163 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1157 HREF=subsubsectionstar3_8_1_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1167 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1166 HREF=subsubsection3_8_2_1.html> Using the tixWidgetClass </A>
+<B>Up:</B> <A NAME=tex2html1164 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1158 HREF=subsubsectionstar3_8_1_5.html> Component Widgets</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00082000000000000000> Widget Class Declaration<A NAME=62> </A></A></H2>
+<P>
+The first step of writing a new widget class is to decide the base
+ class from which the new class. Usually, if the new class does not
+ share any common features with other classes, it should be derived
+ from the TixPrimitive class. If it does share common features with
+ other classes, then it should be derived from the appropriate base
+ class. For example, if the new class support scrollbars, it should
+ be derived from TixScrolledWidget; if it displays a label next to
+ its ``main area'', then it should be derived from TixLabelWidget.
+<P>In the case of our new TixArrowButton class, it doesn't really share
+ any common features with other classes, so we decide to use the base
+ class TixPrimitive as its superclass.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html1168 HREF=subsubsection3_8_2_1.html#SECTION00082100000000000000> Using the tixWidgetClass Command<A NAME=621> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,82 @@
+<HEAD>
+<TITLE> Writing Methods<A NAME=63> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1186 HREF=subsubsection3_8_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1184 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1178 HREF=subsubsection3_8_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1188 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1187 HREF=subsubsection3_8_3_1.html> Declaring Public Methods</A>
+<B>Up:</B> <A NAME=tex2html1185 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1179 HREF=subsubsection3_8_2_1.html> Using the tixWidgetClass </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00083000000000000000> Writing Methods<A NAME=63> </A></A></H2>
+<P>
+After we have declared the new widget class, we can write methods
+ for this class to define its behavior. Methods are just a special
+ type of TCL procedures and they are created by the <tt>proc</tt>
+ command. There are, however, three requirements for methods. First,
+ their names must be prefixed by the command name of their
+ class. Second, they must accept at least one argument and the first
+ argument that they accept must be called <tt>w</tt>. Third, the first
+ command executed inside each method must be:
+<blockquote> <P><tt> upvar #0 $w data
+</tt>
+<P></blockquote>
+<P>For example, the following is an implementation of the invert method
+ for the class TixArrowButton:
+<P>
+<blockquote> <P><tt> proc tixArrowButton:invert {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ set curDirection $data(-direction)<BR>
+ case $curDirection {<BR>
+ n {<BR>
+ set newDirection s<BR>
+ }<BR>
+ s {<BR>
+ set newDirection n<BR>
+ }<BR>
+ # ....<BR>
+ }<BR>
+}</tt>
+<P></blockquote>
+<P>
+ Notice that the name of the method is prefixed by the command name
+ of the class (<tt>tixArrowButton</tt>). Also, the first and only
+ argument that it accepts is <tt>w</tt> and the first line it executes
+ is ``<tt>upvar #0 $wdata</tt>''.
+<P>
+ The argument <tt>w</tt> specifies which widget instance this method
+ should act upon. For example, if the user has issued the command
+<P>
+<blockquote> <P><tt> .up invert
+</tt>
+<P></blockquote>
+ on an instance <tt>.up</tt> of the class tixArrowButton, the method
+ <tt>tixArrowButton:invert</tt> will be called and the argument <tt>w</tt>
+ will have the value <tt>.up</tt>.
+<P>
+ The <tt>invert</tt> method is used to invert the direction of the
+ arrow. Therefore, it should examine the variable <tt>.up(-direction)</tt>, which stores the current direction of the instance
+ <tt>.up</tt>, and modify it appropriately. It turns out that in TCL,
+ the only clean way to access an array whose name is stored in a
+ variable is the ``<tt>upvar #0 $wdata</tt>'' technique: essentially
+ it tells the intepreter that the array data should be an alias for
+ the global array whose name is stored in <tt>$w</tt>. We will soon see
+ how the widget's methods use the data array.
+<P>
+ Once the mysterious ``<tt>upvar #0 $wdata</tt>'' line is explained,
+ it becomes clear what the rest of the <tt>tixArrowButton:invert</tt>
+ method does: it examines the current direction of the arrow, which
+ is stored in <tt>$data(-direction)</tt> and inverts it.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html1189 HREF=subsubsection3_8_3_1.html#SECTION00083100000000000000> Declaring Public Methods<A NAME=631> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,33 @@
+<HEAD>
+<TITLE> Standard Initialization Methods<A NAME=64> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1207 HREF=subsubsection3_8_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1205 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1199 HREF=subsubsection3_8_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1209 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1208 HREF=subsubsection3_8_4_1.html> The InitWidgetRec Method</A>
+<B>Up:</B> <A NAME=tex2html1206 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1200 HREF=subsubsection3_8_3_1.html> Declaring Public Methods</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00084000000000000000> Standard Initialization Methods<A NAME=64> </A></A></H2>
+<P>
+Each new mega-widget class must supply three standard initialization
+ methods. When an instance of a Tix widget is created, three
+ three methods will be called to initialize this instance. The
+ methods are <tt>InitWidgetRec</tt>, <tt>ConstructWidget</tt> and <tt>SetBindings</tt> and they will be called in that order. The following
+ sections show how these methods can be implemented.
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html1210 HREF=subsubsection3_8_4_1.html#SECTION00084100000000000000> The InitWidgetRec Method<A NAME=641> </A></A>
+<LI> <A NAME=tex2html1211 HREF=subsubsectionstar3_8_4_2.html#SECTION00084200000000000000> Chaining Methods<A NAME=6411> </A></A>
+<LI> <A NAME=tex2html1212 HREF=subsubsectionstar3_8_4_3.html#SECTION00084300000000000000> The tixChainMethod call<A NAME=6412> </A></A>
+<LI> <A NAME=tex2html1213 HREF=subsubsection3_8_4_4.html#SECTION00084400000000000000> The ConstructWidget Method<A NAME=642> </A></A>
+<LI> <A NAME=tex2html1214 HREF=subsubsection3_8_4_5.html#SECTION00084500000000000000> The SetBindings Method<A NAME=643> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,82 @@
+<HEAD>
+<TITLE> Declaring and Using Variables<A NAME=65> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1276 HREF=subsubsection3_8_5_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1274 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1268 HREF=subsubsection3_8_4_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1278 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1277 HREF=subsubsection3_8_5_1.html> Initialization of Public </A>
+<B>Up:</B> <A NAME=tex2html1275 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1269 HREF=subsubsection3_8_4_5.html> The SetBindings Method</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00085000000000000000> Declaring and Using Variables<A NAME=65> </A></A></H2>
+<P>
+The private variables of a widget class do not need to be
+ declared. In fact they can be initialized and used anywhere by any
+ method. Usually, however, general purpose private variables are
+ initialized by the <tt>InitWidgetRec</tt> method and subwidget
+ variables are initialized in the <tt>ConstructWidget</tt> method.
+<P>We have seen in the <tt>tixArrowButton:InitWidgetRec</tt> example that
+ the private variable <tt>data(count)</tt> was initialized there. Also,
+ the private variable <tt>data(w:button)</tt> was initialized in <tt>tixArrowButton:ConstructWidget</tt> and subsequently used in <tt>tixArrowButton:SetBindings</tt>.
+<P>In contrast, public variables must be declared inside the class
+ declaration. The following arguments are used to declare the public
+ variables and specify various options for them:
+<P>
+<blockquote> <UL><P><LI><P><tt>-flag</tt>: As shown in the class declaration in figure
+ 6-2, the <tt>-flag</tt> argument declares all the public
+ variables of the TixArrowButton class, <tt>-direction</tt> and <tt>-state</tt>
+<P><LI><P><tt>-configspec</tt>: We can use the <tt>-configspec</tt> argument to
+ specify the details of each public variable. For example, the
+ following declaration
+<P>
+<blockquote> <P><tt> -configspec {<BR>
+ {-direction direction Direction e}<BR>
+ {-state state State normal}<BR>
+}</tt>
+<P></blockquote>
+<P>specifies that the <tt>-direction</tt> variable has the resource
+ name <tt>direction</tt> and resource class <tt>Direction</tt>; its default
+ value is <tt>e</tt>. The application programmer can assign value to
+ this variable by using the <tt>-direction</tt> option in the command
+ line or by specifying resources in the Tk option database with its
+ resource name or class. The declaration of <tt>-state</tt> installs
+ similar definitions for that variable.
+<P><LI><P><tt>-alias</tt>: The <tt>-alias</tt> argument is used to specify
+ alternative names for public variables. In our example, the setting
+<P>
+<blockquote> <P><tt> -alias {<BR>
+ {-dir -direction}<BR>
+}</tt>
+<P></blockquote>
+<P>specifies that <tt>-dir</tt> is the same variable as <tt>-direction</tt>. Therefore, when the application issue the command
+<P>
+<blockquote> <P><tt> .up config -dir w
+</tt>
+<P></blockquote>
+<P>it is the same as issuing
+<P>
+<blockquote> <tt> .up config -direction w
+</tt>
+<P></blockquote>
+<P>
+ The <tt>-alias</tt> option provides only an alternative name for
+ the application programmer. Inside the widget's implementation code,
+ the variable is still accessed as <tt>data(-direction)</tt>, <em>not</em>
+ <tt>data(-dir)</tt>.
+<P></UL>
+</blockquote>
+<P>
+<HR>
+<UL>
+<LI> <A NAME=tex2html1279 HREF=subsubsection3_8_5_1.html#SECTION00085100000000000000> Initialization of Public Variables<A NAME=651> </A></A>
+<LI> <A NAME=tex2html1280 HREF=subsubsectionstar3_8_5_2.html#SECTION00085200000000000000> Type Checker<A NAME=6511> </A></A>
+<LI> <A NAME=tex2html1281 HREF=subsubsection3_8_5_3.html#SECTION00085300000000000000> Public Variable Configuration Methods<A NAME=652> </A></A>
+<LI> <A NAME=tex2html1282 HREF=subsubsectionstar3_8_5_4.html#SECTION00085400000000000000> Configuration Methods and Public Variable Initialization<A NAME=6521> </A></A>
+</UL>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_6.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_6.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,42 @@
+<HEAD>
+<TITLE> Summary of Widget Instance Initialization<A NAME=66> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1333 HREF=subsection3_8_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1331 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1325 HREF=subsubsectionstar3_8_5_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1335 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1334 HREF=subsection3_8_7.html> Loading the New </A>
+<B>Up:</B> <A NAME=tex2html1332 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1326 HREF=subsubsectionstar3_8_5_4.html> Configuration Methods and </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00086000000000000000> Summary of Widget Instance Initialization<A NAME=66> </A></A></H2>
+<P>
+The creation of a widget instance is a complex process. You must
+ understand how it works in order to write your widget classes. The
+ following is the steps taken by the Tix Intrinsics when a widget
+ instance is created:
+<P>
+<blockquote> <UL><P><LI><P>When the user creates an instance, the public variables are
+ intilized as discussed in section 6.5.1. Type checkers
+ are always called if they are specified. Configuration methods are
+ called only if they are specified in the <tt>-forcecall</tt> section.
+<P><LI><P>The <tt>InitWidgetRec</tt> method is called. It should initialize
+ private variable, possibly according to the values the public
+ variables.
+<P><LI><P>The <tt>ConstructWidget</tt> method is called. It should create the
+ component widgets. It should also store the names of public
+ subwidgets into the subwidget variables.
+<P><LI><P>The <tt>SetBinding</tt> method is called. It should create bindings for
+ the component widgets.
+<P></UL>
+</blockquote>
+<P>
+ After the above steps, the creation of the instance is complete and the
+ user can iterate with it using its widget command.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_7.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsection3_8_7.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+<HEAD>
+<TITLE> Loading the New Classes<A NAME=67> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif_gr.gif"> <A NAME=tex2html1340 HREF=section3_8.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1336 HREF=subsection3_8_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1342 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B>Up:</B> <A NAME=tex2html1341 HREF=section3_8.html> Tix Object Oriented </A>
+<B> Previous:</B> <A NAME=tex2html1337 HREF=subsection3_8_6.html> Summary of Widget </A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00087000000000000000> Loading the New Classes<A NAME=67> </A></A></H2>
+<P>
+Usually, you can use a separate script file to store the
+ implementaion of each new widget class. If you have several of those
+ files, it will be a good idea to group the files into a single
+ directory and create a <tt>tclIndex</tt> file for them so that the new
+ classes can be auto-loaded.
+<P>
+ Suppose you have put the class files into the directory <tt>/usr/my/tix/classes</tt>. You can create the <tt>tclIndex</tt> file using
+ the <tt>tools/tixindex</tt> program that comes with Tix:
+<P>
+<blockquote> <P><tt> cd /usr/my/tix/classes<BR>
+/usr/my/Tix8.1/tools/tixindex *.tcl
+</tt>
+<P></blockquote>
+ The <tt>tclIndex</tt> file must be created by the <tt>tixindex</tt>
+ program. You cannot use the standard <tt>auto_mkindex</tt> command
+ that comes with Tcl.
+<P>
+ Once you have created the <tt>tclIndex</tt> file, you can use your new
+ widget classes by auto-loading. Here is a small demo program that
+ uses the new TixArrowButton class:
+<P>
+<blockquote> <P><tt> #!/usr/local/bin/tixwish<BR>
+lappend auto_path /usr/my/tix/classes<BR>
+<BR>
+# Now I can use my TixArrowButton class!<BR>
+#<BR>
+tixArrowButton .arr -direction n<BR>
+pack .arr
+</tt>
+<P></blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,27 @@
+<HEAD>
+<TITLE> About This Manual<A NAME=01> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html169 HREF=subsectionstar3_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html167 HREF=sectionstar3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html161 HREF=sectionstar3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html171 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html170 HREF=subsectionstar3_2_2.html> About This Document</A>
+<B>Up:</B> <A NAME=tex2html168 HREF=sectionstar3_2.html> Preface</A>
+<B> Previous:</B> <A NAME=tex2html162 HREF=sectionstar3_2.html> Preface</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00021000000000000000> About This Manual<A NAME=01> </A></A></H2>
+<P>
+ This manual is the programmer's guide to the Tix library. It takes you
+though a step-by-step tutorial about the different widgets and functions
+available in the Tix library. It also covers how to write new widgets using
+the Tix Intrinsics objecr-oriented programming interface. The accompanying
+<em>Tix Reference Manual</em> is a collection of the Tix manual pages. It
+describes all the options and other details of the Tix widgets and
+functions.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,25 @@
+<HEAD>
+<TITLE> About This Document<A NAME=02> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html180 HREF=subsectionstar3_2_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html178 HREF=sectionstar3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html172 HREF=subsectionstar3_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html182 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html181 HREF=subsectionstar3_2_3.html> Organization of This </A>
+<B>Up:</B> <A NAME=tex2html179 HREF=sectionstar3_2.html> Preface</A>
+<B> Previous:</B> <A NAME=tex2html173 HREF=subsectionstar3_2_1.html> About This Manual</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00022000000000000000> About This Document<A NAME=02> </A></A></H2>
+<P>
+This HTML document is converted from LaTeX source files to HTML by a
+modified version of latex2html.
+<P>
+This document is also available both pdf and HTML format from
+<A HREF="http://tix.sourceforge.net">http://tix.sourceforge.net</A>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsectionstar3_2_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,34 @@
+<HEAD>
+<TITLE> Organization of This Manual<A NAME=03> </A><A NAME=04> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html189 HREF=section3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html187 HREF=sectionstar3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html183 HREF=subsectionstar3_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html191 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html190 HREF=section3_3.html> Introduction</A>
+<B>Up:</B> <A NAME=tex2html188 HREF=sectionstar3_2.html> Preface</A>
+<B> Previous:</B> <A NAME=tex2html184 HREF=subsectionstar3_2_2.html> About This Document</A>
+<HR> <P>
+<A NAME=Contents> </A><H2><A NAME=SECTION00023000000000000000> Organization of This Manual<A NAME=03> </A><A NAME=04> </A></A></H2>
+<P>
+ Chapter 1, <em>Introduction</em> gets you started with the
+ Tix widgets by describing their basic options and
+ operations. Chapter 2, <em>Container Widgets</em>,
+ describes the Tix widgets that can be used to contain other widgets
+ and maintain their geometry. Chapter 3, <em>TList
+ Widget and Display Items</em>, describes the tabular listbox widget and
+ the Tix display items, which are used by many Tix widgets. Chapter
+ 4, <em>Hierarchical Listbox</em>, describes how to create
+ a hierarchical list structure using the TixHList widget. Chapter
+ 5, <em>Selection Files and Directories</em>, describes
+ how to use the file and directory selection widgets in the Tix
+ library. Finally, Chapter 6, <em>Tix Object Oriented
+ Programming</em>, describes how to use the Tix object oriented
+ programming library to create new classes of Tix widgets.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_1_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_1_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,59 @@
+<HEAD>
+<TITLE> Tix for Application Programmers<A NAME=111> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html253 HREF=subsubsection3_3_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html251 HREF=subsection3_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html245 HREF=subsection3_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html255 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html254 HREF=subsubsection3_3_1_2.html> Tix for Widget </A>
+<B>Up:</B> <A NAME=tex2html252 HREF=subsection3_3_1.html> What is Tix</A>
+<B> Previous:</B> <A NAME=tex2html246 HREF=subsection3_3_1.html> What is Tix</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00031100000000000000> Tix for Application Programmers<A NAME=111> </A></A></H3>
+<P>
+The acronym Tix stands for Tk Interface Extension. Tix is different
+ things for different people.
+<P>
+If you are a GUI application programmer, that is, if you earn a
+ living by building graphical applications, you will appreciate Tix
+ as a library of <em>mega-widgets</em>: widgets made out of other
+ widgets. To use a crude analogy, if the widgets in the standard TK
+ library are bricks and mortars for a builder, the mega-widgets in
+ the Tix library are walls, windows or even pre-build kitchens. Of
+ course, these ``bigger components'' are themselves made of bricks
+ and mortars, but it will take much less effort to put them together
+ than planting bricks on top of each other.
+<P>
+The Tix widgets not only help you speed up the development of your
+ applications, they also help you in the design process. Since the
+ standard Tk widgets are too primitive, they force you to think of
+ your house as, by using the same analogy, millions of bricks. With
+ the help of the Tix mega-widgets, you can design your application is
+ a more structural and coherent manner.
+<P>
+Moreover, the Tix library provides a rich set of widgets. Figure
+ 1-1 shows all Tix widgets - there are more than 40
+ of them! Although the standard Tk library has many useful widgets,
+ they are far from complete. The Tix library provides most of the
+ commonly needed widgets that are missing from standard Tk:
+ FileSelectBox, ComboBox, Control (a.k.a. SpinBox) and an assortment
+ of scroll-able widgets. Tix also includes many more widgets that are
+ generally useful in a wide range of applications: NoteBook,
+ FileEntry, PanedWindow, MDIWindow, etc.
+<P>
+With all these new widgets, you can introduce new interaction
+ techniques into applications, creating more useful and more
+ intuitive user interfaces. You can design your application by
+ choosing the most appropriate widgets to match the special needs of
+ your application and users.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/intro/hierarchy.png">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_1_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_1_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+<HEAD>
+<TITLE> Tix for Widget Developers<A NAME=112> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html262 HREF=subsection3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html260 HREF=subsection3_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html256 HREF=subsubsection3_3_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html264 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html263 HREF=subsection3_3_2.html> Getting Started: the </A>
+<B>Up:</B> <A NAME=tex2html261 HREF=subsection3_3_1.html> What is Tix</A>
+<B> Previous:</B> <A NAME=tex2html257 HREF=subsubsection3_3_1_1.html> Tix for Application </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00031200000000000000> Tix for Widget Developers<A NAME=112> </A></A></H3>
+<P>
+On the other hand, if you are a widget developer, Tix provides an
+ object oriented programming environment, the Tix Intrinsics, that is
+ carefully designed for the development of mega-widgets. If you have
+ developed widgets in C, you will know how slow and painful such a
+ process would be. In recognition of the difficulties in widget
+ development, the Tix Intrinsics includes many tools that
+ dramatically cuts down the efforts required to develop new widgets.
+ With the Tix Intrinsics, the rapid prototyping/development of
+ widgets is finally feasible: you can write a new widgets in the
+ matter of hours or even minutes.
+<P>
+With the Tix Intrinsics, you widget code can readily become
+ reusable. Tix also provides a set of rules and mechanisms that
+ allow you to develop widgets that are inter-operable with other
+ widgets.
+<P>
+In Part I of this manual, we will talk about using the Tix widgets.
+ The discussion of writing new Tix widgets will be carried out in
+ Part II.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,71 @@
+<HEAD>
+<TITLE> Creating a TixControl Widget<A NAME=121> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html288 HREF=subsubsection3_3_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html286 HREF=subsection3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html280 HREF=subsection3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html290 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html289 HREF=subsubsection3_3_2_2.html> Accessing The Value </A>
+<B>Up:</B> <A NAME=tex2html287 HREF=subsection3_3_2.html> Getting Started: the </A>
+<B> Previous:</B> <A NAME=tex2html281 HREF=subsection3_3_2.html> Getting Started: the </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00032100000000000000> Creating a TixControl Widget<A NAME=121> </A></A></H3>
+<P>
+The following code demonstrates how to create a TixControl widget and
+ specify its options:
+<P>
+<tt> tixControl .lawyers -label Lawyers: -max 10 -min 0<BR>
+ .lawyers config -integer true -step 2
+</tt>
+<P>
+This example creates a TixControl widget that let us to select the
+ numbers of lawyers we wish to be allowed in this country. (Figure
+ 1-2)
+<P>
+Let us examine the options: the <tt>-label</tt> option specifies a
+ caption for this widget. The <tt>-max</tt> option specifies the maximum
+ number of lawyers we can choose. The <tt>-min</tt> option specifies the
+ minimum number of lawyers we can choose: although we would love to
+ enter a negative number, reality dictate that the lower limit must
+ be zero. The <tt>-integer</tt> option indicates that the number of
+ lawyers must be an integer; that is, we respect the lawyers' rights
+ not to be chopped up into decimal points. Finally, since lawyers
+ seem to go in pairs, we set the <tt>-step</tt> option to <tt>2</tt>, which
+ indicates that when we press the up/down arrow buttons, we want the
+ number of lawyers to go up and down by two each time.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/intro/lawyer.gif">
+ </CENTER>
+</blockquote>
+<P>
+As shown in the example, you can create and manipulate a Tix widget
+ in the same manner as the standard Tk widgets. The options of the
+ widget can be specified during the creation of the widget.
+ Alternatively, they can be changed by the <tt>configure</tt> widget
+ command. In addition, options can also be specified in the option
+ database or as X resources. Here is an example that produces the
+ same result as the previous code fragment:
+<P>
+<tt> option add *lawyers.max 10<BR>
+ option add *lawyers.min 0<BR>
+ tixControl .lawyers -label Lawyers: -integer true<BR>
+ .lawyers config -step 2
+</tt>
+<P>
+In figure 1-3, you can see the composition of
+ TixControl: it is made out of a label widget, an entry widget and
+ two button widgets. Widgets that are composed of other widgets, like
+ TixControl, are called <em>mega-widgets</em>. Most widgets in the Tix
+ library are mega-widgets (xx: and as you know this book is about
+ them!).
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/intro/law_comp.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,51 @@
+<HEAD>
+<TITLE> Accessing The Value of a TixControl Widget<A NAME=122> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html299 HREF=subsubsectionstar3_3_2_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html297 HREF=subsection3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html291 HREF=subsubsection3_3_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html301 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html300 HREF=subsubsectionstar3_3_2_3.html> Disabling Callbacks Temporarily</A>
+<B>Up:</B> <A NAME=tex2html298 HREF=subsection3_3_2.html> Getting Started: the </A>
+<B> Previous:</B> <A NAME=tex2html292 HREF=subsubsection3_3_2_1.html> Creating a TixControl </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00032200000000000000> Accessing The Value of a TixControl Widget<A NAME=122> </A></A></H3>
+<P>
+The TixControl widget allows the user to input a value. There are
+ several ways to read this value in your program. First of all,
+ TixControl stores the current value in the <tt>-value</tt> option. You
+ can use query the <tt>-value</tt> option by calling the command
+<P>
+<tt> .c cget -value
+</tt>
+this command will return the current value of the tixContro widget
+ <tt>.c</tt>. The following command sets the value of the widget to a
+ new number (100):
+<P>
+<tt> .c config -value 100
+</tt>
+<P>
+The second way to access the value of TixControl is to use the <tt>-variable</tt> option. This options instructs the TixControl widget to
+ store the its value into a global variable so that you can read it
+ at any time. Also, by assigning a new value to this global variable,
+ you can change the value of the TixControl widget. Here is an
+ example:
+<P>
+<tt> .c config -variable myvar<BR>
+ set myvar 100
+</tt>
+<P>
+ In some situations, you may want to be informed immediately when the
+ value of the TixControl widget changes. To accomplish this, you can use
+ the <tt>-command</tt> option. The following line causes the TCL procedure
+ <tt>valueChanged</tt> to be called whenever the value of <tt>.c</tt> changes:
+<P>
+<tt> tixControl .c -command valueChanged
+</tt>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_2_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+<HEAD>
+<TITLE> Validating User Inputs<A NAME=123> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html319 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html317 HREF=subsection3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html313 HREF=subsubsectionstar3_3_2_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html321 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html320 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B>Up:</B> <A NAME=tex2html318 HREF=subsection3_3_2.html> Getting Started: the </A>
+<B> Previous:</B> <A NAME=tex2html314 HREF=subsubsectionstar3_3_2_3.html> Disabling Callbacks Temporarily</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00032400000000000000> Validating User Inputs<A NAME=123> </A></A></H3>
+<P>
+Sometimes it may be necessary to check the user input against certain
+ criteria. For example, you may want to allow only even numbers in a
+ TixControl widget. To do this, you can use the <tt>-validatecmd</tt> option,
+ which specifies a Tcl command to call whenever the user enters a new
+ value. Here is an example:
+<P>
+<tt> tixControl .c -value 0 -step 2 -validatecmd evenOnly<BR>
+<BR>
+ proc evenOnly {value} {<BR>
+ return [expr $value - ($value %2)]<BR>
+ }</tt>
+<P>
+The value parameter to <tt>evenOnly</tt> is the new value entered by
+ the user. The <tt>evenOnly</tt> procedure makes sure that the new
+ value is even by returning a modified, even number. The Tcl command
+ specified by the <tt>-validatecmd</tt> must return a value which it
+ deems valid and this value will be stored in the <tt>-value</tt> option
+ of the TixControl widget.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,27 @@
+<HEAD>
+<TITLE> Subwidgets<A NAME=131> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html348 HREF=subsubsection3_3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html346 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html340 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html350 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html349 HREF=subsubsection3_3_3_2.html> Subwidget Names</A>
+<B>Up:</B> <A NAME=tex2html347 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html341 HREF=subsection3_3_3.html> Accessing The Components </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033100000000000000> Subwidgets<A NAME=131> </A></A></H3>
+<P>
+As we have seen in section 1.2.1, the TixControl
+ widget is composed of several widgets: one label widget, one entry
+ widget and two button widgets. These ``widgets inside mega-widgets''
+ are called <em>subwidgets</em> in the Tix terminology. We will often
+ have the need to access these subwidgets. For example, sometimes we
+ need to change the configuration options of the subwidgets. In other
+ cases, we may need to interact with the subwidgets directly.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,30 @@
+<HEAD>
+<TITLE> Subwidget Names<A NAME=132> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html359 HREF=subsubsection3_3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html357 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html351 HREF=subsubsection3_3_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html361 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html360 HREF=subsubsection3_3_3_3.html> The subwidget Method</A>
+<B>Up:</B> <A NAME=tex2html358 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html352 HREF=subsubsection3_3_3_1.html> Subwidgets</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033200000000000000> Subwidget Names<A NAME=132> </A></A></H3>
+<P>
+Each subwidget inside a mega is identified by a <em>subwidget
+ name</em>. Naturally, the label and entry subwidgets inside a TixSelect
+ widget are called <tt>label</tt> and <tt>entry</tt>, respectively. The two
+ button widgets are called <tt>incr</tt> and <tt>decr</tt> because they are
+ used to <tt>incr</tt>ement and <tt>decr</tt>ement the value inside the
+ TixControl widget (see figure 1-4).
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/intro/ctl_subw.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,63 @@
+<HEAD>
+<TITLE> The <tt>subwidget</tt> Method<A NAME=133> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html370 HREF=subsubsection3_3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html368 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html362 HREF=subsubsection3_3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html372 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html371 HREF=subsubsection3_3_3_4.html> Chaining the subwidget </A>
+<B>Up:</B> <A NAME=tex2html369 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html363 HREF=subsubsection3_3_3_2.html> Subwidget Names</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033300000000000000> The <tt>subwidget</tt> Method<A NAME=133> </A></A></H3>
+<P>
+All Tix mega-widgets support the <tt>subwidget</tt> method. This method
+ takes at least one argument, the name of a subwidget. When you pass
+ only one argument to this method, it returns the pathname of the
+ subwidget which is identified by that name. For example, if .c is
+ the pathname of a TixControl widget, the command:
+<P>
+<blockquote> <tt> .c subwidget entry
+</tt>
+</blockquote>
+<P>
+returns the pathname of the <tt>entry</tt> subwidget, which is <tt>.c.frame.entry</tt> in this case.
+<P>
+If you call the <tt>subwidget</tt> method with additional arguments, the
+ widget command of the specified subwidget will be called with these
+ arguments. For example, if <tt>.c</tt> is, again, the pathname of a
+ TixControl widget, the command:
+<P>
+<blockquote> <tt> .c subwidget entry configure -bg gray
+</tt>
+</blockquote>
+<P>
+will cause the widget command of the <tt>entry</tt> subwidget of <tt>.c</tt> to be called with the arguments <tt>configure -bg gray</tt>. So
+ actually this command will be translated into the following call:
+<P>
+<blockquote> <tt> .c.frame.entry configure -bg gray
+</tt>
+</blockquote>
+<P>
+which calls the <tt>configure</tt> method of the <tt>entry</tt> subwidget
+ with the arguments <tt>-bg gray</tt> and changes its background color
+ to <tt>gray</tt>.
+<P>
+We can call the <tt>subwidget</tt> method with other types of arguments
+ to access different methods of the specified subwidget. For example,
+ the following call:
+<P>
+<blockquote> <tt> .c subwidget entry icursor end
+</tt>
+</blockquote>
+<P>
+calls the <tt>icursor</tt> method of the <tt>entry</tt> subwidget with the
+ argument <tt>end</tt> and sets the insert cursor of the <tt>entry</tt>
+ subwidget to the end of its input string.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,42 @@
+<HEAD>
+<TITLE> Chaining the <tt>subwidget</tt> Method<A NAME=134> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html381 HREF=subsubsection3_3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html379 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html373 HREF=subsubsection3_3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html383 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html382 HREF=subsubsection3_3_3_5.html> Configuring Subwidget Options </A>
+<B>Up:</B> <A NAME=tex2html380 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html374 HREF=subsubsection3_3_3_3.html> The subwidget Method</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033400000000000000> Chaining the <tt>subwidget</tt> Method<A NAME=134> </A></A></H3>
+<P>
+Some Tix mega-widgets may have subwidgets that in turn contain
+ subwidgets. For example, the TixExFileSelectDialog (section
+ 5.1.3) widget contains a TixExFileSelectBox subwidget
+ called <tt>fsbox</tt>, which in turn contains a TixComboBox (section
+ 1.4) subwidget called <tt>dir</tt>. If we want to access
+ the <tt>dir</tt> subwidget, we can just ``chain'' the <tt>subwidget</tt>
+ method. For example, if we have a TixExFileSelectDialog called <tt>.file</tt>, the following command will return the pathname of the <tt>dir</tt> subwidget of the <tt>fsbox</tt> subwidget of <tt>.file</tt>:
+<P>
+<blockquote> <tt> .file subwidget fsbox subwidget dir
+</tt>
+</blockquote>
+<P>
+Moreover, the following command configures the <tt>dir</tt> subwidget to
+ have a border of the groove type with a border width of 2 pixels:
+<P>
+<blockquote> <tt> .file subwidget fsbox subwidget dir configure -bd 2 -relief groove
+</tt>
+</blockquote>
+<P>
+The chaining of the subwidget command can be applied for arbitrarily
+ many levels, depending whether your widget has a subwidget that has
+ a subwidget that has a subwidget that has a subwidget ... and so on.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,84 @@
+<HEAD>
+<TITLE> Configuring Subwidget Options Using the <tt>-options</tt> Switch<A NAME=135> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html392 HREF=subsubsection3_3_3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html390 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html384 HREF=subsubsection3_3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html394 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html393 HREF=subsubsection3_3_3_6.html> Configuring Subwidget Options </A>
+<B>Up:</B> <A NAME=tex2html391 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html385 HREF=subsubsection3_3_3_4.html> Chaining the subwidget </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033500000000000000> Configuring Subwidget Options Using the <tt>-options</tt> Switch<A NAME=135> </A></A></H3>
+<P>
+As we have seen above, we can use commands like ``<tt>subwidget</tt> <em>name</em> <tt>configure ...</tt>'' to set the configuration options of
+ subwidgets. However, this can get quite tedious if we want to configure
+ many options of many subwidgets.
+<P>
+There is a more convenient and terse way to configure the subwidget options
+ without using the <tt>subwidget</tt> method: the <tt>-options</tt> switch. All
+ Tix mega-widgets support the <tt>-option</tt> switch, which can be used
+ during the creation of the mega-widget.
+<P>
+<blockquote> <tt> tixControl .income -label "Income: " -variable income -options {<BR>
+ label.width 8<BR>
+ label.anchor e<BR>
+ entry.width 10<BR>
+ entry.borderWidth 3<BR>
+}<BR>
+tixControl .age -label "Age: " -variable age -options {<BR>
+ label.width 8<BR>
+ label.anchor e<BR>
+ entry.width 10<BR>
+ entry.borderWidth 3<BR>
+}<BR>
+pack .income .age -side top
+</tt>
+</blockquote>
+<P><CENTER>(Figure 1-5) Using the <tt>-options</tt> switch<A NAME=15> </A>
+ </CENTER>
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/intro/ctl_noopt.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/intro/ctl_wopt.gif"><BR CLEAR=LEFT><CENTER>(Figure 1-6) Using the <tt>-options</tt> Switch to Align the Labels<A NAME=16> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+The use of the <tt>-options</tt> switch is illustrated in program
+ 1-5, which creates two TixControl widgets for
+ the user to enter his income and age. Because of the different sizes
+ of the labels of these two widgets, if we create them haphazardly,
+ the output may look like fig 1-6.
+<P>
+To avoid this problem, we set the width of the <tt>label</tt>
+ subwidgets of the <tt>.income</tt> and <tt>.age</tt> widgets to be the
+ same (8 characters wide) and set their <tt>-anchor</tt> option to <tt>e</tt> (flushed to right), so that the labels appear to be
+ well-aligned. Program 1-5 also does other
+ things such as setting the <tt>entry</tt> subwidgets to have a width of
+ 10 characters and a border-width of 3 pixels so that they appear
+ wider and ``deeper''. A better result is shown in figure
+ 1-6.
+<P>
+ As we can see from program 1-5, the value for
+ the <tt>-options</tt> switch is a list of one or more pairs of
+<P>
+<blockquote> <em>subwidget-option-spec</em> <em>value</em> ..
+</blockquote>
+<P>
+<em>subwidget-option-spec</em> is in the form <em>subwidget-name</em><tt>.</tt><em>option-name</em>. For example, <tt>label.anchor</tt> identifies the
+ <tt>anchor</tt> option of the <tt>label</tt> subwidget, <tt>entry.width</tt>
+ identifies the <tt>width</tt> option of the entry subwidget, and so on.
+<P>
+Notice we must use the <em>name</em> of the option, not the <em>command-line switch</em> of the option. For example, the option that
+ specifies the border-width of the <tt>entry</tt> subwidget has the
+ command-line switch <tt>-borderwidth</tt> but its name is <tt>borderWidth</tt> (notice the capitalization on the name but not on the
+ command-line switch). Therefore, we have used the capitalized version
+ of ``<tt>entry.borderWidth 3</tt>'' in program
+ 1-5 and not ``<tt>entry.borderwidth 3</tt>''. To
+ find out the names of the options of the respective subwidgets,
+ please refer to their manual pages.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_6.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_6.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,71 @@
+<HEAD>
+<TITLE> Configuring Subwidget Options Using the Tk Option Database<A NAME=136> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html403 HREF=subsubsection3_3_3_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html401 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html395 HREF=subsubsection3_3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html405 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html404 HREF=subsubsection3_3_3_7.html> Caution: Restricted Access</A>
+<B>Up:</B> <A NAME=tex2html402 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html396 HREF=subsubsection3_3_3_5.html> Configuring Subwidget Options </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033600000000000000> Configuring Subwidget Options Using the Tk Option Database<A NAME=136> </A></A></H3>
+<P>
+The <tt>-options</tt> switch is good if you want to specify subwidget
+ options for one or a few mega-widgets. If you want to specify the
+ subwidget for many mega-widgets, it is easier to use the Tk Option
+ Database.
+<P>
+Options in the Tk Option Database can be specified using the <tt>option</tt> command and the pathname of the widget. For all the Tix
+ mega-widgets, it is guaranteed that the pathname of their subwidgets
+ ends with the <em>name</em> of the subwidgets. For example, if we have
+ a mega widget called <tt>.a.b.megaw</tt> and it has a subwidget whose
+ name is <tt>subw</tt>, then we can be sure that the pathname of the
+ subwidget will be something like
+<P>
+<blockquote> <tt> .a.b.megaw.foo.bar.subw
+</tt>
+</blockquote>
+<P>
+Therefore, if we want to specify options for it in the Option
+ Database, we can issue commands like:
+<P>
+<blockquote> <tt> option add *a.b.megaw*subw.option1 value1<BR>
+ option add *a.b.megaw*subw.option2 value2
+</tt>
+</blockquote>
+<P>
+Notice that it will be wrong to issue the commands as:
+<P>
+<blockquote> <tt> option add *a.b.megaw.subw.option1 value1<BR>
+ option add *a.b.megaw.subw.option2 value2
+</tt>
+</blockquote>
+<P>
+because in general we will not know whether the subwidget is an
+ immediate child window of <tt>.a.b.megaw</tt> (<em>such a decision
+ is left to the mega-widget implementor and may vary in different
+ versions of the same mega-widget</em>).
+<P>
+Program 1-7 demonstrates how the Tk Option Database can be
+ used to achieve the same effect as program 1-5.
+<P>
+<blockquote> <tt> option add *TixControl*label.width 8<BR>
+option add *TixControl*label.anchor e<BR>
+option add *TixControl*entry.width 10<BR>
+option add *TixControl*entry.borderWidth 3<BR>
+<BR>
+tixControl .income -label "Income: " -variable income<BR>
+tixControl .age -label "Age: " -variable age<BR>
+<BR>
+pack .income .age -side top
+</tt>
+</blockquote>
+(Figure 1-7) Using the Tk Option Database in Place of the <tt>-options</tt> switch<A NAME=17> </A>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_7.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_3_7.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Caution: Restricted Access<A NAME=137> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html412 HREF=subsection3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html410 HREF=subsection3_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html406 HREF=subsubsection3_3_3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html414 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html413 HREF=subsection3_3_4.html> Another Tix Widget: </A>
+<B>Up:</B> <A NAME=tex2html411 HREF=subsection3_3_3.html> Accessing The Components </A>
+<B> Previous:</B> <A NAME=tex2html407 HREF=subsubsection3_3_3_6.html> Configuring Subwidget Options </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00033700000000000000> Caution: Restricted Access<A NAME=137> </A></A></H3>
+<P>
+In the current implementation of Tix, there is no limits on how you
+ can access the options of the subwidgets. However, many options of
+ the subwidgets may be already used by the mega-widget in special
+ ways. For example, the <tt>-textvariable</tt> option of the <tt>entry</tt>
+ subwidget of TixControl may be used to store some private
+ information for the mega widget. Therefore, you should access the
+ options of the subwidgets with great care. In general you should
+ only access those options that affect the appearance of the
+ subwidgets (such as <tt>-font</tt> or <tt>-foreground</tt>) and leave
+ everything else intact. (<em></em>) {In future versions of Tix, there
+ will be explicit restrictions on which subwidget options you can
+ access. Errors will be generated if you try to access restricted
+ subwidget options}<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+<HEAD>
+<TITLE> Creating a TixComboBox Widget<A NAME=141> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html438 HREF=subsubsection3_3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html436 HREF=subsection3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html430 HREF=subsection3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html440 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html439 HREF=subsubsection3_3_4_2.html> Controlling the Style </A>
+<B>Up:</B> <A NAME=tex2html437 HREF=subsection3_3_4.html> Another Tix Widget: </A>
+<B> Previous:</B> <A NAME=tex2html431 HREF=subsection3_3_4.html> Another Tix Widget: </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00034100000000000000> Creating a TixComboBox Widget<A NAME=141> </A></A></H3>
+<P>
+<blockquote> <tt> tixComboBox .c -label "Animal:" -editable true<BR>
+.c insert end cat<BR>
+.c insert end dog<BR>
+.c insert end pig
+</tt>
+</blockquote>
+<P><CENTER>(Figure 1-9) Creating a ComboBox<A NAME=19> </A>
+ </CENTER>
+<P>
+In program 1-9, we set up a ComboBox <tt>.c</tt>
+ for the user to select an animal to play with. If the user is just a
+ dull person like you and me, he would just press the arrow button
+ and select a pre-designated animal such as ``dog''. However, if he
+ wants to try something new, he could type ``micky'' or ``sloth''
+ into the entry widget and he will get to play with his favorite
+ animal.
+<P>
+Of course, sometimes we don't want too many sloths around us and we
+ want to limit the range of the user's selections. In this case we
+ can do one of two things. First, we can set the <tt>-editable</tt>
+ option to <tt>false</tt> so that the user cannot type in the entry
+ widget at all. Alternatively, we can use the <tt>-validatecmd</tt>
+ option (see section 1.4.3) to check input the input.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Controlling the Style of the TixComboBox<A NAME=142> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html449 HREF=subsubsection3_3_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html447 HREF=subsection3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html441 HREF=subsubsection3_3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html451 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html450 HREF=subsubsection3_3_4_3.html> Static Options</A>
+<B>Up:</B> <A NAME=tex2html448 HREF=subsection3_3_4.html> Another Tix Widget: </A>
+<B> Previous:</B> <A NAME=tex2html442 HREF=subsubsection3_3_4_1.html> Creating a TixComboBox </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00034200000000000000> Controlling the Style of the TixComboBox<A NAME=142> </A></A></H3>
+<P>
+The TixComboBox widget can appear in many different styles. If we
+ set the <tt>-dropdown</tt> option to <tt>true</tt> (which is the default),
+ the listbox will only appear when the user presses the arrow button.
+ When <tt>-dropdown</tt> is set to <tt>false</tt>, the listbox is always
+ shown and the arrow button will disappear because it is not needed
+ anymore.
+<P>
+There is also an option called <tt>-fancy</tt>. It is set to <tt>false</tt> by default. When set to <tt>true</tt>, a tick button and a cross
+ button will appear next to the entry widget. The tick button allows
+ you to select again the value that's already in the ComboBox. If you
+ press the cross button, the entry widget will be cleared.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+<HEAD>
+<TITLE> Static Options<A NAME=143> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html460 HREF=subsubsection3_3_4_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html458 HREF=subsection3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html452 HREF=subsubsection3_3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html462 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html461 HREF=subsubsection3_3_4_4.html> Monitoring the User's </A>
+<B>Up:</B> <A NAME=tex2html459 HREF=subsection3_3_4.html> Another Tix Widget: </A>
+<B> Previous:</B> <A NAME=tex2html453 HREF=subsubsection3_3_4_2.html> Controlling the Style </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00034300000000000000> Static Options<A NAME=143> </A></A></H3>
+<P>
+The <tt>-dropdown</tt> and <tt>-fancy</tt> options are so-called ``static
+ options''. They can only be set during the creation of the
+ ComboBox. Hence this code is valid:
+<P>
+<tt> tixComboBox .c -dropdown true
+</tt>
+<P>
+But the following code will generate an error because it attempts to
+ set the <tt>-dropdown</tt> option <em>after</em> the ComboBox has already
+ been created.
+<P>
+<tt> TixComboBox .c<BR>
+ .c config -dropdown true
+</tt>
+<P>
+The restrictions of the static options, although annoying,
+ nevertheless make sense because we don't want our interface to
+ suddenly change its style. If sometimes a button is there and
+ sometimes it disappear all by itself, that will certainly create a
+ lot of confusion and makes the user wonder why he should buy our
+ software. Also, as you will see in chapter 6, having some
+ static options will make the life of widget writers a lot easier.
+<P>
+Accessing the value of the ComboBox is very similar to accessing the
+ value of the TixControl widget. The ComboBox has these four options,
+ which we discussed in section 1.2.2: <tt>-value</tt>,
+ <tt>-variable</tt>, <tt>-command</tt> and <tt>-validatecmd</tt>. You can use
+ these four options to access the user input and respond to user
+ actions in exactly the same way as discussed in section
+ 1.2.2.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_4_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,73 @@
+<HEAD>
+<TITLE> Monitoring the User's Browsing Actions<A NAME=144> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html469 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html467 HREF=subsection3_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html463 HREF=subsubsection3_3_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html471 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html470 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B>Up:</B> <A NAME=tex2html468 HREF=subsection3_3_4.html> Another Tix Widget: </A>
+<B> Previous:</B> <A NAME=tex2html464 HREF=subsubsection3_3_4_3.html> Static Options</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00034400000000000000> Monitoring the User's Browsing Actions<A NAME=144> </A></A></H3>
+<P>
+When the user drags the mouse pointer over the listbox, the listbox
+ item under the pointer will be highlighted and a ``browse event''
+ will be generated. If you want to keep track of what items the user
+ has browses through, you can use the <tt>-browsecmd</tt> option. Here
+ is an example:
+<P>
+<tt> tixComboBox .c -browsecmd mybrowse<BR>
+ ....<BR>
+<BR>
+ proc mybrowse {item} {<BR>
+ puts "user has browsed $item"<BR>
+ }</tt>
+<P>
+When the Tcl command specified by the <tt>-browsecmd</tt> option is
+ called, it will be called with one parameter: the current item that
+ the user has highlighted.
+<P>
+The <tt>-browsecmd</tt> is useful because it gives the user the
+ possibility of temporarily seeing the results of several choices
+ before committing to a final choice.
+<P>
+For example, we can list a set of image files in a ComboBox. When
+ the user single-clicks on an item on the ComboBox, we want to show a
+ simplified view of that image. After the user has browsed through
+ several images, he can finally decide on which image he wants by
+ double-clicking on that item in the listbox.
+<P>
+The following is some pseudo Tcl code that does this. Please notice
+ that the <tt>-browsecmd</tt> procedure is called every time the user
+ single-clicks on an item or drags the mouse pointer in the listbox.
+ The <tt>-command</tt> procedure is only called when the user
+ double-clicks on an item.
+<P>
+<tt> tixComboBox .c -dropdown false -browsecmd show_simple -command load_fullsize <BR>
+.c insert end "/pkg/images/flowers.gif"<BR>
+.c insert end "/pkg/images/jimmy.gif"<BR>
+.c insert end "/pkg/images/ncsa.gif"<BR>
+<BR>
+proc show_simple {filename} {<BR>
+ # Load in a simplified version of $filename<BR>
+}<BR>
+<BR>
+proc load_fullsize {filename} {<BR>
+ # Load in the full size image in $filename<BR>
+}</tt>
+<P>
+As we shall see, all Tix widgets that let us do some sort of
+ selections have the <tt>-browsecmd</tt> option. The <tt>-browsecmd</tt>
+ option allows us to respond to user events in a simple,
+ straight-forward manner. Of course, you can do the same thing with
+ the Tk <tt>bind</tt> command, but you don't want to do that unless you
+ are very fond of things like <tt>$<$Control-Shift-ButtonRelease-1$>$</tt>
+ and <tt>"%x%X$w%W%w"</tt>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,32 @@
+<HEAD>
+<TITLE> Creating A TixSelect Widget<A NAME=151> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html496 HREF=subsubsectionstar3_3_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html494 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html488 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html498 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html497 HREF=subsubsectionstar3_3_5_2.html> Label and Orientation</A>
+<B>Up:</B> <A NAME=tex2html495 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html489 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035100000000000000> Creating A TixSelect Widget<A NAME=151> </A></A></H3>
+<P>
+Program 1-11 shows how to create a TixSelect
+ widget. At line 1 of program 1-11, we create a
+ TixSelect using the the <tt>tixSelect</tt> command.
+<P>
+<tt> tixSelect .fruits -label "Fruits: " -orientation horizontal<BR>
+ .fruits add apple -text Apple -width 6<BR>
+ .fruits add orange -text Orange -width 6<BR>
+ .fruits add banana -text Banana -width 6<BR>
+ pack .fruits
+</tt>
+<P><CENTER>(Figure 1-11) Creating a TixSelect Widget<A NAME=111> </A>
+ </CENTER>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+<HEAD>
+<TITLE> Specifying Selection Rules<A NAME=152> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html540 HREF=subsubsection3_3_5_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html538 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html532 HREF=subsubsectionstar3_3_5_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html542 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html541 HREF=subsubsection3_3_5_6.html> Accessing the Value </A>
+<B>Up:</B> <A NAME=tex2html539 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html533 HREF=subsubsectionstar3_3_5_4.html> Accessing the Button </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035500000000000000> Specifying Selection Rules<A NAME=152> </A></A></H3>
+<P>
+For simple selection rules, you can use the <tt>-allowzero</tt> and <tt>-radio</tt> options. The <tt>-allowzero</tt> option specifies whether the user
+ can select none of the choices inside the TixSelect widget. The <tt>-radio</tt> option controls how many buttons can be selected at once: when
+ set to true, the user can select only one button at a time; when set to
+ false, the user can select as many buttons as he desires.
+<P>
+With these two options, we can write a program using two TixSelect widgets
+ for little Jimmy to fill up his lunch box. On the Sandwich side, we set
+ <tt>-radio</tt> to true and <tt>-allowzero</tt> <tt>false</tt>. That means Jimmy
+ can select one and only one sandwich among beef, cheese or ham
+ sandwiches. On the Veggie side, we want to encourage Jimmy to consume as
+ much veggie as possible, so we set the <tt>-allowzero</tt> option to <tt>false</tt>. We also set the <tt>-allowzero</tt> option to <tt>false</tt> so that
+ Jimmy cannot get away with eating none of the vegetables (see program
+ 1-13).
+<P>
+<blockquote> <tt> tixSelect .sandwich -allowzero false -radio true -label "Sandwich :"<BR>
+.sandwich add beef -text Beef<BR>
+.sandwich add cheese -text Cheese<BR>
+.sandwich add ham -text Ham<BR>
+<BR>
+tixSelect .vege -allowzero false -radio false -label "Vegetable :"<BR>
+.vege add bean -text Bean<BR>
+.vege add carrot -text Carrot<BR>
+.vege add lettuce -text Lettuce
+</tt>
+</blockquote>
+<P><CENTER>(Figure 1-13) Specifying Simple Selection Rules<A NAME=113> </A>
+ </CENTER>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_6.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_6.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,36 @@
+<HEAD>
+<TITLE> Accessing the Value of a TixSelect Widget<A NAME=153> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html551 HREF=subsubsection3_3_5_7.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html549 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html543 HREF=subsubsection3_3_5_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html553 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html552 HREF=subsubsection3_3_5_7.html> Specifying Complex Selection </A>
+<B>Up:</B> <A NAME=tex2html550 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html544 HREF=subsubsection3_3_5_5.html> Specifying Selection Rules</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035600000000000000> Accessing the Value of a TixSelect Widget<A NAME=153> </A></A></H3>
+<P>
+The <em>value</em> of a TixSelect widget is a list of the names of the
+ button subwidgets that are currently selected. For example, in
+ program 1-11, if the user has selected the apple
+ button, then the value of the TixSelect widget will be <tt>apple</tt>. If the user has selected both the apple and the orange
+ buttons, then the value will be the list <tt>"apple orange"</tt>.
+<P>
+The TixSelect widget supports same set of options as the TixControl widget
+ for you to access its value: the <tt>-value</tt> option stores the current
+ value, which can be queried and modified using the cget and configure
+ methods. You can also use the <tt>-variable</tt> option to specify a global
+ variable to store the value of the TixSelect widget. The <tt>-command</tt>
+ option specifies a TCL command to be called whenever the user changes the
+ selection inside a TixSelect widget. This command is called with one
+ argument: the new value of the TixSelect widget. There is also the <tt>-disablecallback</tt> option which you can use to control whether the command
+ specified by the <tt>-command</tt> option should be called when the value of
+ the TixSelect changes.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_7.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_3_5_7.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,51 @@
+<HEAD>
+<TITLE> Specifying Complex Selection Rules<A NAME=154> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html560 HREF=section3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html558 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html554 HREF=subsubsection3_3_5_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html562 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html561 HREF=section3_4.html> Container Widgets</A>
+<B>Up:</B> <A NAME=tex2html559 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html555 HREF=subsubsection3_3_5_6.html> Accessing the Value </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035700000000000000> Specifying Complex Selection Rules<A NAME=154> </A></A></H3>
+<P>
+If you want to have more complex selection rules for the
+ TixSelect widget, you can use the <tt>-validatecmd</tt> option. This
+ option works the same as the <tt>-validatecmd</tt> option of the
+ TixControl widget which we discusses in section
+ 1.2: it specifies a command to be called every
+ time the user attempts to change the selection inside a TixSelect
+ widget.
+<P>
+In the example program 1-14, the procedure
+ <tt>TwoMax</tt> will be called every time the user tries to change the
+ selection of the <tt>.fruits</tt> widget. <tt>TwoMax</tt> limits the
+ maximum number of fruits that the user to choose to be 2 by always
+ truncating the value of the TixSelect widget to have no more than
+ two items. If you run this program, you will find out that you can
+ never select a third fruit after you have select two fruits.
+<P>
+<tt> tixSelect .fruits -label "Fruits: " -radio false -validatecmd TwoMax<BR>
+ .fruits add apple -text Apple -width 6<BR>
+ .fruits add orange -text Orange -width 6<BR>
+ .fruits add banana -text Banana -width 6<BR>
+ pack .fruits<BR>
+<BR>
+ proc TwoMax {value} {<BR>
+ if {[llength $value] $>$ 2} {<BR>
+ return [lrange $value 0 1]<BR>
+ } else {<BR>
+ return $value<BR>
+ }<BR>
+ }</tt>
+<P><CENTER>(Figure 1-14) Specifying More Complex Selection Rules<A NAME=114> </A>
+ </CENTER>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+<HEAD>
+<TITLE> Adding Pages to a TixNoteBook<A NAME=211> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html610 HREF=subsubsection3_4_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html608 HREF=subsection3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html602 HREF=subsection3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html612 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html611 HREF=subsubsection3_4_1_2.html> Keyboard Accelerators</A>
+<B>Up:</B> <A NAME=tex2html609 HREF=subsection3_4_1.html> TixNoteBook</A>
+<B> Previous:</B> <A NAME=tex2html603 HREF=subsection3_4_1.html> TixNoteBook</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00041100000000000000> Adding Pages to a TixNoteBook<A NAME=211> </A></A></H3>
+<P>
+The example program in figure 2-2 creates the
+ TixNoteBook widget shown in figure 2-1. In the first
+ three lines, we create the notebook widget and two pages inside
+ it. While we create the pages, we also set the labels on the tabs
+ associated with each page and use the <tt>-underline</tt> option to
+ indicate the keyboard accelerator for each page.
+<P>
+ Each time we create a page in the notebook using the <tt>add</tt> method, a
+ frame subwidget is created for us automatically. This frame subwidget has
+ the same name as the page (the first parameter passed to the <tt>add</tt>
+ method). We can use the <tt>subwidget</tt> method to find out the pathname
+ of this frame subwidget and pack everything we want to display on the
+ page into this frame widget. Lines 4-10 of program 2-2 shows
+ how to create the widgets inside the ``Hard Disk'' page. Creating the
+ widgets inside the ``Network'' page will be similar.
+<P>
+<blockquote> <P><tt> tixNoteBook .n<BR>
+.n add hd -label "Hard Disk" -underline 0<BR>
+.n add net -label "Network" -underline 0<BR>
+<BR>
+set frame [.n subwidget hd]<BR>
+tixControl $frame.access -label "Access Time:"<BR>
+tixControl $frame.write -label "Write Throughput:"<BR>
+tixControl $frame.read -label "Read Througput:"<BR>
+tixControl $frame.capacity -label "Capacity:"<BR>
+pack $frame.access $frame.write $frame.read $frame.capacity <BR> -side top -fill x
+</tt>
+<P></blockquote>
+<P><CENTER>(Figure 2-2) Using The TixNoteBook Widget<A NAME=22> </A>
+ </CENTER>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,29 @@
+<HEAD>
+<TITLE> Keyboard Accelerators<A NAME=212> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html621 HREF=subsubsection3_4_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html619 HREF=subsection3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html613 HREF=subsubsection3_4_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html623 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html622 HREF=subsubsection3_4_1_3.html> Delaying the Creation </A>
+<B>Up:</B> <A NAME=tex2html620 HREF=subsection3_4_1.html> TixNoteBook</A>
+<B> Previous:</B> <A NAME=tex2html614 HREF=subsubsection3_4_1_1.html> Adding Pages to </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00041200000000000000> Keyboard Accelerators<A NAME=212> </A></A></H3>
+<P>
+Note that in line 2-3 of program 2-2, we have indicated
+ the keyboard accelerators for the two pages using the <tt>-underline</tt> option. The value of this option is the position of the
+ character to be underlined in the string, where zero represents the
+ first character. When the user presses <tt>$<$Alt-N$>$</tt> or <tt>$<$Meta-N$>$</tt> the ``Network'' page will be activated; on the other hand,
+ if he presses <tt>$<$Alt-H$>$</tt> or <tt>$<$Meta-H$>$</tt> the ``Hard Disk'' page
+ will be activated. The TixNoteBook widget will automatically create
+ the keyboard bindings for these accelerators for us, in a way
+ similar to what the menu widget does, so there is no need to set the
+ keyboard bindings ourself.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,59 @@
+<HEAD>
+<TITLE> Delaying the Creation of New Pages<A NAME=213> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html632 HREF=subsubsection3_4_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html630 HREF=subsection3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html624 HREF=subsubsection3_4_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html634 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html633 HREF=subsubsection3_4_1_4.html> Changing Page Tabs </A>
+<B>Up:</B> <A NAME=tex2html631 HREF=subsection3_4_1.html> TixNoteBook</A>
+<B> Previous:</B> <A NAME=tex2html625 HREF=subsubsection3_4_1_2.html> Keyboard Accelerators</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00041300000000000000> Delaying the Creation of New Pages<A NAME=213> </A></A></H3>
+<P>
+If your notebook contains many complicated pages, it may take quite a
+ while to create all widgets inside these pages and your program will
+ probably freezes for a few seconds when it pops up the notebook for
+ the first time. To avoid embarrassing moments like this, we can use
+ the ``delayed page creation'' feature of the TixNoteBook widget.
+<P>When we create a page using the <tt>add</tt> method, we can specify
+ the optional parameter <tt>-createcmd</tt> so that we only need to
+ create the page when the user wants to see it. This is illustrated
+ in program 2-3:
+<P>
+<blockquote> <P><tt> tixNoteBook .n<BR>
+.n add hd -label "Hard Disk" -underline 0 -createcmd CreateHd<BR>
+.n add net -label "Network" -underline 0 -createCmd CreateNet<BR>
+<BR>
+proc CreateHd {frame} {<BR>
+ tixControl $frame.access -label "Access Time:"<BR>
+ tixControl $frame.write -label "Write Throughput:"<BR>
+ tixControl $frame.read -label "Read Througput:"<BR>
+ tixControl $frame.capacity -label "Capacity:"<BR>
+ pack $frame.access $frame.write $frame.read $frame.capacity <BR> -side top -fill x<BR>
+}<BR>
+<BR>
+proc CreateNet {frame} {<BR>
+ ...<BR>
+}</tt>
+<P></blockquote>
+<P>
+<P>
+<P><CENTER>(Figure 2-3) Delayed Page Creation<A NAME=23> </A>
+ </CENTER>
+<P>
+In line 2 of program 2-3, we use the <tt>-createcmd</tt>
+ option to specify that the procedure <tt>CreateHd</tt> should be called
+ when the ``Hard Disk'' page needs to be created. <tt>CreateHd</tt>
+ takes one argument, the frame subwidget of the page. As we can see,
+ program program 2-3 is not very different than program
+ 2-2, except now we can issue less commands during the
+ set-up of the NoteBook widget and the interface can be started up
+ more quickly.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_1_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,30 @@
+<HEAD>
+<TITLE> Changing Page Tabs and Deleting Pages<A NAME=214> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html641 HREF=subsection3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html639 HREF=subsection3_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html635 HREF=subsubsection3_4_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html643 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html642 HREF=subsection3_4_2.html> PanedWindow</A>
+<B>Up:</B> <A NAME=tex2html640 HREF=subsection3_4_1.html> TixNoteBook</A>
+<B> Previous:</B> <A NAME=tex2html636 HREF=subsubsection3_4_1_3.html> Delaying the Creation </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00041400000000000000> Changing Page Tabs and Deleting Pages<A NAME=214> </A></A></H3>
+<P>
+To change the information in the tabs of the pages, we can use the
+ <tt>pageconfigure</tt> method. For example, the following command:
+<P><blockquote> <P><tt> .nb pageconfigure hd -label "Fixed Disk"
+</tt>
+<P></blockquote>
+<P>changes the label from ``Hard Disk'' to ``Fixed Disk''. To delete a
+ page, we can use the <tt>delete</tt> method.
+<P>You should avoid using the <tt>pageconfigure</tt> and <tt>delete</tt>. Your users will just feel annoyed if the interface changes
+ all the time and notebook pages appear and disappear every now and
+ then.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,59 @@
+<HEAD>
+<TITLE> Adding Panes Inside a TixPanedWindow Widget<A NAME=221> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html667 HREF=subsubsection3_4_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html665 HREF=subsection3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html659 HREF=subsection3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html669 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html668 HREF=subsubsection3_4_2_2.html> Putting Widgets Inside </A>
+<B>Up:</B> <A NAME=tex2html666 HREF=subsection3_4_2.html> PanedWindow</A>
+<B> Previous:</B> <A NAME=tex2html660 HREF=subsection3_4_2.html> PanedWindow</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00042100000000000000> Adding Panes Inside a TixPanedWindow Widget<A NAME=221> </A></A></H3>
+<P>
+You can create a TixPanedWindow widget using the <tt>tixPanedWindow</tt>
+ command. After that, you can add panes into this widget using the
+ <tt>add</tt> method (see program 2-5).
+<P>When you use the <tt>add</tt> method, there are several optional
+ parameters which you can use to control the size of each of the
+ pane. The <tt>-min</tt> parameter controls the minimum size of the pane
+ and the <tt>-max</tt> parameter controls its maximum size. These two
+ parameters controls how much the user can expand or shrink a
+ pane. If neither is specified, then the pane can be expanded or
+ shrunk without restrictions.
+<P>In addition, the -size parameter specifies the initial size of the
+ pane. If it is not specified, then the initial size of the pane will
+ be its natural size.
+<P>
+ In program 2-5, we set the initial size of <tt>pane1</tt> to
+ 100 pixels using the -size parameter. We don't set the <tt>-size</tt>
+ parameter for <tt>pane2</tt> so it will appear in its natural
+ size. However, we use the <tt>-max</tt> option for <tt>pane2</tt> so that
+ the user can never expand the size of <tt>pane2</tt> to more than 300
+ pixels.
+<P>
+<blockquote> <P><tt> tixPanedWindow .p<BR>
+.p add pane1 -size 100<BR>
+.p add pane2 -max 300<BR>
+<BR>
+set p1 [.p subwidget pane1]<BR>
+button $p1.b1 -text Button1<BR>
+button $p1.b2 -text Button2<BR>
+pack $p1.b1 $p1.b2 -side left -expand yes<BR>
+<BR>
+set p2 [.p subwidget pane2]<BR>
+button $p2.b -text "Another Button"<BR>
+pack $p2.b -side left -expand yes -fill both<BR>
+<BR>
+pack .p -expand yes -fill both
+</tt>
+<P></blockquote>
+<P><CENTER>(Figure 2-5) Adding Panes into a TixPanedWindow Widget<A NAME=25> </A>
+ </CENTER>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Putting Widgets Inside the Panes<A NAME=222> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html678 HREF=subsubsection3_4_2_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html676 HREF=subsection3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html670 HREF=subsubsection3_4_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html680 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html679 HREF=subsubsection3_4_2_3.html> Setting the Order </A>
+<B>Up:</B> <A NAME=tex2html677 HREF=subsection3_4_2.html> PanedWindow</A>
+<B> Previous:</B> <A NAME=tex2html671 HREF=subsubsection3_4_2_1.html> Adding Panes Inside </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00042200000000000000> Putting Widgets Inside the Panes<A NAME=222> </A></A></H3>
+<P>
+Each pane we have created using the <tt>add</tt> method is essentially
+ a frame widget. After we have created the panes, we can put widgets
+ inside them. As shown inside program 2-5, we can use the
+ <tt>subwidget</tt> method to find out the name of the pane
+ subwidgets. Then we can just create new widgets as their children
+ and pack these new widgets inside the panes. The output of program
+ 2-5 is shown in figure 2-6
+<P>
+<blockquote> <P><P><CENTER><IMG SRC="../gif/tix/container/pane_add.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,32 @@
+<HEAD>
+<TITLE> Setting the Order of the Panes<A NAME=223> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html689 HREF=subsubsection3_4_2_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html687 HREF=subsection3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html681 HREF=subsubsection3_4_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html691 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html690 HREF=subsubsection3_4_2_4.html> Changing the Sizes </A>
+<B>Up:</B> <A NAME=tex2html688 HREF=subsection3_4_2.html> PanedWindow</A>
+<B> Previous:</B> <A NAME=tex2html682 HREF=subsubsection3_4_2_2.html> Putting Widgets Inside </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00042300000000000000> Setting the Order of the Panes<A NAME=223> </A></A></H3>
+<P>
+Usually, when you create a new pane, it is always added to the
+ bottom or right of the list of panes. If you want to control the
+ order in which the panes appear inside the TixPanedWindow widget,
+ you can use the two optional parameters, <tt>-before</tt> and <tt>-after</tt>, for the <tt>add</tt> method. For example, the call:
+<P><blockquote> <P><tt> .p add pane2 -after pane1
+</tt>
+<P></blockquote>
+ will place the new pane immediately after <tt>pane1</tt>. The call:
+<blockquote> <P><tt> .p add pane2 -before pane1
+</tt>
+<P></blockquote>
+will place the new pane immediately in front of <tt>pane1</tt>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_2_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,33 @@
+<HEAD>
+<TITLE> Changing the Sizes of the Panes<A NAME=224> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html698 HREF=subsection3_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html696 HREF=subsection3_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html692 HREF=subsubsection3_4_2_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html700 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html699 HREF=subsection3_4_3.html> The Family of </A>
+<B>Up:</B> <A NAME=tex2html697 HREF=subsection3_4_2.html> PanedWindow</A>
+<B> Previous:</B> <A NAME=tex2html693 HREF=subsubsection3_4_2_3.html> Setting the Order </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00042400000000000000> Changing the Sizes of the Panes<A NAME=224> </A></A></H3>
+<P>
+If you want to change the sizes of the existing panes or change
+ their maximum/minimum size constraints, you can use the
+ <tt>paneconfigure</tt> method. For example, the following code changes the
+ size of <tt>pane2</tt> to 100 pixels and adjusts its minimum size
+ constraint to no less than 10 pixels:
+<P>
+<blockquote> <P><tt> .p paneconfigure pane2 -size 100 -min 10
+</tt>
+<P></blockquote>
+<P>
+ Notice that after you call the <tt>paneconfigure</tt> method, the
+ PanedWindow may jitter and that may annoy the user. Therefore, use
+ this method only when it is necessary.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_3_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_3_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,58 @@
+<HEAD>
+<TITLE> The Scrolled Listbox Widget<A NAME=231> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html720 HREF=subsubsection3_4_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html718 HREF=subsection3_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html712 HREF=subsection3_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html722 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html721 HREF=subsubsection3_4_3_2.html> Other Scrolled Widgets</A>
+<B>Up:</B> <A NAME=tex2html719 HREF=subsection3_4_3.html> The Family of </A>
+<B> Previous:</B> <A NAME=tex2html713 HREF=subsection3_4_3.html> The Family of </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00043100000000000000> The Scrolled Listbox Widget<A NAME=231> </A></A></H3>
+<P>
+You can create a scrolled listbox widget using the <tt>tixScrolledListBox</tt>
+ command. Notice that the widget created by the <tt>tixScrolledListBox</tt>
+ command is not itself a listbox widget. Rather, it is a frame widget
+ which contains two scrollbar subwidgets: one is called <tt>hsb</tt> (the
+ horizontal scrollbar) and the other is called <tt>vsb</tt> (the vertical
+ scrollbar). Similarly, the listbox being scrolled is also a subwidget
+ which is appropriately called <tt>listbox</tt>. Therefore, if we need to put
+ things into the listbox (as we always do!), we can use the <tt>subwidget</tt> method. As shown in program 2-7, we first find
+ the pathname of the <tt>listbox</tt> subwidget by calling ``<tt>.sl
+ subwidget listbox</tt>''. Then, we insert some items into the <tt>listbox</tt>
+ subwidget.
+<P>
+<P><blockquote> <P><tt> tixScrolledListBox .sl -scrollbar auto<BR>
+set listbox [.sl subwidget listbox]<BR>
+<BR>
+for {set x 0} {$x $<$ 6} {incr x} {<BR>
+ $listbox insert end "This is item $x"<BR>
+}<BR>
+<BR>
+pack .sl -side left -expand yes -fill both
+</tt>
+<P></blockquote>
+<P><CENTER>(Figure 2-7) Scrolled Listbox Widget<A NAME=27> </A>
+ </CENTER>
+<P>
+<P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/container/sl-nobar.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/container/sl-bar.gif"><BR CLEAR=LEFT><CENTER>(Figure 2-8) Scrolled ListBox with Automatic Scrollbars<A NAME=28> </A></CENTER><P>
+ </CENTER>
+<P>
+Also, as seen in the first line of program 2-7, we use
+ the <tt>-scrollbar</tt> option to control the scrolling policy of the
+ TixScrolledListBox widget. Usually, we'll set it to ``<tt>auto</tt>'':
+ the scrollbars are displayed only if they are needed. Other possible
+ values are ``<tt>both</tt>'': the two scrollbars are always displayed;
+ ``<tt>x</tt>'': the horizontal scrollbar is always displayed, while the
+ vertical scrollbar is always hidden; ``<tt>y</tt>'': the opposite of
+ ``<tt>x</tt>''; ``<tt>none</tt>'': the two scrollbars are always
+ hidden. The result of program 2-7 is shown in figure
+ 2-8.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_3_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_4_3_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,62 @@
+<HEAD>
+<TITLE> Other Scrolled Widgets<A NAME=232> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html729 HREF=section3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html727 HREF=subsection3_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html723 HREF=subsubsection3_4_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html731 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html730 HREF=section3_5.html> Tabular Listbox and </A>
+<B>Up:</B> <A NAME=tex2html728 HREF=subsection3_4_3.html> The Family of </A>
+<B> Previous:</B> <A NAME=tex2html724 HREF=subsubsection3_4_3_1.html> The Scrolled Listbox </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00043200000000000000> Other Scrolled Widgets<A NAME=232> </A></A></H3>
+<P>
+The <b>TixScrolledText</b> widget is very similar to the
+ TixScrolledListBox widget, except it scrolls a text subwidget, which
+ is called <tt>text</tt>. One problem with the TixScrolledText widget,
+ though, is its <tt>-scrollbar</tt> option doesn't work in the <b>auto</b> mode. This is due to a bug in Tk which doesn't report the
+ width of the <b>text</b> subwidget correctly. Until this bug is fixed
+ in TK, the <b>auto</b> mode will behave the same way as the both mode
+ for the TixScrolledText widget.
+<P>
+ Another scrolled-widget is <b>TixScrolledWindow</b>. Sometimes you have a
+ large number of widgets that can't possibly be shown in the screen all at
+ once and your application doesn't allow you to divide the widgets into
+ several pages of a TixNoteBook. In this case you can use
+ TixScrolledWindow. It contains a frame subwidget called <tt>window</tt>. You
+ can just create as many widgets as you need as children of the <tt>window</tt> subwidget. An example is shown in program 2-9, which uses the
+ TixScrolledWindow widget to implement a ``cheap'' spreadsheet
+ application. The boxes of the spreadsheet are just entry widgets and they
+ are packed inside the <tt>window</tt> subwidget. The user will be able to
+ scroll to different parts of the spreadsheet if it is too large to fit in
+ one screen.
+<P>
+<blockquote> <P><tt> tixScrolledWindow .sw -scrollbar auto<BR>
+set f [.sw subwidget window]<BR>
+<BR>
+for {set x 0} {$x $<$ 10} {incr x} {<BR>
+ frame $f.f$x<BR>
+ pack $f.f$x -side top -expand yes -fill both<BR>
+ for {set y 0} {$y $<$ 10} {incr y} {<BR>
+ entry $f.f$x.e$y -width 10<BR>
+ pack $f.f$x.e$y -side left -fill x<BR>
+ }<BR>
+}<BR>
+<BR>
+pack .sw -side left -expand yes -fill both
+</tt>
+<P></blockquote>
+<P><CENTER>(Figure 2-9) Cheap Spreadsheet Application with TixScrolledWindow<A NAME=29> </A>
+ </CENTER>
+<P>
+There are two more scrolled-widgets in the Tix library: <b>TixScrolledTList</b> scrolls a TixTList widget and <b>TixScrolledHList</b>
+ scrolls a TixHList widget. The subwidgets that they scroll are called
+ <tt>tlist</tt> and <tt>hlist</tt>, respectively. The use of the TList and HList
+ widgets will be described in the next chapters.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_2_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_2_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+<HEAD>
+<TITLE> Advantages of Display Items<A NAME=321> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html786 HREF=subsubsection3_5_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html784 HREF=subsection3_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html778 HREF=subsection3_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html788 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html787 HREF=subsubsection3_5_2_2.html> Display Items and </A>
+<B>Up:</B> <A NAME=tex2html785 HREF=subsection3_5_2.html> Display Items</A>
+<B> Previous:</B> <A NAME=tex2html779 HREF=subsection3_5_2.html> Display Items</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00052100000000000000> Advantages of Display Items<A NAME=321> </A></A></H3>
+<P>
+It is easy to see the advantages of seperating the display items from their
+ host widgets. First, the display items are easy to learn. Since they are
+ the same across different types of widgets. Once you learn about a type
+ of display items, you will know how to use them in all Tix widgets that
+ support display items (currently these include TixHList, TixTList and the
+ spreadsheet widget TixGrid, but the number is growing). In contrast, if
+ you want to create a text item for the Tk widgets, you will find out that
+ the listbox, text, canvas and entry widget each have a different method
+ of creating and manipulating text items, and it is quite annoying to
+ learn each of them individually.
+<P>
+ Second, the hosts widgets that use display items are extensible.
+ Because of the separation of task, the host widgets are not involved
+ in the implementation details of the display items. Therefore, if
+ you add a new type of display items, such as a <tt>animation</tt> type
+ that displays live video, the host widgets will gladly take them in
+ and display them. You don't need to modify the existing host widgets
+ at all. In contrast, if you want to display graphical images in the
+ existing Tk listbox widgets, you'd better set aside 100 hours to
+ rewrite it completely!
+<P>
+ Third, display items are good for writers of host widgets. Because
+ now they just need to implement the arrangement policy of the host
+ widgets. They don't need to worry about drawing at all because it is
+ all handled by the display items. This is a significant saving in
+ code because a widget that does not use display items has to spend
+ 30%of its C code to do the drawing.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_2_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_2_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,55 @@
+<HEAD>
+<TITLE> Display Items and Display Styles<A NAME=322> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html795 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html793 HREF=subsection3_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html789 HREF=subsubsection3_5_2_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html797 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html796 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B>Up:</B> <A NAME=tex2html794 HREF=subsection3_5_2.html> Display Items</A>
+<B> Previous:</B> <A NAME=tex2html790 HREF=subsubsection3_5_2_1.html> Advantages of Display </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00052200000000000000> Display Items and Display Styles<A NAME=322> </A></A></H3>
+<P>
+The appearance of a display item is controlled by a set of
+ attributes. For example, the <tt>text</tt> attribute controls the text
+ string displayed on the item and the <tt>font</tt> attribute specifies
+ what font should be used.
+<P>
+ Usually, each of the attributes falls into one of two categroies:
+ ``<em>individual</em>'' or ``<em>collective</em>''. For example, each of
+ the items inside a TixTList widget may display a different text
+ string; therefore we call the text string an <em>individual
+ attribute</em>. However, in most cases, the items share the same color,
+ font and spacing and we call these <em>collective attributes</em>.
+<P>
+ One question concerns where we keep the collective attribute for the
+ display items. Certainly, we can keep a <tt>font</tt> attribute for each
+ item, but this is not really an efficient solution. In fact, if all the
+ items have the same font, we would be keeping a duplicated copy of the
+ same font for each of the items we create. Since a host widget may have
+ many thousands of items, keeping thousands of dupilcated copys of the
+ same font, or any other collective attributes, would be very wasteful.
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/tlist/relation.gif">
+ </CENTER>
+</blockquote>
+<P>
+To avoid the unnecessary duplication of resources, Tix stores the
+ collective attributes in special objects called <em>display styles</em>. The
+ relationship between display items and their styles is depicted in figure
+ 3-4. Each item holds its own copy of the individual
+ attributes, such as <tt>text</tt>. However, the collective attributes are
+ stored in the style objects. Each item has a special <tt>style</tt>
+ attribute that tells it which style it should use. In figure 3-4
+, since items <em>a</em> and <em>b</em> are assigned the same
+ style, therefore, they share the same font and color. Item <em>c</em> is
+ assigned a different style, thus, it uses a different font than <em>a</em>
+ and <em>b</em>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+<HEAD>
+<TITLE> Creating Display Items<A NAME=331> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html821 HREF=subsubsection3_5_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html819 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html813 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html823 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html822 HREF=subsubsection3_5_3_2.html> Setting the Styles </A>
+<B>Up:</B> <A NAME=tex2html820 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B> Previous:</B> <A NAME=tex2html814 HREF=subsection3_5_3.html> Creating Display Items </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00053100000000000000> Creating Display Items<A NAME=331> </A></A></H3>
+<P>
+Now it's time to put our knowledge about host widgets, display items
+ and display styles into practice. The following example code creates
+ two items in a TixTList widget using the <tt>insert</tt> method:
+<P>
+<blockquote> <P><tt> tixTList .t<BR>
+pack .t<BR>
+<BR>
+.t insert end -itemtype text -text "First Item" -underline 0<BR>
+.t insert end -itemtype text -text "Second Item" -underline 0<BR>
+<BR>
+set picture [image create bitmap -file picture.xbm]<BR>
+.t insert end -itemtype image -image $picture</tt>
+<P></blockquote>
+<P>
+As we can see, the <tt>insert</tt> method of TixTList is very similar to the
+ <tt>insert</tt> method of the standard Tk listbox widget: it inserts a new
+ item into the TixTList widget. The first argument it takes is the
+ location of the new item. For example <tt>0</tt> indicates the first
+ location in the list, <tt>1</tt> indicates the second location, and so
+ on. Also the special keyword <tt>end</tt> indicates the end of the list.
+<P>
+ Then, we can use the <tt>-itemtype</tt> switch to specify the type of
+ display item we want to create. There are currently four types of items
+ to choose from: <tt>text</tt>, <tt>image</tt>, <tt>imagetext</tt> and <tt>window</tt>. In the above example, we create two items of the type <tt>text</tt>
+ and one item of the type <tt>image</tt>. The subsequent arguments to the
+ <tt>insert</tt> method set the configuration options of the individual
+ attributes of the new item.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,75 @@
+<HEAD>
+<TITLE> Setting the Styles of the Display Items<A NAME=332> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html832 HREF=subsubsection3_5_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html830 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html824 HREF=subsubsection3_5_3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html834 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html833 HREF=subsubsection3_5_3_3.html> Configuring and Deleting </A>
+<B>Up:</B> <A NAME=tex2html831 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B> Previous:</B> <A NAME=tex2html825 HREF=subsubsection3_5_3_1.html> Creating Display Items</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00053200000000000000> Setting the Styles of the Display Items<A NAME=332> </A></A></H3>
+<P>
+Note that in the above example, if we want to control the foreground color
+ of the text items, we cannot issue commands such as:
+<P>
+<blockquote> <tt> .t insert end -itemtype text -text "First Item" -foreground black
+</tt>
+<P></blockquote>
+<P>
+ because <tt>-foreground</tt> is not an individual attribute of the text
+ item. Instead, it is a collective attribute and must be accessed using a
+ display style object. To do that we can use the command <tt>tixItemStyle</tt> to create display styles, as shown in the following
+ example:
+<P>
+<blockquote> <P><tt> set style1 [tixDisplayStyle text -font 8x13]<BR>
+set style2 [tixDisplayStyle text -font 8x13bold]<BR>
+<BR>
+tixTList .t; pack .t<BR>
+<BR>
+.t insert end -itemtype text -text "First Item" -underline 0 <BR> -style $style1<BR>
+.t insert end -itemtype text -text "Second Item" -underline 0 <BR> -style $style2<BR>
+.t insert end -itemtype text -text "Third Item" -underline 0 <BR> -style $style1</tt>
+<P></blockquote>
+<P>
+The first argument of <tt>tixDisplayStyle</tt> specify the type of style we
+ want to create. Each type of display item needs its own type of display
+ styles. Therefore, for example, we cannot create a style of type <tt>text</tt> and assign it to an item of type <tt>image</tt>. The subsequent
+ arguments to <tt>tixDisplayStyle</tt> set the configuration options of the
+ collective attributes defined by this style. A complete list of the
+ configuration options of each type of the display style is in figures ???
+ through ???.
+<P>
+ The <tt>tixDisplayStyle</tt> command returns the names of the newly created
+ styles to us and we use the variables <tt>style1</tt> and <tt>style2</tt> to
+ store these names. We can then assign the styles to the display items by
+ using the names of the styles. As shown in figure 3-5, by
+ assing these two styles to the <tt>-style</tt> option of the display items,
+ we assigned a medium-weight font to the first and third item and a bold
+ font to the second item.
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/tlist/twofont.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/tlist/twofont2.gif"><BR CLEAR=LEFT><CENTER>(Figure 3-5) Two Display Styles With Different Fonts<A NAME=35> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+ The name of the style returned by <tt>tixDisplayStyle</tt> is also the name
+ of a command which we can use to control the style. For example, we can
+ use the following commands to switch the fonts in the two styles we
+ created in the above example:
+<P>
+<blockquote> <P><tt> $style1 configure -font 8x13bold<BR>
+$style2 configure -font 8x13
+</tt>
+<P></blockquote>
+<P>
+ After the execution of the above command, the font in the second item in
+ the TixTList widget becomes medium-weight and the font in the first and
+ third items becomes bold, as shown in figure 3-5.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Configuring and Deleting the Items<A NAME=333> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html843 HREF=subsubsection3_5_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html841 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html835 HREF=subsubsection3_5_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html845 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html844 HREF=subsubsection3_5_3_4.html> Choosing the Orientation </A>
+<B>Up:</B> <A NAME=tex2html842 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B> Previous:</B> <A NAME=tex2html836 HREF=subsubsection3_5_3_2.html> Setting the Styles </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00053300000000000000> Configuring and Deleting the Items<A NAME=333> </A></A></H3>
+<P>
+You can configure the individual attributes of the items using the <tt>entryconfigure</tt> method. There is also the entrycget method for querying
+ the attributes of the items. To <tt>delete</tt> the items, you can use the
+ delete method. In the following example, we use these two methods to
+ change the first and third items to display the text strings <tt>One</tt>
+ and <tt>Two</tt> and change the third item to use the style <tt>$style2</tt>. Then we delete the second item using the <tt>delete</tt> command.
+<P>
+<blockquote> <P><tt> .t entryconfigure 0 -text One<BR>
+.t entryconfigure 2 -text Two<BR>
+.t delete 1
+</tt>
+<P></blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+<HEAD>
+<TITLE> Choosing the Orientation and Number of Rows or Columns<A NAME=334> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html854 HREF=subsubsection3_5_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html852 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html846 HREF=subsubsection3_5_3_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html856 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html855 HREF=subsubsection3_5_3_5.html> Event Handling</A>
+<B>Up:</B> <A NAME=tex2html853 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B> Previous:</B> <A NAME=tex2html847 HREF=subsubsection3_5_3_3.html> Configuring and Deleting </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00053400000000000000> Choosing the Orientation and Number of Rows or Columns<A NAME=334> </A></A></H3>
+<P>
+There are three options that controls the layout of the items in the
+ TixTList widget. The <tt>-orientation</tt> option can be set to either
+ vertical or horizontal. When <tt>-orientation</tt> is set to <tt>vertical</tt>,
+ the items are laid out vertically from top down and wrapped to the next
+ column when the bottom is reached (see figure 3-6). The opposite layout
+ policy is chosen if <tt>-orientation</tt> is set to <tt>horizontal</tt> (see
+ figure 3-6).
+<P>
+ When the <tt>-orientation</tt> option is set to <tt>vertical</tt>, normally
+ the number of columns displayed depends on the number of items in the
+ TixTList widget: the more items there are, the more columns will there
+ be. However, we can use the <tt>-columns</tt> option to control the number
+ of columns: the items will be wrapped in a way so that the number of
+ columns produced will be exactly as dicated by the <tt>-columns</tt> option.
+<P>
+ One use of the <tt>-columns</tt> option is to specify the same layout
+ policy as that of the standard Tk listbox widget. We can do this by
+ setting <tt>-orientation</tt> to vertical and <tt>-columns</tt> to <tt>1</tt>. This way we can get a replacement listbox widget that can
+ display multiple fonts and colors and graphics!
+<P>
+ The counterpart of the <tt>-columns</tt> option is the <tt>-rows</tt> option,
+ which is used for the same purpose when the <tt>-orientation</tt> option is
+ set to <tt>horizontal</tt>.
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/tlist/vertical.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/tlist/horizontal.gif"><BR CLEAR=LEFT><CENTER>(Figure 3-6) The <tt>-orientation</tt> option of the TixSelect Widget<A NAME=36> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,29 @@
+<HEAD>
+<TITLE> Event Handling<A NAME=335> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html865 HREF=subsubsection3_5_3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html863 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html857 HREF=subsubsection3_5_3_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html867 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html866 HREF=subsubsection3_5_3_6.html> Selection</A>
+<B>Up:</B> <A NAME=tex2html864 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B> Previous:</B> <A NAME=tex2html858 HREF=subsubsection3_5_3_4.html> Choosing the Orientation </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00053500000000000000> Event Handling<A NAME=335> </A></A></H3>
+<P>
+You can handle the events in a TList widget using the <tt>-browsecmd</tt> and
+ <tt>-command</tt> options. The meanings of these two options are silimar to
+ their meanings in other Tix widgets such as the ComboBox. Usually, the
+ command specified by <tt>-browsecmd</tt> is called when the user clicks or
+ drags the mouse over the items or presses the arrow keys. The command
+ specified by <tt>-command</tt> is called when the user double-clicks or
+ presses the Return key. These commands are called with one extra
+ argument - the index of the currently ``active'' item, which is usually
+ the item under the mouse cursor.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_6.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_5_3_6.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,33 @@
+<HEAD>
+<TITLE> Selection<A NAME=336> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html874 HREF=section3_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html872 HREF=subsection3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html868 HREF=subsubsection3_5_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html876 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html875 HREF=section3_6.html> Hierarchical Listbox</A>
+<B>Up:</B> <A NAME=tex2html873 HREF=subsection3_5_3.html> Creating Display Items </A>
+<B> Previous:</B> <A NAME=tex2html869 HREF=subsubsection3_5_3_5.html> Event Handling</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00053600000000000000> Selection<A NAME=336> </A></A></H3>
+<P>
+The <tt>-selectmode</tt> option controls how many items the user can select at
+ one time. In the <tt>single</tt> and <tt>browse</tt> mode, the user can select
+ only one item at a time. In the <tt>multiple</tt> and <tt>extended</tt> mode,
+ the user can select multiple items; the <tt>extended</tt> mode allows
+ disjoint selections while the <tt>multiple</tt> mode does not.
+<P>
+ Normally, the user selects the items using the mouse or the
+ keyboard. You can find out which items the user has selected with the
+ <tt>info selection</tt> method, which returns a list of the currently
+ selected items. You can also set the selection using the <tt>selection
+ set</tt> method. For example, the command <tt>.tlist selection set 3</tt>
+ selects the item whose index is <tt>3</tt>. The command <tt>.tlist
+ selection set 2 10</tt> selects all the items at index <tt>2</tt> through <tt>10</tt>. The method <tt>selection clear</tt> empties the selection.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,55 @@
+<HEAD>
+<TITLE> Creating a Hierarchical List<A NAME=411> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html917 HREF=subsubsection3_6_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html915 HREF=subsection3_6_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html909 HREF=subsection3_6_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html919 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html918 HREF=subsubsection3_6_1_2.html> Creating Entries in </A>
+<B>Up:</B> <A NAME=tex2html916 HREF=subsection3_6_1.html> TixHList - The </A>
+<B> Previous:</B> <A NAME=tex2html910 HREF=subsection3_6_1.html> TixHList - The </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00061100000000000000> Creating a Hierarchical List<A NAME=411> </A></A></H3>
+<P>
+A TixHList widget can be created by the command <tt>tixHList</tt>. However, most likely, you would want to create a TixHList
+ with scrollbars attached. Therefore, usually you will use the <tt>tixScrolledHList</tt> command to create a scrolled hierarchical listbox
+ (line 1 in program 4-2). The <tt>tixScrolledHList</tt>
+ command is very similar to the <tt>TixScrolledListBox</tt> command we
+ saw in section 2.3.1. It creates a TixHList subwidget
+ of the name <tt>hlist</tt> and attaches two scrollbars to it.
+<P>
+ As shown in the first five lines in program 4-2, we
+ create a scrolled TixHList widget, using the <tt>-options</tt> switch
+ (see section 1.3.5) to set several options for the <tt>hlist</tt> subwidget (we'll talk about these options shortly). Then, we
+ can access the HList subwidget widget using the <tt>subwidget
+ hlist</tt> method (line 7 in program 4-2).
+<P>
+<blockquote> <P><tt> tixScrolledHList .sh -options {<BR>
+ hlist.itemType text<BR>
+ hlist.drawBranch false<BR>
+ hlist.indent 8<BR>
+}<BR>
+pack .sh -expand yes -fill both<BR>
+set hlist [.sh subwidget hlist]<BR>
+<BR>
+$hlist add foo -text "foo"<BR>
+$hlist add foo.bar -text "foo's 1st son"<BR>
+$hlist add foo.bor -text "foo's 2nd son"<BR>
+$hlist add foo.bar.bao -text "foo's 1st son's 1st son"<BR>
+$hlist add foo.bar.kao -text "foo's 1st son's 2nd son"<BR>
+$hlist add dor -text "dor, who has no son"
+</tt>
+<P></blockquote>
+<P><CENTER>(Figure 4-2) Creating Entries in a HList Widget<A NAME=42> </A>
+ </CENTER>
+<P>
+<P><blockquote> <P><P><CENTER><IMG SRC="../gif/tix/hlist/hlist_ex1.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,83 @@
+<HEAD>
+<TITLE> Creating Entries in a HList Widget<A NAME=412> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html928 HREF=subsubsection3_6_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html926 HREF=subsection3_6_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html920 HREF=subsubsection3_6_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html930 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html929 HREF=subsubsection3_6_1_3.html> Controlling the Layout </A>
+<B>Up:</B> <A NAME=tex2html927 HREF=subsection3_6_1.html> TixHList - The </A>
+<B> Previous:</B> <A NAME=tex2html921 HREF=subsubsection3_6_1_1.html> Creating a Hierarchical </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00061200000000000000> Creating Entries in a HList Widget<A NAME=412> </A></A></H3>
+<P>
+ Each entry in an HList widget has a unique name, called its <em>entry-path</em>, which determines each entry's position in the HList
+ widget. The entry-paths of the HList entries are very similar to the
+ pathnames of Unix files. Each entry-path is a list of string names
+ separated by a <em>separator character</em>. By default, the separator
+ character is the period character (<tt>.</tt>), but it can be
+ configured using the <tt>-separator</tt> option of the HList widget.
+<P>
+ In program 4-3, we add several new entries <tt>foo</tt>,
+ <tt>foo.bar</tt>, <tt>foo.bor</tt>, <tt>foo.bar.bao</tt>, .. etc, into the
+ HList widget using the <tt>add</tt> method. The relationship between
+ the entries is signified by their names, in a way similar to how
+ Unix denotes directories and subdirectories. For example, <tt>foo</tt>
+ is the <em>parent</em> of <tt>foo.bar</tt> and <tt>foo.bor</tt>; <tt>foo.bar</tt> is the parent of <tt>foo.bar.bao</tt>, and so on. As far as
+ the terminology goes, we also say that <tt>foo.bar</tt> a <em>child</em>
+ of <tt>foo</tt>; <tt>foo</tt> is an <em>ancestor</em> of <tt>foo.bar.bao</tt>
+ and <tt>foo.bar.bao</tt> is a <em>descendant</em> of <tt>foo</tt>.
+<P>
+ The output of program 4-2 is shown in figure
+ 4-3. As we can see, the entries are displayed under
+ their parents with the amount of indentation control by the <tt>-indent</tt> option of the HList widget: <tt>foo.bar.bao</tt> and <tt>foo.bar.kao</tt> are display under <tt>foo.bar</tt>, which is in turn
+ displayed under <tt>foo</tt>.
+<P>
+ Entries with no parents, for example, <tt>foo</tt> and <tt>dor</tt> in
+ program 4-2, are called <em>top-level
+ entries</em>. Top-level entries are usually entries with no immediate
+ superiors in a hierarchical. For example, the owner of a company, the
+ principle of a school or the root directory of a Unix file
+ system. Toplevel entries are displayed with no indentation.
+<P>As evident from program 4-2, all entries who
+ entry-path does not contain a separator character are top-level
+ entries. The only exception is the separator character itself is
+ also a toplevel entry. This makes it easy to display Unix file and
+ directory names inside the HList widget, as shown in program
+ 4-4.
+<P>
+<blockquote> <P><tt> set folder [tix getimage folder]<BR>
+tixScrolledHList .sh -options {<BR>
+ hlist.separator /<BR>
+ hlist.itemType imagetext<BR>
+ hlist.drawBranch true<BR>
+ hlist.indent 14<BR>
+ hlist.wideSelection false<BR>
+}<BR>
+pack .sh -expand yes -fill both<BR>
+set hlist [.sh subwidget hlist]<BR>
+<BR>
+foreach directory {/ /usr /usr/bin /usr/local /etc /etc/rc.d} {<BR>
+ $hlist add $directory -image $folder -text $directory<BR>
+}</tt>
+<P></blockquote>
+<P><CENTER>(Figure 4-4) Displaying Directories in a HList Widget<A NAME=44> </A>
+ </CENTER>
+<P>
+<blockquote> <P><P>
+<P><CENTER><IMG SRC="../gif/tix/hlist/hlist_ex2.gif">
+ </CENTER>
+</blockquote>
+<P>
+ Each entry is associated with a display item (see section 3.2
+ about display items). We can use the <tt>-itemtype</tt>
+option of the HList widget to specify the default type of display item
+to be created by the the <tt>add</tt> method, as shown in program 4-2
+ and 4-4. Alternatively, we can also specify
+the type of display item using the <tt>-itemtype</tt> option for the <tt>add</tt> method.
+<P><HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,26 @@
+<HEAD>
+<TITLE> Controlling the Layout of the Entries<A NAME=413> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html939 HREF=subsubsection3_6_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html937 HREF=subsection3_6_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html931 HREF=subsubsection3_6_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html941 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html940 HREF=subsubsection3_6_1_4.html> Handling the Selection </A>
+<B>Up:</B> <A NAME=tex2html938 HREF=subsection3_6_1.html> TixHList - The </A>
+<B> Previous:</B> <A NAME=tex2html932 HREF=subsubsection3_6_1_2.html> Creating Entries in </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00061300000000000000> Controlling the Layout of the Entries<A NAME=413> </A></A></H3>
+<P>
+There are two options to control the layout of the entries: the <tt>-showbranch</tt> option specifies whether branch lines should be drawn
+ between parent entries and their children. The <tt>-indent</tt> option
+ controls the amount of relative indentation between parent and child
+ entries. Notice the <tt>-drawbranch</tt> option is turned on in figure 4-5
+ but turned off in figure 4-3. Usually, you need
+ to set a bigger indentation when the branches are shown - we used an
+ indentation of 14 pixels in 4-5 compared to 8 pixels in 4-3
+. <P><HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_6_1_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+<HEAD>
+<TITLE> Handling the Selection and User Event<A NAME=414> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html948 HREF=subsection3_6_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html946 HREF=subsection3_6_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html942 HREF=subsubsection3_6_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html950 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html949 HREF=subsection3_6_2.html> Creating Collapsible Tree </A>
+<B>Up:</B> <A NAME=tex2html947 HREF=subsection3_6_1.html> TixHList - The </A>
+<B> Previous:</B> <A NAME=tex2html943 HREF=subsubsection3_6_1_3.html> Controlling the Layout </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00061400000000000000> Handling the Selection and User Event<A NAME=414> </A></A></H3>
+<P>
+The handling of the selection and user events for the HList widget
+ is very similar to the TList widget (see section
+ 3.3.5), except that for the HList widget all the
+ operations are based on entry-paths, not list indices. The methods
+ <tt>info selection</tt>, <tt>selection set</tt> and <tt>selection clear</tt>
+ can be used to query, set or clear the selection; the option <tt>-selectmode</tt> controls how many entries can be selected at a time;
+ the options <tt>-browsecmd</tt> and <tt>-command</tt> can be used to
+ specify a command to be called to handle user events.
+<P>
+ There is one more option worth mentioning: the <tt>-wideselection</tt>
+ option. When set to <tt>true</tt>, the selection highlight will be drawn
+ across the whole HList widget (see figure 4-3). When set to
+ false, selection highlight will be drawn as wide as the selected entry
+ (see figure 4-5). Normally, you would set <tt>-wideselection</tt> to <tt>false</tt> when you use <tt>imagetext</tt> items inside
+ (as we did in program 4-4).
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+<HEAD>
+<TITLE> Using the TixFileSelectDialog Widget<A NAME=511> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1002 HREF=subsubsection3_7_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1000 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html994 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1004 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1003 HREF=subsubsection3_7_1_2.html> The Subwidget in </A>
+<B>Up:</B> <A NAME=tex2html1001 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<B> Previous:</B> <A NAME=tex2html995 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00071100000000000000> Using the TixFileSelectDialog Widget<A NAME=511> </A></A></H3>
+<P>
+An example of using the TixFileSelectDialog widget is in figure 5-1
+. At line 1, we create a TixFileSelectDialog widget and set
+ the title of the dialog to ``Select A File'' using the <tt>-title</tt>
+ option. We also use the <tt>-command</tt> option to specify that the
+ procedure <tt>selectCmd</tt> should be called when the user has selected a
+ file. <tt>selectCmd</tt> will be called with one parameter, the filename
+ selected by the user. When the TixFileSelectDialog widget is created, it
+ is initially not shown on the screen. Therefore, at line 3, we call its
+ <tt>popup</tt> widget command to place the widget on the screen.
+<P>
+<P><tt> tixFileSelectDialog .file -title "Select A File" -command selectCmd<BR>
+.file subwidget fsbox config -pattern "*.txt" -directory /usr/info<BR>
+.file popup<BR>
+<BR>
+proc selectCmd {filename} {<BR>
+ puts "You have selected $filename"<BR>
+}</tt>
+<P><P><CENTER>(Figure 5-1) Using the TixFileSelectDialog<A NAME=51> </A>
+ </CENTER>
+<P>
+<blockquote> <P><P><CENTER><IMG SRC="../gif/tix/filesel/fb_comp.gif">
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,42 @@
+<HEAD>
+<TITLE> The Subwidget in the TixFileSelectDialog<A NAME=512> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1013 HREF=subsubsection3_7_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1011 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1005 HREF=subsubsection3_7_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1015 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1014 HREF=subsubsection3_7_1_3.html> The TixExFileSelectDialog Widget</A>
+<B>Up:</B> <A NAME=tex2html1012 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<B> Previous:</B> <A NAME=tex2html1006 HREF=subsubsection3_7_1_1.html> Using the TixFileSelectDialog </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00071200000000000000> The Subwidget in the TixFileSelectDialog<A NAME=512> </A></A></H3>
+<P>
+We may also want to set other options for the file dialog such as its file
+ filter and working directory. To do this, we must know the composition of
+ the TixFileSelectDialog widget. As shown in figure 5-2, the
+ TixFileSelectDialog contains a subwidget <tt>fsbox</tt> of the type
+ TixFileSelectBox and a subwidget <tt>bbox</tt> of the type TixStdButtonBox.
+<P>
+ The <tt>fsbox</tt> subwidget supports the <tt>-pattern</tt> and <tt>-directory</tt> options. At line 2 of figure 5-1, we use the <tt>-directory</tt> option to tell the <tt>fsbox</tt> subwidget to display files in
+the directory <tt>/usr/info</tt>; we also use the <tt>-pattern</tt> option to
+specify we only want the filenames that has the <tt>txt</tt> extension.
+<P>
+ The <tt>fsbox</tt> subwidget also supports the <tt>-selection</tt> option,
+ which stores the filename currently selected by the user. We can
+ query this value by the <tt>cget</tt> widget command of the <tt>fsbox</tt>
+ subwidget.
+<P>
+Remember that the <tt>-pattern</tt>, <tt>-directory</tt> and <tt>-selection</tt>
+ options do not belong to the TixFileSelectDialog widget. A common mistake
+ that people make is to try to configure the non-existent <tt>-pattern</tt>
+ option of the TixFileSelectDialog, which causes much despair, long error
+ messages and great loss of self-confidence. <em>Always remember:</em>, when
+ you want to configure an option, find out whether it belongs to the
+ widget or its subwidgets.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+<HEAD>
+<TITLE> The TixExFileSelectDialog Widget<A NAME=513> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1024 HREF=subsubsection3_7_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1022 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1016 HREF=subsubsection3_7_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1026 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1025 HREF=subsubsection3_7_1_4.html> Specifying File Types </A>
+<B>Up:</B> <A NAME=tex2html1023 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<B> Previous:</B> <A NAME=tex2html1017 HREF=subsubsection3_7_1_2.html> The Subwidget in </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00071300000000000000> The TixExFileSelectDialog Widget<A NAME=513> </A></A></H3>
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/filesel/exfile.gif">
+ </CENTER>
+</blockquote>
+<P>
+The TixExFileSelectDialog widget is very similar to the TixFileSelectDialog
+ widget. It supports all the options and widget commands of the latter, so
+ essentially we can just take the program 5-1 and replace the
+ command <tt>tixFileSelectDialog</tt> in the first line to <tt>tixExFileSelectDialog</tt>.
+<P>
+The composition of the TixExFileSelectDialog widget is a bit different: it
+ contains one contains one subwidget, which is also called <tt>fsbox</tt>, of
+ the type TixExFileSelectBox widget (figure 5-3). Again this
+ <tt>fsbox</tt> widgets supports all widget options and commands of the <tt>fsbox</tt> subwidget in TixFileSelectDialog, so the line 2 of program 5-1
+ can work for TixExFileSelectDialog widgets without any
+ change.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_7_1_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Specifying File Types for TixExFileSelectDialog<A NAME=514> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1035 HREF=subsubsectionstar3_7_1_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1033 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1027 HREF=subsubsection3_7_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1037 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1036 HREF=subsubsectionstar3_7_1_5.html> 5.1.5 The tix </A>
+<B>Up:</B> <A NAME=tex2html1034 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<B> Previous:</B> <A NAME=tex2html1028 HREF=subsubsection3_7_1_3.html> The TixExFileSelectDialog Widget</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00071400000000000000> Specifying File Types for TixExFileSelectDialog<A NAME=514> </A></A></H3>
+<P>
+The TixExFileSelectBox widget has a ComboBox subwidget marked as
+ ``Select Files of Type:'' (see figure 5-3). This widget
+ contains some pre-set types of files for the user to choose
+ from. For example, a word processor program can include choices such
+ as ``Microsoft Word Documents'' and ``WordPerfect Documents''.
+<P>
+The TixExFileSelectBox widget has a <tt>-filetypes</tt> option for this
+ purpose. As shown in line 3 through 7 in program 5-4, the
+ value for the <tt>-filetypes</tt> option is a list. Each item in the list
+ should contain two parts. The first part is a list of file patterns and
+ the second part is the textual name for this type of files.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_1_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_1_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,43 @@
+<HEAD>
+<TITLE> Widget Classes and Widget Instances<A NAME=611> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1112 HREF=subsubsection3_8_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1110 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1104 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1114 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1113 HREF=subsubsection3_8_1_2.html> What is in </A>
+<B>Up:</B> <A NAME=tex2html1111 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<B> Previous:</B> <A NAME=tex2html1105 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00081100000000000000> Widget Classes and Widget Instances<A NAME=611> </A></A></H3>
+<P>
+All the mega-widget classes in Tix, such as TixComboBox and
+ TixControl, are implemented in the Tix Intrinsics framework. Also,
+ you can write new <em>widget classes</em> with the Tix Intrinsics. In
+ the next section, I'll go through all the steps of creating a new
+ widget class in Tix. I'll illustrate the idea using a new class
+ ``TixArrowButton'' as an example. TixArrowButton is essentially a
+ button that can display an arrow in one of the for directions
+ (see figure 6-1).
+<P>
+<blockquote> <P><CENTER><IMG SRC="../gif/tix/oop/arrows.gif">
+ </CENTER>
+</blockquote>
+<P>
+ Once you have defined your classes, you can create <em>widget
+ instances</em> of these classes. For example, the following code will
+ create four instances of your new TixArrowButton class:
+<P>
+<blockquote> <P><tt> tixArrowButton .up -direction n<BR>
+tixArrowButton .left -direction e<BR>
+tixArrowButton .right -direction w<BR>
+tixArrowButton .down -direction s
+</tt>
+<P></blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_1_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_1_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,22 @@
+<HEAD>
+<TITLE> What is in a Widget Instance<A NAME=612> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1123 HREF=subsubsectionstar3_8_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1121 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1115 HREF=subsubsection3_8_1_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1125 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1124 HREF=subsubsectionstar3_8_1_3.html> Variables</A>
+<B>Up:</B> <A NAME=tex2html1122 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<B> Previous:</B> <A NAME=tex2html1116 HREF=subsubsection3_8_1_1.html> Widget Classes and </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00081200000000000000> What is in a Widget Instance<A NAME=612> </A></A></H3>
+<P>
+Each widget instance is composed of three integral parts: variables,
+ methods and component widgets
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_2_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_2_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,91 @@
+<HEAD>
+<TITLE> Using the tixWidgetClass Command<A NAME=621> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1175 HREF=subsection3_8_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1173 HREF=subsection3_8_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1169 HREF=subsection3_8_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1177 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1176 HREF=subsection3_8_3.html> Writing Methods</A>
+<B>Up:</B> <A NAME=tex2html1174 HREF=subsection3_8_2.html> Widget Class Declaration</A>
+<B> Previous:</B> <A NAME=tex2html1170 HREF=subsection3_8_2.html> Widget Class Declaration</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00082100000000000000> Using the tixWidgetClass Command<A NAME=621> </A></A></H3>
+<P>
+We can use the <tt>tixWidgetClass</tt> command to declare a new
+class. The syntax is:
+<P>
+<blockquote> <P><tt> tixWidgetClass classCommandName {<BR>
+ -switch value<BR>
+ -switch value<BR>
+ ....<BR>
+}</tt>
+<P></blockquote>
+<P>
+For example, the following is the declaration section of TixArrowButton:
+<P>
+<P><tt> tixWidgetClass tixArrowButton {<BR>
+ -classname TixArrowButton<BR>
+ -superclass tixPrimitive<BR>
+ -method {<BR>
+ flash invoke invert<BR>
+ }<BR>
+ -flag {<BR>
+ -direction -state<BR>
+ }<BR>
+ -configspec {<BR>
+ {-direction direction Direction e}<BR>
+ {-state state State normal}<BR>
+ }<BR>
+ -alias {<BR>
+ {-dir -direction}<BR>
+ }<BR>
+ -default {<BR>
+ {*Button.anchor c}<BR>
+ {*Button.padX 5}<BR>
+ }<BR>
+}</tt><P><P><CENTER>(Figure 6-2) declaration of the TixArrowButton Class<A NAME=62> </A>
+ </CENTER>
+<P>
+ We'll look at what each option means as I describe the command in
+ the following sections.
+<P>
+ The first argument for <tt>tixWidgetClass</tt> is the <em>command name</em>
+ for the widget class (<tt>tixArrowButton</tt>). Command names are used to
+ create widgets of this class. For example, the code
+<P>
+<blockquote> <P><tt> tixArrowButton .arrow
+</tt>
+<P></blockquote>
+ creates a widget instance <tt>.arrow</tt> of the class
+ TixArrowButton. Also, the command name is used as a prefix of all
+ the methods of this class. For example, the <tt>Foo</tt> and <tt>Bar</tt>
+ methods of the class TixArrowButton will be written as <tt>tixArrowButton:Foo</tt> and <tt>tixArrowButton:Bar</tt>.
+<P>
+ The <em>class name</em> of the class (<tt>TixArrowButton</tt>)is specified
+ by the <tt>-classname</tt> switch inside the main body of the
+ declaration. The class name is used only to specify options in the
+ TK option database. For example, the following commands specifies
+ the TixArrowButton widget instances should have the default value
+ <tt>up</tt> for their <tt>-direction</tt> option and the default value
+ <tt>normal</tt> for their <tt>-state</tt> option.
+<P>
+<blockquote> <P><tt> option add *TixArrowButton.direction up<BR>
+option add *TixArrowButton.state normal
+</tt>
+<P></blockquote>
+<P>Notice the difference in the capitalization of the class name
+ and the command name of the TixArrowButton class: both of them has
+ the individual words capitalized, but the command name (<tt>tixArrowButton</tt>)starts with a lower case letter while the class name
+ (<tt>TixArrowButton</tt>) starts with an upper case letter. When you
+ create your own classes, you should follow this naming convention.
+<P>The <tt>-superclass</tt> switch specifies the superclass of the new
+ widget. In our example, we have set it to <tt>tixPrimitive</tt>. Again,
+ pay attention to the capitalization: we should use the command name
+ of the superclass, not its class name.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_3_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_3_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Declaring Public Methods<A NAME=631> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1196 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1194 HREF=subsection3_8_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1190 HREF=subsection3_8_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1198 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1197 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<B>Up:</B> <A NAME=tex2html1195 HREF=subsection3_8_3.html> Writing Methods</A>
+<B> Previous:</B> <A NAME=tex2html1191 HREF=subsection3_8_3.html> Writing Methods</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00083100000000000000> Declaring Public Methods<A NAME=631> </A></A></H3>
+<P>
+All the methods of a class are by default private methods and cannot
+ be accessed by the application programmer. If you want to make a
+ method public, you can include its name in the <tt>-method</tt> section
+ of the class declaration. In our TixArrowButton example, we have
+ declared that the methods <tt>flash</tt>, <tt>invert</tt> and <tt>invoke</tt>
+ are public methods and they can be accessed by the application
+ programmer. All other methods of the TixArrowButton class will be
+ private.
+ Usually, the names of private methods start with a capital letter
+ with individual words capitalized. The names of public methods
+ start with a lowercase letter.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,34 @@
+<HEAD>
+<TITLE> The InitWidgetRec Method<A NAME=641> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1223 HREF=subsubsectionstar3_8_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1221 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1215 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1225 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1224 HREF=subsubsectionstar3_8_4_2.html> Chaining Methods</A>
+<B>Up:</B> <A NAME=tex2html1222 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<B> Previous:</B> <A NAME=tex2html1216 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00084100000000000000> The InitWidgetRec Method<A NAME=641> </A></A></H3>
+<P>
+The purpose of the <tt>InitWidgetRec</tt> method is to initialize the
+ variables of the widget instance. For example, the following
+ implementation of <tt>tixArrowButton:InitWidgetRec</tt> sets the <tt>count</tt> variable of each newly created instance to zero.
+<P>
+<blockquote> <P><tt> proc tixArrowButton:InitWidgetRec {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ set data(count) 0<BR>
+}</tt>
+<P></blockquote>
+<P>Earlier, we showed how each widget you create is associated with an
+ array of the same name. Within the methods, you always refer to
+ this array through the name <tt>data</tt> -the method then works
+ properly in each instance of the widget.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,41 @@
+<HEAD>
+<TITLE> The ConstructWidget Method<A NAME=642> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1256 HREF=subsubsection3_8_4_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1254 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1248 HREF=subsubsectionstar3_8_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1258 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1257 HREF=subsubsection3_8_4_5.html> The SetBindings Method</A>
+<B>Up:</B> <A NAME=tex2html1255 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<B> Previous:</B> <A NAME=tex2html1249 HREF=subsubsectionstar3_8_4_3.html> The tixChainMethod call</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00084400000000000000> The ConstructWidget Method<A NAME=642> </A></A></H3>
+<P>
+The <tt>ConstructWidget</tt> method is used to creates the components
+ of a widget instance. In the case of TixArrowButton, we want to
+ create a new button subwidget, whose name is <tt>button</tt>, and use a
+ bitmap to display an arrow on this button. Assuming the bitmap files
+ are stored in the files <tt>up.xbm</tt>, <tt>down.xbm</tt>, <tt>left.xbm</tt>
+ and <tt>right.xbm</tt>, the string substitution <tt>@$data(-direction).xbm</tt> will give us the appropriate bitmap
+ depending on the current direction option of the widget instance.
+<P>
+<blockquote> <P><tt> proc tixArrowButton:ConstructWidget {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ tixChainMethod $w ConstructWidget<BR>
+<BR>
+ set data(w:button) [button $w.button -bitmap @$data(-direction).xbm]<BR>
+ pack $data(w:button) -expand yes -fill both<BR>
+}</tt>
+<P></blockquote>
+<P>The <tt>tixArrowButton:ConstructWidget</tt> method shown above sets
+ the variable <tt>data(w:button)</tt> to be the pathname of the <tt>button</tt> subwidget. As a convention of the Tix Intrinsics, we must
+ declare a public subwidget <em>swid</em> by storing its pathname in the
+ variable <tt>data(w:</tt><em>swid</em><tt>)</tt>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_4_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+<HEAD>
+<TITLE> The SetBindings Method<A NAME=643> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1265 HREF=subsection3_8_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1263 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1259 HREF=subsubsection3_8_4_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1267 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1266 HREF=subsection3_8_5.html> Declaring and Using </A>
+<B>Up:</B> <A NAME=tex2html1264 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<B> Previous:</B> <A NAME=tex2html1260 HREF=subsubsection3_8_4_4.html> The ConstructWidget Method</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00084500000000000000> The SetBindings Method<A NAME=643> </A></A></H3>
+<P>
+In your interface, you want to handle a lot of events in the
+ subwidgets that make up your mega-widget. For instance, when
+ somebody presses the button in a TixArrowButton widget, you want the
+ button to handle the event. The <tt>SetBindings</tt> method is used to
+ creates event bindings for the components inside the mega-widget. In
+ our TixArrowButton example, we use the bind command to specify that
+ the method <tt>tixArrowButton:IncrCount</tt> should be called each
+ time when the user presses the first mouse button. As a result, we
+ can count the number of times the user has pressed on the button
+ (obviously for no better reasons than using it as a dumb example).
+<P>
+<blockquote> <P><tt> proc tixArrowButton:SetBindings {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ tixChainMethod $w SetBindings<BR>
+<BR>
+ bind $data(w:button) $<$1$>$ "tixArrowButton:IncrCount $w"<BR>
+}<BR>
+<BR>
+proc tixArrowButton:IncrCount {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ incr data(count)<BR>
+}</tt>
+<P></blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_5_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_5_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+<HEAD>
+<TITLE> Initialization of Public Variables<A NAME=651> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1291 HREF=subsubsectionstar3_8_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1289 HREF=subsection3_8_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1283 HREF=subsection3_8_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1293 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1292 HREF=subsubsectionstar3_8_5_2.html> Type Checker</A>
+<B>Up:</B> <A NAME=tex2html1290 HREF=subsection3_8_5.html> Declaring and Using </A>
+<B> Previous:</B> <A NAME=tex2html1284 HREF=subsection3_8_5.html> Declaring and Using </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00085100000000000000> Initialization of Public Variables<A NAME=651> </A></A></H3>
+<P>
+When a widget instance is created, all of its public variables are
+ initialized by the Tix Intrinsics before the <tt>InitWidgetRec</tt>
+ method is called. Therefore, <tt>InitWidgetRec</tt> and any other
+ method of this widgte instance are free to assume that all the
+ public variables have been properly initialized and use them as
+ such.
+<P>The public variables are initialized by the following criteria.
+<P>
+<blockquote> <UL><P><LI><P>Step 1: If the value of the variable is specified by the
+ creation command, this value is used. For example, if the
+ application programmer has created an instance in the following way:
+<P>
+<blockquote> <P><tt> tixArrowButton .arr -direction n
+</tt>
+<P></blockquote>
+<P>The value <tt>n</tt> will be used for the -direction variable.
+<P><LI><P>Step 2: if step 1 fails but the value of the variable is
+ specified in the options database, that value is used. For example,
+ if the user has created an instance in the following way:
+<P>
+<blockquote> <P><tt> option add *TixArrowButton.direction w<BR>
+tixArrowButton .arr
+</tt>
+<P></blockquote>
+<P>The value <tt>w</tt> will be used for the <tt>-direction</tt> variable.
+<P><LI><P>Step3: if step 2 also fails, the default value specified in
+ the <tt>-configspec</tt> secton of the class declaration will be used.
+<P></UL>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_5_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsection3_8_5_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,78 @@
+<HEAD>
+<TITLE> Public Variable Configuration Methods<A NAME=652> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1313 HREF=subsubsectionstar3_8_5_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1311 HREF=subsection3_8_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1305 HREF=subsubsectionstar3_8_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1315 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1314 HREF=subsubsectionstar3_8_5_4.html> Configuration Methods and </A>
+<B>Up:</B> <A NAME=tex2html1312 HREF=subsection3_8_5.html> Declaring and Using </A>
+<B> Previous:</B> <A NAME=tex2html1306 HREF=subsubsectionstar3_8_5_2.html> Type Checker</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00085300000000000000> Public Variable Configuration Methods<A NAME=652> </A></A></H3>
+<P>
+After a widget instance is created, the user can assign new values
+ to the public variables using the configure method. For example, the
+ following code changes the <tt>-direction</tt> variable of the <tt>.arr</tt> instance to <tt>n</tt>.
+<P>
+<blockquote> <P><tt> .arr configure -direction n
+</tt>
+<P></blockquote>
+<P>In order for configuration to work, you have to define a
+ configuration method that does what the programmer expects. The
+ configuration method of a public variable is invoked whenever the
+ user calls the configure method to change the value of this
+ variable. The name of a configuration method must be the name of the
+ public variable prefixed by the creation command of the class and
+ <tt>:config</tt>. For example, the name configuration method for the
+ <tt>-direction</tt> variable of the TixArrowButton class is <tt>tixArrowButton:config-direction</tt>. The following code implements
+ this method:
+<P>
+<blockquote> <P><tt> proc tixArrowButton:config-direction {w value} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ $data(w:button) config -bitmap @$value.xbm<BR>
+}</tt>
+<P></blockquote>
+<P>Notice that when <tt>tixArrowButton:config-direction</tt> is called,
+ the <tt>value</tt> parameter contains the new value of the <tt>-direction</tt> variable but <tt>data(-direction)</tt> contains the <tt>old</tt> value. This is useful when the configuration method needs to
+ check the previous value of the variable before taking in the new
+ value.
+<P>If a type checker is defined for a variable, it will be called
+ before the configuration method is called. Therefore, the
+ configuration method can assume that the type of the <tt>value</tt>
+ parameter is got is always correct.
+<P>Sometimes it is necessary to override the value supplied by the
+ user. The following code illustrates this idea:
+<P>
+<blockquote> <P><tt> proc tixArrowButton:config-direction {w value} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ if {$value == "n"} {<BR>
+ set value s<BR>
+ set data(-direction) $value<BR>
+ }<BR>
+<BR>
+ $data(w:button) config -bitmap @$value.xbm<BR>
+ return $data(-direction)<BR>
+}</tt>
+<P></blockquote>
+<P>Notice the above code always overrides values of <tt>n</tt> to <tt>s</tt>. If you need to override the value, you must do the following two
+ things:
+<P>
+<blockquote> <UL><P><LI><P>Explicitly set the instance variable inside the configuration
+ method (the <tt>set data(-direction) $value</tt> line).
+<P><LI><P>Return the modified value from the configuration method.
+</UL>
+</blockquote>
+<P>If you do not need to override the value, you don't need to return
+ anything from the configuration method. In this case, the Tix
+ Intrinsics will assign the new value to the instance variable for
+ you.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_2_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_2_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,41 @@
+<HEAD>
+<TITLE> Disabling Callbacks Temporarily<A NAME=1221> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html310 HREF=subsubsection3_3_2_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html308 HREF=subsection3_3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html302 HREF=subsubsection3_3_2_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html312 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html311 HREF=subsubsection3_3_2_4.html> Validating User Inputs</A>
+<B>Up:</B> <A NAME=tex2html309 HREF=subsection3_3_2.html> Getting Started: the </A>
+<B> Previous:</B> <A NAME=tex2html303 HREF=subsubsection3_3_2_2.html> Accessing The Value </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00032300000000000000> Disabling Callbacks Temporarily<A NAME=1221> </A></A></H3>
+<P>
+Now, if you want to change a value from within the program, you have to
+ disable the callback. The reason is that the callback runs whenever you
+ (as well as the user) makes a change. In particular, if you make a change
+ within the callback procedure and forget to disable the callback, it will
+ recursively call itself and enter an infinite loop. To avoid this
+ problem, you should use the <tt>-disablecallback</tt> option. Here is an
+ example:
+<P>
+<tt> tixControl .c -command addOne<BR>
+<BR>
+ proc addOne {value} {<BR>
+ .c config -disablecallback true<BR>
+ .c config -value [incr value]<BR>
+ .c config -disablecallback false<BR>
+ }</tt>
+<P>
+The procedure <tt>addOne</tt> adjusts the value of <tt>.c</tt> by one whenever
+ the user enters a new value into <tt>.c</tt>. Notice that it is necessary to
+ set <tt>-disablecallback</tt> here or otherwise <tt>addOne</tt> will be
+ infinitely recursed! That is because <tt>addOne</tt> is called <em>every
+ time</em> the value changes, either by the user or by the program.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,27 @@
+<HEAD>
+<TITLE> Label and Orientation<A NAME=1511> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html507 HREF=subsubsectionstar3_3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html505 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html499 HREF=subsubsection3_3_5_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html509 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html508 HREF=subsubsectionstar3_3_5_3.html> Creating the Button </A>
+<B>Up:</B> <A NAME=tex2html506 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html500 HREF=subsubsection3_3_5_1.html> Creating A TixSelect </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035200000000000000> Label and Orientation<A NAME=1511> </A></A></H3>
+<P>
+As shown in program 1-11, with the <tt>-label</tt>
+ option, we can put a label next to the button subwidgets as the
+ caption of the TixSelect widget. We can also control the layout of
+ the button subwidgets using the <tt>-orientation</tt> option. The <tt>-orientation</tt> option can have two values: <tt>horizontal</tt> (the
+ default value) or <tt>vertical</tt>, and the buttons are lied up
+ accordingly. Figure 1-12 shows the output of a
+ TixSelect widget whose <tt>-orientation</tt> is set to <tt>vertical</tt>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+<HEAD>
+<TITLE> Creating the Button Subwidgets and Configuring
+Their Appearance<A NAME=1512> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html518 HREF=subsubsectionstar3_3_5_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html516 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html510 HREF=subsubsectionstar3_3_5_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html520 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html519 HREF=subsubsectionstar3_3_5_4.html> Accessing the Button </A>
+<B>Up:</B> <A NAME=tex2html517 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html511 HREF=subsubsectionstar3_3_5_2.html> Label and Orientation</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035300000000000000> Creating the Button Subwidgets and Configuring
+Their Appearance<A NAME=1512> </A></A></H3>
+<P>
+After we have created the TixSelect widget, we can create the button
+ subwidgets inside the TixSelect widget by the <tt>add</tt> widget
+ command (lines 2-4 of program 1-11).
+<P>
+The first argument to the <tt>add</tt> command is the name of the button
+ subwidget. Additional arguments can be given in <em>option-value</em> pairs
+ to configure the appearance of the button subwidget. These <em>option-value</em> pairs can be any of those accepted by a normal TK button
+ widget. As shown in program 1-11, we use the <tt>-text</tt>
+ option to put appropriate text strings over the three button subwidgets.
+<P>
+Notice that we also set the <tt>-width</tt> option of all the button
+ subwidgets to 6 characters. This way, the three buttons will have
+ the same width. If we didn't set the <tt>-width</tt> option for the
+ button widgets, they will have different widths, depending on their
+ text string, and the result would look less esthetically pleasing
+ than buttons with same widths.
+<P>
+The output of program 1-11 is shown in figure
+ 1-12
+<P>
+<blockquote> <P><CENTER><P><IMG ALIGN="LEFT" SRC="../gif/tix/intro/select1.gif"> <IMG ALIGN="LEFT" SRC="../gif/tix/intro/select-vert.gif"><BR CLEAR=LEFT><CENTER>(Figure 1-12) The TixSelect Widget<A NAME=112> </A></CENTER><P>
+ </CENTER>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_3_5_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+<HEAD>
+<TITLE> Accessing the Button Subwidgets<A NAME=1513> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html529 HREF=subsubsection3_3_5_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html527 HREF=subsection3_3_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html521 HREF=subsubsectionstar3_3_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html531 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html530 HREF=subsubsection3_3_5_5.html> Specifying Selection Rules</A>
+<B>Up:</B> <A NAME=tex2html528 HREF=subsection3_3_5.html> The TixSelect Widget</A>
+<B> Previous:</B> <A NAME=tex2html522 HREF=subsubsectionstar3_3_5_3.html> Creating the Button </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00035400000000000000> Accessing the Button Subwidgets<A NAME=1513> </A></A></H3>
+<P>
+We have already seen the concept of subwidgets and how they can be
+ accessed in section 1.3.1 - when we create a Tix
+ mega-widget, some subwidgets are created for us automatically. For
+ example, the label and entry subwidgets inside a TixControl widget.
+ We can access these subwidgets in a multitude of ways, including
+ using the subwidget method.
+<P>
+One thing about the subwidgets we saw in section 1.3.1 is
+that they are ``static'', meaning they are created when the mega-widget is
+created and they remain there for the whole lifetime of the mega-widget.
+<P>
+The TixSelect widget takes us to a new concept: <em>dynamic
+ subwidgets</em> are subwidgets that can be created on-the-fly. After we
+ add a new button into the TixSelect widget, we get a new
+ subwidget. The name of this new subwidget is given by the first
+ parameter passed to the <tt>add</tt> method. As the following code
+ demonstrates, we can access this new subwidget using the <tt>subwidget</tt> method:
+<P>
+<blockquote> <tt> tixSelect .s<BR>
+.s add apple -text Apple<BR>
+.s add orange -text Orange<BR>
+# Mmmm..., let's make the widget look more educated<BR>
+# by using French words<BR>
+.s subwidget apple config -text Pomme<BR>
+.s subwidget orange config -text Orange
+</tt>
+</blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_7_1_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_7_1_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,77 @@
+<HEAD>
+<TITLE> 5.1.5 The <b><tt>tix filedialog</tt></b> Command<A NAME=515> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1044 HREF=subsection3_7_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1042 HREF=subsection3_7_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1038 HREF=subsubsection3_7_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1046 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1045 HREF=subsection3_7_2.html> Selecting Directories with </A>
+<B>Up:</B> <A NAME=tex2html1043 HREF=subsection3_7_1.html> File Selection Dialog </A>
+<B> Previous:</B> <A NAME=tex2html1039 HREF=subsubsection3_7_1_4.html> Specifying File Types </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00071500000000000000> 5.1.5 The <b><tt>tix filedialog</tt></b> Command<A NAME=515> </A></A></H3>
+<P>
+TixExFileSelectDialog and TixFileSelectDialog are very similar to
+ each other. So which one should we use? That is just a matter of
+ taste. However, since we know that programmers usually have bad
+ taste, clever programmers would rather step aside and let the users
+ exercise their own taste. To do this, we can use the <tt>tix
+ filedialog</tt> command.
+<P>
+ For any programs based on Tix, the user can choose his preferred
+ type of file dialog by setting the X resource <tt>FileDialog</tt> to
+ either <tt>tixFileSelectDialog</tt> or <tt>tixExFileSelectDialog</tt>.
+ This can usually be done by inserting a line similar to the
+ following into the user's <tt>.Xdefaults</tt> file:
+<blockquote> <P><tt> *myapp*FileDialog: tixExFileSelectDialog
+</tt>
+<P></blockquote>
+<P>
+ When we call the command <tt>tix filedialog</tt>, it will return a file
+ dialog widget of the user's preferred type.
+<P>
+ The advantage of using <tt>tix filedialog</tt> is it makes coding
+ flexible. If the management suddenly mandates that we dump the Motif
+ look-and-feel in favor of the MS Windows look-and-feel, we don't need to
+ dig up every line of <tt>tixFileSelectDialog</tt> calls and replace it with
+ <tt>tixExFileSelectDialog</tt>. Also, <tt>tix filedialog</tt> creates only one
+ copy of the file dialog, which can be shared by different parts of the
+ program. Therefore, we can avoid creating a separate file dialog widget
+ for each of the ``Open'', ``Save'' and ``Save As'' commands in our
+ application. This way, we can save resource since a file dialog is a
+ large widget and it takes up quite a bit of space.
+<P>
+<blockquote> <P><tt> set dialog [tix filedialog]<BR>
+$dialog -title "Select A File" -command selectCmd<BR>
+$dialog subwidget fsbox config -pattern "*.txt" -directory /usr/info<BR>
+if {[winfo class $dialog] == "TixExFileSelectDialog"} {<BR>
+ $dialog subwidget fsbox config -filetypes {<BR>
+ {\*} {* - All files}\<BR>
+ {\*.txt} {*.txt - Text files}\<BR>
+ {\*.c} {*.c - C source files}\<BR>
+ }<BR>
+}<BR>
+$dialog popup<BR>
+<BR>
+proc selectCmd {filename} {<BR>
+ puts "You have selected $filename"<BR>
+}</tt>
+<P></blockquote>
+<P><CENTER>(Figure 5-4) Using the <tt>tix dialog</tt> command<A NAME=54> </A>
+ </CENTER>
+<P>
+ The use of the <tt>tix filedialog</tt> command is shown in program 5-4
+. This program is very similar to what we saw in program 5-1
+, except now we aren't really sure which type of file dialog
+ the user have chosen. Therefore, if we want to do something allowed for
+ only one type of file dialogs, we have to be careful. At line 4 of
+ program 5-4, we use the <tt>winfo</tt> command to see whether
+ the type of the file dialog is TixExFileSelectDialog. If so, we set the
+ value for the <tt>-filetypes</tt> option of its <tt>fsbox</tt> subwidget.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+<HEAD>
+<TITLE> Variables<A NAME=6121> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1134 HREF=subsubsectionstar3_8_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1132 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1126 HREF=subsubsection3_8_1_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1136 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1135 HREF=subsubsectionstar3_8_1_4.html> Methods</A>
+<B>Up:</B> <A NAME=tex2html1133 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<B> Previous:</B> <A NAME=tex2html1127 HREF=subsubsection3_8_1_2.html> What is in </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00081300000000000000> Variables<A NAME=6121> </A></A></H3>
+<P>
+Each widget instance is associated with a set of variables. In the
+ example of an instance of the TixArrowButton class, we may use a
+ variable to store the direction to which the arrow is pointing
+ to. We may also use a variable to count how many times the user has
+ pressed the button.
+<P>
+ Each variable can be public or private. Public variables may be
+ accessed by the application programmer (usually via <tt>configure</tt>
+ or cget <tt>methods</tt>) and their names usually start with a dash
+ (<tt>-</tt>). They usually are used to represent some user-configurable
+ options of the widget instance. Private variables, on the other
+ hand, cannot be accessed by the application programmer. They are
+ usually used to store information about the widget instance that are
+ of interests only to the widget writer.
+<P>
+ All the variables of an instance are stored in a global array that
+ has the same name as the instance. For example, the variables of the
+ instance <tt>.up</tt> are stored in the global array <tt>.up:</tt>. The
+ public variable <tt>-direction</tt>, which records the direction to
+ which the arrow is pointing to, is stored in <tt>.up(-direction)</tt>.
+ The private variable <tt>count</tt>, which counts how many times the
+ user has pressed the button, is stored in <tt>.up(count)</tt>. In
+ comparison, the same variables of the <tt>.down</tt> instance are
+ stored in <tt>.down(-direction)</tt> and <tt>.down(count)</tt>.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,34 @@
+<HEAD>
+<TITLE> Methods<A NAME=6122> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1145 HREF=subsubsectionstar3_8_1_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1143 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1137 HREF=subsubsectionstar3_8_1_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1147 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1146 HREF=subsubsectionstar3_8_1_5.html> Component Widgets</A>
+<B>Up:</B> <A NAME=tex2html1144 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<B> Previous:</B> <A NAME=tex2html1138 HREF=subsubsectionstar3_8_1_3.html> Variables</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00081400000000000000> Methods<A NAME=6122> </A></A></H3>
+<P>
+To carry out operations on the widget, you define a set of
+ procedures called <em>methods</em> (to use common object-oriented
+ terminology). Each method can be declared as public or private. <em>Public methods</em> can be called by the application programmer. For
+ example, if the TixArrowButton class supports the public methods
+ <tt>invoke</tt> and <tt>invert</tt>, the application programmer can issue
+ the commands to call these method for the widget instance <tt>.up</tt>.
+<P>
+<blockquote> <P><tt> .up invert<BR>
+.up invoke
+</tt>
+<P></blockquote>
+<P>
+ In contrast, <em>Private methods</em> are of interests only to widget
+ writers and cannot be called by application programmers.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_5.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_1_5.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,31 @@
+<HEAD>
+<TITLE> Component Widgets<A NAME=6123> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1154 HREF=subsection3_8_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1152 HREF=subsection3_8_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1148 HREF=subsubsectionstar3_8_1_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1156 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1155 HREF=subsection3_8_2.html> Widget Class Declaration</A>
+<B>Up:</B> <A NAME=tex2html1153 HREF=subsection3_8_1.html> Introduction to Tix </A>
+<B> Previous:</B> <A NAME=tex2html1149 HREF=subsubsectionstar3_8_1_4.html> Methods</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00081500000000000000> Component Widgets<A NAME=6123> </A></A></H3>
+<P>
+A Tix mega-widget is composed of one or more component
+ widgets. The main part of a mega-widget is called the <em>root
+ widget</em>, which is usually a frame widget that encompasses all other
+ component widgets. The other component widgets are called <em>subwidgets</em>.
+<P>The root widget has the same name as the the mega-widget itself. In
+ the above example, we have a mega-widget called <tt>.up</tt>. It has a
+ root widget which is a frame widget and is also called <tt>.up</tt>. Inside <tt>.up</tt> we have a button subwidget called <tt>.up.button</tt>.
+<P>Similar to variables and methods, component widgets are also
+ classified into public and private component widgets. Only public
+ widgets may be accessed by the application programmer, via the <tt>subwidget</tt> method (see section 1.3.1) of each widget
+ instance.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_4_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_4_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+<HEAD>
+<TITLE> Chaining Methods<A NAME=6411> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1234 HREF=subsubsectionstar3_8_4_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1232 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1226 HREF=subsubsection3_8_4_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1236 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1235 HREF=subsubsectionstar3_8_4_3.html> The tixChainMethod call</A>
+<B>Up:</B> <A NAME=tex2html1233 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<B> Previous:</B> <A NAME=tex2html1227 HREF=subsubsection3_8_4_1.html> The InitWidgetRec Method</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00084200000000000000> Chaining Methods<A NAME=6411> </A></A></H3>
+<P>
+The above implementation is not sufficient because our
+ TixArrowButton class is derived from TixPrimitive. The class
+ derivation in Tix is basically an <em>is-a</em> relationship:
+ TixArrowButton <em>is a</em> TixPrimitive. TixPrimitive defines the
+ method <tt>tixPrimitive:InitWidgetRec</tt> which sets up the instance
+ variables of every instance of TixPrimitive. Since an instance of
+ TixArrowButton is also an instance of TixPrimitive, we need to make
+ sure that the instance variables defined by TixPrimitive are also
+ properly initialized. The technique of calling a method defined in a
+ superclass is called the <em>chaining</em> of a method. The following
+ implementation does this correctly:
+<P>
+<blockquote> <P><tt> proc tixArrowButton:InitWidgetRec {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ tixPrimitive:InitWidgetRec $w<BR>
+ set data(count) 0<BR>
+}</tt>
+<P></blockquote>
+<P>Notice that <tt>tixPrimitive:InitWidgetRec</tt> is called before anything
+ else is done. This way, we can define new classes by means of
+ successive refinement: we can first ask the superclass to set up the
+ instance variables, then we can modify some of those variables when
+ necessary and also define new variables.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_4_3.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_4_3.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,80 @@
+<HEAD>
+<TITLE> The tixChainMethod call<A NAME=6412> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1245 HREF=subsubsection3_8_4_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1243 HREF=subsection3_8_4.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1237 HREF=subsubsectionstar3_8_4_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1247 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1246 HREF=subsubsection3_8_4_4.html> The ConstructWidget Method</A>
+<B>Up:</B> <A NAME=tex2html1244 HREF=subsection3_8_4.html> Standard Initialization Methods</A>
+<B> Previous:</B> <A NAME=tex2html1238 HREF=subsubsectionstar3_8_4_2.html> Chaining Methods</A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00084300000000000000> The tixChainMethod call<A NAME=6412> </A></A></H3>
+<P>
+The above implementation of <tt>tixArrowButton:InitWidgetRec</tt> is
+ correct but it may be cumbersome if we want to switch
+ superclasses. For example, suppose we want to create a new base class
+ TixArrowWidget, which presumably defines common attributes of any
+ class that have arrows in them. Then, instead of deriving
+ TixArrowButton directly from TixPrimitive, we decide to derive
+ TixArrowButton from TixArrowWidget, which is in turn derived from
+ TixPrimitive:
+<P>
+<blockquote> <P><tt> tixWidgetClass tixArrowWidget {<BR>
+ -superclass tixPrimitive<BR>
+ ...<BR>
+}<BR>
+tixWidgetClass tixArrowButton {<BR>
+ -superclass tixArrowWidget<BR>
+ ...<BR>
+}</tt>
+<P></blockquote>
+<P>Now we would need to change all the method chaining calls in
+ TixArrowButton from:
+<P>
+<blockquote> <P><tt> tixPrimitive:SomeMethod
+</tt>
+<P></blockquote>
+<P>to:
+<P>
+<blockquote> <P><tt> tixArrowWidget:SomeMethod
+</tt>
+<P></blockquote>
+<P>This may be a lot of work because you may have chained methods in many
+ places in the original implementation of TixArrowButton.
+<P>The <tt>tixChainMethod</tt> command solves this problem. It will
+ automatically find a superclass that defines the method we want to
+ chain and calls this method for us. For example, the following is a
+ better implementation of <tt>tixArrowButton:InitWidgetRec</tt> that
+ uses <tt>tixChainMethod</tt> to avoid calling <tt>tixPrimitive:InitWidgetRec</tt> directly:
+<P>
+<blockquote> <P><tt> proc tixArrowButton:InitWidgetRec {w} {<BR>
+ upvar #0 $w data<BR>
+<BR>
+ tixChainMethod $w InitWidgetRec<BR>
+ set data(count) 0<BR>
+}</tt>
+<P></blockquote>
+<P>Notice the order of the arguments for tixChainMethod: the name of
+ the instance, <tt>$w</tt>, is passed before the method we want to
+ chain, <tt>InitWidgetRec</tt>. In general, if the method we want to
+ chain has $1+n$arguments:
+<P>
+<blockquote> <P><tt> proc tixPrimitive:MethodToChain {w arg1 arg2 ... argn} {<BR>
+ ...<BR>
+}</tt>
+<P></blockquote>
+<P>We call it with the arguments in the following order
+<P>
+<blockquote> <P><tt> tixChainMethod $w MethodToChain $arg1 $arg2 ... $argn</tt>
+<P></blockquote>
+<P>We'll come back to more detailed discussion of <tt>tixChainMethod</tt>
+ shortly. For the time being, let's take it for granted that <tt>tixChainMethod</tt> must be used in the three standard initialization
+ methods: <tt>InitWidgetRec</tt>, <tt>ConstructWidget</tt> and <tt>SetBindings</tt>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_5_2.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_5_2.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+<HEAD>
+<TITLE> Type Checker<A NAME=6511> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1302 HREF=subsubsection3_8_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1300 HREF=subsection3_8_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1294 HREF=subsubsection3_8_5_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1304 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1303 HREF=subsubsection3_8_5_3.html> Public Variable Configuration </A>
+<B>Up:</B> <A NAME=tex2html1301 HREF=subsection3_8_5.html> Declaring and Using </A>
+<B> Previous:</B> <A NAME=tex2html1295 HREF=subsubsection3_8_5_1.html> Initialization of Public </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00085200000000000000> Type Checker<A NAME=6511> </A></A></H3>
+<P>
+You can use a <em>type ckecker procedure</em> to check whether the user
+ has supplied a value of the correct type for a public variable. The
+ type checker is specified in the <tt>-configspec</tt> section of the
+ class declaration after the default value. The following code
+ specifies the type checker procedure <tt>CheckDirection</tt> for the
+ <tt>-direction</tt> variable:
+<P>
+<blockquote> <P><tt> -configspec {<BR>
+ {-direction direction Direction e CheckDirection}<BR>
+ {-state state State normal}<BR>
+ }<BR>
+ ...<BR>
+}<BR>
+<BR>
+proc CheckDirection {dir} {<BR>
+ if {[lsearch {n s w e} $dir] != -1} {<BR>
+ return $dir<BR>
+ } else {<BR>
+ error "wrong direction value $<BR>$"$dir$<BR>$""<BR>
+}</tt>
+<P></blockquote>
+<P>
+ Notice that no type checker has been specified for the <tt>-state</tt>
+ variable and thus its value will not be checked.
+<P>
+ If a type checker procedure is specified for a public variable, this
+ procedure will be called once the value of a public variable is
+ determined by the three steps mentioned above.
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_5_4.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/subsubsectionstar3_8_5_4.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,32 @@
+<HEAD>
+<TITLE> Configuration Methods and Public Variable Initialization<A NAME=6521> </A></TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html1322 HREF=subsection3_8_6.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html1320 HREF=subsection3_8_5.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html1316 HREF=subsubsection3_8_5_3.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <A NAME=tex2html1324 HREF=tableofcontents3_1.html><IMG ALIGN=MIDDLE SRC="../gif/icons/contents_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html1323 HREF=subsection3_8_6.html> Summary of Widget </A>
+<B>Up:</B> <A NAME=tex2html1321 HREF=subsection3_8_5.html> Declaring and Using </A>
+<B> Previous:</B> <A NAME=tex2html1317 HREF=subsubsection3_8_5_3.html> Public Variable Configuration </A>
+<HR> <P>
+<A NAME=Contents> </A><H3><A NAME=SECTION00085400000000000000> Configuration Methods and Public Variable Initialization<A NAME=6521> </A></A></H3>
+<P>
+For efficiency reasons, the configuration methods are not called
+ during the intialization of the public variables. If you want to
+ force the configuration method to be called for a particular public
+ variable, you can specify it in the <tt>-forcecall</tt> section of the
+ class declaration. In the following example, we force the
+ configuration method of the <tt>-direction</tt> variable to be called
+ during intialization:
+<P>
+<blockquote> <P><tt> -forcecall {<BR>
+ -direction<BR>
+}</tt>
+<P></blockquote>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/TixBook/tableofcontents3_1.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/html/TixBook/tableofcontents3_1.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,171 @@
+<HEAD>
+<TITLE>Contents</TITLE>
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#000080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+ <HR> <A NAME=tex2html45 HREF=sectionstar3_2.html><IMG ALIGN=MIDDLE SRC="../gif/icons/next_motif.gif"></A> <A NAME=tex2html43 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/up_motif.gif"></A> <A NAME=tex2html37 HREF=TixBook.html><IMG ALIGN=MIDDLE SRC="../gif/icons/previous_motif.gif"></A> <BR>
+<B> Next:</B> <A NAME=tex2html46 HREF=sectionstar3_2.html> Preface</A>
+<B>Up:</B> <A NAME=tex2html44 HREF=TixBook.html>Tix Programming Guide</A>
+<B> Previous:</B> <A NAME=tex2html38 HREF=TixBook.html>Tix Programming Guide</A>
+<HR> <P>
+<P><H2><A NAME=SECTION00010000000000000000>Contents</A></H2>
+<UL>
+<LI> <A NAME=tex2html47 HREF=tableofcontents3_1.html#SECTION00010000000000000000>Contents</A>
+<LI> <A NAME=tex2html48 HREF=sectionstar3_2.html#SECTION00020000000000000000> Preface</A>
+<UL>
+<LI> <A NAME=tex2html49 HREF=subsectionstar3_2_1.html#SECTION00021000000000000000> About This Manual<A NAME=01> </A></A>
+<LI> <A NAME=tex2html50 HREF=subsectionstar3_2_2.html#SECTION00022000000000000000> About This Document<A NAME=02> </A></A>
+<LI> <A NAME=tex2html51 HREF=subsectionstar3_2_3.html#SECTION00023000000000000000> Organization of This Manual<A NAME=03> </A><A NAME=04> </A></A>
+</UL>
+<LI> <A NAME=tex2html52 HREF=section3_3.html#SECTION00030000000000000000> Introduction<A NAME=1> </A></A>
+<UL>
+<LI> <A NAME=tex2html53 HREF=subsection3_3_1.html#SECTION00031000000000000000> What is Tix<A NAME=11> </A></A>
+<UL>
+<LI> <A NAME=tex2html54 HREF=subsubsection3_3_1_1.html#SECTION00031100000000000000> Tix for Application Programmers<A NAME=111> </A></A>
+<LI> <A NAME=tex2html55 HREF=subsubsection3_3_1_2.html#SECTION00031200000000000000> Tix for Widget Developers<A NAME=112> </A></A>
+</UL>
+<LI> <A NAME=tex2html56 HREF=subsection3_3_2.html#SECTION00032000000000000000> Getting Started: the TixControl Widget<A NAME=12> </A></A>
+<UL>
+<LI> <A NAME=tex2html57 HREF=subsubsection3_3_2_1.html#SECTION00032100000000000000> Creating a TixControl Widget<A NAME=121> </A></A>
+<LI> <A NAME=tex2html58 HREF=subsubsection3_3_2_2.html#SECTION00032200000000000000> Accessing The Value of a TixControl Widget<A NAME=122> </A></A>
+<LI> <A NAME=tex2html59 HREF=subsubsectionstar3_3_2_3.html#SECTION00032300000000000000> Disabling Callbacks Temporarily<A NAME=1221> </A></A>
+<LI> <A NAME=tex2html60 HREF=subsubsection3_3_2_4.html#SECTION00032400000000000000> Validating User Inputs<A NAME=123> </A></A>
+</UL>
+<LI> <A NAME=tex2html61 HREF=subsection3_3_3.html#SECTION00033000000000000000> Accessing The Components Inside Mega Widgets<A NAME=13> </A></A>
+<UL>
+<LI> <A NAME=tex2html62 HREF=subsubsection3_3_3_1.html#SECTION00033100000000000000> Subwidgets<A NAME=131> </A></A>
+<LI> <A NAME=tex2html63 HREF=subsubsection3_3_3_2.html#SECTION00033200000000000000> Subwidget Names<A NAME=132> </A></A>
+<LI> <A NAME=tex2html64 HREF=subsubsection3_3_3_3.html#SECTION00033300000000000000> The <tt>subwidget</tt> Method<A NAME=133> </A></A>
+<LI> <A NAME=tex2html65 HREF=subsubsection3_3_3_4.html#SECTION00033400000000000000> Chaining the <tt>subwidget</tt> Method<A NAME=134> </A></A>
+<LI> <A NAME=tex2html66 HREF=subsubsection3_3_3_5.html#SECTION00033500000000000000> Configuring Subwidget Options Using the <tt>-options</tt> Switch<A NAME=135> </A></A>
+<LI> <A NAME=tex2html67 HREF=subsubsection3_3_3_6.html#SECTION00033600000000000000> Configuring Subwidget Options Using the Tk Option Database<A NAME=136> </A></A>
+<LI> <A NAME=tex2html68 HREF=subsubsection3_3_3_7.html#SECTION00033700000000000000> Caution: Restricted Access<A NAME=137> </A></A>
+</UL>
+<LI> <A NAME=tex2html69 HREF=subsection3_3_4.html#SECTION00034000000000000000> Another Tix Widget: TixComboBox<A NAME=14> </A></A>
+<UL>
+<LI> <A NAME=tex2html70 HREF=subsubsection3_3_4_1.html#SECTION00034100000000000000> Creating a TixComboBox Widget<A NAME=141> </A></A>
+<LI> <A NAME=tex2html71 HREF=subsubsection3_3_4_2.html#SECTION00034200000000000000> Controlling the Style of the TixComboBox<A NAME=142> </A></A>
+<LI> <A NAME=tex2html72 HREF=subsubsection3_3_4_3.html#SECTION00034300000000000000> Static Options<A NAME=143> </A></A>
+<LI> <A NAME=tex2html73 HREF=subsubsection3_3_4_4.html#SECTION00034400000000000000> Monitoring the User's Browsing Actions<A NAME=144> </A></A>
+</UL>
+<LI> <A NAME=tex2html74 HREF=subsection3_3_5.html#SECTION00035000000000000000> The TixSelect Widget<A NAME=15> </A></A>
+<UL>
+<LI> <A NAME=tex2html75 HREF=subsubsection3_3_5_1.html#SECTION00035100000000000000> Creating A TixSelect Widget<A NAME=151> </A></A>
+<LI> <A NAME=tex2html76 HREF=subsubsectionstar3_3_5_2.html#SECTION00035200000000000000> Label and Orientation<A NAME=1511> </A></A>
+<LI> <A NAME=tex2html77 HREF=subsubsectionstar3_3_5_3.html#SECTION00035300000000000000> Creating the Button Subwidgets and Configuring
+Their Appearance<A NAME=1512> </A></A>
+<LI> <A NAME=tex2html78 HREF=subsubsectionstar3_3_5_4.html#SECTION00035400000000000000> Accessing the Button Subwidgets<A NAME=1513> </A></A>
+<LI> <A NAME=tex2html79 HREF=subsubsection3_3_5_5.html#SECTION00035500000000000000> Specifying Selection Rules<A NAME=152> </A></A>
+<LI> <A NAME=tex2html80 HREF=subsubsection3_3_5_6.html#SECTION00035600000000000000> Accessing the Value of a TixSelect Widget<A NAME=153> </A></A>
+<LI> <A NAME=tex2html81 HREF=subsubsection3_3_5_7.html#SECTION00035700000000000000> Specifying Complex Selection Rules<A NAME=154> </A></A>
+</UL>
+</UL>
+<LI> <A NAME=tex2html82 HREF=section3_4.html#SECTION00040000000000000000> Container Widgets<A NAME=2> </A></A>
+<UL>
+<LI> <A NAME=tex2html83 HREF=subsection3_4_1.html#SECTION00041000000000000000> TixNoteBook<A NAME=21> </A></A>
+<UL>
+<LI> <A NAME=tex2html84 HREF=subsubsection3_4_1_1.html#SECTION00041100000000000000> Adding Pages to a TixNoteBook<A NAME=211> </A></A>
+<LI> <A NAME=tex2html85 HREF=subsubsection3_4_1_2.html#SECTION00041200000000000000> Keyboard Accelerators<A NAME=212> </A></A>
+<LI> <A NAME=tex2html86 HREF=subsubsection3_4_1_3.html#SECTION00041300000000000000> Delaying the Creation of New Pages<A NAME=213> </A></A>
+<LI> <A NAME=tex2html87 HREF=subsubsection3_4_1_4.html#SECTION00041400000000000000> Changing Page Tabs and Deleting Pages<A NAME=214> </A></A>
+</UL>
+<LI> <A NAME=tex2html88 HREF=subsection3_4_2.html#SECTION00042000000000000000> PanedWindow<A NAME=22> </A></A>
+<UL>
+<LI> <A NAME=tex2html89 HREF=subsubsection3_4_2_1.html#SECTION00042100000000000000> Adding Panes Inside a TixPanedWindow Widget<A NAME=221> </A></A>
+<LI> <A NAME=tex2html90 HREF=subsubsection3_4_2_2.html#SECTION00042200000000000000> Putting Widgets Inside the Panes<A NAME=222> </A></A>
+<LI> <A NAME=tex2html91 HREF=subsubsection3_4_2_3.html#SECTION00042300000000000000> Setting the Order of the Panes<A NAME=223> </A></A>
+<LI> <A NAME=tex2html92 HREF=subsubsection3_4_2_4.html#SECTION00042400000000000000> Changing the Sizes of the Panes<A NAME=224> </A></A>
+</UL>
+<LI> <A NAME=tex2html93 HREF=subsection3_4_3.html#SECTION00043000000000000000> The Family of Scrolled Widgets<A NAME=23> </A></A>
+<UL>
+<LI> <A NAME=tex2html94 HREF=subsubsection3_4_3_1.html#SECTION00043100000000000000> The Scrolled Listbox Widget<A NAME=231> </A></A>
+<LI> <A NAME=tex2html95 HREF=subsubsection3_4_3_2.html#SECTION00043200000000000000> Other Scrolled Widgets<A NAME=232> </A></A>
+</UL>
+</UL>
+<LI> <A NAME=tex2html96 HREF=section3_5.html#SECTION00050000000000000000> Tabular Listbox and Display Items<A NAME=3> </A></A>
+<UL>
+<LI> <A NAME=tex2html97 HREF=subsection3_5_1.html#SECTION00051000000000000000> tixTList - The Tix Tabular Listbox Widget<A NAME=31> </A></A>
+<LI> <A NAME=tex2html98 HREF=subsection3_5_2.html#SECTION00052000000000000000> Display Items<A NAME=32> </A></A>
+<UL>
+<LI> <A NAME=tex2html99 HREF=subsubsection3_5_2_1.html#SECTION00052100000000000000> Advantages of Display Items<A NAME=321> </A></A>
+<LI> <A NAME=tex2html100 HREF=subsubsection3_5_2_2.html#SECTION00052200000000000000> Display Items and Display Styles<A NAME=322> </A></A>
+</UL>
+<LI> <A NAME=tex2html101 HREF=subsection3_5_3.html#SECTION00053000000000000000> Creating Display Items in the TixTList Widget<A NAME=33> </A></A>
+<UL>
+<LI> <A NAME=tex2html102 HREF=subsubsection3_5_3_1.html#SECTION00053100000000000000> Creating Display Items<A NAME=331> </A></A>
+<LI> <A NAME=tex2html103 HREF=subsubsection3_5_3_2.html#SECTION00053200000000000000> Setting the Styles of the Display Items<A NAME=332> </A></A>
+<LI> <A NAME=tex2html104 HREF=subsubsection3_5_3_3.html#SECTION00053300000000000000> Configuring and Deleting the Items<A NAME=333> </A></A>
+<LI> <A NAME=tex2html105 HREF=subsubsection3_5_3_4.html#SECTION00053400000000000000> Choosing the Orientation and Number of Rows or Columns<A NAME=334> </A></A>
+<LI> <A NAME=tex2html106 HREF=subsubsection3_5_3_5.html#SECTION00053500000000000000> Event Handling<A NAME=335> </A></A>
+<LI> <A NAME=tex2html107 HREF=subsubsection3_5_3_6.html#SECTION00053600000000000000> Selection<A NAME=336> </A></A>
+</UL>
+</UL>
+<LI> <A NAME=tex2html108 HREF=section3_6.html#SECTION00060000000000000000> Hierarchical Listbox<A NAME=4> </A></A>
+<UL>
+<LI> <A NAME=tex2html109 HREF=subsection3_6_1.html#SECTION00061000000000000000> TixHList - The Tix Hierarchical Listbox Widget<A NAME=41> </A></A>
+<UL>
+<LI> <A NAME=tex2html110 HREF=subsubsection3_6_1_1.html#SECTION00061100000000000000> Creating a Hierarchical List<A NAME=411> </A></A>
+<LI> <A NAME=tex2html111 HREF=subsubsection3_6_1_2.html#SECTION00061200000000000000> Creating Entries in a HList Widget<A NAME=412> </A></A>
+<LI> <A NAME=tex2html112 HREF=subsubsection3_6_1_3.html#SECTION00061300000000000000> Controlling the Layout of the Entries<A NAME=413> </A></A>
+<LI> <A NAME=tex2html113 HREF=subsubsection3_6_1_4.html#SECTION00061400000000000000> Handling the Selection and User Event<A NAME=414> </A></A>
+</UL>
+<LI> <A NAME=tex2html114 HREF=subsection3_6_2.html#SECTION00062000000000000000> Creating Collapsible Tree Structures with TixTree<A NAME=42> </A></A>
+</UL>
+<LI> <A NAME=tex2html115 HREF=section3_7.html#SECTION00070000000000000000> Selecting Files and Directories<A NAME=5> </A></A>
+<UL>
+<LI> <A NAME=tex2html116 HREF=subsection3_7_1.html#SECTION00071000000000000000> File Selection Dialog Widgets<A NAME=51> </A></A>
+<UL>
+<LI> <A NAME=tex2html117 HREF=subsubsection3_7_1_1.html#SECTION00071100000000000000> Using the TixFileSelectDialog Widget<A NAME=511> </A></A>
+<LI> <A NAME=tex2html118 HREF=subsubsection3_7_1_2.html#SECTION00071200000000000000> The Subwidget in the TixFileSelectDialog<A NAME=512> </A></A>
+<LI> <A NAME=tex2html119 HREF=subsubsection3_7_1_3.html#SECTION00071300000000000000> The TixExFileSelectDialog Widget<A NAME=513> </A></A>
+<LI> <A NAME=tex2html120 HREF=subsubsection3_7_1_4.html#SECTION00071400000000000000> Specifying File Types for TixExFileSelectDialog<A NAME=514> </A></A>
+<LI> <A NAME=tex2html121 HREF=subsubsectionstar3_7_1_5.html#SECTION00071500000000000000> 5.1.5 The <b><tt>tix filedialog</tt></b> Command<A NAME=515> </A></A>
+</UL>
+<LI> <A NAME=tex2html122 HREF=subsection3_7_2.html#SECTION00072000000000000000> Selecting Directories with the TixDirTree and TixDirList Widgets<A NAME=52> </A></A>
+</UL>
+<LI> <A NAME=tex2html123 HREF=section3_8.html#SECTION00080000000000000000> Tix Object Oriented Programming<A NAME=6> </A></A>
+<UL>
+<LI> <A NAME=tex2html124 HREF=subsection3_8_1.html#SECTION00081000000000000000> Introduction to Tix Object Oriented Programming<A NAME=61> </A></A>
+<UL>
+<LI> <A NAME=tex2html125 HREF=subsubsection3_8_1_1.html#SECTION00081100000000000000> Widget Classes and Widget Instances<A NAME=611> </A></A>
+<LI> <A NAME=tex2html126 HREF=subsubsection3_8_1_2.html#SECTION00081200000000000000> What is in a Widget Instance<A NAME=612> </A></A>
+<LI> <A NAME=tex2html127 HREF=subsubsectionstar3_8_1_3.html#SECTION00081300000000000000> Variables<A NAME=6121> </A></A>
+<LI> <A NAME=tex2html128 HREF=subsubsectionstar3_8_1_4.html#SECTION00081400000000000000> Methods<A NAME=6122> </A></A>
+<LI> <A NAME=tex2html129 HREF=subsubsectionstar3_8_1_5.html#SECTION00081500000000000000> Component Widgets<A NAME=6123> </A></A>
+</UL>
+<LI> <A NAME=tex2html130 HREF=subsection3_8_2.html#SECTION00082000000000000000> Widget Class Declaration<A NAME=62> </A></A>
+<UL>
+<LI> <A NAME=tex2html131 HREF=subsubsection3_8_2_1.html#SECTION00082100000000000000> Using the tixWidgetClass Command<A NAME=621> </A></A>
+</UL>
+<LI> <A NAME=tex2html132 HREF=subsection3_8_3.html#SECTION00083000000000000000> Writing Methods<A NAME=63> </A></A>
+<UL>
+<LI> <A NAME=tex2html133 HREF=subsubsection3_8_3_1.html#SECTION00083100000000000000> Declaring Public Methods<A NAME=631> </A></A>
+</UL>
+<LI> <A NAME=tex2html134 HREF=subsection3_8_4.html#SECTION00084000000000000000> Standard Initialization Methods<A NAME=64> </A></A>
+<UL>
+<LI> <A NAME=tex2html135 HREF=subsubsection3_8_4_1.html#SECTION00084100000000000000> The InitWidgetRec Method<A NAME=641> </A></A>
+<LI> <A NAME=tex2html136 HREF=subsubsectionstar3_8_4_2.html#SECTION00084200000000000000> Chaining Methods<A NAME=6411> </A></A>
+<LI> <A NAME=tex2html137 HREF=subsubsectionstar3_8_4_3.html#SECTION00084300000000000000> The tixChainMethod call<A NAME=6412> </A></A>
+<LI> <A NAME=tex2html138 HREF=subsubsection3_8_4_4.html#SECTION00084400000000000000> The ConstructWidget Method<A NAME=642> </A></A>
+<LI> <A NAME=tex2html139 HREF=subsubsection3_8_4_5.html#SECTION00084500000000000000> The SetBindings Method<A NAME=643> </A></A>
+</UL>
+<LI> <A NAME=tex2html140 HREF=subsection3_8_5.html#SECTION00085000000000000000> Declaring and Using Variables<A NAME=65> </A></A>
+<UL>
+<LI> <A NAME=tex2html141 HREF=subsubsection3_8_5_1.html#SECTION00085100000000000000> Initialization of Public Variables<A NAME=651> </A></A>
+<LI> <A NAME=tex2html142 HREF=subsubsectionstar3_8_5_2.html#SECTION00085200000000000000> Type Checker<A NAME=6511> </A></A>
+<LI> <A NAME=tex2html143 HREF=subsubsection3_8_5_3.html#SECTION00085300000000000000> Public Variable Configuration Methods<A NAME=652> </A></A>
+<LI> <A NAME=tex2html144 HREF=subsubsectionstar3_8_5_4.html#SECTION00085400000000000000> Configuration Methods and Public Variable Initialization<A NAME=6521> </A></A>
+</UL>
+<LI> <A NAME=tex2html145 HREF=subsection3_8_6.html#SECTION00086000000000000000> Summary of Widget Instance Initialization<A NAME=66> </A></A>
+<LI> <A NAME=tex2html146 HREF=subsection3_8_7.html#SECTION00087000000000000000> Loading the New Classes<A NAME=67> </A></A>
+</UL>
+</UL>
+<A NAME=TableofContents> </A>
+<P>
+<HR>
+
+</FONT>
+</BODY>
+<P><ADDRESS>
+<A HREF=http://tix.sourceforge.net>http://tix.sourceforge.net</A><BR>
+</ADDRESS>
\ No newline at end of file
Added: external/tix-8.4.2.x/docs/html/gif/tix/ARROWS.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/arrows.png
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/container/notebook.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/container/pane_add.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/container/pane_horz.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/container/pane_vert.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/container/sl-bar.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/container/sl-nobar.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/filesel/dirlist.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/filesel/dirtree.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/filesel/exfile.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/filesel/fb_comp.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hierarchy.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hierarchy.png
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hlist/dirtree.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist_ex1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist_ex2.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/hlist/hlist_ex3.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/combo.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/ctl_noopt.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/ctl_subw.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/ctl_wopt.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/hierarchy.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/law_comp.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/lawyer.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/select-vert.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/select.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/intro/select1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/oop/arrows.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tix32.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tix32.png
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/horizontal.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/joe.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/relation.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/tlist.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/twofont.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/twofont2.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/vertical.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/html/gif/tix/tlist/widgets.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/demo1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/docview_w.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/setup0.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/setup1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/setup2.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/setup3.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/setup5.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/setup6.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/tk42a.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/img/tk42b.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/license.html_lib
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/license.html_lib Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+----------------------------------------------------------------------
+COPYRIGHT NOTICE OF THE HTML_LIBRARY SOFTWARE. THE TERM "SOFTWARE"
+SHALL MEAN THE HTML_LIBRARY SOFTWARE ONLY. THIS NOTICE DOES NOT COVER
+THE TIX LIBRARY. SEE THE FILE "license.terms" FOR COPYRIGHT NOTICE AND
+LICENSE TERMS OF THE TIX LIBRARY.
+----------------------------------------------------------------------
+
+Sun Microsystems, Inc. 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.
Added: external/tix-8.4.2.x/docs/license.tcltk
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/license.tcltk Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+----------------------------------------------------------------------
+COPYRIGHT NOTICE OF THE TCL/TK SOFTWARE. THE TERM "SOFTWARE" SHALL
+MEAN THE TCL/TK SOFTWARE ONLY. THIS NOTICE DOES NOT COVER THE TIX
+LIBRARY. SEE THE FILE "license.terms" FOR COPYRIGHT NOTICE AND LICENSE
+TERMS OF THE TIX LIBRARY.
+----------------------------------------------------------------------
+
+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.
Added: external/tix-8.4.2.x/docs/pdf/TixBook.pdf
==============================================================================
Binary files (empty file) and external/tix-8.4.2.x/docs/pdf/TixBook.pdf Tue Mar 18 19:38:59 2008 differ
Added: external/tix-8.4.2.x/docs/pdf/TixUser.pdf
==============================================================================
Binary files (empty file) and external/tix-8.4.2.x/docs/pdf/TixUser.pdf Tue Mar 18 19:38:59 2008 differ
Added: external/tix-8.4.2.x/docs/pdf/pguide-tix4.0.pdf
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/container.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/container.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,389 @@
+<!-- $Id: container.tex.html,v 1.1 2000/10/10 19:48:13 idiscovery Exp $ -->
+<H1><A NAME=2>2 Container Widgets</H1>
+
+<p> In addition to providing some nice-looking interface elements, Tix
+ offers some useful ways to organize the elements that you create.
+ It does this by providing <i> container widgets</i>, which are widgets
+ designed to contain whatever you want to put into them.
+
+<p> Different container widgets have different policies as to how they
+ arrange the widgets inside them. In this chapter, we'll talk about
+ TixNoteBook, which arranges its subwidgets using a notebook
+ metaphor, TixPanedWindow, which arranges its subwidgets in
+ non-overlapping horizontal or vertical panes, and a family of
+ ``Scrolled Widgets'', which attach scrollbars to their subwidgets.
+
+<p><H2><A NAME=2.1>2.1 TixNoteBook</H2>
+
+<p> When your need to put a lot of information into your interface, you
+ may find out that your window has to grow intolerably big in order
+ to hold all the information. Having a window that's 10000
+ pixels wide and 5000 pixels high doesn't seem to be the perfect
+ solution. Of course, you can ``chop up'' your big window into a set
+ of smaller dialog boxes, but the user will most likely find it
+ impossible to manage 20 different dialog boxes on their desktop.
+
+<p> The TixNoteBook (fig <a href=container.tex.html#2-1>2-1 </a>) widget comes into
+ rescue. It allows you to pack a large interface into manageable
+ ``pages'' using a notebook metaphor: it contains multiple pages with
+ anything you want on them, displays one at a time, and attaches a
+ tab to each page so the user can bring it forward with a single
+ click on the tab.
+
+<p><blockquote><a name=2-1>
+<center><img src=fig/container/notebook.gif></center>
+<hr><center><h3>(Figure 2-1) The TixNoteBook Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=2.1.1>2.1.1 Adding Pages to a TixNoteBook</H3>
+
+<p> The example program in figure <a href=container.tex.html#2-2>2-2 </a> creates the
+ TixNoteBook widget shown in figure <a href=container.tex.html#2-1>2-1 </a>. In the first
+ three lines, we create the notebook widget and two pages inside
+ it. While we create the pages, we also set the labels on the tabs
+ associated with each page and use the <code> -underline</code> option to
+ indicate the keyboard accelerator for each page.
+
+<p> Each time we create a page in the notebook using the <code> add</code>
+ method, a frame subwidget is created for us automatically. This
+ frame subwidget has the same name as the page (the first parameter
+ passed to the <code> add</code> method). We can use the <code> subwidget</code>
+ method to find out the pathname of this frame subwidget and pack
+ everything we want to display on the page into this frame
+ widget. Lines 4-10 of program <a href=container.tex.html#2-2>2-2 </a> shows how to create
+ the widgets inside the ``Hard Disk'' page. Creating the widgets
+ inside the ``Network'' page will be similar.
+
+<p><blockquote><a name=2-2>
+<blockquote><pre>
+tixNoteBook .n
+.n add hd -label "Hard Disk" -underline 0
+.n add net -label "Network" -underline 0
+
+<p>set frame [.n subwidget hd]
+tixControl $frame.access -label "Access Time:"
+tixControl $frame.write -label "Write Throughput:"
+tixControl $frame.read -label "Read Througput:"
+tixControl $frame.capacity -label "Capacity:"
+pack $frame.access $frame.write $frame.read $frame.capacity <br> -side top -fill x
+</pre></blockquote>
+<hr><center><h3>(Figure 2-2) Using The TixNoteBook Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=2.1.2>2.1.2 Keyboard Accelerators</H3>
+
+<p> Note that in line 2-3 of program <a href=container.tex.html#2-2>2-2 </a>, we have indicated
+ the keyboard accelerators for the two pages using the <code>
+ -underline</code> option. The value of this option is the position of the
+ character to be underlined in the string, where zero represents the
+ first character. When the user presses <code> <Alt-N></code> or <code>
+ <Meta-N></code> the ``Network'' page will be activated; on the other hand,
+ if he presses <code> <Alt-H></code> or <code> <Meta-H></code> the ``Hard Disk'' page
+ will be activated. The TixNoteBook widget will automatically create
+ the keyboard bindings for these accelerators for us, in a way
+ similar to what the menu widget does, so there is no need to set the
+ keyboard bindings ourself.
+
+<p><H3><A NAME=2.1.3>2.1.3 Delaying the Creation of New Pages</H3>
+
+<p> If your notebook contains many complicated pages, it may take quite a
+ while to create all widgets inside these pages and your program will
+ probably freezes for a few seconds when it pops up the notebook for
+ the first time. To avoid embarrassing moments like this, we can use
+ the ``delayed page creation'' feature of the TixNoteBook widget.
+
+<p> When we create a page using the <code> add</code> method, we can specify
+ the optional parameter <code> -createcmd</code> so that we only need to
+ create the page when the user wants to see it. This is illustrated
+ in program <a href=container.tex.html#2-3>2-3 </a>:
+
+<p><blockquote><a name=2-3>
+<blockquote><pre>
+tixNoteBook .n
+.n add hd -label "Hard Disk" -underline 0 -createcmd CreateHd
+.n add net -label "Network" -underline 0 -createCmd CreateNet
+
+<p>proc CreateHd {frame} {
+ tixControl $frame.access -label "Access Time:"
+ tixControl $frame.write -label "Write Throughput:"
+ tixControl $frame.read -label "Read Througput:"
+ tixControl $frame.capacity -label "Capacity:"
+ pack $frame.access $frame.write $frame.read $frame.capacity <br> -side top -fill x
+}
+
+<p>proc CreateNet {frame} {
+ ...
+}
+</pre></blockquote>
+<hr><center><h3>(Figure 2-3) Delayed Page Creation</center></h3>
+</blockquote>
+
+<p> In line 2 of program <a href=container.tex.html#2-3>2-3 </a>, we use the <code> -createcmd</code>
+ option to specify that the procedure <code> CreateHd</code> should be called
+ when the ``Hard Disk'' page needs to be created. <code> CreateHd</code>
+ takes one argument, the frame subwidget of the page. As we can see,
+ program program <a href=container.tex.html#2-3>2-3 </a> is not very different than program
+ <a href=container.tex.html#2-2>2-2 </a>, except now we can issue less commands during the
+ set-up of the NoteBook widget and the interface can be started up
+ more quickly.
+
+<p><H3><A NAME=2.1.4>2.1.4 Changing Page Tabs and Deleting Pages</H3>
+
+<p> To change the information in the tabs of the pages, we can use the
+ <code> pageconfigure</code> method. For example, the following command:
+
+<p><blockquote><pre>
+.nb pageconfigure hd -label "Fixed Disk"
+</pre></blockquote>
+ changes the label from ``Hard Disk'' to ``Fixed Disk''. To delete a
+ page, we can use the <code> delete</code> method.
+
+<p> You should avoid using the <code> pageconfigure</code> and <code>
+ delete</code>. Your users will just feel annoyed if the interface changes
+ all the time and notebook pages appear and disappear every now and
+ then.
+
+<p><H2><A NAME=2.2>2.2 PanedWindow</H2>
+
+<p> The <i> TixPanedWindow</i> widget arranges arranges its subwidgets in
+ non-overlapping panes. As we can see in figure <a href=container.tex.html#2-4>2-4 </a>, the
+ PanedWindow widget puts a resize handle between the panes for the
+ user to manipulate the sizes of the panes interactively. The panes
+ can be arranged either vertically (figure <a href=container.tex.html#2-4>2-4 </a>) or
+ horizontally (<a href=container.tex.html#2-4>2-4 </a>).
+
+<p> Each individual pane may have upper and lower limits of its
+ size. The user changes the sizes of the panes by dragging the resize
+ handle between two panes.
+
+<p><blockquote><a name=2-4>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/container/pane_vert.gif><p><h4><center>Vertical Panes</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/container/pane_horz.gif><p><h4><center>Horizontal Panes</center></h4></td>
+ </TR></TABLE></center>
+
+<hr><center><h3>(Figure 2-4) The TixPane Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=2.2.1>2.2.1 Adding Panes Inside a TixPanedWindow Widget</H3>
+
+<p> You can create a TixPanedWindow widget using the <code> tixPanedWindow</code>
+ command. After that, you can add panes into this widget using the
+ <code> add</code> method (see program <a href=container.tex.html#2-5>2-5 </a>).
+
+<p> When you use the <code> add</code> method, there are several optional
+ parameters which you can use to control the size of each of the
+ pane. The <code> -min</code> parameter controls the minimum size of the pane
+ and the <code> -max</code> parameter controls its maximum size. These two
+ parameters controls how much the user can expand or shrink a
+ pane. If neither is specified, then the pane can be expanded or
+ shrunk without restrictions.
+
+<p> In addition, the -size parameter specifies the initial size of the
+ pane. If it is not specified, then the initial size of the pane will
+ be its natural size.
+
+<p> In program <a href=container.tex.html#2-5>2-5 </a>, we set the initial size of <code> pane1</code> to
+ 100 pixels using the -size parameter. We don't set the <code> -size</code>
+ parameter for <code> pane2</code> so it will appear in its natural
+ size. However, we use the <code> -max</code> option for <code> pane2</code> so that
+ the user can never expand the size of <code> pane2</code> to more than 300
+ pixels.
+
+<p><blockquote><a name=2-5>
+<blockquote><pre>
+tixPanedWindow .p
+.p add pane1 -size 100
+.p add pane2 -max 300
+
+<p>set p1 [.p subwidget pane1]
+button $p1.b1 -text Button1
+button $p1.b2 -text Button2
+pack $p1.b1 $p1.b2 -side left -expand yes
+
+<p>set p2 [.p subwidget pane2]
+button $p2.b -text "Another Button"
+pack $p2.b -side left -expand yes -fill both
+
+<p>pack .p -expand yes -fill both
+</pre></blockquote>
+<hr><center><h3>(Figure 2-5) Adding Panes into a TixPanedWindow Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=2.2.2>2.2.2 Putting Widgets Inside the Panes</H3>
+
+<p> Each pane we have created using the <code> add</code> method is essentially
+ a frame widget. After we have created the panes, we can put widgets
+ inside them. As shown inside program <a href=container.tex.html#2-5>2-5 </a>, we can use the
+ <code> subwidget</code> method to find out the name of the pane
+ subwidgets. Then we can just create new widgets as their children
+ and pack these new widgets inside the panes. The output of program
+ <a href=container.tex.html#2-5>2-5 </a> is shown in figure <a href=container.tex.html#2-6>2-6 </a>
+
+<p><blockquote><a name=2-6>
+<center><img src=fig/container/pane_add.gif></center>
+<hr><center><h3>(Figure 2-6) Output of Program <a href=container.tex.html#2-5>2-5 </a></center></h3>
+</blockquote>
+
+<p><H3><A NAME=2.2.3>2.2.3 Setting the Order of the Panes</H3>
+
+<p> Usually, when you create a new pane, it is always added to the
+ bottom or right of the list of panes. If you want to control the
+ order in which the panes appear inside the TixPanedWindow widget,
+ you can use the two optional parameters, <code> -before</code> and <code>
+ -after</code>, for the <code> add</code> method. For example, the call:
+
+<p><blockquote><pre>
+.p add pane2 -after pane1
+</pre></blockquote>
+ will place the new pane immediately after <code> pane1</code>. The call:
+
+<blockquote><pre>
+.p add pane2 -before pane1
+</pre></blockquote>
+ will place the new pane immediately in front of <code> pane1</code>.
+
+<H3><A NAME=2.2.4>2.2.4 Changing the Sizes of the Panes</H3>
+
+<p> If you want to change the sizes of the existing panes or change
+ their maximum/minimum size constraints, you can use the
+ <code> paneconfigure</code> method. For example, the following code changes the
+ size of <code> pane2</code> to 100 pixels and adjusts its minimum size
+ constraint to no less than 10 pixels:
+
+<p><blockquote><pre>
+.p paneconfigure pane2 -size 100 -min 10
+</pre></blockquote>
+ Notice that after you call the <code> paneconfigure</code> method, the
+ PanedWindow may jitter and that may annoy the user. Therefore, use
+ this method only when it is necessary.
+
+<p><H2><A NAME=2.3>2.3 The Family of Scrolled Widgets</H2>
+
+<p> With plain Tcl/Tk, the widgets do not automatically come with
+ scrollbars. If you want to use scrollbars with the text, canvas or
+ listbox widgets, you will need to create scrollbars separately and
+ attach them to the widgets. This can be a lot of hassle because you
+ would almost always need scrollbars for these widgets. Sometimes you
+ will wonder why you need to write the same boring code again and
+ again just to get the scrollbars to working.
+
+<p> The Tix scrolled widgets are here to make your life easier. With a
+ single command such as <code> tixScrolledListBox</code> or <code>
+ tixScrolledText</code>, you can create a listbox or text widget that comes
+ automatically with scrollbars attached.
+
+<p> Another advantage of the Tix scrolled widgets is that you can
+ specify their scrolling policy so that the scrollbars appear only
+ when they are needed. This feature is especially useful if you are
+ displaying a lot of widgets and running out of screen real estate.
+
+<p><H3><A NAME=2.3.1>2.3.1 The Scrolled Listbox Widget</H3>
+
+<p> You can create a scrolled listbox widget using the <code>
+ tixScrolledListBox</code> command. Notice that the widget created by the
+ <code> tixScrolledListBox</code> command is not itself a listbox
+ widget. Rather, it is a frame widget which contains two scrollbar
+ subwidgets: one is called <code> hsb</code> (the horizontal scrollbar) and
+ the other is called <code> vsb</code> (the vertical scrollbar). Similarly,
+ the listbox being scrolled is also a subwidget which is
+ appropriately called <code> listbox</code>. Therefore, if we need to put
+ things into the listbox (as we always do!), we can use the <code>
+ subwidget</code> method. As shown in program <a href=container.tex.html#2-7>2-7 </a>, we first
+ find the pathname of the <code> listbox</code> subwidget by calling ``<code>
+ .sl subwidget listbox</code>''. Then, we insert some items into the <code>
+ listbox</code> subwidget.
+
+<p><blockquote><a name=2-7>
+<blockquote><pre>
+tixScrolledListBox .sl -scrollbar auto
+set listbox [.sl subwidget listbox]
+
+<p>for {set x 0} {$x < 6} {incr x} {
+ $listbox insert end "This is item $x"
+}
+
+<p>pack .sl -side left -expand yes -fill both
+</pre></blockquote>
+<hr><center><h3>(Figure 2-7) Scrolled Listbox Widget</center></h3>
+</blockquote>
+
+<p><blockquote><a name=2-8>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/container/sl-nobar.gif><p><h4><center>Scrollbars not displayed</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/container/sl-bar.gif><p><h4><center>Scrollbars displayed only when needed</center></h4></td>
+ </TR></TABLE></center>
+
+<hr><center><h3>(Figure 2-8) Scrolled ListBox with Automatic Scrollbars</center></h3>
+</blockquote>
+
+<p>
+ Also, as seen in the first line of program <a href=container.tex.html#2-7>2-7 </a>, we use
+ the <code> -scrollbar</code> option to control the scrolling policy of the
+ TixScrolledListBox widget. Usually, we'll set it to ``<code> auto</code>'':
+ the scrollbars are displayed only if they are needed. Other possible
+ values are ``<code> both</code>'': the two scrollbars are always displayed;
+ ``<code> x</code>'': the horizontal scrollbar is always displayed, while the
+ vertical scrollbar is always hidden; ``<code> y</code>'': the opposite of
+ ``<code> x</code>''; ``<code> none</code>'': the two scrollbars are always
+ hidden. The result of program <a href=container.tex.html#2-7>2-7 </a> is shown in figure
+ <a href=container.tex.html#2-8>2-8 </a>.
+
+<p><H3><A NAME=2.3.2>2.3.2 Other Scrolled Widgets</H3>
+
+<p> The <b> TixScrolledText</b> widget is very similar to the
+ TixScrolledListBox widget, except it scrolls a text subwidget, which
+ is called <code> text</code>. One problem with the TixScrolledText widget,
+ though, is its <code> -scrollbar</code> option doesn't work in the <b>
+ auto</b> mode. This is due to a bug in Tk which doesn't report the
+ width of the <b> text</b> subwidget correctly. Until this bug is fixed
+ in TK, the <b> auto</b> mode will behave the same way as the both mode
+ for the TixScrolledText widget.
+
+<p> Another scrolled-widget is <b> TixScrolledWindow</b>. Sometimes you
+ have a large number of widgets that can't possibly be shown in the
+ screen all at once and your application doesn't allow you to divide
+ the widgets into several pages of a TixNoteBook. In this case you
+ can use TixScrolledWindow. It contains a frame subwidget called <code>
+ window</code>. You can just create as many widgets as you need as children
+ of the <code> window</code> subwidget. An example is shown in program
+ <a href=container.tex.html#2-9>2-9 </a>, which uses the TixScrolledWindow widget to
+ implement a ``cheap'' spreadsheet application. The boxes of the
+ spreadsheet are just entry widgets and they are packed inside the
+ <code> window</code> subwidget. The user will be able to scroll to different
+ parts of the spreadsheet if it is too large to fit in one screen.
+
+<p><blockquote><a name=2-9>
+<blockquote><pre>
+tixScrolledWindow .sw -scrollbar auto
+set f [.sw subwidget window]
+
+<p>for {set x 0} {$x < 10} {incr x} {
+ frame $f.f$x
+ pack $f.f$x -side top -expand yes -fill both
+ for {set y 0} {$y < 10} {incr y} {
+ entry $f.f$x.e$y -width 10
+ pack $f.f$x.e$y -side left -fill x
+ }
+}
+
+<p>pack .sw -side left -expand yes -fill both
+</pre></blockquote>
+<hr><center><h3>(Figure 2-9) Cheap Spreadsheet Application with TixScrolledWindow</center></h3>
+</blockquote>
+
+<p> There are two more scrolled-widgets in the Tix library: <b>
+ TixScrolledTList</b> scrolls a TixTList widget and <b>
+ TixScrolledHList</b> scrolls a TixHList widget. The subwidgets that
+ they scroll are called <code> tlist</code> and <code> hlist</code>,
+ respectively. The use of the TList and HList widgets will be
+ described in the next chapters.
+
+<p>
+
Added: external/tix-8.4.2.x/docs/tix-book/fig/container/notebook.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/container/pane_add.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/container/pane_horz.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/container/pane_vert.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/container/sl-bar.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/container/sl-nobar.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/cover.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/filesel/dirlist.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/filesel/dirtree.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/filesel/exfile.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/filesel/fb_comp.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/hlist/dirtree.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist_ex1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist_ex2.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/hlist/hlist_ex3.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/ctl_noopt.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/ctl_subw.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/ctl_wopt.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/hierarchy.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/law_comp.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/lawyer.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/select-vert.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/select.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/intro/select1.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/oop/arrows.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/horizontal.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/joe.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/relation.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/tlist.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/twofont.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/twofont2.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/vertical.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/fig/tlist/widgets.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/docs/tix-book/filesel.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/filesel.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,239 @@
+<!-- $Id: filesel.tex.html,v 1.1 2000/10/10 19:49:35 idiscovery Exp $ -->
+
+<p><H1><A NAME=5>5 Selecting Files and Directories</H1>
+
+<p> One task that an application has to perform frequently is to ask the
+ user to select files or directories. To select files, you can use
+ the Tix <i> File Selection Widgets</i>: TixFileSelectDialog and
+ TixExFileSelectDialog. To select directories, you can use the Tix
+ <i> Directory Selection Widgets</i>: TixDirList and TixDirTree.
+
+<p><H2><A NAME=5.1>5.1 File Selection Dialog Widgets</H2>
+
+<p> There are two file dialog widgets inside Tix: the
+ TixFileSelectDialog (figure <a href=filesel.tex.html#5-2>5-2 </a>) is similar to the
+ FileSelectionDialog widget in Motif; TixExFileSelectDialog (figure
+ <a href=filesel.tex.html#5-3>5-3 </a>) looks like its conunterpart in MS Windows. Both
+ widgets let the user navigate through the file system directories
+ and select a file.
+
+<p> One advanced feature of both types of file selection boxes is they
+ use ComboBoxes to store the files, directories and patterns the user
+ has selected in the past. If the user wants to select the same files
+ again, he can simply open the ComboBoxes and click on his past
+ inputs. This saves a lot of keystrokes and is especially useful when
+ the user needs to switch among several files or directories.
+
+<p>
+<H3><A NAME=5.1.1>5.1.1 Using the TixFileSelectDialog Widget</H3>
+
+<p> An example of using the TixFileSelectDialog widget is in figure
+ <a href=filesel.tex.html#5-1>5-1 </a>. At line 1, we create a TixFileSelectDialog
+ widget and set the title of the dialog to ``Select A File'' using
+ the <code> -title</code> option. We also use the <code> -command</code> option to
+ specify that the procedure <code> selectCmd</code> should be called when the
+ user has selected a file. <code> selectCmd</code> will be called with one
+ parameter, the filename selected by the user. When the
+ TixFileSelectDialog widget is created, it is initially not shown on
+ the screen. Therefore, at line 3, we call its <code> popup</code> widget
+ command to place the widget on the screen.
+
+<p><blockquote><a name=5-1>
+<pre>
+tixFileSelectDialog .file -title "Select A File" -command selectCmd
+.file subwidget fsbox config -pattern "*.txt" -directory /usr/info
+.file popup
+
+<p>proc selectCmd {filename} {
+ puts "You have selected $filename"
+}
+</pre>
+<hr><center><h3>(Figure 5-1) Using the TixFileSelectDialog</center></h3>
+</blockquote>
+
+<p><blockquote><a name=5-2>
+<center><img src=fig/filesel/fb_comp.gif></center>
+<hr><center><h3>(Figure 5-2) The Composition of a TixFileSelectDialog Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=5.1.2>5.1.2 The Subwidget in the TixFileSelectDialog</H3>
+
+<p> We may also want to set other options for the file dialog such as
+ its file filter and working directory. To do this, we must know the
+ composition of the TixFileSelectDialog widget. As shown in figure
+ <a href=filesel.tex.html#5-2>5-2 </a>, the TixFileSelectDialog contains a subwidget <code>
+ fsbox</code> of the type TixFileSelectBox and a subwidget <code> bbox</code> of
+ the type TixStdButtonBox.
+
+<p> The <code> fsbox</code> subwidget supports the <code> -pattern</code> and <code>
+ -directory</code> options. At line 2 of figure <a href=filesel.tex.html#5-1>5-1 </a>, we
+ use the <code> -directory</code> option to tell the <code> fsbox</code> subwidget to
+ display files in the directory <code> /usr/info</code>; we also use the <code>
+ -pattern</code> option to specify we only want the filenames that has the
+ <code> txt</code> extension.
+
+<p> The <code> fsbox</code> subwidget also supports the <code> -selection</code> option,
+ which stores the filename currently selected by the user. We can
+ query this value by the <code> cget</code> widget command of the <code> fsbox</code>
+ subwidget.
+
+<p> Remember that the <code> -pattern</code>, <code> -directory</code> and <code>
+ -selection</code> options do not belong to the TixFileSelectDialog
+ widget. A common mistake that people make is to try to configure the
+ non-existent <code> -pattern</code> option of the TixFileSelectDialog, which
+ causes much despair, long error messages and great loss of
+ self-confidence. <i> Always remember:</i>, when you want to configure
+ an option, find out whether it belongs to the widget or its
+ subwidgets.
+
+<p><H3><A NAME=5.1.3>5.1.3 The TixExFileSelectDialog Widget</H3>
+
+<p>
+<blockquote><a name=5-3>
+<center><img src=fig/filesel/exfile.gif></center>
+<hr><center><h3>(Figure 5-3) The ExFileSelectDialog Widget</center></h3>
+</blockquote>
+
+<p>
+ The TixExFileSelectDialog widget is very similar to the
+ TixFileSelectDialog widget. It supports all the options and widget
+ commands of the latter, so essentially we can just take the program
+ <a href=filesel.tex.html#5-1>5-1 </a> and replace the command <code> tixFileSelectDialog</code>
+ in the first line to <code> tixExFileSelectDialog</code>.
+
+<p> The composition of the TixExFileSelectDialog widget is a bit
+ different: it contains one contains one subwidget, which is also
+ called <code> fsbox</code>, of the type TixExFileSelectBox widget (figure
+ <a href=filesel.tex.html#5-3>5-3 </a>). Again this <code> fsbox</code> widgets supports all
+ widget options and commands of the <code> fsbox</code> subwidget in
+ TixFileSelectDialog, so the line 2 of program <a href=filesel.tex.html#5-1>5-1 </a>
+ can work for TixExFileSelectDialog widgets without any change.
+
+<p><H3><A NAME=5.1.4>5.1.4 Specifying File Types for TixExFileSelectDialog</H3>
+
+<p> The TixExFileSelectBox widget has a ComboBox subwidget marked as
+ ``Select Files of Type:'' (see figure <a href=filesel.tex.html#5-3>5-3 </a>). This widget
+ contains some pre-set types of files for the user to choose
+ from. For example, a word processor program can include choices such
+ as ``Microsoft Word Documents'' and ``WordPerfect Documents''.
+
+<p> The TixExFileSelectBox widget has a <code> -filetypes</code> option for this
+ purpose. As shown in line 3 through 7 in program
+ <a href=filesel.tex.html#5-4>5-4 </a>, the value for the <code> -filetypes</code> option is
+ a list. Each item in the list should contain two parts. The first
+ part is a list of file patterns and the second part is the textual
+ name for this type of files.
+
+<p><H3><A NAME=5.1.5>5.1.5 The <b> <code> tix filedialog</code></b> Command</H3>
+
+<p> TixExFileSelectDialog and TixFileSelectDialog are very similar to
+ each other. So which one should we use? That is just a matter of
+ taste. However, since we know that programmers usually have bad
+ taste, clever programmers would rather step aside and let the users
+ exercise their own taste. To do this, we can use the <code> tix
+ filedialog</code> command.
+
+<p> For any programs based on Tix, the user can choose his preferred
+ type of file dialog by setting the X resource <code> FileDialog</code> to
+ either <code> tixFileSelectDialog</code> or <code> tixExFileSelectDialog</code>.
+ This can usually be done by inserting a line similar to the
+ following into the user's <code> .Xdefaults</code> file:
+
+<p><blockquote><pre>
+*myapp*FileDialog: tixExFileSelectDialog
+</pre></blockquote>
+ When we call the command <code> tix filedialog</code>, it will return a file
+ dialog widget of the user's preferred type.
+
+<p> The advantage of using <code> tix filedialog</code> is it makes coding
+ flexible. If the management suddenly mandates that we dump the Motif
+ look-and-feel in favor of the MS Windows look-and-feel, we don't
+ need to dig up every line of <code> tixFileSelectDialog</code> calls and
+ replace it with <code> tixExFileSelectDialog</code>. Also, <code> tix
+ filedialog</code> creates only one copy of the file dialog, which can be
+ shared by different parts of the program. Therefore, we can avoid
+ creating a separate file dialog widget for each of the ``Open'',
+ ``Save'' and ``Save As'' commands in our application. This way, we
+ can save resource since a file dialog is a large widget and it takes
+ up quite a bit of space.
+
+<p><blockquote><a name=5-4>
+<blockquote><pre>
+set dialog [tix filedialog]
+$dialog -title "Select A File" -command selectCmd
+$dialog subwidget fsbox config -pattern "*.txt" -directory /usr/info
+if {[winfo class $dialog] == "TixExFileSelectDialog"} {
+ $dialog subwidget fsbox config -filetypes {
+ {{*} {* -- All files}}
+ {{*.txt} {*.txt -- Text files}}
+ {{*.c} {*.c -- C source files}}
+ }
+}
+$dialog popup
+
+<p>proc selectCmd {filename} {
+ puts "You have selected $filename"
+}
+</pre></blockquote>
+<hr><center><h3>(Figure 5-4) Using the <code> tix dialog</code> command</center></h3>
+</blockquote>
+
+<p> The use of the <code> tix filedialog</code> command is shown in program
+ <a href=filesel.tex.html#5-4>5-4 </a>. This program is very similar to what we saw
+ in program <a href=filesel.tex.html#5-1>5-1 </a>, except now we aren't really sure
+ which type of file dialog the user have chosen. Therefore, if we
+ want to do something allowed for only one type of file dialogs, we
+ have to be careful. At line 4 of program <a href=filesel.tex.html#5-4>5-4 </a>, we
+ use the <code> winfo</code> command to see whether the type of the file
+ dialog is TixExFileSelectDialog. If so, we set the value for the
+ <code> -filetypes</code> option of its <code> fsbox</code> subwidget.
+
+<p>
+<H2><A NAME=5.2>5.2 Selecting Directories with the TixDirTree and TixDirList Widgets</H2>
+
+<p> There are two Tix widgets for selecting a directory: TixDirList
+ (figure <a href=filesel.tex.html#5-6>5-6 </a>) and TixDirTree (figure
+ <a href=filesel.tex.html#5-6>5-6 </a>). Both of them display the directories in a
+ hierarchical format. The display in the TixDirList widget is more
+ compact: it shows only the parent- and child-directories of a
+ particular directory. The TixDirTree widget, on the other hand, can
+ display the whole tree structure of the file system.
+
+<p> The programming interface of these two widgets are the same and you
+ can choose the which one to use depending on your application. As
+ shown in the following example, you can use the <code> -directory</code>
+ option of the TixDirList widget to specify a directory to
+ display. In the example, we set <code> -directory</code> to be <code>
+ /home/ioi/dev</code>. As a result, the TixDirList widget displays all the
+ subdirectories and all the ancestor directories of <code>
+ /home/ioi/dev</code>. You can use the <code> -command</code> and <code> -browsecmd</code>
+ options to handle the user events: a double click or Return
+ key-stroke will trigger the <code> -command</code> option and a single click
+ or space bar key stroke will trigger the <code> -browsecmd</code>
+ option. Normally, you would handle both type of events in the same
+ manner, as we have done in program <a href=filesel.tex.html#5-5>5-5 </a>
+
+<p><blockquote><a name=5-5>
+<blockquote><pre>
+tixDirList .d -value /home/ioi/dev <br> -command "selectDir" -browsecmd "selectDir"
+pack .d
+
+<p>proc selectDir {dir} {
+ puts "now you select $dir"
+}
+</pre></blockquote>
+<hr><center><h3>(Figure 5-5) Using the TixDirList widget</center></h3>
+</blockquote>
+
+<p>
+<blockquote><a name=5-6>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/filesel/dirtree.gif><p><h4><center>DirTree</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/filesel/dirlist.gif><p><h4><center>DirList</center></h4></td>
+ </TR></TABLE></center>
+
+<hr><center><h3>(Figure 5-6) The DirTree and DirList Widgets</center></h3>
+</blockquote>
Added: external/tix-8.4.2.x/docs/tix-book/hlist.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/hlist.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,243 @@
+<!-- $Id: hlist.tex.html,v 1.2 2000/11/11 23:34:25 idiscovery Exp $ -->
+<H1><A NAME=4>4 Hierarchical Listbox</H1>
+
+<p><H2><A NAME=4.1>4.1 TixHList -- The Tix Hierarchical Listbox Widget</H2>
+
+<p> <i> TixHList</i> is the Tix Hierarchical Listbox Widget. You can use it
+ to display any data that have a hierarchical structure. For example,
+ the HList widget in figure <a href=hlist.tex.html#4-1>4-1 </a> displays a Unix file
+ system directory tree; the HList widget in figure <a href=hlist.tex.html#4-1>4-1 </a>
+ displays the corporate hierarchy of a hypothetical company. As shown
+ in these two figures, the entries inside the TixHList widget are
+ indented can be optionally connected by branch lines according to
+ their positions in the hierarchy.
+
+<p><blockquote><a name=4-1>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/hlist/dirtree.gif>
+ <p><h4><center>Directory Tree Display</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/hlist/hlist1.gif>
+ <p><h4><center>A Corporate Hierarchy</center></h4></td>
+ </TR></TABLE></center>
+<hr><center><h3>(Figure 4-1) Examples of the TixHList Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=4.1.1>4.1.1 Creating a Hierarchical List</H3>
+
+<p> A TixHList widget can be created by the command <code>
+ tixHList</code>. However, most likely, you would want to create a TixHList
+ with scrollbars attached. Therefore, usually you will use the <code>
+ tixScrolledHList</code> command to create a scrolled hierarchical listbox
+ (line 1 in program <a href=hlist.tex.html#4-2>4-2 </a>). The <code> tixScrolledHList</code>
+ command is very similar to the <code> TixScrolledListBox</code> command we
+ saw in section <a href=container.tex.html#2.3.1>2.3.1 </a>. It creates a TixHList subwidget
+ of the name <code> hlist</code> and attaches two scrollbars to it.
+
+<p> As shown in the first five lines in program <a href=hlist.tex.html#4-2>4-2 </a>, we
+ create a scrolled TixHList widget, using the <code> -options</code> switch
+ (see section <a href=intro.tex.html#1.3.5>1.3.5 </a>) to set several options for the <code>
+ hlist</code> subwidget (we'll talk about these options shortly). Then, we
+ can access the HList subwidget widget using the <code> subwidget
+ hlist</code> method (line 7 in program <a href=hlist.tex.html#4-2>4-2 </a>).
+
+<p><blockquote><a name=4-2>
+<blockquote><pre>
+tixScrolledHList .sh -options {
+ hlist.itemType text
+ hlist.drawBranch false
+ hlist.indent 8
+}
+pack .sh -expand yes -fill both
+set hlist [.sh subwidget hlist]
+
+<p>$hlist add foo -text "foo"
+$hlist add foo.bar -text "foo's 1st son"
+$hlist add foo.bor -text "foo's 2nd son"
+$hlist add foo.bar.bao -text "foo's 1st son's 1st son"
+$hlist add foo.bar.kao -text "foo's 1st son's 2nd son"
+$hlist add dor -text "dor, who has no son"
+</pre></blockquote>
+<hr><center><h3>(Figure 4-2) Creating Entries in a HList Widget</center></h3>
+</blockquote>
+
+<p>
+<blockquote><a name=4-3>
+<center><img src=fig/hlist/hlist_ex1.gif></center>
+<hr><center><h3>(Figure 4-3) Output of Program <a href=hlist.tex.html#4-2>4-2 </a></center></h3>
+</blockquote>
+
+<p>
+<H3><A NAME=4.1.2>4.1.2 Creating Entries in a HList Widget</H3>
+
+<p> Each entry in an HList widget has a unique name, called its <i>
+ entry-path</i>, which determines each entry's position in the HList
+ widget. The entry-paths of the HList entries are very similar to the
+ pathnames of Unix files. Each entry-path is a list of string names
+ separated by a <i> separator character</i>. By default, the separator
+ character is the period character (<code> .</code>), but it can be
+ configured using the <code> -separator</code> option of the HList widget.
+
+<p> In program <a href=hlist.tex.html#4-3>4-3 </a>, we add several new entries <code> foo</code>,
+ <code> foo.bar</code>, <code> foo.bor</code>, <code> foo.bar.bao</code>, .. etc, into the
+ HList widget using the <code> add</code> method. The relationship between
+ the entries is signified by their names, in a way similar to how
+ Unix denotes directories and subdirectories. For example, <code> foo</code>
+ is the <i> parent</i> of <code> foo.bar</code> and <code> foo.bor</code>; <code>
+ foo.bar</code> is the parent of <code> foo.bar.bao</code>, and so on. As far as
+ the terminology goes, we also say that <code> foo.bar</code> a <i> child</i>
+ of <code> foo</code>; <code> foo</code> is an <i> ancestor</i> of <code> foo.bar.bao</code>
+ and <code> foo.bar.bao</code> is a <i> descendant</i> of <code> foo</code>.
+
+<p> The output of program <a href=hlist.tex.html#4-2>4-2 </a> is shown in figure
+ <a href=hlist.tex.html#4-3>4-3 </a>. As we can see, the entries are displayed under
+ their parents with the amount of indentation control by the <code>
+ -indent</code> option of the HList widget: <code> foo.bar.bao</code> and <code>
+ foo.bar.kao</code> are display under <code> foo.bar</code>, which is in turn
+ displayed under <code> foo</code>.
+
+<p> Entries with no parents, for example, <code> foo</code> and <code> dor</code> in
+ program <a href=hlist.tex.html#4-2>4-2 </a>, are called <i> top-level
+ entries</i>. Top-level entries are usually entries with no immediate
+ superiors in a hierarchical. For example, the owner of a company, the
+ principle of a school or the root directory of a Unix file
+ system. Toplevel entries are displayed with no indentation.
+
+<p> As evident from program <a href=hlist.tex.html#4-2>4-2 </a>, all entries who
+ entry-path does not contain a separator character are top-level
+ entries. The only exception is the separator character itself is
+ also a toplevel entry. This makes it easy to display Unix file and
+ directory names inside the HList widget, as shown in program
+ <a href=hlist.tex.html#4-4>4-4 </a>.
+
+<p><blockquote><a name=4-4>
+<blockquote><pre>
+set folder [tix getimage folder]
+tixScrolledHList .sh -options {
+ hlist.separator /
+ hlist.itemType imagetext
+ hlist.drawBranch true
+ hlist.indent 14
+ hlist.wideSelection false
+}
+pack .sh -expand yes -fill both
+set hlist [.sh subwidget hlist]
+
+<p>foreach directory {/ /usr /usr/bin /usr/local /etc /etc/rc.d} {
+ $hlist add $directory -image $folder -text $directory
+}
+</pre></blockquote>
+<hr><center><h3>(Figure 4-4) Displaying Directories in a HList Widget</center></h3>
+</blockquote>
+
+<p><blockquote><a name=4-5>
+<center><img src=fig/hlist/hlist_ex2.gif></center>
+<hr><center><h3>(Figure 4-5) Output of Program <a href=hlist.tex.html#4-4>4-4 </a></center></h3>
+</blockquote>
+
+<p> <!ignored:nind> Each entry is associated with a display item (see section
+ <a href=tlist.tex.html#3.2>3.2 </a> about display items). We can use the <code> -itemtype</code>
+ option of the HList widget to specify the default type of display
+ item to be created by the the <code> add</code> method, as shown in program
+ <a href=hlist.tex.html#4-2>4-2 </a> and <a href=hlist.tex.html#4-4>4-4 </a>. Alternatively, we can
+ also specify the type of display item using the <code> -itemtype</code>
+ option for the <code> add</code> method.
+
+<p><H3><A NAME=4.1.3>4.1.3 Controlling the Layout of the Entries</H3>
+
+<p> There are two options to control the layout of the entries: the <code>
+ -showbranch</code> option specifies whether branch lines should be drawn
+ between parent entries and their children. The <code> -indent</code> option
+ controls the amount of relative indentation between parent and child
+ entries. Notice the <code> -drawbranch</code> option is turned on in figure
+ <a href=hlist.tex.html#4-5>4-5 </a> but turned off in figure
+ <a href=hlist.tex.html#4-3>4-3 </a>. Usually, you need to set a bigger indentation
+ when the branches are shown --- we used an indentation of 14 pixels
+ in <a href=hlist.tex.html#4-5>4-5 </a> compared to 8 pixels in <a href=hlist.tex.html#4-3>4-3 </a>.
+
+<p><H3><A NAME=4.1.4>4.1.4 Handling the Selection and User Event</H3>
+
+<p> The handling of the selection and user events for the HList widget
+ is very similar to the TList widget (see section
+ <a href=tlist.tex.html#3.3.5>3.3.5 </a>), except that for the HList widget all the
+ operations are based on entry-paths, not list indices. The methods
+ <code> info selection</code>, <code> selection set</code> and <code> selection clear</code>
+ can be used to query, set or clear the selection; the option <code>
+ -selectmode</code> controls how many entries can be selected at a time;
+ the options <code> -browsecmd</code> and <code> -command</code> can be used to
+ specify a command to be called to handle user events.
+
+<p> There is one more option worth mentioning: the <code> -wideselection</code>
+ option. When set to <code> true</code>, the selection highlight will be
+ drawn across the whole HList widget (see figure
+ <a href=hlist.tex.html#4-3>4-3 </a>). When set to false, selection highlight will be
+ drawn as wide as the selected entry (see figure
+ <a href=hlist.tex.html#4-5>4-5 </a>). Normally, you would set <code> -wideselection</code>
+ to <code> false</code> when you use <code> imagetext</code> items inside (as we did
+ in program <a href=hlist.tex.html#4-4>4-4 </a>).
+
+
+<p><H2><A NAME=4.2>4.2 Creating Collapsible Tree Structures with TixTree</H2>
+
+<p> The TixTree widget is based on the TixScrolledHList widget; you can
+ use it to create a collapsible hierarchical structure so that the
+ user can conveniently navigate through a large number of list
+ entries. As shown in figure <a href=hlist.tex.html#4-7>4-7 </a>, the TixTree puts
+ the little ``<code> +</code>'' and ``<code> -</code>'' icons next to the branches of
+ an HList entry that has descendants. These two icons are knows as
+ the open and close icons, respectively. When the user presses the
+ open icon next to an entry, its immediate children of an entry will
+ be displayed. Conversely, when the user presses the close icon, the
+ entry's children will become hidden.
+
+<p> Program <a href=hlist.tex.html#4-6>4-6 </a> shows how to create a collapsible
+ tree. We first create a TixTree widget. Then we add the entries in
+ your hierarchical structure into its <code> hlist</code> subwidget using the
+ add method of this subwidget. When we are finished with adding the
+ entries, we just call the <code> autosetmode</code> method of the TixTree
+ widget, which will automatically adds the open and close icons next
+ to the entries who have children.
+
+<p><blockquote><a name=4-6>
+<blockquote><pre>
+set folder [tix getimage folder]
+tixTree .tree -command Command -options {
+ hlist.separator /
+ hlist.itemType imagetext
+ hlist.drawBranch true
+ hlist.indent 18
+}
+pack .tree -expand yes -fill both
+set hlist [.tree subwidget hlist]
+
+<p>foreach directory {/ /usr /usr/bin /usr/local /etc /etc/rc.d} {
+ $hlist add $directory -image $folder -text $directory
+}
+.tree autosetmode
+
+<p>proc Command {entry} {
+ puts "you have selected $entry"
+}
+</pre></blockquote>
+<hr><center><h3>(Figure 4-6) Creating a Collapsible Hierarchy</center></h3>
+</blockquote>
+
+<p>
+<blockquote><a name=4-7>
+<center><img src=fig/hlist/hlist_ex3.gif></center>
+<hr><center><h3>(Figure 4-7) Output of Program <a href=hlist.tex.html#4-6>4-6 </a></center></h3>
+</blockquote>
+
+<p> Note that in program <a href=hlist.tex.html#4-6>4-6 </a> we use the <code> -command</code>
+ option of the TixTree widget, not the <code> -command</code> option of its <code>
+ hlist</code> subwidget. This is because the TixTree actually used the <code>
+ -command</code> option of its <code> hlist</code> subwidget to process some
+ low-level events. In general, if both a mega-widget and its
+ subwidget have the options of the same name, you would always use
+ the option that belongs to the mega-widget.
+
+<p>
+
+<p>
Added: external/tix-8.4.2.x/docs/tix-book/intro.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/intro.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,854 @@
+<!-- $Id: intro.tex.html,v 1.2 2000/11/11 23:34:36 idiscovery Exp $ -->
+<H1><A NAME=1>1 Introduction</H1>
+
+<p><H2><A NAME=1.1>1.1 What is Tix</H2>
+
+<p><H3><A NAME=1.1.1>1.1.1 Tix for Application Programmers</H3>
+
+<p> The acronym Tix stands for Tk Interface Extension. Tix is different
+ things for different people.
+
+<p> If you are a GUI application programmer, that is, if you earn a
+ living by building graphical applications, you will appreciate Tix
+ as a library of <i> mega-widgets</i>: widgets made out of other
+ widgets. To use a crude analogy, if the widgets in the standard TK
+ library are bricks and mortars for a builder, the mega-widgets in
+ the Tix library are walls, windows or even pre-build kitchens. Of
+ course, these ``bigger components'' are themselves made of bricks
+ and mortars, but it will take much less effort to put them together
+ than planting bricks on top of each other.
+
+<p> The Tix widgets not only help you speed up the development of your
+ applications, they also help you in the design process. Since the
+ standard Tk widgets are too primitive, they force you to think of
+ your house as, by using the same analogy, millions of bricks. With
+ the help of the Tix mega-widgets, you can design your application is
+ a more structural and coherent manner.
+
+<p> Moreover, the Tix library provides a rich set of widgets. Figure
+ <a href=intro.tex.html#1-1>1-1 </a> shows all Tix widgets -- there are more than 40
+ of them! Although the standard Tk library has many useful widgets,
+ they are far from complete. The Tix library provides most of the
+ commonly needed widgets that are missing from standard Tk:
+ FileSelectBox, ComboBox, Control (a.k.a. SpinBox) and an assortment
+ of scroll-able widgets. Tix also includes many more widgets that are
+ generally useful in a wide range of applications: NoteBook,
+ FileEntry, PanedWindow, MDIWindow, etc.
+
+<p> With all these new widgets, you can introduce new interaction
+ techniques into applications, creating more useful and more
+ intuitive user interfaces. You can design your application by
+ choosing the most appropriate widgets to match the special needs of
+ your application and users.
+
+<p><blockquote><a name=1-1>
+<center><img src=fig/intro/hierarchy.gif></center>
+<hr><center><h3>(Figure 1-1) The Class Hierarchy of Tix Widgets</center></h3>
+</blockquote>
+
+<p><H3><A NAME=1.1.2>1.1.2 Tix for Widget Developers</H3>
+
+<p> On the other hand, if you are a widget developer, Tix provides an
+ object oriented programming environment, the Tix Intrinsics, that is
+ carefully designed for the development of mega-widgets. If you have
+ developed widgets in C, you will know how slow and painful such a
+ process would be. In recognition of the difficulties in widget
+ development, the Tix Intrinsics includes many tools that
+ dramatically cuts down the efforts required to develop new widgets.
+ With the Tix Intrinsics, the rapid prototyping/development of
+ widgets is finally feasible: you can write a new widgets in the
+ matter of hours or even minutes.
+
+<p> With the Tix Intrinsics, you widget code can readily become
+ reusable. Tix also provides a set of rules and mechanisms that
+ allow you to develop widgets that are inter-operable with other
+ widgets.
+
+<p> In Part I of this manual, we will talk about using the Tix widgets.
+ The discussion of writing new Tix widgets will be carried out in
+ Part II.
+
+<p><H2><A NAME=1.2>1.2 Getting Started: the TixControl Widget</H2>
+
+<p> <i> Pre-requisites: you should be familiar with Tk widgets and
+ programming, or read the Tk book along with this book</i>
+
+<p> Before delving into the deep philosophy of the Tix widgets, let us
+ first have a quick example to demonstrate the usefulness and
+ convenience of an Tix widget: the TixControl is basically an entry
+ widget that displays a value. Next to the entry, there are two up
+ and down arrow buttons for you to adjust the value inside the entry
+ widget.
+
+<p><H3><A NAME=1.2.1>1.2.1 Creating a TixControl Widget</H3>
+
+<p> The following code demonstrates how to create a TixControl widget and
+ specify its options:
+
+<p><pre>
+ tixControl .lawyers -label Lawyers: -max 10 -min 0
+ .lawyers config -integer true -step 2
+</pre>
+ This example creates a TixControl widget that let us to select the
+ numbers of lawyers we wish to be allowed in this country. (Figure
+ <a href=intro.tex.html#1-2>1-2 </a>)
+
+<p> Let us examine the options: the <code> -label</code> option specifies a
+ caption for this widget. The <code> -max</code> option specifies the maximum
+ number of lawyers we can choose. The <code> -min</code> option specifies the
+ minimum number of lawyers we can choose: although we would love to
+ enter a negative number, reality dictate that the lower limit must
+ be zero. The <code> -integer</code> option indicates that the number of
+ lawyers must be an integer; that is, we respect the lawyers' rights
+ not to be chopped up into decimal points. Finally, since lawyers
+ seem to go in pairs, we set the <code> -step</code> option to <code> 2</code>, which
+ indicates that when we press the up/down arrow buttons, we want the
+ number of lawyers to go up and down by two each time.
+
+<p>
+<blockquote><a name=1-2>
+<center><img src=fig/intro/lawyer.gif></center>
+<hr><center><h3>(Figure 1-2) The TixControl Widget</center></h3>
+</blockquote>
+
+<p> As shown in the example, you can create and manipulate a Tix widget
+ in the same manner as the standard Tk widgets. The options of the
+ widget can be specified during the creation of the widget.
+ Alternatively, they can be changed by the <code> configure</code> widget
+ command. In addition, options can also be specified in the option
+ database or as X resources. Here is an example that produces the
+ same result as the previous code fragment:
+
+<p><pre>
+ option add *lawyers.max 10
+ option add *lawyers.min 0
+ tixControl .lawyers -label Lawyers: -integer true
+ .lawyers config -step 2
+</pre>
+
+<p> <!ignored:nind> In figure <a href=intro.tex.html#1-3>1-3 </a>, you can see the composition of
+ TixControl: it is made out of a label widget, an entry widget and
+ two button widgets. Widgets that are composed of other widgets, like
+ TixControl, are called <i> mega-widgets</i>. Most widgets in the Tix
+ library are mega-widgets (xx: and as you know this book is about
+ them!).
+
+<p><blockquote><a name=1-3>
+<center><img src=fig/intro/law_comp.gif></center>
+<hr><center><h3>(Figure 1-3) The Composition of TixControl</center></h3>
+</blockquote>
+
+<p><H3><A NAME=1.2.2>1.2.2 Accessing The Value of a TixControl Widget</H3>
+
+
+<p> The TixControl widget allows the user to input a value. There are
+ several ways to read this value in your program. First of all,
+ TixControl stores the current value in the <code> -value</code> option. You
+ can use query the <code> -value</code> option by calling the command
+
+<p><pre>
+ .c cget -value
+</pre>
+
+<p> this command will return the current value of the tixContro widget
+ <code> .c</code>. The following command sets the value of the widget to a
+ new number (100):
+
+<p><pre>
+ .c config -value 100
+</pre>
+ The second way to access the value of TixControl is to use the <code>
+ -variable</code> option. This options instructs the TixControl widget to
+ store the its value into a global variable so that you can read it
+ at any time. Also, by assigning a new value to this global variable,
+ you can change the value of the TixControl widget. Here is an
+ example:
+
+<p><pre>
+ .c config -variable myvar
+ set myvar 100
+</pre>
+
+ <!ignored:nind> In some situations, you may want to be informed immediately
+ when the value of the TixControl widget changes. To accomplish this,
+ you can use the <code> -command</code> option. The following line causes
+ the TCL procedure <code> valueChanged</code> to be called whenever the value
+ of <code> .c</code> changes:
+
+<p><pre>
+ tixControl .c -command valueChanged
+</pre>
+
+<p><H4><A NAME=1.2.2.1> Disabling Callbacks Temporarily</H4>
+
+<p>
+ Now, if you want to change a value from within the program, you have
+ to disable the callback. The reason is that the callback runs
+ whenever you (as well as the user) makes a change. In particular, if
+ you make a change within the callback procedure and forget to
+ disable the callback, it will recursively call itself and enter an
+ infinite loop. To avoid this problem, you should use the <code>
+ -disablecallback</code> option. Here is an example:
+
+<p><pre>
+ tixControl .c -command addOne
+
+<p> proc addOne {value} {
+ .c config -disablecallback true
+ .c config -value [incr value]
+ .c config -disablecallback false
+ }
+</pre>
+ The procedure <code> addOne</code> adjusts the value of <code> .c</code> by one
+ whenever the user enters a new value into <code> .c</code>. Notice that it
+ is necessary to set <code> -disablecallback</code> here or otherwise <code>
+ addOne</code> will be infinitely recursed! That is because <code> addOne</code> is
+ called <i> every time</i> the value changes, either by the user or by
+ the program.
+
+<p><H3><A NAME=1.2.3>1.2.3 Validating User Inputs</H3>
+
+<p> Sometimes it may be necessary to check the user input against
+ certain criteria. For example, you may want to allow only even
+ numbers in a TixControl widget. To do this, you can use the <code>
+ -validatecmd</code> option, which specifies a Tcl command to call whenever
+ the user enters a new value. Here is an example:
+
+<p><pre>
+ tixControl .c -value 0 -step 2 -validatecmd evenOnly
+
+<p> proc evenOnly {value} {
+ return [expr $value - ($value %2)]
+ }
+</pre>
+ The value parameter to <code> evenOnly</code> is the new value entered by
+ the user. The <code> evenOnly</code> procedure makes sure that the new
+ value is even by returning a modified, even number. The Tcl command
+ specified by the <code> -validatecmd</code> must return a value which it
+ deems valid and this value will be stored in the <code> -value</code> option
+ of the TixControl widget.
+
+<p>
+<H2><A NAME=1.3>1.3 Accessing The Components Inside Mega Widgets</H2>
+
+<p><H3><A NAME=1.3.1>1.3.1 Subwidgets</H3>
+
+<p> As we have seen in section <a href=intro.tex.html#1.2.1>1.2.1 </a>, the TixControl
+ widget is composed of several widgets: one label widget, one entry
+ widget and two button widgets. These ``widgets inside mega-widgets''
+ are called <i> subwidgets</i> in the Tix terminology. We will often
+ have the need to access these subwidgets. For example, sometimes we
+ need to change the configuration options of the subwidgets. In other
+ cases, we may need to interact with the subwidgets directly.
+
+<p><H3><A NAME=1.3.2>1.3.2 Subwidget Names</H3>
+
+<p> Each subwidget inside a mega is identified by a <i> subwidget
+ name</i>. Naturally, the label and entry subwidgets inside a TixSelect
+ widget are called <code> label</code> and <code> entry</code>, respectively. The two
+ button widgets are called <code> incr</code> and <code> decr</code> because they are
+ used to <code> incr</code>ement and <code> decr</code>ement the value inside the
+ TixControl widget (see figure <a href=intro.tex.html#1-4>1-4 </a>).
+
+<p><blockquote><a name=1-4>
+<center><img src=fig/intro/ctl_subw.gif></center>
+<hr><center><h3>(Figure 1-4) Subwidgets inside TixControl Widget</center></h3>
+</blockquote>
+
+<p>
+<H3><A NAME=1.3.3>1.3.3 The <code> subwidget</code> Method</H3>
+
+<p> All Tix mega-widgets support the <code> subwidget</code> method. This method
+ takes at least one argument, the name of a subwidget. When you pass
+ only one argument to this method, it returns the pathname of the
+ subwidget which is identified by that name. For example, if .c is
+ the pathname of a TixControl widget, the command:
+
+<p><blockquote><pre>
+ .c subwidget entry
+</pre></blockquote>
+ returns the pathname of the <code> entry</code> subwidget, which is <code>
+ .c.frame.entry</code> in this case.
+
+<p> If you call the <code> subwidget</code> method with additional arguments,
+ the widget command of the specified subwidget will be called with
+ these arguments. For example, if <code> .c</code> is, again, the pathname of
+ a TixControl widget, the command:
+
+<p><blockquote><pre>
+ .c subwidget entry configure -bg gray
+</pre></blockquote>
+ will cause the widget command of the <code> entry</code> subwidget of <code>
+ .c</code> to be called with the arguments <code> configure -bg gray</code>. So
+ actually this command will be translated into the following call:
+
+<p><blockquote><pre>
+ .c.frame.entry configure -bg gray
+</pre></blockquote>
+ which calls the <code> configure</code> method of the <code> entry</code> subwidget
+ with the arguments <code> -bg gray</code> and changes its background color
+ to <code> gray</code>.
+
+<p> We can call the <code> subwidget</code> method with other types of arguments
+ to access different methods of the specified subwidget. For example,
+ the following call:
+
+<p><blockquote><pre>
+ .c subwidget entry icursor end
+</pre></blockquote>
+ calls the <code> icursor</code> method of the <code> entry</code> subwidget with the
+ argument <code> end</code> and sets the insert cursor of the <code> entry</code>
+ subwidget to the end of its input string.
+
+<p><H3><A NAME=1.3.4>1.3.4 Chaining the <code> subwidget</code> Method</H3>
+
+<p> Some Tix mega-widgets may have subwidgets that in turn contain
+ subwidgets. For example, the TixExFileSelectDialog (section
+ <a href=filesel.tex.html#5.1.3>5.1.3 </a>) widget contains a TixExFileSelectBox subwidget
+ called <code> fsbox</code>, which in turn contains a TixComboBox (section
+ <a href=intro.tex.html#1.4>1.4 </a>) subwidget called <code> dir</code>. If we want to access
+ the <code> dir</code> subwidget, we can just ``chain'' the <code> subwidget</code>
+ method. For example, if we have a TixExFileSelectDialog called <code>
+ .file</code>, the following command will return the pathname of the <code>
+ dir</code> subwidget of the <code> fsbox</code> subwidget of <code> .file</code>:
+
+<p><blockquote><pre>
+ .file subwidget fsbox subwidget dir
+</pre></blockquote>
+ Moreover, the following command configures the <code> dir</code> subwidget to
+ have a border of the groove type with a border width of 2 pixels:
+
+<p><blockquote><pre>
+ .file subwidget fsbox subwidget dir configure -bd 2 -relief groove
+</pre></blockquote>
+
+<p> The chaining of the subwidget command can be applied for arbitrarily
+ many levels, depending whether your widget has a subwidget that has
+ a subwidget that has a subwidget that has a subwidget ... and so on.
+
+<p><H3><A NAME=1.3.5>1.3.5 Configuring Subwidget Options Using the <code> -options</code> Switch</H3>
+
+<p> As we have seen above, we can use commands like ``<code> subwidget</code>
+ <i> name</i> <code> configure ...</code>'' to set the configuration options
+ of subwidgets. However, this can get quite tedious if we want to
+ configure many options of many subwidgets.
+
+<p> There is a more convenient and terse way to configure the subwidget
+ options without using the <code> subwidget</code> method: the <code> -options</code>
+ switch. All Tix mega-widgets support the <code> -option</code> switch, which
+ can be used during the creation of the mega-widget.
+
+<p><blockquote><a name=1-5>
+<blockquote><pre>
+tixControl .income -label "Income: " -variable income -options {
+ label.width 8
+ label.anchor e
+ entry.width 10
+ entry.borderWidth 3
+}
+tixControl .age -label "Age: " -variable age -options {
+ label.width 8
+ label.anchor e
+ entry.width 10
+ entry.borderWidth 3
+}
+pack .income .age -side top
+</pre></blockquote>
+<hr><center><h3>(Figure 1-5) Using the <code> -options</code> switch</center></h3>
+</blockquote>
+
+<p>
+<blockquote><a name=1-6>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/intro/ctl_noopt.gif><p><h4><center>Unaligned Labels</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/intro/ctl_wopt.gif> <p><h4><center>Aligned Labels</center></h4></td>
+ </TR></TABLE></center>
+<hr><center><h3>(Figure 1-6) Using the <code> -options</code> Switch to Align the Labels</center></h3>
+</blockquote>
+
+<p>
+ The use of the <code> -options</code> switch is illustrated in program
+ <a href=intro.tex.html#1-5>1-5 </a>, which creates two TixControl widgets for
+ the user to enter his income and age. Because of the different sizes
+ of the labels of these two widgets, if we create them haphazardly,
+ the output may look like fig <a href=intro.tex.html#1-6>1-6 </a>.
+
+<p> To avoid this problem, we set the width of the <code> label</code>
+ subwidgets of the <code> .income</code> and <code> .age</code> widgets to be the
+ same (8 characters wide) and set their <code> -anchor</code> option to <code>
+ e</code> (flushed to right), so that the labels appear to be
+ well-aligned. Program <a href=intro.tex.html#1-5>1-5 </a> also does other
+ things such as setting the <code> entry</code> subwidgets to have a width of
+ 10 characters and a border-width of 3 pixels so that they appear
+ wider and ``deeper''. A better result is shown in figure
+ <a href=intro.tex.html#1-6>1-6 </a>.
+
+ As we can see from program <a href=intro.tex.html#1-5>1-5 </a>, the value for
+ the <code> -options</code> switch is a list of one or more pairs of
+
+<p><blockquote>
+ <i> subwidget-option-spec</i> <i> value</i> ..
+</blockquote>
+
+<p> <i> subwidget-option-spec</i> is in the form <i> subwidget-name</i><code>
+ .</code><i> option-name</i>. For example, <code> label.anchor</code> identifies the
+ <code> anchor</code> option of the <code> label</code> subwidget, <code> entry.width</code>
+ identifies the <code> width</code> option of the entry subwidget, and so on.
+
+<p> Notice we must use the <i> name</i> of the option, not the <i>
+ command-line switch</i> of the option. For example, the option that
+ specifies the border-width of the <code> entry</code> subwidget has the
+ command-line switch <code> -borderwidth</code> but its name is <code>
+ borderWidth</code> (notice the capitalization on the name but not on the
+ command-line switch). Therefore, we have used the capitalized version
+ of ``<code> entry.borderWidth 3</code>'' in program
+ <a href=intro.tex.html#1-5>1-5 </a> and not ``<code> entry.borderwidth 3</code>''. To
+ find out the names of the options of the respective subwidgets,
+ please refer to their manual pages.
+
+<p><H3><A NAME=1.3.6>1.3.6 Configuring Subwidget Options Using the Tk Option Database</H3>
+
+<p> The <code> -options</code> switch is good if you want to specify subwidget
+ options for one or a few mega-widgets. If you want to specify the
+ subwidget for many mega-widgets, it is easier to use the Tk Option
+ Database.
+
+<p> Options in the Tk Option Database can be specified using the <code>
+ option</code> command and the pathname of the widget. For all the Tix
+ mega-widgets, it is guaranteed that the pathname of their subwidgets
+ ends with the <i> name</i> of the subwidgets. For example, if we have
+ a mega widget called <code> .a.b.megaw</code> and it has a subwidget whose
+ name is <code> subw</code>, then we can be sure that the pathname of the
+ subwidget will be something like
+
+<p><blockquote><pre>
+ .a.b.megaw.foo.bar.subw
+</pre></blockquote>
+ Therefore, if we want to specify options for it in the Option
+ Database, we can issue commands like:
+
+<p><blockquote><pre>
+ option add *a.b.megaw*subw.option1 value1
+ option add *a.b.megaw*subw.option2 value2
+</pre></blockquote>
+ Notice that it will be wrong to issue the commands as:
+
+<p><blockquote><pre>
+ option add *a.b.megaw.subw.option1 value1
+ option add *a.b.megaw.subw.option2 value2
+</pre></blockquote>
+ because in general we will not know whether the subwidget is an
+ immediate child window of <code> .a.b.megaw</code> (<i>such a decision
+ is left to the mega-widget implementor and may vary in different
+ versions of the same mega-widget</i>).
+
+<p> Program <a href=intro.tex.html#1-7>1-7 </a> demonstrates how the Tk Option
+ Database can be used to achieve the same effect as program
+ <a href=intro.tex.html#1-5>1-5 </a>.
+
+<p><blockquote><a name=1-7>
+<blockquote><pre>
+option add *TixControl*label.width 8
+option add *TixControl*label.anchor e
+option add *TixControl*entry.width 10
+option add *TixControl*entry.borderWidth 3
+
+<p>tixControl .income -label "Income: " -variable income
+tixControl .age -label "Age: " -variable age
+
+<p>pack .income .age -side top
+</pre></blockquote>
+<hr><center><h3>(Figure 1-7) Using the Tk Option Database in Place of the <code> -options</code>
+ switch</center></h3>
+</blockquote>
+
+<p><H3><A NAME=1.3.7>1.3.7 Caution: Restricted Access</H3>
+
+<p> In the current implementation of Tix, there is no limits on how you
+ can access the options of the subwidgets. However, many options of
+ the subwidgets may be already used by the mega-widget in special
+ ways. For example, the <code> -textvariable</code> option of the <code> entry</code>
+ subwidget of TixControl may be used to store some private
+ information for the mega widget. Therefore, you should access the
+ options of the subwidgets with great care. In general you should
+ only access those options that affect the appearance of the
+ subwidgets (such as <code> -font</code> or <code> -foreground</code>) and leave
+ everything else intact. (<i></i>) { In future versions of Tix, there
+ will be explicit restrictions on which subwidget options you can
+ access. Errors will be generated if you try to access restricted
+ subwidget options}
+
+<p>
+
+<p><H2><A NAME=1.4>1.4 Another Tix Widget: TixComboBox</H2>
+
+<p> The <i> TixComboBox</i> widget is very similar to the ComboBox widgets
+ available in MS Windows and Motif 2.0. A TixComboBox consists of an
+ entry widget and a listbox widget. Usually, the ComboBox contains a
+ list of possible values for the user to select. The user may also
+ choose an alternative value by typing it in the entry widget. Figure
+ <a href=intro.tex.html#1-8>1-8 </a> shows two ComboBoxes for the user to choose fonts and
+ character sizes. You can see fro the figure that a listbox is popped
+ down from the ComboBox for fonts for the user to choose among a list
+ of possible fonts.
+
+<p>
+<blockquote><a name=1-8>
+<center><img src=fig/intro/combobox.gif></center>
+<hr><center><h3>(Figure 1-8) The TixComboBox Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=1.4.1>1.4.1 Creating a TixComboBox Widget</H3>
+
+<p><blockquote><a name=1-9>
+<blockquote><pre>
+tixComboBox .c -label "Animal:" -editable true
+.c insert end cat
+.c insert end dog
+.c insert end pig
+</pre></blockquote>
+<hr><center><h3>(Figure 1-9) Creating a ComboBox</center></h3>
+</blockquote>
+
+<p> In program <a href=intro.tex.html#1-9>1-9 </a>, we set up a ComboBox <code> .c</code>
+ for the user to select an animal to play with. If the user is just a
+ dull person like you and me, he would just press the arrow button
+ and select a pre-designated animal such as ``dog''. However, if he
+ wants to try something new, he could type ``micky'' or ``sloth''
+ into the entry widget and he will get to play with his favorite
+ animal.
+
+<p> Of course, sometimes we don't want too many sloths around us and we
+ want to limit the range of the user's selections. In this case we
+ can do one of two things. First, we can set the <code> -editable</code>
+ option to <code> false</code> so that the user cannot type in the entry
+ widget at all. Alternatively, we can use the <code> -validatecmd</code>
+ option (see section <a href=intro.tex.html#1.4.3>1.4.3 </a>) to check input the input.
+
+<p><H3><A NAME=1.4.2>1.4.2 Controlling the Style of the TixComboBox</H3>
+
+<p> The TixComboBox widget can appear in many different styles. If we
+ set the <code> -dropdown</code> option to <code> true</code> (which is the default),
+ the listbox will only appear when the user presses the arrow button.
+ When <code> -dropdown</code> is set to <code> false</code>, the listbox is always
+ shown and the arrow button will disappear because it is not needed
+ anymore.
+
+<p> There is also an option called <code> -fancy</code>. It is set to <code>
+ false</code> by default. When set to <code> true</code>, a tick button and a cross
+ button will appear next to the entry widget. The tick button allows
+ you to select again the value that's already in the ComboBox. If you
+ press the cross button, the entry widget will be cleared.
+
+<p><H3><A NAME=1.4.3>1.4.3 Static Options</H3>
+
+<p> The <code> -dropdown</code> and <code> -fancy</code> options are so-called ``static
+ options''. They can only be set during the creation of the
+ ComboBox. Hence this code is valid:
+
+<p><pre>
+ tixComboBox .c -dropdown true
+</pre>
+
+<p> But the following code will generate an error because it attempts to
+ set the <code> -dropdown</code> option <i> after</i> the ComboBox has already
+ been created.
+
+<p><pre>
+ TixComboBox .c
+ .c config -dropdown true
+</pre>
+
+<p> The restrictions of the static options, although annoying,
+ nevertheless make sense because we don't want our interface to
+ suddenly change its style. If sometimes a button is there and
+ sometimes it disappear all by itself, that will certainly create a
+ lot of confusion and makes the user wonder why he should buy our
+ software. Also, as you will see in chapter <a href=oop.tex.html#6>6 </a>, having some
+ static options will make the life of widget writers a lot easier.
+
+<p> Accessing the value of the ComboBox is very similar to accessing the
+ value of the TixControl widget. The ComboBox has these four options,
+ which we discussed in section <a href=intro.tex.html#1.2.2>1.2.2 </a>: <code> -value</code>,
+ <code> -variable</code>, <code> -command</code> and <code> -validatecmd</code>. You can use
+ these four options to access the user input and respond to user
+ actions in exactly the same way as discussed in section
+ <a href=intro.tex.html#1.2.2>1.2.2 </a>.
+
+<p><H3><A NAME=1.4.4>1.4.4 Monitoring the User's Browsing Actions</H3>
+
+<p> When the user drags the mouse pointer over the listbox, the listbox
+ item under the pointer will be highlighted and a ``browse event''
+ will be generated. If you want to keep track of what items the user
+ has browses through, you can use the <code> -browsecmd</code> option. Here
+ is an example:
+
+<p><pre>
+ tixComboBox .c -browsecmd mybrowse
+ ....
+
+<p> proc mybrowse {item} {
+ puts "user has browsed $item"
+ }
+</pre>
+
+<p> When the Tcl command specified by the <code> -browsecmd</code> option is
+ called, it will be called with one parameter: the current item that
+ the user has highlighted.
+
+<p> The <code> -browsecmd</code> is useful because it gives the user the
+ possibility of temporarily seeing the results of several choices
+ before committing to a final choice.
+
+<p> For example, we can list a set of image files in a ComboBox. When
+ the user single-clicks on an item on the ComboBox, we want to show a
+ simplified view of that image. After the user has browsed through
+ several images, he can finally decide on which image he wants by
+ double-clicking on that item in the listbox.
+
+<p> The following is some pseudo Tcl code that does this. Please notice
+ that the <code> -browsecmd</code> procedure is called every time the user
+ single-clicks on an item or drags the mouse pointer in the listbox.
+ The <code> -command</code> procedure is only called when the user
+ double-clicks on an item.
+
+<p><pre>
+tixComboBox .c -dropdown false -browsecmd show_simple -command load_fullsize
+.c insert end "/pkg/images/flowers.gif"
+.c insert end "/pkg/images/jimmy.gif"
+.c insert end "/pkg/images/ncsa.gif"
+
+<p>proc show_simple {filename} {
+ # Load in a simplified version of $filename
+}
+
+<p>proc load_fullsize {filename} {
+ # Load in the full size image in $filename
+}
+</pre>
+
+<p> As we shall see, all Tix widgets that let us do some sort of
+ selections have the <code> -browsecmd</code> option. The <code> -browsecmd</code>
+ option allows us to respond to user events in a simple,
+ straight-forward manner. Of course, you can do the same thing with
+ the Tk <code> bind</code> command, but you don't want to do that unless you
+ are very fond of things like <code> <Control-Shift-ButtonRelease-1></code>
+ and <code> "%x %X $w %W %w"</code>.
+
+<p>
+
+<p><H2><A NAME=1.5>1.5 The TixSelect Widget</H2>
+
+<p> The TixSelect widget figure <a href=intro.tex.html#1-10>1-10 </a> provides you the same
+ kind of facility that is available with the Tk <code> radiobutton</code> and
+ <code> checkbutton</code> widgets. That is, TixSelect allows the user to
+ select one or a few values out of many choices. However, TixSelect
+ is superior because it allows you to layout the choices in much less
+ space than what is required by the Tk <code> radiobutton</code>
+ widgets. Also, TixSelect supports complicated selection
+ rules. Because of these reasons, TixSelect is a primary choice for
+ implementing toolbar buttons, which often have strict space
+ requirements and complicated selection rules.
+
+<p><blockquote><a name=1-10>
+<center><img src=fig/intro/select.gif></center>
+<hr><center><h3>(Figure 1-10) The TixSelect Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=1.5.1>1.5.1 Creating A TixSelect Widget</H3>
+
+<p> Program <a href=intro.tex.html#1-11>1-11 </a> shows how to create a TixSelect
+ widget. At line 1 of program <a href=intro.tex.html#1-11>1-11 </a>, we create a
+ TixSelect using the the <code> tixSelect</code> command.
+
+<p><blockquote><a name=1-11>
+<pre>
+ tixSelect .fruits -label "Fruits: " -orientation horizontal
+ .fruits add apple -text Apple -width 6
+ .fruits add orange -text Orange -width 6
+ .fruits add banana -text Banana -width 6
+ pack .fruits
+</pre>
+<hr><center><h3>(Figure 1-11) Creating a TixSelect Widget</center></h3>
+</blockquote>
+
+<p><H4><A NAME=1.5.1.1> Label and Orientation</H4>
+
+<p> As shown in program <a href=intro.tex.html#1-11>1-11 </a>, with the <code> -label</code>
+ option, we can put a label next to the button subwidgets as the
+ caption of the TixSelect widget. We can also control the layout of
+ the button subwidgets using the <code> -orientation</code> option. The <code>
+ -orientation</code> option can have two values: <code> horizontal</code> (the
+ default value) or <code> vertical</code>, and the buttons are lied up
+ accordingly. Figure <a href=intro.tex.html#1-12>1-12 </a> shows the output of a
+ TixSelect widget whose <code> -orientation</code> is set to <code> vertical</code>.
+
+<p><H4><A NAME=1.5.1.2> Creating the Button Subwidgets and Configuring
+Their Appearance</H4>
+
+<p> After we have created the TixSelect widget, we can create the button
+ subwidgets inside the TixSelect widget by the <code> add</code> widget
+ command (lines 2-4 of program <a href=intro.tex.html#1-11>1-11 </a>).
+
+<p> The first argument to the <code> add</code> command is the name of the
+ button subwidget. Additional arguments can be given in <i>
+ option-value</i> pairs to configure the appearance of the button
+ subwidget. These <i> option-value</i> pairs can be any of those
+ accepted by a normal TK button widget. As shown in program
+ <a href=intro.tex.html#1-11>1-11 </a>, we use the <code> -text</code> option to put
+ appropriate text strings over the three button subwidgets.
+
+<p> Notice that we also set the <code> -width</code> option of all the button
+ subwidgets to 6 characters. This way, the three buttons will have
+ the same width. If we didn't set the <code> -width</code> option for the
+ button widgets, they will have different widths, depending on their
+ text string, and the result would look less esthetically pleasing
+ than buttons with same widths.
+
+<p> The output of program <a href=intro.tex.html#1-11>1-11 </a> is shown in figure
+ <a href=intro.tex.html#1-12>1-12 </a>
+
+<p>
+<blockquote><a name=1-12>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/intro/select1.gif>
+ <p><h4><center>Horizontal Orientation</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/intro/select-vert.gif>
+ <p><h4><center>Vertical Orientation</center></h4></td>
+ </TR></TABLE></center>
+<hr><center><h3>(Figure 1-12) The TixSelect Widget</center></h3>
+</blockquote>
+
+<p><H4><A NAME=1.5.1.3> Accessing the Button Subwidgets</H4>
+
+<p> We have already seen the concept of subwidgets and how they can be
+ accessed in section <a href=intro.tex.html#1.3.1>1.3.1 </a> --- when we create a Tix
+ mega-widget, some subwidgets are created for us automatically. For
+ example, the label and entry subwidgets inside a TixControl widget.
+ We can access these subwidgets in a multitude of ways, including
+ using the subwidget method.
+
+<p> One thing about the subwidgets we saw in section
+ <a href=intro.tex.html#1.3.1>1.3.1 </a> is that they are ``static'', meaning they are
+ created when the mega-widget is created and they remain there for
+ the whole lifetime of the mega-widget.
+
+<p> The TixSelect widget takes us to a new concept: <i> dynamic
+ subwidgets</i> are subwidgets that can be created on-the-fly. After we
+ add a new button into the TixSelect widget, we get a new
+ subwidget. The name of this new subwidget is given by the first
+ parameter passed to the <code> add</code> method. As the following code
+ demonstrates, we can access this new subwidget using the <code>
+ subwidget</code> method:
+
+<p><blockquote><pre>
+tixSelect .s
+.s add apple -text Apple
+.s add orange -text Orange
+# Mmmm..., let's make the widget look more educated
+# by using French words
+.s subwidget apple config -text Pomme
+.s subwidget orange config -text Orange
+</pre></blockquote>
+
+<p>
+<H3><A NAME=1.5.2>1.5.2 Specifying Selection Rules</H3>
+
+<p> For simple selection rules, you can use the <code> -allowzero</code> and
+ <code> -radio</code> options. The <code> -allowzero</code> option specifies whether
+ the user can select none of the choices inside the TixSelect
+ widget. The <code> -radio</code> option controls how many buttons can be
+ selected at once: when set to true, the user can select only one
+ button at a time; when set to false, the user can select as many
+ buttons as he desires.
+
+<p> With these two options, we can write a program using two TixSelect
+ widgets for little Jimmy to fill up his lunch box. On the Sandwich
+ side, we set <code> -radio</code> to true and <code> -allowzero</code> <code>
+ false</code>. That means Jimmy can select one and only one sandwich among
+ beef, cheese or ham sandwiches. On the Veggie side, we want to
+ encourage Jimmy to consume as much veggie as possible, so we set the
+ <code> -allowzero</code> option to <code> false</code>. We also set the <code>
+ -allowzero</code> option to <code> false</code> so that Jimmy cannot get away with
+ eating none of the vegetables (see program <a href=intro.tex.html#1-13>1-13 </a>).
+
+<p><blockquote><a name=1-13>
+<blockquote><pre>
+tixSelect .sandwich -allowzero false -radio true -label "Sandwich :"
+.sandwich add beef -text Beef
+.sandwich add cheese -text Cheese
+.sandwich add ham -text Ham
+
+<p>tixSelect .vege -allowzero false -radio false -label "Vegetable :"
+.vege add bean -text Bean
+.vege add carrot -text Carrot
+.vege add lettuce -text Lettuce
+</pre></blockquote>
+<hr><center><h3>(Figure 1-13) Specifying Simple Selection Rules</center></h3>
+</blockquote>
+
+<p>
+<H3><A NAME=1.5.3>1.5.3 Accessing the Value of a TixSelect Widget</H3>
+
+<p> The <i> value</i> of a TixSelect widget is a list of the names of the
+ button subwidgets that are currently selected. For example, in
+ program <a href=intro.tex.html#1-11>1-11 </a>, if the user has selected the apple
+ button, then the value of the TixSelect widget will be <code>
+ apple</code>. If the user has selected both the apple and the orange
+ buttons, then the value will be the list <code> "apple orange"</code>.
+
+<p> The TixSelect widget supports same set of options as the TixControl
+ widget for you to access its value: the <code> -value</code> option stores
+ the current value, which can be queried and modified using the cget
+ and configure methods. You can also use the <code> -variable</code> option
+ to specify a global variable to store the value of the TixSelect
+ widget. The <code> -command</code> option specifies a TCL command to be
+ called whenever the user changes the selection inside a TixSelect
+ widget. This command is called with one argument: the new value of
+ the TixSelect widget. There is also the <code> -disablecallback</code>
+ option which you can use to control whether the command specified by
+ the <code> -command</code> option should be called when the value of the
+ TixSelect changes.
+
+<p><H3><A NAME=1.5.4>1.5.4 Specifying Complex Selection Rules</H3>
+
+<p> If you want to have more complex selection rules for the
+ TixSelect widget, you can use the <code> -validatecmd</code> option. This
+ option works the same as the <code> -validatecmd</code> option of the
+ TixControl widget which we discusses in section
+ <a href=intro.tex.html#1.2>1.2 </a>: it specifies a command to be called every
+ time the user attempts to change the selection inside a TixSelect
+ widget.
+
+<p> In the example program <a href=intro.tex.html#1-14>1-14 </a>, the procedure
+ <code> TwoMax</code> will be called every time the user tries to change the
+ selection of the <code> .fruits</code> widget. <code> TwoMax</code> limits the
+ maximum number of fruits that the user to choose to be 2 by always
+ truncating the value of the TixSelect widget to have no more than
+ two items. If you run this program, you will find out that you can
+ never select a third fruit after you have select two fruits.
+
+<p><blockquote><a name=1-14>
+<pre>
+ tixSelect .fruits -label "Fruits: " -radio false -validatecmd TwoMax
+ .fruits add apple -text Apple -width 6
+ .fruits add orange -text Orange -width 6
+ .fruits add banana -text Banana -width 6
+ pack .fruits
+
+<p> proc TwoMax {value} {
+ if {[llength $value] > 2} {
+ return [lrange $value 0 1]
+ } else {
+ return $value
+ }
+ }
+</pre>
+<hr><center><h3>(Figure 1-14) Specifying More Complex Selection Rules</center></h3>
+</blockquote>
Added: external/tix-8.4.2.x/docs/tix-book/oop.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/oop.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,790 @@
+<!-- $Id: oop.tex.html,v 1.2 2000/11/11 23:34:47 idiscovery Exp $ -->
+<H1><A NAME=6>6 Tix Object Oriented Programming</H1>
+
+<p> <i> This chapter is intended for experienced programmers who want to
+ create new Tix widgets. If you just want use the Tix widgets in your
+ applications, you can skip this chapter.</i>
+
+<p><H2><A NAME=6.1>6.1 Introduction to Tix Object Oriented Programming</H2>
+
+<p> Tix comes with a simple object oriented programming (OOP) framework,
+ the <i> Tix Intrinsics</i>, for writing mega-widgets. The Tix
+ Intrinsics is not a general purpose OOP system and it does not
+ support some features found in general purpose OOP systems such as
+ <code> [incr Tcl]</code>. However, the Tix Intrinsics is specially designed
+ for writing mega-widgets. It provides a simple and efficient
+ interface for creating mega-widgets so that you can avoid the
+ complexity and overheads of the general purpose OOP extensions to
+ Tcl.
+
+<p> The hard thing about programming with mega-widgets is to make sure
+ that each instance you create can handle its own activities. Events
+ must be directed to the right widget, procedures must act on data
+ that is internal to that widget, and users should be able to change
+ the options associated with the widget. For instance, we'll show an
+ arrow widget that needs to know what direction it's pointing; this
+ requires each instance of the widget to have its own variable.
+
+<p> Furthermore, each widget should respond properly to changes
+ requested by the application programmer during the program's run.
+ The whole reason people use Tcl/Tk is because they can alter things
+ on the fly.
+
+<p> The advantage of an object-oriented programming system is that you
+ can easily associate a widget with its own data and procedures
+ (methods). This chapter shows how to do that, and how to configure
+ data both at the time the widget is initialized and later during the
+ program.
+
+<p>
+<H3><A NAME=6.1.1>6.1.1 Widget Classes and Widget Instances</H3>
+
+<p> All the mega-widget classes in Tix, such as TixComboBox and
+ TixControl, are implemented in the Tix Intrinsics framework. Also,
+ you can write new <i> widget classes</i> with the Tix Intrinsics. In
+ the next section, I'll go through all the steps of creating a new
+ widget class in Tix. I'll illustrate the idea using a new class
+ ``TixArrowButton'' as an example. TixArrowButton is essentially a
+ button that can display an arrow in one of the for directions
+ (see figure <a href=oop.tex.html#6-1>6-1 </a>).
+
+<p><blockquote><a name=6-1>
+<center><img src=fig/oop/arrows.gif></center>
+<hr><center><h3>(Figure 6-1) Arrow Buttons</center></h3>
+</blockquote>
+
+<p> Once you have defined your classes, you can create <i> widget
+ instances</i> of these classes. For example, the following code will
+ create four instances of your new TixArrowButton class:
+
+<p><blockquote><pre>
+tixArrowButton .up -direction n
+tixArrowButton .left -direction e
+tixArrowButton .right -direction w
+tixArrowButton .down -direction s
+</pre></blockquote>
+
+<p><H3><A NAME=6.1.2>6.1.2 What is in a Widget Instance</H3>
+
+<p> Each widget instance is composed of three integral parts: variables,
+ methods and component widgets
+
+<p><H4><A NAME=6.1.2.1> Variables</H4>
+
+<p> Each widget instance is associated with a set of variables. In the
+ example of an instance of the TixArrowButton class, we may use a
+ variable to store the direction to which the arrow is pointing
+ to. We may also use a variable to count how many times the user has
+ pressed the button.
+
+<p> Each variable can be public or private. Public variables may be
+ accessed by the application programmer (usually via <code> configure</code>
+ or cget <code> methods</code>) and their names usually start with a dash
+ (<code> -</code>). They usually are used to represent some user-configurable
+ options of the widget instance. Private variables, on the other
+ hand, cannot be accessed by the application programmer. They are
+ usually used to store information about the widget instance that are
+ of interests only to the widget writer.
+
+<p> All the variables of an instance are stored in a global array that
+ has the same name as the instance. For example, the variables of the
+ instance <code> .up</code> are stored in the global array <code> .up:</code>. The
+ public variable <code> -direction</code>, which records the direction to
+ which the arrow is pointing to, is stored in <code> .up(-direction)</code>.
+ The private variable <code> count</code>, which counts how many times the
+ user has pressed the button, is stored in <code> .up(count)</code>. In
+ comparison, the same variables of the <code> .down</code> instance are
+ stored in <code> .down(-direction)</code> and <code> .down(count)</code>.
+
+<p><H4><A NAME=6.1.2.2> Methods</H4>
+
+<p> To carry out operations on the widget, you define a set of
+ procedures called <i> methods</i> (to use common object-oriented
+ terminology). Each method can be declared as public or private. <i>
+ Public methods</i> can be called by the application programmer. For
+ example, if the TixArrowButton class supports the public methods
+ <code> invoke</code> and <code> invert</code>, the application programmer can issue
+ the commands to call these method for the widget instance <code> .up</code>.
+
+<p><blockquote><pre>
+.up invert
+.up invoke
+</pre></blockquote>
+ In contrast, <i> Private methods</i> are of interests only to widget
+ writers and cannot be called by application programmers.
+
+<p><H4><A NAME=6.1.2.3> Component Widgets</H4>
+
+<p> A Tix mega-widget is composed of one or more component
+ widgets. The main part of a mega-widget is called the <i> root
+ widget</i>, which is usually a frame widget that encompasses all other
+ component widgets. The other component widgets are called <i>
+ subwidgets</i>.
+
+<p> The root widget has the same name as the the mega-widget itself. In
+ the above example, we have a mega-widget called <code> .up</code>. It has a
+ root widget which is a frame widget and is also called <code>
+ .up</code>. Inside <code> .up</code> we have a button subwidget called <code>
+ .up.button</code>.
+
+<p> Similar to variables and methods, component widgets are also
+ classified into public and private component widgets. Only public
+ widgets may be accessed by the application programmer, via the <code>
+ subwidget</code> method (see section <a href=intro.tex.html#1.3.1>1.3.1 </a>) of each widget
+ instance.
+
+<p><H2><A NAME=6.2>6.2 Widget Class Declaration</H2>
+
+<p> The first step of writing a new widget class is to decide the base
+ class from which the new class. Usually, if the new class does not
+ share any common features with other classes, it should be derived
+ from the TixPrimitive class. If it does share common features with
+ other classes, then it should be derived from the appropriate base
+ class. For example, if the new class support scrollbars, it should
+ be derived from TixScrolledWidget; if it displays a label next to
+ its ``main area'', then it should be derived from TixLabelWidget.
+
+<p> In the case of our new TixArrowButton class, it doesn't really share
+ any common features with other classes, so we decide to use the base
+ class TixPrimitive as its superclass.
+
+<p>
+<H3><A NAME=6.2.1>6.2.1 Using the tixWidgetClass Command</H3>
+
+<p> We can use the <code> tixWidgetClass</code> command to declare a new
+ class. The syntax is:
+
+<p><blockquote><pre>
+tixWidgetClass classCommandName {
+ -switch value
+ -switch value
+ ....
+}
+</pre></blockquote>
+ For example, the following is the declaration section of
+ TixArrowButton:
+
+<p><blockquote><a name=6-2>
+<pre>
+tixWidgetClass tixArrowButton {
+ -classname TixArrowButton
+ -superclass tixPrimitive
+ -method {
+ flash invoke invert
+ }
+ -flag {
+ -direction -state
+ }
+ -configspec {
+ {-direction direction Direction e}
+ {-state state State normal}
+ }
+ -alias {
+ {-dir -direction}
+ }
+ -default {
+ {*Button.anchor c}
+ {*Button.padX 5}
+ }
+}
+</pre>
+<hr><center><h3>(Figure 6-2) declaration of the TixArrowButton Class</center></h3>
+</blockquote>
+
+<p> We'll look at what each option means as I describe the command in
+ the following sections.
+
+<p> The first argument for <code> tixWidgetClass</code> is the <i> command
+ name</i> for the widget class (<code> tixArrowButton</code>). Command names are
+ used to create widgets of this class. For example, the code
+
+<p><blockquote><pre>
+tixArrowButton .arrow
+</pre></blockquote>
+ creates a widget instance <code> .arrow</code> of the class
+ TixArrowButton. Also, the command name is used as a prefix of all
+ the methods of this class. For example, the <code> Foo</code> and <code> Bar</code>
+ methods of the class TixArrowButton will be written as <code>
+ tixArrowButton:Foo</code> and <code> tixArrowButton:Bar</code>.
+
+<p> The <i> class name</i> of the class (<code> TixArrowButton</code>)is specified
+ by the <code> -classname</code> switch inside the main body of the
+ declaration. The class name is used only to specify options in the
+ TK option database. For example, the following commands specifies
+ the TixArrowButton widget instances should have the default value
+ <code> up</code> for their <code> -direction</code> option and the default value
+ <code> normal</code> for their <code> -state</code> option.
+
+<p><blockquote><pre>
+option add *TixArrowButton.direction up
+option add *TixArrowButton.state normal
+</pre></blockquote>
+
+<p> <!ignored:nind> Notice the difference in the capitalization of the class name
+ and the command name of the TixArrowButton class: both of them has
+ the individual words capitalized, but the command name (<code>
+ tixArrowButton</code>)starts with a lower case letter while the class name
+ (<code> TixArrowButton</code>) starts with an upper case letter. When you
+ create your own classes, you should follow this naming convention.
+
+<p>
+ The <code> -superclass</code> switch specifies the superclass of the new
+ widget. In our example, we have set it to <code> tixPrimitive</code>. Again,
+ pay attention to the capitalization: we should use the command name
+ of the superclass, not its class name.
+
+<p><H2><A NAME=6.3>6.3 Writing Methods</H2>
+
+<p> After we have declared the new widget class, we can write methods
+ for this class to define its behavior. Methods are just a special
+ type of TCL procedures and they are created by the <code> proc</code>
+ command. There are, however, three requirements for methods. First,
+ their names must be prefixed by the command name of their
+ class. Second, they must accept at least one argument and the first
+ argument that they accept must be called <code> w</code>. Third, the first
+ command executed inside each method must be
+
+<p><blockquote><pre>
+upvar #0 $w data
+</pre></blockquote>
+
+<p> For example, the following is an implementation of the invert method
+ for the class TixArrowButton:
+
+<p><blockquote><pre>
+proc tixArrowButton:invert {w} {
+ upvar #0 $w data
+
+<p> set curDirection $data(-direction)
+ case $curDirection {
+ n {
+ set newDirection s
+ }
+ s {
+ set newDirection n
+ }
+ # ....
+ }
+}
+</pre></blockquote>
+ Notice that the name of the method is prefixed by the command name
+ of the class (<code> tixArrowButton</code>). Also, the first and only
+ argument that it accepts is <code> w</code> and the first line it executes
+ is ``<code> upvar #0 $w data</code>''.
+
+<p> The argument <code> w</code> specifies which widget instance this method
+ should act upon. For example, if the user has issued the command
+
+<p><blockquote><pre>
+.up invert
+</pre></blockquote>
+ on an instance <code> .up</code> of the class tixArrowButton, the method
+ <code> tixArrowButton:invert</code> will be called and the argument <code> w</code>
+ will have the value <code> .up</code>.
+
+<p> The <code> invert</code> method is used to invert the direction of the
+ arrow. Therefore, it should examine the variable <code>
+ .up(-direction)</code>, which stores the current direction of the instance
+ <code> .up</code>, and modify it appropriately. It turns out that in TCL,
+ the only clean way to access an array whose name is stored in a
+ variable is the ``<code> upvar #0 $w data</code>'' technique: essentially
+ it tells the intepreter that the array data should be an alias for
+ the global array whose name is stored in <code> $w</code>. We will soon see
+ how the widget's methods use the data array.
+
+<p> Once the mysterious ``<code> upvar #0 $w data</code>'' line is explained,
+ it becomes clear what the rest of the <code> tixArrowButton:invert</code>
+ method does: it examines the current direction of the arrow, which
+ is stored in <code> $data(-direction)</code> and inverts it.
+
+<p><H3><A NAME=6.3.1>6.3.1 Declaring Public Methods</H3>
+
+<p> All the methods of a class are by default private methods and cannot
+ be accessed by the application programmer. If you want to make a
+ method public, you can include its name in the <code> -method</code> section
+ of the class declaration. In our TixArrowButton example, we have
+ declared that the methods <code> flash</code>, <code> invert</code> and <code> invoke</code>
+ are public methods and they can be accessed by the application
+ programmer. All other methods of the TixArrowButton class will be
+ private.
+
+<p> Usually, the names of private methods start with a capital letter
+ with individual words capitalized. The names of public methods
+ start with a lowercase letter.
+
+<p><H2><A NAME=6.4>6.4 Standard Initialization Methods</H2>
+
+<p> Each new mega-widget class must supply three standard initialization
+ methods. When an instance of a Tix widget is created, three
+ three methods will be called to initialize this instance. The
+ methods are <code> InitWidgetRec</code>, <code> ConstructWidget</code> and <code>
+ SetBindings</code> and they will be called in that order. The following
+ sections show how these methods can be implemented.
+
+<p><H3><A NAME=6.4.1>6.4.1 The InitWidgetRec Method</H3>
+
+<p> The purpose of the <code> InitWidgetRec</code> method is to initialize the
+ variables of the widget instance. For example, the following
+ implementation of <code> tixArrowButton:InitWidgetRec</code> sets the <code>
+ count</code> variable of each newly created instance to zero.
+
+<p><blockquote><pre>
+proc tixArrowButton:InitWidgetRec {w} {
+ upvar #0 $w data
+
+<p> set data(count) 0
+}
+</pre></blockquote>
+
+<p> Earlier, we showed how each widget you create is associated with an
+ array of the same name. Within the methods, you always refer to
+ this array through the name <code> data</code> --the method then works
+ properly in each instance of the widget.
+
+<p><H4><A NAME=6.4.1.1> Chaining Methods</H4>
+
+<p> The above implementation is not sufficient because our
+ TixArrowButton class is derived from TixPrimitive. The class
+ derivation in Tix is basically an <i> is-a</i> relationship:
+ TixArrowButton <i> is a</i> TixPrimitive. TixPrimitive defines the
+ method <code> tixPrimitive:InitWidgetRec</code> which sets up the instance
+ variables of every instance of TixPrimitive. Since an instance of
+ TixArrowButton is also an instance of TixPrimitive, we need to make
+ sure that the instance variables defined by TixPrimitive are also
+ properly initialized. The technique of calling a method defined in a
+ superclass is called the <i> chaining</i> of a method. The following
+ implementation does this correctly:
+
+<p>
+<blockquote><pre>
+proc tixArrowButton:InitWidgetRec {w} {
+ upvar #0 $w data
+
+<p> tixPrimitive:InitWidgetRec $w
+ set data(count) 0
+}
+</pre></blockquote>
+ Notice that <code> tixPrimitive:InitWidgetRec</code> is called before anything
+ else is done. This way, we can define new classes by means of
+ successive refinement: we can first ask the superclass to set up the
+ instance variables, then we can modify some of those variables when
+ necessary and also define new variables.
+
+<p><H4><A NAME=6.4.1.2> The tixChainMethod call</H4>
+
+<p> The above implementation of <code> tixArrowButton:InitWidgetRec</code> is
+ correct but it may be cumbersome if we want to switch
+ superclasses. For example, suppose we want to create a new base class
+ TixArrowWidget, which presumably defines common attributes of any
+ class that have arrows in them. Then, instead of deriving
+ TixArrowButton directly from TixPrimitive, we decide to derive
+ TixArrowButton from TixArrowWidget, which is in turn derived from
+ TixPrimitive:
+
+<p><blockquote><pre>
+tixWidgetClass tixArrowWidget {
+ -superclass tixPrimitive
+ ...
+}
+tixWidgetClass tixArrowButton {
+ -superclass tixArrowWidget
+ ...
+}
+</pre></blockquote>
+ Now we would need to change all the method chaining calls in
+ TixArrowButton from:
+
+<p><blockquote><pre>
+tixPrimitive:SomeMethod
+</pre></blockquote>
+ to:
+
+<p><blockquote><pre>
+tixArrowWidget:SomeMethod
+</pre></blockquote>
+ This may be a lot of work because you may have chained methods in many
+ places in the original implementation of TixArrowButton.
+
+<p> The <code> tixChainMethod</code> command solves this problem. It will
+ automatically find a superclass that defines the method we want to
+ chain and calls this method for us. For example, the following is a
+ better implementation of <code> tixArrowButton:InitWidgetRec</code> that
+ uses <code> tixChainMethod</code> to avoid calling <code>
+ tixPrimitive:InitWidgetRec</code> directly:
+
+<p><blockquote><pre>
+proc tixArrowButton:InitWidgetRec {w} {
+ upvar #0 $w data
+
+<p> tixChainMethod $w InitWidgetRec
+ set data(count) 0
+}
+</pre></blockquote>
+ Notice the order of the arguments for tixChainMethod: the name of
+ the instance, <code> $w</code>, is passed before the method we want to
+ chain, <code> InitWidgetRec</code>. In general, if the method we want to
+ chain has $1+n$ arguments:
+
+<p><blockquote><pre>
+proc tixPrimitive:MethodToChain {w arg1 arg2 ... argn} {
+ ...
+}
+</pre></blockquote>
+ We call it with the arguments in the following order
+
+<p><blockquote><pre>
+tixChainMethod $w MethodToChain $arg1 $arg2 ... $argn
+</pre></blockquote>
+ We'll come back to more detailed discussion of <code> tixChainMethod</code>
+ shortly. For the time being, let's take it for granted that <code>
+ tixChainMethod</code> must be used in the three standard initialization
+ methods: <code> InitWidgetRec</code>, <code> ConstructWidget</code> and <code>
+ SetBindings</code>
+
+<p><H3><A NAME=6.4.2>6.4.2 The ConstructWidget Method</H3>
+
+<p> The <code> ConstructWidget</code> method is used to creates the components
+ of a widget instance. In the case of TixArrowButton, we want to
+ create a new button subwidget, whose name is <code> button</code>, and use a
+ bitmap to display an arrow on this button. Assuming the bitmap files
+ are stored in the files <code> up.xbm</code>, <code> down.xbm</code>, <code> left.xbm</code>
+ and <code> right.xbm</code>, the string substitution <code>
+ @$data(-direction).xbm</code> will give us the appropriate bitmap
+ depending on the current direction option of the widget instance.
+
+<p><blockquote><pre>
+proc tixArrowButton:ConstructWidget {w} {
+ upvar #0 $w data
+
+<p> tixChainMethod $w ConstructWidget
+
+<p> set data(w:button) [button $w.button -bitmap @$data(-direction).xbm]
+ pack $data(w:button) -expand yes -fill both
+}
+</pre></blockquote>
+
+<p> The <code> tixArrowButton:ConstructWidget</code> method shown above sets
+ the variable <code> data(w:button)</code> to be the pathname of the <code>
+ button</code> subwidget. As a convention of the Tix Intrinsics, we must
+ declare a public subwidget <i> swid</i> by storing its pathname in the
+ variable <code> data(w:</code><i> swid</i><code> )</code>.
+
+<p><H3><A NAME=6.4.3>6.4.3 The SetBindings Method</H3>
+
+<p> In your interface, you want to handle a lot of events in the
+ subwidgets that make up your mega-widget. For instance, when
+ somebody presses the button in a TixArrowButton widget, you want the
+ button to handle the event. The <code> SetBindings</code> method is used to
+ creates event bindings for the components inside the mega-widget. In
+ our TixArrowButton example, we use the bind command to specify that
+ the method <code> tixArrowButton:IncrCount</code> should be called each
+ time when the user presses the first mouse button. As a result, we
+ can count the number of times the user has pressed on the button
+ (obviously for no better reasons than using it as a dumb example).
+
+<p><blockquote><pre>
+proc tixArrowButton:SetBindings {w} {
+ upvar #0 $w data
+
+<p> tixChainMethod $w SetBindings
+
+<p> bind $data(w:button) <1> "tixArrowButton:IncrCount $w"
+}
+
+<p>proc tixArrowButton:IncrCount {w} {
+ upvar #0 $w data
+
+<p> incr data(count)
+}
+</pre></blockquote>
+
+<p><H2><A NAME=6.5>6.5 Declaring and Using Variables</H2>
+
+<p> The private variables of a widget class do not need to be
+ declared. In fact they can be initialized and used anywhere by any
+ method. Usually, however, general purpose private variables are
+ initialized by the <code> InitWidgetRec</code> method and subwidget
+ variables are initialized in the <code> ConstructWidget</code> method.
+
+<p> We have seen in the <code> tixArrowButton:InitWidgetRec</code> example that
+ the private variable <code> data(count)</code> was initialized there. Also,
+ the private variable <code> data(w:button)</code> was initialized in <code>
+ tixArrowButton:ConstructWidget</code> and subsequently used in <code>
+ tixArrowButton:SetBindings</code>.
+
+<p> In contrast, public variables must be declared inside the class
+ declaration. The following arguments are used to declare the public
+ variables and specify various options for them:
+
+<p><blockquote><ul>
+
+<p> <li> <code> -flag</code>: As shown in the class declaration in figure
+ <a href=oop.tex.html#6-2>6-2 </a>, the <code> -flag</code> argument declares all the public
+ variables of the TixArrowButton class, <code> -direction</code> and <code>
+ -state</code>
+
+<p> <li> <code> -configspec</code>: We can use the <code> -configspec</code> argument to
+ specify the details of each public variable. For example, the
+ following declaration
+
+<p><blockquote><pre>
+-configspec {
+ {-direction direction Direction e}
+ {-state state State normal}
+}
+</pre></blockquote>
+
+<p> <!ignored:nind> specifies that the <code> -direction</code> variable has the resource
+ name <code> direction</code> and resource class <code> Direction</code>; its default
+ value is <code> e</code>. The application programmer can assign value to
+ this variable by using the <code> -direction</code> option in the command
+ line or by specifying resources in the Tk option database with its
+ resource name or class. The declaration of <code> -state</code> installs
+ similar definitions for that variable.
+
+<p> <li> <code> -alias</code>: The <code> -alias</code> argument is used to specify
+ alternative names for public variables. In our example, the setting
+
+<p><blockquote><pre>
+-alias {
+ {-dir -direction}
+}
+</pre></blockquote>
+ specifies that <code> -dir</code> is the same variable as <code>
+ -direction</code>. Therefore, when the application issue the command
+
+<p><blockquote><pre>
+.up config -dir w
+</pre></blockquote>
+ it is the same as issuing
+
+<p><blockquote><pre>
+.up config -direction w
+</pre></blockquote>
+ The <code> -alias</code> option provides only an alternative name for
+ the application programmer. Inside the widget's implementation code,
+ the variable is still accessed as <code> data(-direction)</code>, <i> not</i>
+ <code> data(-dir)</code>.
+
+<p></blockquote></ul>
+
+<p><H3><A NAME=6.5.1>6.5.1 Initialization of Public Variables</H3>
+
+<p> When a widget instance is created, all of its public variables are
+ initialized by the Tix Intrinsics before the <code> InitWidgetRec</code>
+ method is called. Therefore, <code> InitWidgetRec</code> and any other
+ method of this widgte instance are free to assume that all the
+ public variables have been properly initialized and use them as
+ such.
+
+<p> The public variables are initialized by the following criteria.
+
+<p><blockquote><ul>
+
+<p> <li> Step 1: If the value of the variable is specified by the
+ creation command, this value is used. For example, if the
+ application programmer has created an instance in the following way:
+
+<p><blockquote><pre>
+tixArrowButton .arr -direction n
+</pre></blockquote>
+ The value <code> n</code> will be used for the -direction variable.
+
+<p> <li> Step 2: if step 1 fails but the value of the variable is
+ specified in the options database, that value is used. For example,
+ if the user has created an instance in the following way:
+
+<p><blockquote><pre>
+option add *TixArrowButton.direction w
+tixArrowButton .arr
+</pre></blockquote>
+ The value <code> w</code> will be used for the <code> -direction</code> variable.
+
+<p> <li> Step3: if step 2 also fails, the default value specified in
+ the <code> -configspec</code> secton of the class declaration will be used.
+
+<p></blockquote></ul>
+
+<p><H4><A NAME=6.5.1.1> Type Checker</H4>
+
+<p> You can use a <i> type ckecker procedure</i> to check whether the user
+ has supplied a value of the correct type for a public variable. The
+ type checker is specified in the <code> -configspec</code> section of the
+ class declaration after the default value. The following code
+ specifies the type checker procedure <code> CheckDirection</code> for the
+ <code> -direction</code> variable:
+
+<p><blockquote><pre>
+ -configspec {
+ {-direction direction Direction e CheckDirection}
+ {-state state State normal}
+ }
+ ...
+}
+
+<p>proc CheckDirection {dir} {
+ if {[lsearch {n s w e} $dir] != -1} {
+ return $dir
+ } else {
+ error "wrong direction value \"$dir\""
+}
+</pre></blockquote>
+ Notice that no type checker has been specified for the <code> -state</code>
+ variable and thus its value will not be checked.
+
+<p> If a type checker procedure is specified for a public variable, this
+ procedure will be called once the value of a public variable is
+ determined by the three steps mentioned above.
+
+<p><H3><A NAME=6.5.2>6.5.2 Public Variable Configuration Methods</H3>
+
+<p> After a widget instance is created, the user can assign new values
+ to the public variables using the configure method. For example, the
+ following code changes the <code> -direction</code> variable of the <code>
+ .arr</code> instance to <code> n</code>.
+
+<p><blockquote><pre>
+.arr configure -direction n
+</pre></blockquote>
+
+<p> In order for configuration to work, you have to define a
+ configuration method that does what the programmer expects. The
+ configuration method of a public variable is invoked whenever the
+ user calls the configure method to change the value of this
+ variable. The name of a configuration method must be the name of the
+ public variable prefixed by the creation command of the class and
+ <code> :config</code>. For example, the name configuration method for the
+ <code> -direction</code> variable of the TixArrowButton class is <code>
+ tixArrowButton:config-direction</code>. The following code implements
+ this method:
+
+<p><blockquote><pre>
+proc tixArrowButton:config-direction {w value} {
+ upvar #0 $w data
+
+<p> $data(w:button) config -bitmap @$value.xbm
+}
+</pre></blockquote>
+ Notice that when <code> tixArrowButton:config-direction</code> is called,
+ the <code> value</code> parameter contains the new value of the <code>
+ -direction</code> variable but <code> data(-direction)</code> contains the <code>
+ old</code> value. This is useful when the configuration method needs to
+ check the previous value of the variable before taking in the new
+ value.
+
+<p> If a type checker is defined for a variable, it will be called
+ before the configuration method is called. Therefore, the
+ configuration method can assume that the type of the <code> value</code>
+ parameter is got is always correct.
+
+<p> Sometimes it is necessary to override the value supplied by the
+ user. The following code illustrates this idea:
+
+<p><blockquote><pre>
+proc tixArrowButton:config-direction {w value} {
+ upvar #0 $w data
+
+<p> if {$value == "n"} {
+ set value s
+ set data(-direction) $value
+ }
+
+<p> $data(w:button) config -bitmap @$value.xbm
+ return $data(-direction)
+}
+</pre></blockquote>
+ Notice the above code always overrides values of <code> n</code> to <code>
+ s</code>. If you need to override the value, you must do the following two
+ things:
+
+<p><blockquote><ul>
+
+<p> <li> Explicitly set the instance variable inside the configuration
+ method (the <code> set data(-direction) $value</code> line).
+
+<p> <li> Return the modified value from the configuration method.
+</blockquote></ul>
+ If you do not need to override the value, you don't need to return
+ anything from the configuration method. In this case, the Tix
+ Intrinsics will assign the new value to the instance variable for
+ you.
+
+<p><H4><A NAME=6.5.2.1> Configuration Methods and Public Variable Initialization</H4>
+
+<p> For efficiency reasons, the configuration methods are not called
+ during the intialization of the public variables. If you want to
+ force the configuration method to be called for a particular public
+ variable, you can specify it in the <code> -forcecall</code> section of the
+ class declaration. In the following example, we force the
+ configuration method of the <code> -direction</code> variable to be called
+ during intialization:
+
+<p><blockquote><pre>
+-forcecall {
+ -direction
+}
+</pre></blockquote>
+
+<p><H2><A NAME=6.6>6.6 Summary of Widget Instance Initialization</H2>
+
+<p> The creation of a widget instance is a complex process. You must
+ understand how it works in order to write your widget classes. The
+ following is the steps taken by the Tix Intrinsics when a widget
+ instance is created:
+
+<p><blockquote><ul>
+
+<p> <li> When the user creates an instance, the public variables are
+ intilized as discussed in section <a href=oop.tex.html#6.5.1>6.5.1 </a>. Type checkers
+ are always called if they are specified. Configuration methods are
+ called only if they are specified in the <code> -forcecall</code> section.
+
+<p> <li> The <code> InitWidgetRec</code> method is called. It should initialize
+ private variable, possibly according to the values the public
+ variables.
+
+<p> <li> The <code> ConstructWidget</code> method is called. It should create the
+ component widgets. It should also store the names of public
+ subwidgets into the subwidget variables.
+
+<p> <li> The <code> SetBinding</code> method is called. It should create bindings for
+ the component widgets.
+
+<p></blockquote></ul>
+ After the above steps, the creation of the instance is complete and the
+ user can iterate with it using its widget command.
+
+<p><H2><A NAME=6.7>6.7 Loading the New Classes</H2>
+
+<p> Usually, you can use a separate script file to store the
+ implementaion of each new widget class. If you have several of those
+ files, it will be a good idea to group the files into a single
+ directory and create a <code> tclIndex</code> file for them so that the new
+ classes can be auto-loaded.
+
+<p> Suppose you have put the class files into the directory <code>
+ /usr/my/tix/classes</code>. You can create the <code> tclIndex</code> file using
+ the <code> tools/tixindex</code> program that comes with Tix:
+
+<p><blockquote><pre>
+cd /usr/my/tix/classes
+/usr/my/Tix4.0/tools/tixindex *.tcl
+</pre></blockquote>
+
+<p> <!ignored:nind> The <code> tclIndex</code> file must be created by the <code> tixindex</code>
+ program. You cannot use the standard <code> auto_mkindex</code> command
+ that comes with Tcl.
+
+<p> Once you have created the <code> tclIndex</code> file, you can use your new
+ widget classes by auto-loading. Here is a small demo program that
+ uses the new TixArrowButton class:
+
+<p><blockquote><pre>
+#!/usr/local/bin/tixwish
+lappend auto_path /usr/my/tix/classes
+
+<p># Now I can use my TixArrowButton class!
+#
+tixArrowButton .arr -direction n
+pack .arr
+</pre></blockquote>
Added: external/tix-8.4.2.x/docs/tix-book/preface.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/preface.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+<!-- $Id: preface.tex.html,v 1.1 2000/10/10 19:52:46 idiscovery Exp $ -->
+<H2><A NAME=0.1>0.1 About This Manual</H2>
+
+<p>This manual is the programmer's guide to the Tix library. It takes you
+though a step-by-step tutorial about the different widgets and
+functions available in the Tix library. It also covers how to write
+new widgets using the Tix Intrinsics objecr-oriented programming
+interface. The accompanying <i> Tix Reference Manual</i> is a collection
+of the Tix manual pages. It describes all the options and other
+details of the Tix widgets and functions.
+
+<p>
+
+<p>
+<H2><A NAME=0.2>0.2 About This HTML Document</H2>
+
+<p> This HTML document is converted from LaTeX source files to HTML by a
+ home grown TeX to HTML converter. This converted is written solely
+ in TCL and it can convert any LaTeX commands used in this document
+ (and probably nothing else).
+
+
+<p><H2><A NAME=0.3>0.3 Other Formats Of This Document</H2>
+
+<p> This document is also available both postscript and HTML format. The
+ postscript format is available at
+ <a href=ftp://ftp.xpi.com/pub/tix-4.0.ps.gz>ftp://ftp.xpi.com/pub/tix-4.0.ps.gz</a>. The HTML format is
+ available from <a href=http://www.xpi.com/tix/doc/tix-4.0/tix.book.html>http://www.xpi.com/tix/doc/tix-4.0/tix.book.html</a>
+
+<p><H2><A NAME=0.4>0.4 Organization of This Manual</H2>
+
+<p> Chapter <a href=intro.tex.html#1>1 </a>, <i> Introduction</i> gets you started with the
+ Tix widgets by describing their basic options and
+ operations. Chapter <a href=container.tex.html#2>2 </a>, <i> Container Widgets</i>,
+ describes the Tix widgets that can be used to contain other widgets
+ and maintain their geometry. Chapter <a href=tlist.tex.html#3>3 </a>, <i> TList
+ Widget and Display Items</i>, describes the tabular listbox widget and
+ the Tix display items, which are used by many Tix widgets. Chapter
+ <a href=hlist.tex.html#4>4 </a>, <i> Hierarchical Listbox</i>, describes how to create
+ a hierarchical list structure using the TixHList widget. Chapter
+ <a href=filesel.tex.html#5>5 </a>, <i> Selection Files and Directories</i>, describes
+ how to use the file and directory selection widgets in the Tix
+ library. Finally, Chapter <a href=oop.tex.html#6>6 </a>, <i> Tix Object Oriented
+ Programming</i>, describes how to use the Tix object oriented
+ programming library to create new classes of Tix widgets.
+
+<p>
+
+<p>
+
Added: external/tix-8.4.2.x/docs/tix-book/tix.book.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/tix.book.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,236 @@
+<!-- $Id: tix.book.html,v 1.1 2000/10/10 19:53:05 idiscovery Exp $ -->
+<HTML>
+<p>
+
+<p><center>
+<H1> Tix Programming Guide</H1>
+
+<p><img src=fig/cover.gif>
+
+<p></center>
+<ul>
+<ul>
+<b>
+<li><a href=preface.tex.html#0.1>0.1 About This Manual</a>
+</b>
+<b>
+<li><a href=preface.tex.html#0.2>0.2 About This HTML Document</a>
+</b>
+<b>
+<li><a href=preface.tex.html#0.3>0.3 Other Formats Of This Document</a>
+</b>
+<b>
+<li><a href=preface.tex.html#0.4>0.4 Organization of This Manual</a>
+</b>
+</ul>
+<h1>
+<li><a href=intro.tex.html#1>1 Introduction</a>
+</h1>
+<ul>
+<b>
+<li><a href=intro.tex.html#1.1>1.1 What is Tix</a>
+</b>
+<ul>
+<li><a href=intro.tex.html#1.1.1>1.1.1 Tix for Application Programmers</a>
+<li><a href=intro.tex.html#1.1.2>1.1.2 Tix for Widget Developers</a>
+</ul>
+<b>
+<li><a href=intro.tex.html#1.2>1.2 Getting Started: the TixControl Widget</a>
+</b>
+<ul>
+<li><a href=intro.tex.html#1.2.1>1.2.1 Creating a TixControl Widget</a>
+<li><a href=intro.tex.html#1.2.2>1.2.2 Accessing The Value of a TixControl Widget</a>
+<ul>
+<li><a href=intro.tex.html#1.2.2.1>1.2.2.1 Disabling Callbacks Temporarily</a>
+</ul>
+<li><a href=intro.tex.html#1.2.3>1.2.3 Validating User Inputs</a>
+</ul>
+<b>
+<li><a href=intro.tex.html#1.3>1.3 Accessing The Components Inside Mega Widgets</a>
+</b>
+<ul>
+<li><a href=intro.tex.html#1.3.1>1.3.1 Subwidgets</a>
+<li><a href=intro.tex.html#1.3.2>1.3.2 Subwidget Names</a>
+<li><a href=intro.tex.html#1.3.3>1.3.3 The <code> subwidget</code> Method</a>
+<li><a href=intro.tex.html#1.3.4>1.3.4 Chaining the <code> subwidget</code> Method</a>
+<li><a href=intro.tex.html#1.3.5>1.3.5 Configuring Subwidget Options Using the <code> -options</code> Switch</a>
+<li><a href=intro.tex.html#1.3.6>1.3.6 Configuring Subwidget Options Using the Tk Option Database</a>
+<li><a href=intro.tex.html#1.3.7>1.3.7 Caution: Restricted Access</a>
+</ul>
+<b>
+<li><a href=intro.tex.html#1.4>1.4 Another Tix Widget: TixComboBox</a>
+</b>
+<ul>
+<li><a href=intro.tex.html#1.4.1>1.4.1 Creating a TixComboBox Widget</a>
+<li><a href=intro.tex.html#1.4.2>1.4.2 Controlling the Style of the TixComboBox</a>
+<li><a href=intro.tex.html#1.4.3>1.4.3 Static Options</a>
+<li><a href=intro.tex.html#1.4.4>1.4.4 Monitoring the User's Browsing Actions</a>
+</ul>
+<b>
+<li><a href=intro.tex.html#1.5>1.5 The TixSelect Widget</a>
+</b>
+<ul>
+<li><a href=intro.tex.html#1.5.1>1.5.1 Creating A TixSelect Widget</a>
+<ul>
+<li><a href=intro.tex.html#1.5.1.1>1.5.1.1 Label and Orientation</a>
+<li><a href=intro.tex.html#1.5.1.2>1.5.1.2 Creating the Button Subwidgets and Configuring Their Appearance</a>
+<li><a href=intro.tex.html#1.5.1.3>1.5.1.3 Accessing the Button Subwidgets</a>
+</ul>
+<li><a href=intro.tex.html#1.5.2>1.5.2 Specifying Selection Rules</a>
+<li><a href=intro.tex.html#1.5.3>1.5.3 Accessing the Value of a TixSelect Widget</a>
+<li><a href=intro.tex.html#1.5.4>1.5.4 Specifying Complex Selection Rules</a>
+</ul>
+</ul>
+<h1>
+<li><a href=container.tex.html#2>2 Container Widgets</a>
+</h1>
+<ul>
+<b>
+<li><a href=container.tex.html#2.1>2.1 TixNoteBook</a>
+</b>
+<ul>
+<li><a href=container.tex.html#2.1.1>2.1.1 Adding Pages to a TixNoteBook</a>
+<li><a href=container.tex.html#2.1.2>2.1.2 Keyboard Accelerators</a>
+<li><a href=container.tex.html#2.1.3>2.1.3 Delaying the Creation of New Pages</a>
+<li><a href=container.tex.html#2.1.4>2.1.4 Changing Page Tabs and Deleting Pages</a>
+</ul>
+<b>
+<li><a href=container.tex.html#2.2>2.2 PanedWindow</a>
+</b>
+<ul>
+<li><a href=container.tex.html#2.2.1>2.2.1 Adding Panes Inside a TixPanedWindow Widget</a>
+<li><a href=container.tex.html#2.2.2>2.2.2 Putting Widgets Inside the Panes</a>
+<li><a href=container.tex.html#2.2.3>2.2.3 Setting the Order of the Panes</a>
+<li><a href=container.tex.html#2.2.4>2.2.4 Changing the Sizes of the Panes</a>
+</ul>
+<b>
+<li><a href=container.tex.html#2.3>2.3 The Family of Scrolled Widgets</a>
+</b>
+<ul>
+<li><a href=container.tex.html#2.3.1>2.3.1 The Scrolled Listbox Widget</a>
+<li><a href=container.tex.html#2.3.2>2.3.2 Other Scrolled Widgets</a>
+</ul>
+</ul>
+<h1>
+<li><a href=tlist.tex.html#3>3 Tabular Listbox and Display Items</a>
+</h1>
+<ul>
+<b>
+<li><a href=tlist.tex.html#3.1>3.1 tixTList -- The Tix Tabular Listbox Widget</a>
+</b>
+<b>
+<li><a href=tlist.tex.html#3.2>3.2 Display Items</a>
+</b>
+<ul>
+<li><a href=tlist.tex.html#3.2.1>3.2.1 Advantages of Display Items</a>
+<li><a href=tlist.tex.html#3.2.2>3.2.2 Display Items and Display Styles</a>
+</ul>
+<b>
+<li><a href=tlist.tex.html#3.3>3.3 Creating Display Items in the TixTList Widget</a>
+</b>
+<ul>
+<li><a href=tlist.tex.html#3.3.1>3.3.1 Creating Display Items</a>
+<li><a href=tlist.tex.html#3.3.2>3.3.2 Setting the Styles of the Display Items</a>
+<li><a href=tlist.tex.html#3.3.3>3.3.3 Configuring and Deleting the Items</a>
+<li><a href=tlist.tex.html#3.3.4>3.3.4 Choosing the Orientation and Number of Rows or Columns</a>
+<li><a href=tlist.tex.html#3.3.5>3.3.5 Event Handling</a>
+<li><a href=tlist.tex.html#3.3.6>3.3.6 Selection</a>
+</ul>
+</ul>
+<h1>
+<li><a href=hlist.tex.html#4>4 Hierarchical Listbox</a>
+</h1>
+<ul>
+<b>
+<li><a href=hlist.tex.html#4.1>4.1 TixHList -- The Tix Hierarchical Listbox Widget</a>
+</b>
+<ul>
+<li><a href=hlist.tex.html#4.1.1>4.1.1 Creating a Hierarchical List</a>
+<li><a href=hlist.tex.html#4.1.2>4.1.2 Creating Entries in a HList Widget</a>
+<li><a href=hlist.tex.html#4.1.3>4.1.3 Controlling the Layout of the Entries</a>
+<li><a href=hlist.tex.html#4.1.4>4.1.4 Handling the Selection and User Event</a>
+</ul>
+<b>
+<li><a href=hlist.tex.html#4.2>4.2 Creating Collapsible Tree Structures with TixTree</a>
+</b>
+</ul>
+<h1>
+<li><a href=filesel.tex.html#5>5 Selecting Files and Directories</a>
+</h1>
+<ul>
+<b>
+<li><a href=filesel.tex.html#5.1>5.1 File Selection Dialog Widgets</a>
+</b>
+<ul>
+<li><a href=filesel.tex.html#5.1.1>5.1.1 Using the TixFileSelectDialog Widget</a>
+<li><a href=filesel.tex.html#5.1.2>5.1.2 The Subwidget in the TixFileSelectDialog</a>
+<li><a href=filesel.tex.html#5.1.3>5.1.3 The TixExFileSelectDialog Widget</a>
+<li><a href=filesel.tex.html#5.1.4>5.1.4 Specifying File Types for TixExFileSelectDialog</a>
+<li><a href=filesel.tex.html#5.1.5>5.1.5 The <b> <code> tix filedialog</code></b> Command</a>
+</ul>
+<b>
+<li><a href=filesel.tex.html#5.2>5.2 Selecting Directories with the TixDirTree and TixDirList Widgets</a>
+</b>
+</ul>
+<h1>
+<li><a href=oop.tex.html#6>6 Tix Object Oriented Programming</a>
+</h1>
+<ul>
+<b>
+<li><a href=oop.tex.html#6.1>6.1 Introduction to Tix Object Oriented Programming</a>
+</b>
+<ul>
+<li><a href=oop.tex.html#6.1.1>6.1.1 Widget Classes and Widget Instances</a>
+<li><a href=oop.tex.html#6.1.2>6.1.2 What is in a Widget Instance</a>
+<ul>
+<li><a href=oop.tex.html#6.1.2.1>6.1.2.1 Variables</a>
+<li><a href=oop.tex.html#6.1.2.2>6.1.2.2 Methods</a>
+<li><a href=oop.tex.html#6.1.2.3>6.1.2.3 Component Widgets</a>
+</ul>
+</ul>
+<b>
+<li><a href=oop.tex.html#6.2>6.2 Widget Class Declaration</a>
+</b>
+<ul>
+<li><a href=oop.tex.html#6.2.1>6.2.1 Using the tixWidgetClass Command</a>
+</ul>
+<b>
+<li><a href=oop.tex.html#6.3>6.3 Writing Methods</a>
+</b>
+<ul>
+<li><a href=oop.tex.html#6.3.1>6.3.1 Declaring Public Methods</a>
+</ul>
+<b>
+<li><a href=oop.tex.html#6.4>6.4 Standard Initialization Methods</a>
+</b>
+<ul>
+<li><a href=oop.tex.html#6.4.1>6.4.1 The InitWidgetRec Method</a>
+<ul>
+<li><a href=oop.tex.html#6.4.1.1>6.4.1.1 Chaining Methods</a>
+<li><a href=oop.tex.html#6.4.1.2>6.4.1.2 The tixChainMethod call</a>
+</ul>
+<li><a href=oop.tex.html#6.4.2>6.4.2 The ConstructWidget Method</a>
+<li><a href=oop.tex.html#6.4.3>6.4.3 The SetBindings Method</a>
+</ul>
+<b>
+<li><a href=oop.tex.html#6.5>6.5 Declaring and Using Variables</a>
+</b>
+<ul>
+<li><a href=oop.tex.html#6.5.1>6.5.1 Initialization of Public Variables</a>
+<ul>
+<li><a href=oop.tex.html#6.5.1.1>6.5.1.1 Type Checker</a>
+</ul>
+<li><a href=oop.tex.html#6.5.2>6.5.2 Public Variable Configuration Methods</a>
+<ul>
+<li><a href=oop.tex.html#6.5.2.1>6.5.2.1 Configuration Methods and Public Variable Initialization</a>
+</ul>
+</ul>
+<b>
+<li><a href=oop.tex.html#6.6>6.6 Summary of Widget Instance Initialization</a>
+</b>
+<b>
+<li><a href=oop.tex.html#6.7>6.7 Loading the New Classes</a>
+</b>
+</ul>
+</HTML>
+
Added: external/tix-8.4.2.x/docs/tix-book/tlist.tex.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/docs/tix-book/tlist.tex.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,362 @@
+<!-- $Id: tlist.tex.html,v 1.2 2000/11/11 23:35:14 idiscovery Exp $ -->
+
+<H1><A NAME=3>3 Tabular Listbox and Display Items</H1>
+
+<p><H2><A NAME=3.1>3.1 tixTList -- The Tix Tabular Listbox Widget</H2>
+
+<p> <i> TixTList</i> is the Tabular Listbox Widget. It displays a list of
+ items in a tabular format. For example the TixTList widget in figure
+ <a href=tlist.tex.html#3-1>3-1 </a> displays files in a directory in rows and columns.
+
+<p><blockquote><a name=3-1>
+<center><img src=fig/tlist/tlist.gif></center>
+<hr><center><h3>(Figure 3-1) Files Displayed in a TixTList Widget in a Tabular Format</center></h3>
+
+</blockquote>
+
+<p><blockquote><a name=3-2>
+<center><img src=fig/tlist/joe.gif></center>
+<hr><center><h3>(Figure 3-2) Employee Names Displayed in a TixTList Widget</center></h3>
+
+</blockquote>
+
+<p> TixTList does all what the standard Tk listbox widget can do, i.e,
+ it displays a list of items. However, TixTList is superior to the
+ listbox widget is many respects. First, TixTList allows you to
+ display the items in a two dimensional format. This way, you can
+ display more items at a time. Usually, the user can locate the
+ desired items much faster in a two dimensional list than the one
+ dimensional list displayed by the Tk listbox widget.
+
+<p> In addition, while the Tk listbox widget can only display text
+ items, the TixTList widget can display a multitude of types of
+ items: text, images and widgets. Also, while you can use only one
+ font and one color in a listbox widget, you can use many different
+ fonts and colors in a TixTList widget. In figure <a href=tlist.tex.html#3-1>3-1 </a>, we
+ use graphical images inside a tixTList widget to represent file
+ objects. In figure <a href=tlist.tex.html#3-2>3-2 </a>, we display the names of all
+ employees of a hypothetical company. Notice the use of a bold font
+ to highlight all employees whose first name is Joe.
+
+<p><H2><A NAME=3.2>3.2 Display Items</H2>
+
+<p> Before we rush to discuss how to create the items inside a TixTList
+ widget, let's first spend some time on a very important topic about
+ the Tix library: the repationship between the display items and
+ their host widgets.
+
+<p> We can better define the terms by taking a quick preview of the
+ TixHList widget, which will be covered in details in the next
+ chapter. Let's compare the items displayed on the two widgets in
+ figure <a href=tlist.tex.html#3-3>3-3 </a>. If we take a close look at the item
+ that shows the <code> usr</code> directory in the TixTList widget on the left
+ versus the TixHList widget on the right, we can see that this item
+ appears exactly the same on both widgets.
+
+<p> If fact, all the items in these two widgets are of the <i> same</i>
+ type: they all display an image next to a textual name. The only
+ difference between these two widgets is how these items are
+ arranged. The TixTList widget arranges the items in rows and
+ columns, while the TixHList widget arranges the items in a
+ hierachical format.
+
+<p> With this observation in mind, we can see a separation of tasks
+ berween the widgets and the items they display. We call the TixHList
+ and TixTList widgets in figure <a href=tlist.tex.html#3-3>3-3 </a> <i> host
+ widgets</i>: their task is to arrange the items according to their
+ particular rules. However, they don't really care what these items
+ display; they just treat the items as rectangle boxes. In contrast,
+ these items, which are called <i> display items</i> in Tix
+ terminology, controls the visual information they display, such as
+ the images, text strings, colors, fonts, etc. However, they don't
+ really care where on the host widget they will appear.
+
+<p>
+<blockquote><a name=3-3>
+<center><img src=fig/tlist/widgets.gif></center>
+<hr><center><h3>(Figure 3-3) The Same Type of Items Displayed in a TixTList (left) and a
+ TixHList(right)</center></h3>
+
+</blockquote>
+
+<p><H3><A NAME=3.2.1>3.2.1 Advantages of Display Items</H3>
+
+<p> It is easy to see the advantages of seperating the display items
+ from their host widgets. First, the display items are easy to
+ learn. Since they are the same across different types of
+ widgets. Once you learn about a type of display items, you will know
+ how to use them in all Tix widgets that support display items
+ (currently these include TixHList, TixTList and the spreadsheet
+ widget TixGrid, but the number is growing). In contrast, if you want
+ to create a text item for the Tk widgets, you will find out that the
+ listbox, text, canvas and entry widget each have a different method
+ of creating and manipulating text items, and it is quite annoying to
+ learn each of them individually.
+
+<p> Second, the hosts widgets that use display items are extensible.
+ Because of the separation of task, the host widgets are not involved
+ in the implementation details of the display items. Therefore, if
+ you add a new type of display items, such as a <code> animation</code> type
+ that displays live video, the host widgets will gladly take them in
+ and display them. You don't need to modify the existing host widgets
+ at all. In contrast, if you want to display graphical images in the
+ existing Tk listbox widgets, you'd better set aside 100 hours to
+ rewrite it completely!
+
+<p> Third, display items are good for writers of host widgets. Because
+ now they just need to implement the arrangement policy of the host
+ widgets. They don't need to worry about drawing at all because it is
+ all handled by the display items. This is a significant saving in
+ code because a widget that does not use display items has to spend
+ 30% of its C code to do the drawing.
+
+<p><H3><A NAME=3.2.2>3.2.2 Display Items and Display Styles</H3>
+
+<p> The appearance of a display item is controlled by a set of
+ attributes. For example, the <code> text</code> attribute controls the text
+ string displayed on the item and the <code> font</code> attribute specifies
+ what font should be used.
+
+<p> Usually, each of the attributes falls into one of two categroies:
+ ``<i> individual</i>'' or ``<i> collective</i>''. For example, each of
+ the items inside a TixTList widget may display a different text
+ string; therefore we call the text string an <i> individual
+ attribute</i>. However, in most cases, the items share the same color,
+ font and spacing and we call these <i> collective attributes</i>.
+
+<p> One question concerns where we keep the collective attribute for the
+ display items. Certainly, we can keep a <code> font</code> attribute for
+ each item, but this is not really an efficient solution. In fact, if
+ all the items have the same font, we would be keeping a duplicated
+ copy of the same font for each of the items we create. Since a host
+ widget may have many thousands of items, keeping thousands of
+ dupilcated copys of the same font, or any other collective
+ attributes, would be very wasteful.
+
+<p><blockquote><a name=3-4>
+<center><img src=fig/tlist/relation.gif></center>
+<hr><center><h3>(Figure 3-4) Relationship Between Display Items and Display Styles</center></h3>
+
+</blockquote>
+
+<p>
+
+ To advoid the unnecessary duplication of resources, Tix stores the
+ collective attributes in special objects called <i> display
+ styles</i>. The relationship between display items and their styles is
+ depicted in figure <a href=tlist.tex.html#3-4>3-4 </a>. Each item holds its own
+ copy of the individual attributes, such as <code> text</code>. However, the
+ collective attributes are stored in the style objects. Each item has
+ a special <code> style</code> attribute that tells it which style it should
+ use. In figure <a href=tlist.tex.html#3-4>3-4 </a>, since items <i> a</i> and <i> b</i>
+ are assigned the same style, therefore, they share the same font and
+ color. Item <i> c</i> is assigned a different style, thus, it uses a
+ different font than <i> a</i> and <i> b</i>.
+
+<p>
+
+<p><H2><A NAME=3.3>3.3 Creating Display Items in the TixTList Widget</H2>
+
+<p>
+<H3><A NAME=3.3.1>3.3.1 Creating Display Items</H3>
+
+<p> Now it's time to put our knowledge about host widgets, display items
+ and display styles into practice. The following example code creates
+ two items in a TixTList widget using the <code> insert</code> method:
+
+<p><!ignored:setlength>{0.0cm}
+<blockquote><pre>
+tixTList .t
+pack .t
+
+<p>.t insert end -itemtype text -text "First Item" -underline 0
+.t insert end -itemtype text -text "Second Item" -underline 0
+
+<p>set picture [image create bitmap -file picture.xbm]
+.t insert end -itemtype image -image $picture
+</pre></blockquote>
+<!ignored:setlength>{0.2cm}
+
+<p> <!ignored:nind> As we can see, the <code> insert</code> method of TixTList is very
+ similar to the <code> insert</code> method of the standard Tk listbox
+ widget: it inserts a new item into the TixTList widget. The first
+ argument it takes is the location of the new item. For example <code>
+ 0</code> indicates the first location in the list, <code> 1</code> indicates the
+ second location, and so on. Also the special keyword <code> end</code>
+ indicates the end of the list.
+
+<p> Then, we can use the <code> -itemtype</code> switch to specify the type of
+ display item we want to create. There are currently four types of
+ items to choose from: <code> text</code>, <code> image</code>, <code> imagetext</code> and
+ <code> window</code>. In the above example, we create two items of the type
+ <code> text</code> and one item of the type <code> image</code>. The subsequent
+ arguments to the <code> insert</code> method set the configuration options
+ of the individual attributes of the new item. The available
+ options for these items are listed in figures ???
+ through ???.
+
+<p><H3><A NAME=3.3.2>3.3.2 Setting the Styles of the Display Items</H3>
+
+<p> Note that in the above example, if we want to control the foreground
+ color of the text items, we cannot issue commands such as:
+
+<p><blockquote><pre>
+.t insert end -itemtype text -text "First Item" -foreground black
+</pre></blockquote>
+ because <code> -foreground</code> is not an individual attribute of the text
+ item. Instead, it is a collective attribute and must be accessed
+ using a display style object. To do that we can use the command <code>
+ tixItemStyle</code> to create display styles, as shown in the following
+ example:
+
+<p><blockquote><pre>
+set style1 [tixDisplayStyle text -font 8x13]
+set style2 [tixDisplayStyle text -font 8x13bold]
+
+<p>tixTList .t; pack .t
+
+<p>.t insert end -itemtype text -text "First Item" -underline 0 <br> -style $style1
+.t insert end -itemtype text -text "Second Item" -underline 0 <br> -style $style2
+.t insert end -itemtype text -text "Third Item" -underline 0 <br> -style $style1
+</pre></blockquote>
+
+<p>
+ <!ignored:nind> The first argument of <code> tixDisplayStyle</code> specify the type
+ of style we want to create. Each type of display item needs its own
+ type of display styles. Therefore, for example, we cannot create a
+ style of type <code> text</code> and assign it to an item of type <code>
+ image</code>. The subsequent arguments to <code> tixDisplayStyle</code> set the
+ configuration options of the collective attributes defined by this
+ style. A complete list of the configuration options of each type of
+ the display style is in figures ??? through
+ ???.
+
+<p> The <code> tixDisplayStyle</code> command returns the names of the newly
+ created styles to us and we use the variables <code> style1</code> and <code>
+ style2</code> to store these names. We can then assign the styles to the
+ display items by using the names of the styles. As shown in figure
+ <a href=tlist.tex.html#3-5>3-5 </a>, by assing these two styles to the <code>
+ -style</code> option of the display items, we assigned a medium-weight
+ font to the first and third item and a bold font to the second item.
+
+<p><blockquote><a name=3-5>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/tlist/twofont.gif>
+ <p><h4><center>Three <code> text</code> items in a TixTList</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/tlist/twofont2.gif>
+ <p><h4><center>The <code> text</code> items with fonts switched</center></h4></td>
+ </TR></TABLE></center>
+<hr><center><h3>(Figure 3-5) Two Display Styles With Different Fonts</center></h3>
+</blockquote>
+
+<p> The name of the style returned by <code> tixDisplayStyle</code> is also the
+ name of a command which we can use to control the style. For
+ example, we can use the following commands to switch the fonts in
+ the two styles we created in the above example:
+
+<p><blockquote><pre>
+$style1 configure -font 8x13bold
+$style2 configure -font 8x13
+</pre></blockquote>
+ After the execution of the above command, the font in the second
+ item in the TixTList widget becomes medium-weight and the font in
+ the first and third items becomes bold, as shown in figure
+ <a href=tlist.tex.html#3-5>3-5 </a>.
+
+<p><H3><A NAME=3.3.3>3.3.3 Configuring and Deleting the Items</H3>
+
+<p> You can configure the individual attributes of the items using the
+ <code> entryconfigure</code> method. There is also the entrycget method for
+ querying the attributes of the items. To <code> delete</code> the items, you
+ can use the delete method. In the following example, we use these
+ two methods to change the first and third items to display the text
+ strings <code> One</code> and <code> Two</code> and change the third item to use the
+ style <code> $style2</code>. Then we delete the second item using the <code>
+ delete</code> command.
+
+<blockquote><pre>
+.t entryconfigure 0 -text One
+.t entryconfigure 2 -text Two
+.t delete 1
+</pre></blockquote>
+
+<p><H3><A NAME=3.3.4>3.3.4 Choosing the Orientation and Number of Rows or Columns</H3>
+
+<p> There are three options that controls the layout of the items in the
+ TixTList widget. The <code> -orientation</code> option can be set to either
+ vertical or horizontal. When <code> -orientation</code> is set to <code>
+ vertical</code>, the items are laid out vertically from top down and
+ wrapped to the next column when the bottom is reached (see figure
+ <a href=tlist.tex.html#3-6>3-6 </a>). The opposite layout policy is chosen if
+ <code> -orientation</code> is set to <code> horizontal</code> (see figure
+ <a href=tlist.tex.html#3-6>3-6 </a>).
+
+<p> When the <code> -orientation</code> option is set to <code> vertical</code>,
+ normally the number of columns displayed depends on the number of
+ items in the TixTList widget: the more items there are, the more
+ columns will there be. However, we can use the <code> -columns</code> option
+ to control the number of columns: the items will be wrapped in a way
+ so that the number of columns produced will be exactly as dicated by
+ the <code> -columns</code> option.
+
+<p> One use of the <code> -columns</code> option is to specify the same layout
+ policy as that of the standard Tk listbox widget. We can do this by
+ setting <code> -orientation</code> to vertical and <code> -columns</code> to <code>
+ 1</code>. This way we can get a replacement listbox widget that can
+ display multiple fonts and colors and graphics!
+
+<p> The counterpart of the <code> -columns</code> option is the <code> -rows</code>
+ option, which is used for the same purpose when the <code>
+ -orientation</code> option is set to <code> horizontal</code>.
+
+<p><blockquote><a name=3-6>
+
+<center><TABLE BORDER=0><TR>
+<p> <td valign=bottom>
+ <img src=fig/tlist/vertical.gif>
+ <p><h4><center>Vertical Orientation</center></h4></td>
+<p> <td valign=bottom>
+ <img src=fig/tlist/horizontal.gif>
+ <p><h4><center>Horizontal Orientation</center></h4></td>
+ </TR></TABLE></center>
+<hr><center><h3>(Figure 3-6) The <code> -orientation</code> option of the TixSelect Widget</center></h3>
+</blockquote>
+
+<p><H3><A NAME=3.3.5>3.3.5 Event Handling</H3>
+
+<p> You can handle the events in a TList widget using the <code>
+ -browsecmd</code> and <code> -command</code> options. The meanings of these two
+ options are silimar to their meanings in other Tix widgets such as
+ the ComboBox. Usually, the command specified by <code> -browsecmd</code> is
+ called when the user clicks or drags the mouse over the items or
+ presses the arrow keys. The command specified by <code> -command</code> is
+ called when the user double-clicks or presses the Return key. These
+ commands are called with one extra argument --- the index of the
+ currently ``active'' item, which is usually the item under the mouse
+ cursor.
+
+<p><H3><A NAME=3.3.6>3.3.6 Selection</H3>
+
+<p> The <code> -selectmode</code> option controls how many items the user can
+ select at one time. In the <code> single</code> and <code> browse</code> mode, the
+ user can select only one item at a time. In the <code> multiple</code> and
+ <code> extended</code> mode, the user can select multiple items; the <code>
+ extended</code> mode allows disjoint selections while the <code> multiple</code>
+ mode does not.
+
+<p> Normally, the user selects the items using the mouse or the
+ keyboard. You can find out which items the user has selected with
+ the <code> info selection</code> method, which returns a list of the
+ currently selected items. You can also set the selection using the
+ <code> selection set</code> method. For example, the command <code> .tlist
+ selection set 3</code> selects the item whose index is <code> 3</code>. The
+ command <code> .tlist selection set 2 10</code> selects all the items at
+ index <code> 2</code> through <code> 10</code>. The method <code> selection clear</code>
+ empties the selection.
+
+<p>
+
+
Added: external/tix-8.4.2.x/generic/tix.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tix.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,458 @@
+/*
+ * 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) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tix.h,v 1.15 2006/11/16 22:34:41 hobbs Exp $
+ */
+
+#ifndef _TIX_H_
+#define _TIX_H_
+
+/*
+ * For C++ compilers, use extern "C"
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _TK
+#include <tk.h>
+#endif
+
+#ifndef _TCL
+#include <tcl.h>
+#endif
+
+#ifndef CONST84
+#define CONST84
+#endif
+
+/*
+ * The following defines are used to indicate the various release levels.
+ */
+
+#define TIX_ALPHA_RELEASE 0
+#define TIX_BETA_RELEASE 1
+#define TIX_FINAL_RELEASE 2
+
+/*
+ * When version numbers change here, must also go into the following files
+ * and update the version numbers:
+ *
+ * unix/README.txt (example directory name)
+ * configure.in (1 LOC major/minor/patch), rerun autoconf
+ * library/Init.tcl (1 LOC major/minor/patch)
+ * win/makefile.vc (1 LOC major/minor/patch)
+ * tests/basic.test (version checks)
+ * tests/README (example executable name)
+ */
+
+#define TIX_MAJOR_VERSION 8
+#define TIX_MINOR_VERSION 4
+#define TIX_RELEASE_LEVEL TIX_FINAL_RELEASE
+#define TIX_RELEASE_SERIAL 2
+
+#define TIX_VERSION "8.4"
+#define TIX_PATCH_LEVEL "8.4.2"
+#define TIX_RELEASE TIX_PATCH_LEVEL
+
+/*
+ * 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
+
+#define Tix_FreeProc Tcl_FreeProc
+
+#define TIX_STDIN_ALWAYS 0
+#define TIX_STDIN_OPTIONAL 1
+#define TIX_STDIN_NONE 2
+
+typedef struct {
+ CONST84 char *name; /* Name of command. */
+ int (*cmdProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp,
+ int argc, CONST84 char **argv));
+ /* Command procedure. */
+} Tix_TclCmd;
+
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * SUB-COMMAND HANDLING
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+typedef int (*Tix_CmdProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char ** argv));
+typedef int (*Tix_SubCmdProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char ** argv));
+typedef int (*Tix_CheckArgvProc) _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char ** argv));
+
+typedef struct _Tix_CmdInfo {
+ int numSubCmds;
+ int minargc;
+ int maxargc;
+ char * info;
+} Tix_CmdInfo;
+
+typedef struct _Tix_SubCmdInfo {
+ int namelen;
+ CONST84 char *name;
+ int minargc;
+ int maxargc;
+ Tix_SubCmdProc proc;
+ CONST84 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(ClientData clientData,\
+ Tcl_Interp *interp, int argc, CONST84 char ** argv)
+
+/*
+ * 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(ClientData clientData,\
+ Tcl_Interp *interp, int argc, CONST84 char ** argv)
+
+/*
+ * 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. */ \
+ CONST84 char **argv; /* 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
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*
+ * These values are similar to the TK_RELIEF_XXX values, except we added
+ * TIX_RELIEF_SOLID.
+ *
+ * TODO: is this option documented??
+ */
+
+#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, CONST84 char ** argv, int prefixCount,
+ CONST84 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,
+ CONST84 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, CONST84 char ** argv));
+EXTERN int Tix_ExistMethod _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST84 char *context, CONST84 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));
+EXTERN GC Tix_GetAnchorGC _ANSI_ARGS_((Tk_Window tkwin,
+ XColor *bgColor));
+EXTERN int Tix_GlobalVarEval _ANSI_ARGS_(
+ TCL_VARARGS(Tcl_Interp *,interp));
+EXTERN int Tix_HandleSubCmds _ANSI_ARGS_((
+ Tix_CmdInfo * cmdInfo,
+ Tix_SubCmdInfo * subCmdInfo,
+ ClientData clientData, Tcl_Interp *interp,
+ int argc, CONST84 char **argv));
+EXTERN int Tix_Init _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN void Tix_OpenStdin _ANSI_ARGS_((Tcl_Interp *interp));
+EXTERN void Tix_SetArgv _ANSI_ARGS_((Tcl_Interp *interp,
+ int argc, CONST84 char **argv));
+EXTERN void Tix_SetRcFileName _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST84 char * rcFileName));
+EXTERN char * Tix_ZAlloc _ANSI_ARGS_((unsigned int nbytes));
+
+/*
+ * 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_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_GetDefaultCmd);
+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_ShellInputCmd);
+extern TIX_DECLARE_CMD(Tix_TListCmd);
+extern TIX_DECLARE_CMD(Tix_TmpLineCmd);
+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
+ *----------------------------------------------------------------------
+ */
+
+#if defined(__WIN32__) && !defined(strcasecmp)
+#define strcasecmp _stricmp
+#endif
+
+/*
+ * end block for C++
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TIX_H_ */
+
Added: external/tix-8.4.2.x/generic/tixAppInit.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixAppInit.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,163 @@
+/*
+ * tixAppInit.c --
+ *
+ * Provides a default version of the Tcl_AppInit procedure for
+ * use in wish and similar Tk-based applications.
+ *
+ * Copyright (c) 1993 The Regents of the University of California.
+ * Copyright (c) 1994 Sun Microsystems, Inc.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixAppInit.c,v 1.1 2000/12/28 21:51:26 ioilam Exp $
+ */
+
+#ifdef USE_TCL_STUBS
+#undef USE_TCL_STUBS
+#endif
+
+#ifdef USE_TK_STUBS
+#undef USE_TK_STUBS
+#endif
+
+#include <tk.h>
+#include <tix.h>
+
+#ifdef __WIN32__
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+#endif
+
+#if !defined(__WIN32__) && !defined(MAC_TCL) /* UNIX */
+
+/*
+ * The following variable is a special hack that is needed in order for
+ * Sun shared libraries to be used for Tcl.
+ */
+
+extern int matherr();
+int *tclDummyMathPtr = (int *) matherr;
+
+#endif /* UNIX */
+
+#ifndef NO_MAIN
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * main --
+ *
+ * This is the main program for the application.
+ *
+ * Results:
+ * None: Tk_Main never returns here, so this procedure never
+ * returns either.
+ *
+ * Side effects:
+ * Whatever the application does.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+main(argc, argv)
+ int argc; /* Number of command-line arguments. */
+ char **argv; /* Values of command-line arguments. */
+{
+ Tk_Main(argc, argv, Tcl_AppInit);
+ return 0; /* Needed only to prevent compiler warning. */
+}
+
+#endif /* NO_MAIN */
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_AppInit --
+ *
+ * This procedure performs application-specific initialization.
+ * Most applications, especially those that incorporate additional
+ * packages, will have their own version of this procedure.
+ *
+ * Results:
+ * Returns a standard Tcl completion code, and leaves an error
+ * message in interp->result if an error occurs.
+ *
+ * Side effects:
+ * Depends on the startup script.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tcl_AppInit(interp)
+ Tcl_Interp *interp; /* Interpreter for application. */
+{
+ if (Tcl_Init(interp) == TCL_ERROR) {
+ goto error;
+ }
+ if (Tk_Init(interp) == TCL_ERROR) {
+ goto error;
+ }
+ Tcl_StaticPackage(interp, "Tk", Tk_Init, (Tcl_PackageInitProc *) NULL);
+
+ if (Tix_Init(interp) == TCL_ERROR) {
+ goto error;
+ }
+ Tcl_StaticPackage(interp, "Tix", Tix_Init, (Tcl_PackageInitProc *) NULL);
+
+#if defined(__WIN32__) && defined(GUI_MODE_APP)
+ /*
+ * Initialize the console only if we are running as an interactive
+ * application.
+ */
+
+ if (Tk_CreateConsoleWindow(interp) == TCL_ERROR) {
+ goto error;
+ }
+#endif /* __WIN32__ */
+
+ /*
+ * Call the init procedures for included packages. Each call should
+ * look like this:
+ *
+ * if (Mod_Init(interp) == TCL_ERROR) {
+ * goto error;
+ * }
+ *
+ * where "Mod" is the name of the module.
+ */
+
+ /*
+ * Call Tcl_CreateCommand for application-specific commands, if
+ * they weren't already created by the init procedures called above.
+ */
+
+ /*
+ * Specify a user-specific startup file to invoke if the application
+ * is run interactively. Typically the startup file is "~/.apprc"
+ * where "app" is the name of the application. If this line is deleted
+ * then no user-specific startup file will be run under any conditions.
+ */
+ Tix_SetRcFileName(interp, "~/.tixwishrc");
+
+ return TCL_OK;
+
+error:
+
+#if defined(__WIN32__) && defined(GUI_MODE_APP)
+
+ MessageBeep(MB_ICONEXCLAMATION);
+ MessageBox(NULL, Tcl_GetStringResult(interp), "Error in Wish",
+ MB_ICONSTOP | MB_OK | MB_TASKMODAL | MB_SETFOREGROUND);
+ ExitProcess(1);
+ /* we won't reach this, but we need the return */
+
+#endif /* __WIN32__ */
+
+ return TCL_ERROR;
+}
Added: external/tix-8.4.2.x/generic/tixClass.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixClass.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1973 @@
+/*
+ * tixClass.c --
+ *
+ * Implements the basic OOP class mechanism for the Tix Intrinsics.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and
+ * redistribution of this file, and for a DISCLAIMER OF ALL
+ * WARRANTIES.
+ *
+ * $Id: tixClass.c,v 1.5 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+/*
+ *
+ * Todo:
+ *
+ * (1) Problems: now a class shares some configspecs with the parent class.
+ * If an option is declared as -static in the child class but not
+ * in the parent class, the parent class will still see this
+ * option as static.
+ *
+ */
+
+
+#include <tk.h>
+#include <tixPort.h>
+#include <tixInt.h>
+
+/*
+ * Access control is not enabled yet.
+ */
+#define USE_ACCESS_CONTROL 0
+
+
+static void ClassTableDeleteProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp));
+static TixConfigSpec * CopySpec _ANSI_ARGS_((TixConfigSpec *spec));
+static TixClassRecord * CreateClassByName _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * classRec));
+static TixClassRecord * CreateClassRecord _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST84 char * classRec, Tk_Window mainWindow,
+ int isWidget));
+static void FreeClassRecord _ANSI_ARGS_((
+ TixClassRecord *cPtr));
+static void FreeParseOptions _ANSI_ARGS_((
+ TixClassParseStruct * parsePtr));
+static void FreeSpec _ANSI_ARGS_((TixConfigSpec *spec));
+static TixClassRecord * GetClassByName _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * classRec));
+static TixConfigSpec * InitAlias _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s));
+static int InitHashEntries _ANSI_ARGS_((
+ Tcl_Interp *interp,TixClassRecord * cPtr));
+static int InitClass _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * classRec, TixClassRecord * cPtr,
+ TixClassRecord * scPtr,
+ TixClassParseStruct * parsePtr));
+static TixConfigSpec * InitSpec _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * s, int isWidget));
+static int ParseClassOptions _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST84 char * opts,
+ TixClassParseStruct * rec));
+static int ParseInstanceOptions _ANSI_ARGS_((
+ Tcl_Interp * interp,TixClassRecord * cPtr,
+ CONST84 char *widRec, int argc, CONST84 char** argv));
+static int SetupAlias _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s));
+static int SetupAttribute _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s,
+ int which));
+static int SetupMethod _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s));
+static int SetupDefault _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s));
+#if USE_ACCESS_CONTROL
+static int SetupSubWidget _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s));
+#endif
+static int SetupSpec _ANSI_ARGS_((Tcl_Interp *interp,
+ TixClassRecord * cPtr, CONST84 char *s,
+ int isWidget));
+
+TIX_DECLARE_CMD(Tix_CreateWidgetCmd);
+TIX_DECLARE_CMD(Tix_CreateInstanceCmd);
+TIX_DECLARE_CMD(Tix_InstanceCmd);
+TIX_DECLARE_CMD(Tix_UninitializedClassCmd);
+
+/*
+ * Per-interpreter hashtables used to store the classes and class specs.
+ */
+
+#define GetClassTable(interp) \
+ (TixGetHashTable(interp, "tixClassTab", ClassTableDeleteProc, \
+ TCL_STRING_KEYS))
+#define GetSpecTable(interp) \
+ (TixGetHashTable(interp, "tixSpecTab", NULL, TCL_STRING_KEYS))
+
+static char * TIX_EMPTY_STRING = "";
+
+
+/*----------------------------------------------------------------------
+ * GetClassByName --
+ *
+ * Return a class struct if it has been created.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static TixClassRecord *
+GetClassByName(interp, classRec)
+ Tcl_Interp * interp;
+ CONST84 char * classRec;
+{
+ Tcl_HashEntry *hashPtr;
+
+ hashPtr = Tcl_FindHashEntry(GetClassTable(interp), classRec);
+ if (hashPtr) {
+ return (TixClassRecord *)Tcl_GetHashValue(hashPtr);
+ } else {
+ return NULL;
+ }
+}
+
+static TixClassRecord *
+CreateClassByName(interp, classRec)
+ Tcl_Interp * interp;
+ CONST84 char * classRec;
+{
+ TixClassRecord * cPtr;
+ TixInterpState state;
+
+ TixSaveInterpState(interp, &state);
+ cPtr = GetClassByName(interp, classRec);
+ if (cPtr == NULL) {
+ if (Tix_GlobalVarEval(interp, classRec, ":AutoLoad", (char*)NULL)
+ == TCL_ERROR){
+ cPtr = NULL;
+ } else {
+ cPtr = GetClassByName(interp, classRec);
+ }
+ }
+ TixRestoreInterpState(interp, &state);
+
+ return cPtr;
+}
+
+/*----------------------------------------------------------------------
+ * CreateClassRecord --
+ *
+ * Create a class record for the definiton of a new class, or return
+ * error if the class already exists.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static TixClassRecord *
+CreateClassRecord(interp, classRec, mainWindow, isWidget)
+ Tcl_Interp * interp;
+ CONST84 char * classRec;
+ Tk_Window mainWindow;
+ int isWidget;
+{
+ Tcl_HashEntry *hashPtr;
+ int isNew;
+ TixClassRecord * cPtr;
+
+ hashPtr = Tcl_CreateHashEntry(GetClassTable(interp), classRec, &isNew);
+
+ if (isNew) {
+ cPtr = (TixClassRecord *)Tix_ZAlloc(sizeof(TixClassRecord));
+#if USE_ACCESS_CONTROL
+ cPtr->next = NULL;
+#endif
+ cPtr->superClass = NULL;
+ cPtr->isWidget = isWidget;
+ cPtr->className = tixStrDup(classRec);
+ cPtr->ClassName = NULL;
+ cPtr->nSpecs = 0;
+ cPtr->specs = 0;
+ cPtr->nMethods = 0;
+ cPtr->methods = 0;
+ cPtr->mainWindow = mainWindow;
+ cPtr->parsePtr = NULL;
+ cPtr->initialized= 0;
+ Tix_SimpleListInit(&cPtr->unInitSubCls);
+ Tix_SimpleListInit(&cPtr->subWDefs);
+
+#if USE_ACCESS_CONTROL
+ Tix_SimpleListInit(&cPtr->subWidgets);
+#endif
+
+ Tcl_SetHashValue(hashPtr, (char*)cPtr);
+ return cPtr;
+ } else {
+
+ /*
+ * We don't allow redefinition of classes
+ */
+
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "Class \"", classRec, "\" redefined", NULL);
+ return NULL;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Tix_ClassCmd
+ *
+ * Create a class record for a Tix class.
+ *
+ * argv[0] = "tixClass" or "tixWidgetClass"
+ * argv[1] = class
+ * argv[2] = arglist
+ *----------------------------------------------------------------------
+ */
+
+TIX_DEFINE_CMD(Tix_ClassCmd)
+{
+ int isWidget, code = TCL_OK;
+ TixClassParseStruct * parsePtr;
+ TixClassRecord * cPtr, * scPtr;
+ CONST84 char * classRec = argv[1];
+ Tk_Window mainWindow = (Tk_Window)clientData;
+
+ if (strcmp(argv[0], "tixClass")==0) {
+ isWidget = 0;
+ } else {
+ isWidget = 1;
+ }
+
+ if (argc != 3) {
+ return Tix_ArgcError(interp, argc, argv, 1, "className {...}");
+ }
+
+ if (strstr(argv[1], "::") != NULL) {
+ /*
+ * Cannot contain :: in instance name, otherwise all hell will
+ * rise w.r.t. namespace
+ */
+
+ Tcl_AppendResult(interp, "invalid class name \"", argv[1],
+ "\": may not contain substring \"::\"", NULL);
+ return TCL_ERROR;
+ }
+
+
+ parsePtr = (TixClassParseStruct *)Tix_ZAlloc(sizeof(TixClassParseStruct));
+ if (ParseClassOptions(interp, argv[2], parsePtr) != TCL_OK) {
+ ckfree((char*)parsePtr);
+ parsePtr = NULL;
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ cPtr = GetClassByName(interp, classRec);
+ if (cPtr == NULL) {
+ cPtr = CreateClassRecord(interp, classRec, mainWindow, isWidget);
+ if (cPtr == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ if (cPtr->initialized) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "Class \"", classRec, "\" redefined", NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * (2) Set up the superclass
+ */
+
+ if (!parsePtr->superClass || strlen(parsePtr->superClass) == 0) {
+ scPtr = NULL;
+ }
+ else {
+ /*
+ * Create the superclass's record if it does not exist yet.
+ */
+ scPtr = GetClassByName(interp, parsePtr->superClass);
+ if (scPtr == NULL) {
+ scPtr = CreateClassByName(interp, parsePtr->superClass);
+ if (scPtr == NULL) {
+ /*
+ * The superclass cannot be autoloaded. We create a
+ * empty class record. This record may later be filled
+ * by a tixClass call (which may be initiated by a
+ * "source" call by the the application, or by SAM).
+ */
+ scPtr = CreateClassRecord(interp, parsePtr->superClass,
+ mainWindow, isWidget);
+ if (scPtr == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ }
+ }
+ cPtr->superClass = scPtr;
+
+ if (scPtr == NULL || scPtr->initialized == 1) {
+ /*
+ * It is safe to initialized the class now.
+ */
+
+ code = InitClass(interp, classRec, cPtr, scPtr, parsePtr);
+ FreeParseOptions(parsePtr);
+ parsePtr = NULL;
+ cPtr->parsePtr = NULL;
+ } else {
+ /*
+ * This class has an uninitialized superclass. We wait until the
+ * superclass is initialized before we initialize this class.
+ *
+ * Because there is no :: inside the cPtr->className, the command is
+ * created in the global namespace.
+ */
+
+ Tix_SimpleListAppend(&scPtr->unInitSubCls, (char*)cPtr, 0);
+ Tcl_CreateCommand(interp, cPtr->className,
+ Tix_UninitializedClassCmd, (ClientData)cPtr, NULL);
+ cPtr->parsePtr = parsePtr;
+ }
+
+done:
+ if (code == TCL_ERROR) {
+ if (parsePtr != NULL) {
+ FreeParseOptions(parsePtr);
+ }
+ }
+ return code;
+}
+
+static int
+ParseClassOptions(interp, opts, parsePtr)
+ Tcl_Interp * interp;
+ CONST84 char * opts;
+ TixClassParseStruct * parsePtr;
+{
+ int i;
+ int code = TCL_OK;
+
+ parsePtr->alias = TIX_EMPTY_STRING;
+ parsePtr->configSpec = TIX_EMPTY_STRING;
+ parsePtr->ClassName = TIX_EMPTY_STRING;
+ parsePtr->def = TIX_EMPTY_STRING;
+ parsePtr->flag = TIX_EMPTY_STRING;
+ parsePtr->forceCall = TIX_EMPTY_STRING;
+ parsePtr->isStatic = TIX_EMPTY_STRING;
+ parsePtr->method = TIX_EMPTY_STRING;
+ parsePtr->readOnly = TIX_EMPTY_STRING;
+ parsePtr->subWidget = TIX_EMPTY_STRING;
+ parsePtr->superClass = TIX_EMPTY_STRING;
+ parsePtr->isVirtual = TIX_EMPTY_STRING;
+ parsePtr->optArgv = NULL;
+
+ if (Tcl_SplitList(interp, opts, &parsePtr->optArgc, &parsePtr->optArgv)
+ != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if ((parsePtr->optArgc %2) == 1) {
+ Tcl_AppendResult(interp, "value for \"",
+ parsePtr->optArgv[parsePtr->optArgc-1],
+ "\" missing", (char*)NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ for (i=0; i<parsePtr->optArgc; i+=2) {
+ if (strcmp(parsePtr->optArgv[i], "-alias") == 0) {
+ parsePtr->alias = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-configspec") == 0) {
+ parsePtr->configSpec = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-classname") == 0) {
+ parsePtr->ClassName = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-default") == 0) {
+ parsePtr->def = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-flag") == 0) {
+ parsePtr->flag = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-forcecall") == 0) {
+ parsePtr->forceCall = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-method") == 0) {
+ parsePtr->method = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-readonly") == 0) {
+ parsePtr->readOnly = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-static") == 0) {
+ parsePtr->isStatic = parsePtr->optArgv[i+1];
+ }
+#if USE_ACCESS_CONTROL
+ else if (strcmp(parsePtr->optArgv[i], "-subwidget") == 0) {
+ parsePtr->subWidget = parsePtr->optArgv[i+1];
+ }
+#endif
+ else if (strcmp(parsePtr->optArgv[i], "-superclass") == 0) {
+ parsePtr->superClass = parsePtr->optArgv[i+1];
+ }
+ else if (strcmp(parsePtr->optArgv[i], "-virtual") == 0) {
+ parsePtr->isVirtual = parsePtr->optArgv[i+1];
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown parsePtr->option \"",
+ parsePtr->optArgv[i], "\"", (char*)NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ done:
+ if (code != TCL_OK) {
+ if (parsePtr->optArgv != NULL) {
+ ckfree((char*)parsePtr->optArgv);
+ parsePtr->optArgv = NULL;
+ }
+ }
+ return code;
+}
+
+static void
+FreeParseOptions(parsePtr)
+ TixClassParseStruct * parsePtr;
+{
+ if (parsePtr->optArgv) {
+ ckfree((char*)parsePtr->optArgv);
+ }
+ ckfree((char*)parsePtr);
+}
+
+/*----------------------------------------------------------------------
+ * InitClass --
+ *
+ * Initialize the class record using the arguments supplied by the
+ * tixClass and tixWidgetClass commands.
+ *
+ * Results:
+ * Standard Tcl result.
+ *
+ * Side effects:
+ * The given class is initialized.
+ *----------------------------------------------------------------------
+ */
+
+static int
+InitClass(interp, classRec, cPtr, scPtr, parsePtr)
+ Tcl_Interp * interp;
+ CONST84 char * classRec;
+ TixClassRecord * cPtr;
+ TixClassRecord * scPtr;
+ TixClassParseStruct * parsePtr;
+{
+ int code = TCL_OK;
+ int i, flag;
+ int isWidget = cPtr->isWidget;
+ Tix_ListIterator li;
+ TixClassRecord * subPtr;
+
+ cPtr->ClassName = tixStrDup(parsePtr->ClassName);
+
+ /*
+ * (3) Set up the methods.
+ */
+ if (SetupMethod(interp, cPtr, parsePtr->method) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /* (4) Set up the major configspecs */
+ if (SetupSpec(interp, cPtr, parsePtr->configSpec, isWidget) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * (5) Set up the aliases
+ */
+
+ /* (5.1)Create the alias configSpec's */
+ if (parsePtr->alias && *parsePtr->alias) {
+ if (SetupAlias(interp, cPtr, parsePtr->alias) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ /*
+ * We are done with the class record. Now let's put the flags into
+ * a hash table so then they can be retrived quickly whenever we call
+ * the "$widget config" method
+ */
+
+ if (InitHashEntries(interp, cPtr)!=TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * (5.2) Initialize the alias configSpec's
+ */
+ for (i=0; i<cPtr->nSpecs; i++) {
+ if (cPtr->specs[i]->isAlias) {
+ cPtr->specs[i]->realPtr =
+ Tix_FindConfigSpecByName(interp, cPtr, cPtr->specs[i]->dbName);
+ }
+ }
+
+ /*
+ * (6) Set up the attributes of the specs
+ */
+ if (parsePtr->isStatic && *parsePtr->isStatic) {
+ if (SetupAttribute(interp, cPtr, parsePtr->isStatic, FLAG_STATIC)
+ != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ if (parsePtr->readOnly && *parsePtr->readOnly) {
+ if (SetupAttribute(interp,cPtr,parsePtr->readOnly, FLAG_READONLY)
+ !=TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ if (parsePtr->forceCall && *parsePtr->forceCall) {
+ if (SetupAttribute(interp,cPtr,parsePtr->forceCall,FLAG_FORCECALL)
+ !=TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ /* (7) Record the default options */
+ if (SetupDefault(interp, cPtr, parsePtr->def) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+#if USE_ACCESS_CONTROL
+ /* (8) Set up the SubWidget specs */
+ if (isWidget) {
+ if (SetupSubWidget(interp, cPtr, parsePtr->subWidget) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+#endif
+
+ /*
+ * Set up the TCL array variable to store some information about the
+ * class. This is compatible with the old Tix and it also speeds up
+ * some operations because the look-up of these variables are done
+ * by hash tables.
+ */
+
+ flag = TCL_GLOBAL_ONLY;
+ if (parsePtr->superClass) {
+ Tcl_SetVar2(interp, classRec, "superClass", parsePtr->superClass,flag);
+ } else {
+ Tcl_SetVar2(interp, classRec, "superClass", "", flag);
+ }
+
+ Tcl_SetVar2(interp, classRec, "className", classRec, flag);
+ Tcl_SetVar2(interp, classRec, "ClassName", parsePtr->ClassName, flag);
+ Tcl_SetVar2(interp, classRec, "options", parsePtr->flag, flag);
+ Tcl_SetVar2(interp, classRec, "forceCall", parsePtr->forceCall, flag);
+ Tcl_SetVar2(interp, classRec, "defaults", parsePtr->def , flag);
+ Tcl_SetVar2(interp, classRec, "methods", parsePtr->method, flag);
+ Tcl_SetVar2(interp, classRec, "staticOptions", parsePtr->isStatic, flag);
+
+ if (parsePtr->isVirtual) {
+ Tcl_SetVar2(interp, classRec, "virtual", "1", flag);
+ } else {
+ Tcl_SetVar2(interp, classRec, "virtual", "0", flag);
+ }
+
+ if (isWidget) {
+ Tcl_SetVar2(interp, classRec, "isWidget", "1", flag);
+ } else {
+ Tcl_SetVar2(interp, classRec, "isWidget", "0", flag);
+ }
+
+ /*
+ * Now create the instantiation command. Because there is no ::
+ * inside the cPtr->className, the command is created in the
+ * global namespace.
+ */
+
+ if (isWidget) {
+ Tcl_CreateCommand(interp, cPtr->className, Tix_CreateWidgetCmd,
+ (ClientData)cPtr, NULL);
+ } else {
+ Tcl_CreateCommand(interp, cPtr->className, Tix_CreateInstanceCmd,
+ (ClientData)cPtr, NULL);
+ }
+
+ /*
+ * Create an "AutoLoad" command. This is needed so that class
+ * definitions can be auto-loaded properly
+ */
+
+ if (Tix_GlobalVarEval(interp, "proc ", cPtr->className, ":AutoLoad {} {}",
+ (char *) NULL) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ cPtr->initialized = 1;
+
+ /*
+ * Complete the initialization of all the partially initialized
+ * sub-classes.
+ */
+
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&cPtr->unInitSubCls, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext(&cPtr->unInitSubCls, &li)) {
+
+ subPtr = (TixClassRecord*)li.curr;
+ code = InitClass(interp, subPtr->className, subPtr, cPtr,
+ subPtr->parsePtr);
+
+ if (code == TCL_OK) {
+ if (subPtr->parsePtr) {
+ FreeParseOptions(subPtr->parsePtr);
+ }
+ subPtr->parsePtr = NULL;
+ Tix_SimpleListDelete(&cPtr->unInitSubCls, &li);
+ } else {
+ /*
+ * (ToDo) Tix is not in a stable state. Some variables
+ * have not been freed.
+ */
+ goto done;
+ }
+ }
+
+ done:
+ return code;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * FreeClassRecord --
+ *
+ * Frees the data associated with a class.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The Tix_InstanceCmd cannot be called afterwards.
+ *----------------------------------------------------------------------
+ */
+
+static void
+FreeClassRecord(cPtr)
+ TixClassRecord *cPtr;
+{
+ int i;
+ Tix_ListIterator li;
+
+ if (cPtr->className) {
+ ckfree(cPtr->className);
+ }
+ if (cPtr->ClassName) {
+ ckfree(cPtr->ClassName);
+ }
+ for (i=0; i<cPtr->nSpecs; i++) {
+ if (cPtr->specs[i] != NULL) {
+ FreeSpec(cPtr->specs[i]);
+ }
+ }
+ if (cPtr->specs) {
+ ckfree((char*)cPtr->specs);
+ }
+ for (i=0; i<cPtr->nMethods; i++) {
+ ckfree(cPtr->methods[i]);
+ }
+ if (cPtr->methods) {
+ ckfree((char*)cPtr->methods);
+ }
+
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&cPtr->unInitSubCls, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext(&cPtr->unInitSubCls, &li)) {
+ Tix_SimpleListDelete(&cPtr->unInitSubCls, &li);
+ }
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&cPtr->subWDefs, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext(&cPtr->subWDefs, &li)) {
+
+ Tix_SubwidgetDef * defPtr = (Tix_SubwidgetDef*)li.curr;
+ Tix_SimpleListDelete(&cPtr->subWDefs, &li);
+
+ ckfree((char*)defPtr->spec);
+ ckfree((char*)defPtr->value);
+ ckfree((char*)defPtr);
+ }
+
+ if (cPtr->parsePtr) {
+ FreeParseOptions(cPtr->parsePtr);
+ }
+
+ ckfree((char*)cPtr);
+}
+
+TIX_DEFINE_CMD(Tix_UninitializedClassCmd)
+{
+ TixClassRecord * cPtr, *scPtr;
+
+ cPtr = (TixClassRecord *)clientData;
+ for (scPtr = cPtr->superClass; scPtr != NULL && scPtr->superClass != NULL;
+ scPtr = scPtr->superClass) {
+ ;
+ }
+ if (scPtr != NULL) {
+ Tcl_AppendResult(interp, "Superclass \"", scPtr->className,
+ "\" not defined", NULL);
+ } else {
+ Tcl_AppendResult(interp, "Unknown Tix internal error", NULL);
+ }
+
+ return TCL_ERROR;
+}
+
+
+/*----------------------------------------------------------------------
+ * Tix_CreateInstanceCmd --
+ *
+ * Create an instance object of a normal Tix class.
+ *
+ * argv[0] = object name.
+ * argv[1+] = args
+ *----------------------------------------------------------------------
+ */
+
+TIX_DEFINE_CMD(Tix_CreateInstanceCmd)
+{
+ TixClassRecord * cPtr;
+ CONST84 char * widRec;
+ CONST84 char * value;
+ int i, code = TCL_OK;
+ TixConfigSpec * spec;
+
+ if (argc <= 1) {
+ return Tix_ArgcError(interp, argc, argv, 1, "name ?arg? ...");
+ }
+
+ if (strstr(argv[1], "::") != NULL) {
+ /*
+ * Cannot contain :: in instance name, otherwise all hell will
+ * rise w.r.t. namespace
+ */
+
+ Tcl_AppendResult(interp, "invalid instance name \"", argv[1],
+ "\": may not contain substring \"::\"", NULL);
+ return TCL_ERROR;
+ }
+
+ cPtr = (TixClassRecord *)clientData;
+ widRec = argv[1];
+
+ Tcl_SetVar2(interp, widRec, "className", cPtr->className, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, widRec, "ClassName", cPtr->ClassName, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, widRec, "context", cPtr->className, TCL_GLOBAL_ONLY);
+
+ /*
+ * This is the command that access the class instace. Because there
+ * is no :: inside widRec, it's created in the global namespace
+ */
+
+ Tcl_CreateCommand(interp, widRec, Tix_InstanceCmd,
+ (ClientData)cPtr, NULL);
+
+ /*
+ * Set up the widget record according to defaults and arguments
+ */
+
+ ParseInstanceOptions(interp, cPtr, widRec, argc-2, argv+2);
+
+ /*
+ * Call the constructor method
+ */
+ if (Tix_CallMethod(interp, cPtr->className, widRec, "Constructor",
+ 0, 0, NULL) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * %% warning. configuration methods for -forcecall options must
+ * *not* assume that the value in the widget record has been
+ * validated!
+ *
+ * todo: please explain the above in the programming guide.
+ */
+
+ for (i=0; i<cPtr->nSpecs; i++) {
+ spec = cPtr->specs[i];
+ if (spec->forceCall) {
+ value = Tcl_GetVar2(interp, widRec, spec->argvName,
+ TCL_GLOBAL_ONLY);
+ if (Tix_CallConfigMethod(interp, cPtr, widRec, spec, value)
+ !=TCL_OK){
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ }
+
+ Tcl_SetResult(interp, (char *) widRec, TCL_VOLATILE);
+
+ done:
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_InstanceCmd
+ *
+ * Redirect the method calls to the class methods
+ *
+ * argv[0] = widget name
+ * argv[1] = method name
+ * argv[2+] = arglist
+ */
+TIX_DEFINE_CMD(Tix_InstanceCmd)
+{
+ TixClassRecord * cPtr;
+ CONST84 char * widRec = argv[0];
+ CONST84 char * method = argv[1];
+ CONST84 char * classRec;
+ CONST84 char * methodName; /* full name of the method -- method may be
+ * abbreviated */
+ unsigned int len;
+ int code;
+ int foundMethod;
+
+ cPtr = (TixClassRecord *)clientData;
+ classRec = cPtr->className;
+
+ if (argc <= 1) {
+ return Tix_ArgcError(interp, argc, argv, 1, "option ...");
+ }
+
+ Tk_Preserve((ClientData) cPtr);
+
+ len = strlen(method);
+
+ if ((methodName = Tix_FindPublicMethod(interp, cPtr, method)) == NULL) {
+ code = Tix_UnknownPublicMethodError(interp, cPtr, widRec, method);
+ goto done;
+ }
+
+ if ((code = Tix_CallMethod(interp, classRec, widRec, methodName,
+ argc-2, argv+2, &foundMethod)) == TCL_OK) {
+ goto done;
+ }
+
+ if (foundMethod) {
+ /*
+ * The method is found, but its execution caused error. Return now.
+ * Don't try to run it again with the code below.
+ */
+ goto done;
+ }
+
+ /*
+ * The method was not defined in Tcl code. See if it's one of
+ * the built-in methods: configure, cget or subwidget.
+ *
+ * Note that the "subwidgets" method is implemented in Tcl code
+ * (Primitiv.tcl) so we don't need to worry about it here.
+ */
+
+ if (strncmp(method, "configure", len) == 0) {
+ Tcl_ResetResult(interp);
+
+ if (argc==2) {
+ code = Tix_QueryAllOptions(interp, cPtr, widRec);
+ goto done;
+ }
+ else if (argc == 3) {
+ code = Tix_QueryOneOption(interp, cPtr, widRec, argv[2]);
+ goto done;
+ } else {
+ code = Tix_ChangeOptions(interp, cPtr, widRec, argc-2, argv+2);
+ goto done;
+ }
+ }
+ else if (strncmp(method, "cget", len) == 0) {
+ Tcl_ResetResult(interp);
+
+ if (argc == 3) {
+ code = Tix_GetVar(interp, cPtr, widRec, argv[2]);
+ goto done;
+ } else {
+ code = Tix_ArgcError(interp, argc, argv, 2, "-flag");
+ goto done;
+ }
+ }
+#if 0
+ else if (cPtr->isWidget && strcmp(method, "subwidgets") == 0) {
+ Tcl_ResetResult(interp);
+
+ code = Tix_CallMethod(interp, classRec, widRec, "subwidgets",
+ argc-2, argv+2, NULL);
+ goto done;
+ }
+#endif
+ else if (cPtr->isWidget && strncmp(method, "subwidget", len) == 0) {
+ /*
+ * TODO: Subwidget protection is not yet implemented
+ */
+
+ Tcl_ResetResult(interp);
+ if (argc >= 3) {
+#define STATIC_SPACE_SIZE 60
+ char buff[STATIC_SPACE_SIZE];
+ char *index = buff;
+ CONST84 char *swName;
+
+ if ((strlen(argv[2]) + 3) > STATIC_SPACE_SIZE) {
+ index = (char*)ckalloc(strlen(argv[2]) + 3);
+ }
+
+ sprintf(index, "w:%s", argv[2]);
+ swName = Tcl_GetVar2(interp, widRec, index, TCL_GLOBAL_ONLY);
+ if (index != buff) {
+ ckfree((char*)index);
+ }
+
+ if (swName) {
+ if (argc == 3) {
+ Tcl_SetResult(interp, (char *) swName, TCL_VOLATILE);
+ code = TCL_OK;
+ goto done;
+ } else {
+ argv[2] = swName;
+ code = Tix_EvalArgv(interp, argc-2, argv+2);
+ goto done;
+ }
+ }
+ Tcl_AppendResult(interp, "unknown subwidget \"", argv[2],
+ "\"", NULL);
+ code = TCL_ERROR;
+ goto done;
+#undef STATIC_SPACE_SIZE
+ } else {
+ code = Tix_ArgcError(interp, argc, argv, 2, "name ?args ...?");
+ goto done;
+ }
+ } else {
+ /*
+ * error message already append by Tix_CallMethod()
+ */
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ done:
+ Tk_Release((ClientData) cPtr);
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * Subroutines for Class definition
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static int SetupMethod(interp, cPtr, s)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+{
+ TixClassRecord * scPtr = cPtr->superClass;
+ CONST84 char ** listArgv;
+ int listArgc, i;
+ int nMethods;
+
+
+ if (s && *s) {
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ listArgc = 0;
+ listArgv = 0;
+ }
+
+ nMethods = listArgc;
+
+ if (scPtr) {
+ nMethods += scPtr->nMethods;
+ }
+ cPtr->nMethods = nMethods;
+ cPtr->methods = (char**)Tix_ZAlloc(nMethods*sizeof(char*));
+ /* Copy the methods of this class */
+ for (i=0; i<listArgc; i++) {
+ cPtr->methods[i] = tixStrDup(listArgv[i]);
+ }
+ /* Copy the methods of the super class */
+ for (; i<nMethods; i++) {
+ cPtr->methods[i] = tixStrDup(scPtr->methods[i-listArgc]);
+ }
+
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+
+ return TCL_OK;
+}
+
+static int
+SetupDefault(interp, cPtr, s)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+{
+ CONST84 char ** listArgv;
+ int listArgc, i;
+ TixClassRecord * scPtr = cPtr->superClass;
+ Tix_ListIterator li;
+ Tix_SubwidgetDef *defPtr;
+
+ if (s && *s) {
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ return TCL_OK;
+ }
+
+ if (scPtr) {
+ /*
+ * Copy the subwidget default specs from the super-class
+ */
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&scPtr->subWDefs, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&scPtr->subWDefs, &li)) {
+
+ Tix_SubwidgetDef * p = (Tix_SubwidgetDef*)li.curr;
+
+ defPtr = (Tix_SubwidgetDef*)Tix_ZAlloc(sizeof(Tix_SubwidgetDef));
+ defPtr->spec = tixStrDup(p->spec);
+ defPtr->value = tixStrDup(p->value);
+
+ Tix_SimpleListAppend(&cPtr->subWDefs, (char*)defPtr, 0);
+ }
+ }
+
+ /*
+ * Merge with the new default specs
+ */
+ for (i=0; i<listArgc; i++) {
+ CONST84 char **list;
+ int n;
+
+ if (Tcl_SplitList(interp, listArgv[i], &n, &list) != TCL_OK) {
+ goto error;
+ }
+ if (n != 2) {
+ Tcl_AppendResult(interp, "bad subwidget default format \"",
+ listArgv[i], "\"", NULL);
+ ckfree((char*)list);
+ goto error;
+ }
+
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&cPtr->subWDefs, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&cPtr->subWDefs, &li)) {
+
+ Tix_SubwidgetDef * p = (Tix_SubwidgetDef*)li.curr;
+
+ if (strcmp(list[0], p->spec) == 0) {
+ Tix_SimpleListDelete(&cPtr->subWDefs, &li);
+ ckfree((char*)p->value);
+ ckfree((char*)p->spec);
+ ckfree((char*)p);
+ break;
+ }
+ }
+ /* Append this spec to the end
+ */
+ defPtr = (Tix_SubwidgetDef*)Tix_ZAlloc(sizeof(Tix_SubwidgetDef));
+ defPtr->spec = tixStrDup(list[0]);
+ defPtr->value = tixStrDup(list[1]);
+
+ Tix_SimpleListAppend(&cPtr->subWDefs, (char*)defPtr, 0);
+
+ ckfree((char*)list);
+ }
+
+ /*
+ * Add the defaults into the options database.
+ */
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&cPtr->subWDefs, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&cPtr->subWDefs, &li)) {
+
+ Tix_SubwidgetDef * p = (Tix_SubwidgetDef*)li.curr;
+
+ if (Tix_GlobalVarEval(interp, "option add *", cPtr->ClassName,
+ p->spec, " [list ", p->value, "] widgetDefault",
+ NULL) != TCL_OK) {
+ goto error;
+ }
+ }
+
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return TCL_OK;
+
+ error:
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return TCL_ERROR;
+}
+
+static int
+SetupSpec(interp, cPtr, s, isWidget)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+ int isWidget;
+{
+ TixClassRecord * scPtr = cPtr->superClass;
+ CONST84 char ** listArgv;
+ int listArgc, i;
+ TixConfigSpec * dupSpec;
+ int nSpecs;
+ int j;
+ int nAlloc;
+ int code = TCL_OK;
+
+ if (s && *s) {
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ listArgc = 0;
+ listArgv = 0;
+ }
+
+ nSpecs = listArgc;
+
+ if (scPtr != NULL) {
+ nAlloc = nSpecs+scPtr->nSpecs;
+ } else {
+ nAlloc = nSpecs;
+ }
+
+ cPtr->nSpecs = nSpecs;
+ cPtr->specs = (TixConfigSpec**)Tix_ZAlloc(nAlloc*sizeof(TixConfigSpec*));
+
+ /*
+ * Initialize the specs of this class
+ */
+ for (i=0; i<listArgc; i++) {
+ if ((cPtr->specs[i] = InitSpec(interp, listArgv[i], isWidget))==NULL){
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ /*
+ * Copy the specs of the super class
+ */
+ if (scPtr != NULL) {
+ for (i=0; i<scPtr->nSpecs; i++) {
+ /* See if we have re-defined this configspec */
+ for (dupSpec = 0, j=0; j<listArgc; j++) {
+ char * pName = scPtr->specs[i]->argvName;
+ if (strcmp(cPtr->specs[j]->argvName, pName)==0) {
+ dupSpec = cPtr->specs[j];
+ break;
+ }
+ }
+
+ if (dupSpec) {
+ /*
+ * If we have not redefined the dbclass or dbname of
+ * this duplicated configSpec, then simply
+ * copy the parent's attributes to the new configSpec
+ *
+ * Otherwise we don't copy the parent's attributes (do nothing)
+ */
+ if ((strcmp(dupSpec->dbClass, scPtr->specs[i]->dbClass) == 0)
+ &&(strcmp(dupSpec->dbName, scPtr->specs[i]->dbName) == 0)){
+ dupSpec->readOnly = scPtr->specs[i]->readOnly;
+ dupSpec->isStatic = scPtr->specs[i]->isStatic;
+ dupSpec->forceCall = scPtr->specs[i]->forceCall;
+ }
+ } else {
+ /*
+ *Let's copy the parent's configSpec
+ */
+ cPtr->specs[cPtr->nSpecs] = CopySpec(scPtr->specs[i]);
+ cPtr->nSpecs ++;
+ }
+ }
+ }
+
+ if (cPtr->nSpecs != nAlloc) {
+ cPtr->specs = (TixConfigSpec**)
+ ckrealloc((char*)cPtr->specs, cPtr->nSpecs*sizeof(TixConfigSpec*));
+ }
+
+ done:
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return code;
+}
+
+static TixConfigSpec *
+InitSpec(interp, specList, isWidget)
+ Tcl_Interp * interp;
+ CONST84 char * specList;
+ int isWidget;
+{
+ CONST84 char ** listArgv = NULL;
+ int listArgc;
+ TixConfigSpec * sPtr = NULL;
+
+ if (Tcl_SplitList(interp, specList, &listArgc, &listArgv)!= TCL_OK) {
+ goto done;
+ }
+ if (( isWidget && (listArgc < 4 || listArgc > 5)) ||
+ (!isWidget && (listArgc < 2 || listArgc > 3))) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "Wrong number of elements in ",
+ "config spec list \"", specList, "\"", NULL);
+ goto done;
+ }
+
+ sPtr = (TixConfigSpec * )Tix_ZAlloc(sizeof(TixConfigSpec));
+
+ sPtr->isAlias = 0;
+ sPtr->readOnly = 0;
+ sPtr->isStatic = 0;
+ sPtr->forceCall = 0;
+ sPtr->realPtr = NULL;
+
+ if (isWidget) {
+ sPtr->argvName = tixStrDup(listArgv[0]);
+ sPtr->dbName = tixStrDup(listArgv[1]);
+ sPtr->dbClass = tixStrDup(listArgv[2]);
+ sPtr->defValue = tixStrDup(listArgv[3]);
+ }
+ else {
+ sPtr->argvName = tixStrDup(listArgv[0]);
+ sPtr->dbClass = TIX_EMPTY_STRING;
+ sPtr->dbName = TIX_EMPTY_STRING;
+ sPtr->defValue = tixStrDup(listArgv[1]);
+ }
+
+ /* Set up the verifyCmd */
+ if ((isWidget && listArgc == 5) || (!isWidget && listArgc == 3)) {
+ int n;
+
+ if (isWidget) {
+ n = 4;
+ } else {
+ n = 2;
+ }
+
+ sPtr->verifyCmd = tixStrDup(listArgv[n]);
+ } else {
+ sPtr->verifyCmd = NULL;
+ }
+
+ done:
+ if (listArgv) {
+ ckfree((char *) listArgv);
+ }
+ return sPtr;
+}
+
+static TixConfigSpec *
+CopySpec(sPtr)
+ TixConfigSpec *sPtr; /* The spec record from the super class. */
+{
+ TixConfigSpec *nPtr = (TixConfigSpec *)Tix_ZAlloc(sizeof(TixConfigSpec));
+
+ nPtr->isAlias = sPtr->isAlias;
+ nPtr->readOnly = sPtr->readOnly;
+ nPtr->isStatic = sPtr->isStatic;
+ nPtr->forceCall = sPtr->forceCall;
+
+ if (sPtr->argvName != NULL && sPtr->argvName != TIX_EMPTY_STRING) {
+ nPtr->argvName = tixStrDup(sPtr->argvName);
+ } else {
+ nPtr->argvName = TIX_EMPTY_STRING;
+ }
+ if (sPtr->defValue != NULL && sPtr->defValue != TIX_EMPTY_STRING) {
+ nPtr->defValue = tixStrDup(sPtr->defValue);
+ } else {
+ nPtr->defValue = TIX_EMPTY_STRING;
+ }
+ if (sPtr->dbName != NULL && sPtr->dbName != TIX_EMPTY_STRING) {
+ nPtr->dbName = tixStrDup(sPtr->dbName);
+ } else {
+ nPtr->dbName = TIX_EMPTY_STRING;
+ }
+ if (sPtr->dbClass != NULL && sPtr->dbClass != TIX_EMPTY_STRING) {
+ nPtr->dbClass = tixStrDup(sPtr->dbClass);
+ } else {
+ nPtr->dbClass = TIX_EMPTY_STRING;
+ }
+ if (sPtr->verifyCmd != NULL) {
+ nPtr->verifyCmd = tixStrDup(sPtr->verifyCmd);
+ } else {
+ nPtr->verifyCmd = NULL;
+ }
+
+ nPtr->realPtr = NULL;
+
+ return nPtr;
+}
+
+static void
+FreeSpec(sPtr)
+ TixConfigSpec *sPtr; /* The spec record to free. */
+{
+ if (sPtr->argvName != NULL && sPtr->argvName != TIX_EMPTY_STRING) {
+ ckfree(sPtr->argvName);
+ }
+ if (sPtr->defValue != NULL && sPtr->defValue != TIX_EMPTY_STRING) {
+ ckfree(sPtr->defValue);
+ }
+ if (sPtr->dbName != NULL && sPtr->dbName != TIX_EMPTY_STRING) {
+ ckfree(sPtr->dbName);
+ }
+ if (sPtr->dbClass != NULL && sPtr->dbClass != TIX_EMPTY_STRING) {
+ ckfree(sPtr->dbClass);
+ }
+ if (sPtr->verifyCmd != NULL) {
+ ckfree(sPtr->verifyCmd);
+ }
+ ckfree((char*)sPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * SetupAttribute --
+ *
+ * Marks the spec's with the given attribute (-readonly, -forcecall,
+ * and -static).
+ *
+ * Results:
+ * Standard Tcl result.
+ *
+ * Side effects:
+ * The attributes of the specs are updated.
+ *----------------------------------------------------------------------
+ */
+
+static int
+SetupAttribute(interp, cPtr, s, which)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+ int which;
+{
+ CONST84 char ** listArgv;
+ int listArgc, i;
+ TixConfigSpec * spec;
+
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ } else {
+ for (i=0; i<listArgc; i++) {
+ spec = Tix_FindConfigSpecByName(interp, cPtr, listArgv[i]);
+ if (spec == NULL) {
+ ckfree((char*)listArgv);
+ return TCL_ERROR;
+ }
+ switch(which) {
+ case FLAG_READONLY:
+ spec->readOnly = 1;
+ break;
+ case FLAG_STATIC:
+ spec->isStatic = 1;
+ break;
+ case FLAG_FORCECALL:
+ spec->forceCall = 1;
+ break;
+ }
+ }
+ }
+
+ ckfree((char*)listArgv);
+ return TCL_OK;
+}
+
+static int
+SetupAlias(interp, cPtr, s)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+{
+ CONST84 char ** listArgv;
+ int listArgc, i;
+
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ } else {
+ int nAliases = listArgc;
+ int nAlloc = cPtr->nSpecs + nAliases;
+
+ cPtr->specs = (TixConfigSpec**)
+ ckrealloc((char*)cPtr->specs, nAlloc*sizeof(TixConfigSpec*));
+
+ /* Initialize the aliases of this class */
+ for (i=cPtr->nSpecs; i<nAlloc; i++) {
+ cPtr->specs[i] = InitAlias(interp, cPtr, listArgv[i-cPtr->nSpecs]);
+ if (cPtr->specs[i] == NULL) {
+ ckfree((char*)listArgv);
+ return TCL_ERROR;
+ }
+ }
+
+ cPtr->nSpecs = nAlloc;
+ }
+ ckfree((char*)listArgv);
+ return TCL_OK;
+}
+
+static TixConfigSpec *
+InitAlias(interp, cPtr, s)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+{
+ CONST84 char ** listArgv;
+ int listArgc;
+ TixConfigSpec * sPtr;
+
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK
+ || 2 != listArgc) {
+ return NULL;
+ } else {
+ sPtr = (TixConfigSpec*) Tix_ZAlloc(sizeof(TixConfigSpec));
+ sPtr->isAlias = 1;
+ sPtr->isStatic = 0;
+ sPtr->forceCall = 0;
+ sPtr->readOnly = 0;
+ sPtr->argvName = tixStrDup(listArgv[0]);
+ sPtr->dbName = tixStrDup(listArgv[1]);
+ sPtr->dbClass = TIX_EMPTY_STRING;
+ sPtr->defValue = TIX_EMPTY_STRING;
+ sPtr->verifyCmd = NULL;
+ sPtr->realPtr = NULL;
+
+ ckfree((char*)listArgv);
+ return sPtr;
+ }
+}
+
+static int
+InitHashEntries(interp, cPtr)
+ Tcl_Interp * interp;
+ TixClassRecord *cPtr;
+{
+ Tcl_HashEntry * hashPtr;
+ int isNew;
+ CONST84 char * key;
+ int i;
+ TixConfigSpec * sPtr;
+
+ for (i=0; i<cPtr->nSpecs; i++) {
+ sPtr = cPtr->specs[i];
+ key = Tix_GetConfigSpecFullName(cPtr->className, sPtr->argvName);
+
+ hashPtr = Tcl_CreateHashEntry(GetSpecTable(interp), key, &isNew);
+ Tcl_SetHashValue(hashPtr, (char*)sPtr);
+
+ ckfree((char *) key);
+ }
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * Subroutines for object instantiation.
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ParseInstanceOptions(interp, cPtr, widRec, argc, argv)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char *widRec;
+ int argc;
+ CONST84 char** argv;
+{
+ int i;
+ TixConfigSpec *spec;
+
+ if ((argc %2) != 0) {
+ Tcl_AppendResult(interp, "missing argument for \"", argv[argc-1],
+ "\"", NULL);
+ return TCL_ERROR;
+ }
+
+ /* Set all specs by their default values */
+ for (i=0; i<cPtr->nSpecs; i++) {
+ spec = cPtr->specs[i];
+ if (!spec->isAlias) {
+ if (Tix_ChangeOneOption(interp, cPtr, widRec, spec,
+ spec->defValue, 1, 0)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+ }
+
+ /* Set specs according to argument line values */
+ for (i=0; i<argc; i+=2) {
+ spec = Tix_FindConfigSpecByName(interp, cPtr, argv[i]);
+
+ if (spec == NULL) { /* this is an invalid flag */
+ return TCL_ERROR;
+ }
+
+ if (Tix_ChangeOneOption(interp, cPtr, widRec, spec,
+ argv[i+1], 0, 1)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * ClassTableDeleteProc --
+ *
+ * This procedure is called when the interp is about to be
+ * deleted. It cleans up the hash entries and destroys the hash
+ * table.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * All class definitions are deleted.
+ *----------------------------------------------------------------------
+ */
+
+static void
+ClassTableDeleteProc(clientData, interp)
+ ClientData clientData;
+ Tcl_Interp *interp;
+{
+ Tcl_HashTable * classTablePtr = (Tcl_HashTable*)clientData;
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry * hashPtr;
+ TixClassRecord * cPtr;
+
+ for (hashPtr = Tcl_FirstHashEntry(classTablePtr, &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+ cPtr = (TixClassRecord*)Tcl_GetHashValue(hashPtr);
+ FreeClassRecord(cPtr);
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ Tcl_DeleteHashTable(classTablePtr);
+ ckfree((char*)classTablePtr);
+}
+
+#if USE_ACCESS_CONTROL
+
+/*
+ * Everything after this line are not used at this moment.
+ *
+ */
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * ACCESS CONTROL
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static void InitExportSpec(exPtr)
+ Tix_ExportSpec * exPtr;
+{
+ Tix_SimpleListInit(&exPtr->exportCmds);
+ Tix_SimpleListInit(&exPtr->restrictCmds);
+ Tix_SimpleListInit(&exPtr->exportOpts);
+ Tix_SimpleListInit(&exPtr->restrictOpts);
+}
+
+static Tix_LinkList * CopyStringList(list, newList)
+ Tix_LinkList * list;
+ Tix_LinkList * newList;
+{
+ Tix_StringLink * ptr, * newLink;
+
+ for (ptr=(Tix_StringLink*)list->head; ptr; ptr=ptr->next) {
+ newLink = (Tix_StringLink*)Tix_ZAlloc(sizeof(Tix_StringLink));
+
+ newLink->string = tixStrDup(ptr->string);
+ Tix_SimpleListAppend(newList, (char*)newLink, 0);
+ }
+}
+
+static void
+CopyExportSpec(src, dst)
+ Tix_ExportSpec * src;
+ Tix_ExportSpec * dst;
+{
+ CopyStringList(&src->exportCmds, &dst->exportCmds);
+ CopyStringList(&src->restrictCmds, &dst->restrictCmds);
+
+ CopyStringList(&src->exportOpts, &dst->exportOpts);
+ CopyStringList(&src->restrictOpts, &dst->restrictOpts);
+}
+
+/*
+ * (1) All items that appear in list1 must not appear in list 2
+ * (2) If either list have the item "all" -- an item whose string pointer is
+ * NULL -- the other list must be empty.
+ */
+static int CheckMutualExclusion(list1, list2)
+ Tix_LinkList * list1;
+ Tix_LinkList * list2;
+{
+ Tix_StringLink * ptr, *ptr2;
+
+ if (list1->numItems == 0) {
+ return TCL_OK;
+ }
+ if (list2->numItems == 0) {
+ return TCL_OK;
+ }
+
+ for (ptr=(Tix_StringLink *)(list1->head); ptr; ptr=ptr->next) {
+ if (ptr->string == NULL) {
+ goto error;
+ }
+
+ for (ptr2=(Tix_StringLink *)(list2->head); ptr2; ptr2=ptr2->next) {
+ if (strcmp(ptr->string, ptr2->string) == 0) {
+
+ /* Violates requirement (1) above :
+ * Some items in list 1 also appear in list 2.
+ */
+ goto error;
+ }
+ }
+ }
+
+ return TCL_OK;
+
+ error:
+
+ return TCL_ERROR;
+}
+
+static int AppendStrings(interp, list, string)
+ Tcl_Interp * interp;
+ Tix_LinkList * list;
+ char * string;
+{
+ char ** listArgv = NULL;
+ int listArgc, i;
+ Tix_StringLink * ptr;
+
+ if (string && *string) {
+ if (Tcl_SplitList(interp, string, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ /* Nothing to be done */
+ return TCL_OK;
+ }
+
+ for (i=0; i<listArgc; i++) {
+ ptr = (Tix_StringLink *)Tix_ZAlloc(sizeof(Tix_StringLink));
+
+ if (strcmp(listArgv[i], "all")==0) {
+ ptr->string = NULL;
+ } else {
+ ptr->string = tixStrDup(listArgv[i]);
+ }
+ Tix_SimpleListAppend(list, (char*)ptr, 0);
+ }
+
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+
+ return TCL_OK;
+}
+
+
+static int ConflictingSpec(interp, which, eList, rList)
+ Tcl_Interp * interp;
+ char * which;
+ Tix_LinkList * eList;
+ Tix_LinkList * rList;
+{
+ Tix_LinkList *lists[2];
+ Tix_StringLink * ptr;
+ int i;
+ char * specs[2] = {"export :", "restrict :"};
+
+ lists[0] = eList;
+ lists[1] = rList;
+
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "conflicting export and restrictions ",
+ "for ", which, "\n", NULL);
+
+ for (i=0; i<2; i++) {
+ Tcl_AppendResult(interp, specs[i], NULL);
+
+ for (ptr=(Tix_StringLink *)(lists[i]->head); ptr; ptr=ptr->next) {
+ if (ptr->string == 0) {
+ Tcl_AppendResult(interp, "all ", NULL);
+ } else {
+ Tcl_AppendResult(interp, ptr->string, " ", NULL);
+ }
+ }
+ Tcl_AppendResult(interp, "\n", NULL);
+ }
+
+ return TCL_ERROR;
+}
+
+/*
+ * Define or redefine the export control
+ */
+static int DefineExport(interp, exPtr, name, spec)
+ Tcl_Interp * interp;
+ Tix_ExportSpec * exPtr;
+ char * name;
+ char * spec;
+{
+ char ** listArgv = NULL;
+ int listArgc, i;
+
+ if (spec && *spec) {
+ if (Tcl_SplitList(interp, spec, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ /* Nothing to be done */
+ return TCL_OK;
+ }
+
+ if (listArgc %2 != 0) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "wrong # of argument in subwidget spec: \"",
+ spec, "\"", NULL);
+ goto error;
+ }
+
+ for (i=0; i<listArgc; i+=2) {
+ if (strcmp(listArgv[i], "-exportcmd") == 0) {
+ if (AppendStrings(interp, &exPtr->exportCmds,
+ listArgv[i+1])==TCL_ERROR) {
+ goto error;
+ }
+ }
+ else if (strcmp(listArgv[i], "-restrictcmd") == 0) {
+ if (AppendStrings(interp, &exPtr->restrictCmds,
+ listArgv[i+1])==TCL_ERROR){
+ goto error;
+ }
+ }
+ else if (strcmp(listArgv[i], "-exportopt") == 0) {
+ if (AppendStrings(interp, &exPtr->exportOpts,
+ listArgv[i+1])==TCL_ERROR) {
+ goto error;
+ }
+ }
+ else if (strcmp(listArgv[i], "-restrictopt") == 0) {
+ if (AppendStrings(interp, &exPtr->restrictOpts,
+ listArgv[i+1])==TCL_ERROR){
+ goto error;
+ }
+ }
+ }
+
+ if (CheckMutualExclusion(&exPtr->exportCmds, &exPtr->restrictCmds)
+ ==TCL_ERROR) {
+ ConflictingSpec(interp, "commands",
+ &exPtr->exportCmds, &exPtr->restrictCmds);
+ goto error;
+ }
+ if (CheckMutualExclusion(&exPtr->restrictCmds, &exPtr->exportCmds)
+ ==TCL_ERROR) {
+ ConflictingSpec(interp, "commands",
+ &exPtr->exportCmds, &exPtr->restrictCmds);
+ goto error;
+ }
+ if (CheckMutualExclusion(&exPtr->exportOpts, &exPtr->restrictOpts)
+ ==TCL_ERROR) {
+ ConflictingSpec(interp, "options",
+ &exPtr->exportOpts, &exPtr->restrictOpts);
+ goto error;
+ }
+ if (CheckMutualExclusion(&exPtr->restrictOpts, &exPtr->exportOpts)
+ ==TCL_ERROR) {
+ ConflictingSpec(interp, "options",
+ &exPtr->exportOpts, &exPtr->restrictOpts);
+ goto error;
+ }
+
+ done:
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return TCL_OK;
+
+ error:
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return TCL_ERROR;
+}
+/*----------------------------------------------------------------------
+ *
+ *
+ * SUBWIDGET SETUP
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_SubWidgetSpec *
+GetSubWidgetSpec(cPtr, name)
+ TixClassRecord * cPtr;
+ CONST84 char * name;
+{
+ Tix_SubWidgetSpec *ptr;
+
+ for (ptr=(Tix_SubWidgetSpec *)cPtr->subWidgets.head; ptr; ptr=ptr->next) {
+ if (strcmp(ptr->name, name) == 0) {
+ return ptr;
+ }
+ }
+
+ return NULL;
+}
+
+static Tix_SubWidgetSpec *
+AllocSubWidgetSpec()
+{
+ Tix_SubWidgetSpec * newPtr =
+ (Tix_SubWidgetSpec *)Tix_ZAlloc(sizeof(Tix_SubWidgetSpec));
+
+ newPtr->next = NULL;
+ newPtr->name = NULL;
+ InitExportSpec(&newPtr->exportSpec);
+ return newPtr;
+}
+
+static void
+CopySubWidgetSpecs(scPtr, cPtr)
+ TixClassRecord * scPtr;
+ TixClassRecord * cPtr;
+{
+ Tix_SubWidgetSpec *ssPtr;
+
+ for (ssPtr=(Tix_SubWidgetSpec *)scPtr->subWidgets.head;
+ ssPtr;
+ ssPtr=ssPtr->next) {
+
+ Tix_SubWidgetSpec *newPtr;
+ newPtr = AllocSubWidgetSpec();
+
+ newPtr->name = tixStrDup(ssPtr->name);
+ CopyExportSpec(&ssPtr->exportSpec, & newPtr->exportSpec);
+
+ Tix_SimpleListAppend(&cPtr->subWidgets, (char*)newPtr, 0);
+ }
+}
+
+static int
+SetupSubWidget(interp, cPtr, s)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * s;
+{
+ char ** listArgv;
+ TixClassRecord * scPtr = cPtr->superClass;
+ int listArgc, i;
+
+ if (s && *s) {
+ if (Tcl_SplitList(interp, s, &listArgc, &listArgv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ return TCL_OK;
+ }
+
+ if (listArgc %2 != 0) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "wrong # of argument in subwidget spec: \"",
+ s, "\"", NULL);
+ goto error;
+ }
+
+ /* Copy all the subwidgets of the superclass to this class */
+ if (scPtr) {
+ CopySubWidgetSpecs(scPtr, cPtr);
+ }
+
+ /* Iterate over all the newly defined or re-defined subwidgets */
+ for (i=0; i<listArgc; i+=2) {
+ char * name, *spec;
+ Tix_SubWidgetSpec * oldSpec;
+ Tix_SubWidgetSpec * newSpec;
+
+ name = listArgv[i];
+ spec = listArgv[i+1];
+
+ if (scPtr && ((oldSpec = GetSubWidgetSpec(cPtr, name)) != NULL)) {
+ if (DefineExport(interp, &oldSpec->exportSpec, name, spec)
+ != TCL_OK) {
+ goto error;
+ }
+ }
+ else {
+ newSpec = AllocSubWidgetSpec();
+ newSpec->name = tixStrDup(name);
+
+ Tix_SimpleListAppend(&cPtr->subWidgets, (char*)newSpec, 0);
+
+ if (DefineExport(interp, &newSpec->exportSpec, name, spec)
+ != TCL_OK) {
+ goto error;
+ }
+ }
+ }
+
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return TCL_OK;
+
+
+ error:
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+ return TCL_ERROR;
+}
+
+#endif
+
Added: external/tix-8.4.2.x/generic/tixCmds.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixCmds.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,687 @@
+/*
+ * tixCmds.c --
+ *
+ * Implements various TCL commands for Tix. This file contains
+ * misc small commands, or groups of commands, that are not big
+ * enough to be put in a separate file.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixCmds.c,v 1.4 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <math.h>
+
+TIX_DECLARE_CMD(Tix_ParentWindow);
+
+/*
+ * Maximum intensity for a color:
+ */
+
+#define MAX_INTENSITY ((int) 65535)
+
+/*
+ * Data structure used by the tixDoWhenIdle command.
+ */
+typedef struct {
+ Tcl_Interp * interp;
+ char * command;
+ Tk_Window tkwin;
+} IdleStruct;
+
+/*
+ * Data structures used by the tixDoWhenMapped command.
+ */
+typedef struct _MapCmdLink {
+ char * command;
+ struct _MapCmdLink * next;
+} MapCmdLink;
+
+typedef struct {
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ MapCmdLink * cmds;
+} MapEventStruct;
+
+/*
+ * Global vars
+ */
+static Tcl_HashTable idleTable; /* hash table for TixDoWhenIdle */
+static Tcl_HashTable mapEventTable; /* hash table for TixDoWhenMapped */
+
+
+/*
+ * Functions used only in this file.
+ */
+static void IdleHandler _ANSI_ARGS_((ClientData clientData));
+static void EventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static void MapEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static int IsOption _ANSI_ARGS_((CONST84 char *option,
+ int optArgc, CONST84 char **optArgv));
+static XColor * ScaleColor _ANSI_ARGS_((Tk_Window tkwin,
+ XColor * color, double scale));
+static char * NameOfColor _ANSI_ARGS_((XColor * colorPtr));
+
+
+/*----------------------------------------------------------------------
+ * Tix_DoWhenIdle --
+ *
+ * The difference between "tixDoWhenIdle" and "after" is: the
+ * "after" handler is called after all other TK Idel Event
+ * Handler are called. Sometimes this will cause some toplevel
+ * windows to be mapped before the Idle Event Handler is
+ * executed.
+ *
+ * This behavior of "after" is not suitable for implementing
+ * geometry managers. Therefore I wrote "tixDoWhenIdle" which is
+ * an exact TCL interface for Tk_DoWhenIdle()
+ *----------------------------------------------------------------------
+ */
+
+TIX_DEFINE_CMD(Tix_DoWhenIdleCmd)
+{
+ int isNew;
+ char * command;
+ static int inited = 0;
+ IdleStruct * iPtr;
+ Tk_Window tkwin;
+ Tcl_HashEntry * hashPtr;
+
+ if (!inited) {
+ Tcl_InitHashTable(&idleTable, TCL_STRING_KEYS);
+ inited = 1;
+ }
+
+ /*
+ * parse the arguments
+ */
+ if (strncmp(argv[0], "tixWidgetDoWhenIdle", strlen(argv[0]))== 0) {
+ if (argc<3) {
+ return Tix_ArgcError(interp, argc, argv, 1,
+ "command window ?arg arg ...?");
+ }
+ /* tixWidgetDoWhenIdle reqires that the second argument must
+ * be the name of a mega widget
+ */
+ tkwin=Tk_NameToWindow(interp, argv[2], Tk_MainWindow(interp));
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+ } else {
+ if (argc<2) {
+ return Tix_ArgcError(interp, argc, argv, 1,
+ "command ?arg arg ...?");
+ }
+ tkwin = NULL;
+ }
+
+ command = Tcl_Merge(argc-1, argv+1);
+
+ hashPtr = Tcl_CreateHashEntry(&idleTable, command, &isNew);
+
+ if (!isNew) {
+ ckfree(command);
+ } else {
+ iPtr = (IdleStruct *) ckalloc(sizeof(IdleStruct));
+ iPtr->interp = interp;
+ iPtr->command = command;
+ iPtr->tkwin = tkwin;
+
+ Tcl_SetHashValue(hashPtr, (char*)iPtr);
+
+ if (tkwin) {
+ /* we just want one event handler for all idle events
+ * associated with a window. This is done by first calling
+ * Delete and then Create EventHandler.
+ */
+ Tk_DeleteEventHandler(tkwin, StructureNotifyMask, EventProc,
+ (ClientData)tkwin);
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask, EventProc,
+ (ClientData)tkwin);
+ }
+
+ Tk_DoWhenIdle(IdleHandler, (ClientData) iPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_DoWhenMapped
+ *
+ * Arranges a command to be called when the window received an
+ * <Map> event.
+ *
+ * argv[1..] = command argvs
+ *
+ *----------------------------------------------------------------------
+ */
+TIX_DEFINE_CMD(Tix_DoWhenMappedCmd)
+{
+ Tcl_HashEntry * hashPtr;
+ int isNew;
+ MapEventStruct * mPtr;
+ MapCmdLink * cmd;
+ Tk_Window tkwin;
+ static int inited = 0;
+
+ if (argc!=3) {
+ return Tix_ArgcError(interp, argc, argv, 1, " pathname command");
+ }
+
+ tkwin = Tk_NameToWindow(interp, argv[1], Tk_MainWindow(interp));
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (!inited) {
+ Tcl_InitHashTable(&mapEventTable, TCL_ONE_WORD_KEYS);
+ inited = 1;
+ }
+
+ hashPtr = Tcl_CreateHashEntry(&mapEventTable, (char*)tkwin, &isNew);
+
+ if (!isNew) {
+ mPtr = (MapEventStruct*) Tcl_GetHashValue(hashPtr);
+ } else {
+ mPtr = (MapEventStruct*) ckalloc(sizeof(MapEventStruct));
+ mPtr->interp = interp;
+ mPtr->tkwin = tkwin;
+ mPtr->cmds = 0;
+
+ Tcl_SetHashValue(hashPtr, (char*)mPtr);
+
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ MapEventProc, (ClientData)mPtr);
+ }
+
+ /*
+ * Add this into a link list
+ */
+ cmd = (MapCmdLink*) ckalloc(sizeof(MapCmdLink));
+ cmd->command = tixStrDup(argv[2]);
+
+ cmd->next = mPtr->cmds;
+ mPtr->cmds = cmd;
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_Get3DBorderCmd
+ *
+ * Returns the upper and lower border shades of a color. Returns then
+ * in a list of two X color names.
+ *
+ * The color is not very useful if the display is a mono display:
+ * it will just return black and white. So a clever program may
+ * want to check the [tk colormodel] and if it is mono, then
+ * dither using a bitmap.
+ *----------------------------------------------------------------------
+ */
+TIX_DEFINE_CMD(Tix_Get3DBorderCmd)
+{
+ XColor * color, * light, * dark;
+ Tk_Window tkwin;
+ Tk_Uid colorUID;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc, argv, 0, "colorName");
+ }
+
+ tkwin = Tk_MainWindow(interp);
+
+ colorUID = Tk_GetUid(argv[1]);
+ color = Tk_GetColor(interp, tkwin, colorUID);
+ if (color == NULL) {
+ return TCL_ERROR;
+ }
+
+ if ((light = ScaleColor(tkwin, color, 1.4)) == NULL) {
+ return TCL_ERROR;
+ }
+ if ((dark = ScaleColor(tkwin, color, 0.6)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tcl_ResetResult(interp);
+ Tcl_AppendElement(interp, NameOfColor(light));
+ Tcl_AppendElement(interp, NameOfColor(dark));
+
+ Tk_FreeColor(color);
+ Tk_FreeColor(light);
+ Tk_FreeColor(dark);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_HandleOptionsCmd
+ *
+ *
+ * argv[1] = recordName
+ * argv[2] = validOptions
+ * argv[3] = argList
+ * if (argv[3][0] == "-nounknown") then
+ * don't complain about unknown options
+ *----------------------------------------------------------------------
+ */
+TIX_DEFINE_CMD(Tix_HandleOptionsCmd)
+{
+ int listArgc;
+ int optArgc;
+ CONST84 char ** listArgv = 0;
+ CONST84 char ** optArgv = 0;
+ int i, code = TCL_OK;
+ int noUnknown = 0;
+
+ if (argc >= 2 && (strcmp(argv[1], "-nounknown") == 0)) {
+ noUnknown = 1;
+ argv[1] = argv[0];
+ argc --;
+ argv ++;
+ }
+
+ if (argc!=4) {
+ return Tix_ArgcError(interp, argc, argv, 2, "w validOptions argList");
+ }
+
+ if (Tcl_SplitList(interp, argv[2], &optArgc, &optArgv ) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (Tcl_SplitList(interp, argv[3], &listArgc, &listArgv) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if ((listArgc %2) == 1) {
+ if (noUnknown || IsOption(listArgv[listArgc-1], optArgc, optArgv)) {
+ Tcl_AppendResult(interp, "value for \"", listArgv[listArgc-1],
+ "\" missing", (char*)NULL);
+ } else {
+ Tcl_AppendResult(interp, "unknown option \"", listArgv[listArgc-1],
+ "\"", (char*)NULL);
+ }
+ code = TCL_ERROR;
+ goto done;
+ }
+ for (i=0; i<listArgc; i+=2) {
+ if (IsOption(listArgv[i], optArgc, optArgv)) {
+ Tcl_SetVar2(interp, argv[1], listArgv[i], listArgv[i+1], 0);
+ }
+ else if (!noUnknown) {
+ Tcl_AppendResult(interp, "unknown option \"", listArgv[i],
+ "\"; must be one of \"", argv[2], "\".", NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ done:
+
+ if (listArgv) {
+ ckfree((char *) listArgv);
+ }
+ if (optArgv) {
+ ckfree((char *) optArgv);
+ }
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_SetWindowParent --
+ *
+ * Sets the parent of a window. This is normally to change the
+ * state of toolbar and MDI windows between docking and free
+ * modes.
+ *
+ * Results:
+ * Standard Tcl results.
+ *
+ * Side effects:
+ * Windows may be re-parented. See user documentation.
+ *----------------------------------------------------------------------
+ */
+
+TIX_DEFINE_CMD(Tix_ParentWindow)
+{
+ Tk_Window mainWin, tkwin, newParent;
+ int parentId;
+
+ if (argc != 3) {
+ return Tix_ArgcError(interp, argc, argv, 1, "window parent");
+ }
+ mainWin = Tk_MainWindow(interp);
+ if (mainWin == NULL) {
+ Tcl_SetResult(interp, "interpreter does not have a main window",
+ TCL_STATIC);
+ return TCL_ERROR;
+ }
+
+ tkwin = Tk_NameToWindow(interp, argv[1], mainWin);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+
+ newParent = Tk_NameToWindow(interp, argv[2], mainWin);
+ if (newParent == NULL) {
+ if (Tcl_GetInt(interp, argv[2], &parentId) != TCL_OK) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "\"", argv[2],
+ "\" must be a window pathname or ID", NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ return TixpSetWindowParent(interp, tkwin, newParent, parentId);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_TmpLineCmd
+ *
+ * Draw a temporary line on the root window
+ *
+ * argv[1..] = x1 y1 x2 y2
+ *----------------------------------------------------------------------
+ */
+TIX_DEFINE_CMD(Tix_TmpLineCmd)
+{
+ Tk_Window mainWin = (Tk_Window)clientData;
+ Tk_Window tkwin;
+ int x1, y1, x2, y2;
+
+ if (argc != 5 && argc != 6) {
+ return Tix_ArgcError(interp, argc, argv, 0,
+ "tixTmpLine x1 y1 x2 y2 ?window?");
+ }
+ if (Tcl_GetInt(interp, argv[1], &x1) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[2], &y1) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[3], &x2) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[4], &y2) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (argc == 6) {
+ /*
+ * argv[5] tells which display to draw the tmp lines on, in
+ * case the application has opened more than one displays. If
+ * this argv[5] is omitted, draws to the display where the
+ * main window is on.
+ */
+ tkwin = Tk_NameToWindow(interp, argv[5], mainWin);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+ } else {
+ tkwin = Tk_MainWindow(interp);
+ }
+
+ TixpDrawTmpLine(x1, y1, x2, y2, tkwin);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * EventProc --
+ *
+ * Monitors events sent to a window associated with a
+ * tixWidgetDoWhenIdle command. If this window is destroyed,
+ * remove the idle handlers associated with this window.
+ *----------------------------------------------------------------------
+ */
+
+static void EventProc(clientData, eventPtr)
+ ClientData clientData;
+ XEvent *eventPtr;
+{
+ Tk_Window tkwin = (Tk_Window)clientData;
+ Tcl_HashSearch hSearch;
+ Tcl_HashEntry * hashPtr;
+ IdleStruct * iPtr;
+
+ if (eventPtr->type != DestroyNotify) {
+ return;
+ }
+
+ /* Iterate over all the entries in the hash table */
+ for (hashPtr = Tcl_FirstHashEntry(&idleTable, &hSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hSearch)) {
+
+ iPtr = (IdleStruct *)Tcl_GetHashValue(hashPtr);
+
+ if (iPtr->tkwin == tkwin) {
+ Tcl_DeleteHashEntry(hashPtr);
+ Tk_CancelIdleCall(IdleHandler, (ClientData) iPtr);
+ ckfree((char*)iPtr->command);
+ ckfree((char*)iPtr);
+ }
+ }
+}
+/*----------------------------------------------------------------------
+ * IdleHandler --
+ *
+ * Called when Tk is idle. Dispatches all commands registered by
+ * tixDoWhenIdle and tixWidgetDoWhenIdle.
+ *----------------------------------------------------------------------
+ */
+
+static void IdleHandler(clientData)
+ ClientData clientData; /* TCL command to evaluate */
+{
+ Tcl_HashEntry * hashPtr;
+ IdleStruct * iPtr;
+
+ iPtr = (IdleStruct *) clientData;
+
+ /*
+ * Clean up the hash table. Note that we have to do this BEFORE
+ * calling the TCL command. Otherwise if the TCL command tries
+ * to register itself again, it will fail in Tix_DoWhenIdleCmd()
+ * because the command is still in the hashtable
+ */
+ hashPtr = Tcl_FindHashEntry(&idleTable, iPtr->command);
+ if (hashPtr) {
+ Tcl_DeleteHashEntry(hashPtr);
+ } else {
+ /* Probably some kind of error */
+ return;
+ }
+
+ if (Tcl_GlobalEval(iPtr->interp, iPtr->command) != TCL_OK) {
+ if (iPtr->tkwin != NULL) {
+ Tcl_AddErrorInfo(iPtr->interp,
+ "\n (idle event handler executed by tixWidgetDoWhenIdle)");
+ } else {
+ Tcl_AddErrorInfo(iPtr->interp,
+ "\n (idle event handler executed by tixDoWhenIdle)");
+ }
+ Tk_BackgroundError(iPtr->interp);
+ }
+
+ ckfree((char*)iPtr->command);
+ ckfree((char*)iPtr);
+}
+
+/*----------------------------------------------------------------------
+ * IsOption --
+ *
+ * Checks whether the string pointed by "option" is one of the
+ * options given by the "optArgv" array.
+ *----------------------------------------------------------------------
+ */
+static int IsOption(option, optArgc, optArgv)
+ CONST84 char *option; /* Number of arguments. */
+ int optArgc; /* Number of arguments. */
+ CONST84 char **optArgv; /* Argument strings. */
+{
+ int i;
+
+ for (i=0; i<optArgc; i++) {
+ if (strcmp(option, optArgv[i]) == 0) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+static void MapEventProc(clientData, eventPtr)
+ ClientData clientData; /* TCL command to evaluate */
+ XEvent *eventPtr; /* Information about event. */
+{
+ Tcl_HashEntry * hashPtr;
+ MapEventStruct * mPtr;
+ MapCmdLink * cmd;
+
+ if (eventPtr->type != MapNotify) {
+ return;
+ }
+
+ mPtr = (MapEventStruct *) clientData;
+
+ Tk_DeleteEventHandler(mPtr->tkwin, StructureNotifyMask,
+ MapEventProc, (ClientData)mPtr);
+
+ /* Clean up the hash table.
+ */
+ if ((hashPtr = Tcl_FindHashEntry(&mapEventTable, (char*)mPtr->tkwin))) {
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+
+ for (cmd = mPtr->cmds; cmd; ) {
+ MapCmdLink * old;
+
+ /* Execute the event handler */
+ if (Tcl_GlobalEval(mPtr->interp, cmd->command) != TCL_OK) {
+ Tcl_AddErrorInfo(mPtr->interp,
+ "\n (event handler executed by tixDoWhenMapped)");
+ Tk_BackgroundError(mPtr->interp);
+ }
+
+ /* Delete the link */
+ old = cmd;
+ cmd = cmd->next;
+
+ ckfree(old->command);
+ ckfree((char*)old);
+ }
+
+ /* deallocate the mapEventStruct */
+ ckfree((char*)mPtr);
+}
+
+static char *
+NameOfColor(colorPtr)
+ XColor * colorPtr;
+{
+ static char string[20];
+ char *ptr;
+
+ sprintf(string, "#%4x%4x%4x", colorPtr->red, colorPtr->green,
+ colorPtr->blue);
+
+ for (ptr = string; *ptr; ptr++) {
+ if (*ptr == ' ') {
+ *ptr = '0';
+ }
+ }
+ return string;
+}
+
+
+static XColor *
+ScaleColor(tkwin, color, scale)
+ Tk_Window tkwin;
+ XColor * color;
+ double scale;
+{
+ int r, g, b;
+ XColor test;
+
+ r = (int)((float)(color->red) * scale);
+ g = (int)((float)(color->green) * scale);
+ b = (int)((float)(color->blue) * scale);
+ if (r > MAX_INTENSITY) { r = MAX_INTENSITY; }
+ if (g > MAX_INTENSITY) { g = MAX_INTENSITY; }
+ if (b > MAX_INTENSITY) { b = MAX_INTENSITY; }
+ test.red = (unsigned short) r;
+ test.green = (unsigned short) g;
+ test.blue = (unsigned short) b;
+
+ return Tk_GetColorByValue(tkwin, &test);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GetDefaultCmd
+ *
+ * Implements the tixGetDefault command.
+ *
+ * Returns values for various default configuration options,
+ * as defined in tixDef.h and tkDefault.h.
+ *
+ * This command makes it possible to define default options
+ * for the Tcl-implemented widgets according to platform-
+ * specific values set in the C header files.
+ *
+ * Note: there is no reason to make this an ObjCmd because the
+ * same Tcl command is unlikely to be executed twice. The old
+ * style "string" command is more compact and less prone to
+ * programming errors.
+ *----------------------------------------------------------------------
+ */
+
+TIX_DEFINE_CMD(Tix_GetDefaultCmd)
+{
+ unsigned int i;
+# define OPT(x) {#x, x}
+ static char *table[][2] = {
+ OPT(ACTIVE_BG),
+ OPT(CTL_FONT),
+ OPT(DISABLED),
+ OPT(HIGHLIGHT),
+ OPT(INDICATOR),
+ OPT(MENU_BG),
+ OPT(MENU_FG),
+ OPT(NORMAL_BG),
+ OPT(NORMAL_FG),
+ OPT(SELECT_BG),
+ OPT(SELECT_FG),
+ OPT(TEXT_FG),
+ OPT(TROUGH),
+
+ OPT(TIX_EDITOR_BG),
+ OPT(TIX_BORDER_WIDTH),
+ OPT(TIX_HIGHLIGHT_THICKNESS),
+ };
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc, argv, 1, "optionName");
+ }
+
+ for (i=0; i<Tix_ArraySize(table); i++) {
+ if (strcmp(argv[1], table[i][0]) == 0) {
+ Tcl_SetResult(interp, table[i][1], TCL_STATIC);
+ return TCL_OK;
+ }
+ }
+
+ Tcl_AppendResult(interp, "unknown option \"", argv[1],
+ "\"", NULL);
+ return TCL_ERROR;
+}
Added: external/tix-8.4.2.x/generic/tixCompat.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixCompat.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,64 @@
+
+/* $Id: tixCompat.c,v 1.2 2001/01/08 06:15:32 ioilam Exp $ */
+
+/*
+ * tixCompat.c --
+ *
+ * Some compatibility functions for Tix.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+/*
+ * strdup is not a POSIX call and is not supported on many platforms.
+ */
+
+char * tixStrDup(s)
+ CONST char * s;
+{
+ size_t len = strlen(s)+1;
+ char * new_string;
+
+ new_string = (char*)ckalloc(len);
+ strcpy(new_string, s);
+
+ return new_string;
+}
+
+
+#ifdef NO_STRCASECMP
+
+int tixStrCaseCmp _ANSI_ARGS_((CONST char * a, CONST char * b));
+
+int tixStrCaseCmp(a, b)
+ CONST char * a;
+ CONST char * b;
+{
+ while (1) {
+ if (*a== 0 && *b==0) {
+ return 0;
+ }
+ if (*a==0) {
+ return (1);
+ }
+ if (*b==0) {
+ return (-1);
+ }
+ if (tolower(*a)>tolower(*b)) {
+ return (-1);
+ }
+ if (tolower(*b)>tolower(*a)) {
+ return (1);
+ }
+ a++; b++;
+ }
+}
+
+#endif /* NO_STRCASECMP */
Added: external/tix-8.4.2.x/generic/tixDItem.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDItem.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,839 @@
+/*
+ * tixDItem.c --
+ *
+ * This file implements the "Display Items" in the Tix library.
+ *
+ * Since many Tix widgets use the same type of display items, for
+ * example, text items, image items, or text-image items (used in
+ * HList, TList and Table), it makes sense to provide a set of
+ * common routines to support these display items. Code re-use is
+ * the major issue: we don't want to re-define almost the same
+ * configSpecs again and again in different widgets. Therefore,
+ * all display items provide common methods to configure,
+ * display, calculate geometry, etc.
+ *
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDItem.c,v 1.3 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+
+static int DItemParseProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
+ char *widRec, int offset));
+
+static char *DItemPrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin, char *widRec,
+ int offset, Tcl_FreeProc **freeProcPtr));
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * PUBLIC INTERFACE
+ *
+ *
+ * The following functions are called by widget implementors
+ *
+ *----------------------------------------------------------------------
+ */
+/* Tix_AddDItemType, Tix_GetDItemType --
+ *
+ *
+ * Maintain a list of item types, each identifies by a unique string
+ * name;
+ */
+
+static Tix_DItemInfo * diTypes = NULL;
+
+void Tix_AddDItemType(diTypePtr)
+ Tix_DItemInfo * diTypePtr;
+{
+ diTypePtr->next = diTypes;
+ diTypes = diTypePtr;
+}
+
+Tix_DItemInfo * Tix_GetDItemType(interp, type)
+ Tcl_Interp * interp;
+ CONST84 char * type;
+{
+ Tix_DItemInfo * diTypePtr;
+
+ for (diTypePtr = diTypes; diTypePtr; diTypePtr = diTypePtr->next) {
+ if (strcmp(type, diTypePtr->name)==0) {
+ return diTypePtr;
+ }
+ }
+
+ if (interp) {
+ Tcl_AppendResult(interp, "unknown display type \"", type, "\"", NULL);
+ }
+ return NULL;
+}
+
+
+/*----------------------------------------------------------------------
+ * Tix_DItemCreate --
+ *
+ * Create a display item according to the "type" string.
+ *
+ *----------------------------------------------------------------------
+ */
+Tix_DItem * Tix_DItemCreate(ddPtr, type)
+ Tix_DispData * ddPtr;
+ CONST84 char * type;
+{
+ Tix_DItemInfo * diTypePtr;
+
+ if ((diTypePtr = Tix_GetDItemType(ddPtr->interp, type)) == NULL) {
+ return NULL;
+ }
+
+ return diTypePtr->createProc(ddPtr, diTypePtr);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_DItemConfigure --
+ *
+ * Configures a display item.
+ *
+ *----------------------------------------------------------------------
+ */
+int Tix_DItemConfigure(iPtr, argc, argv, flags)
+ Tix_DItem * iPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ return iPtr->base.diTypePtr->configureProc(iPtr, argc, argv, flags);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_DItemDisplay --
+ *
+ * Display a DItem. {x, y, width, height} specifies a region
+ * for to display this item in. {xOffset, yOffset} gives the
+ * offset of the top-left corner of the item relative to
+ * the top-left corder of the region.
+ *
+ * Background and foreground of the item are displayed according
+ * to the flags parameter.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tix_DItemDisplay(drawable, iPtr, x, y, width, height, xOffset, yOffset,flags)
+ Drawable drawable;
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+ int width;
+ int height;
+ int xOffset;
+ int yOffset;
+ int flags;
+{
+ iPtr->base.diTypePtr->displayProc(drawable, iPtr, x, y,
+ width, height, xOffset, yOffset, flags);
+}
+
+void Tix_DItemFree(iPtr)
+ Tix_DItem * iPtr;
+{
+ iPtr->base.diTypePtr->freeProc(iPtr);
+
+ /*
+ * When it comes to here, iPtr is no longer a valid pointer!
+ */
+}
+
+void Tix_DItemCalculateSize(iPtr)
+ Tix_DItem * iPtr;
+{
+ iPtr->base.diTypePtr->calculateSizeProc(iPtr);
+}
+
+char * Tix_DItemComponent(iPtr, x, y)
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+{
+ return (iPtr->base.diTypePtr->componentProc(iPtr, x, y));
+}
+
+
+/*----------------------------------------------------------------------
+ * Tix_FreeArgumentList --
+ *
+ * Free the argument lists allocated by Tix_SplitConfig;
+ *----------------------------------------------------------------------
+ */
+void
+Tix_FreeArgumentList(argListPtr)
+ Tix_ArgumentList *argListPtr;
+{
+ int i;
+
+ for (i=0; i<argListPtr->numLists; i++) {
+ ckfree((char*)argListPtr->arg[i].argv);
+ }
+ if (argListPtr->arg != argListPtr->preAlloc) {
+ ckfree((char*)argListPtr->arg);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Tix_SplitConfig --
+ *
+ * Split the command line arguments according for several configurable
+ * objects.
+ *----------------------------------------------------------------------
+ */
+int
+Tix_SplitConfig(interp, tkwin, specsList, numLists, argc, argv, argListPtr)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ Tk_ConfigSpec ** specsList; /* a list of two or more config spec
+ * arrays */
+ int numLists;
+ int argc;
+ CONST84 char ** argv;
+ Tix_ArgumentList * argListPtr;
+{
+ Tix_Argument *arg;
+ int i, n, code = TCL_OK;
+ Tk_ConfigSpec *specPtr;
+ size_t len;
+ int found;
+
+ if (argc % 2) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ if (numLists > FIXED_SIZE) {
+ arg = (Tix_Argument*)ckalloc(numLists * sizeof(Tix_Argument));
+ } else {
+ arg = argListPtr->preAlloc;
+ }
+ argListPtr->arg = arg;
+ argListPtr->numLists = numLists;
+ for (i=0; i<numLists; i++) {
+ arg[i].argc = 0;
+ arg[i].argv = (CONST84 char**)ckalloc(argc * sizeof(char*));
+ }
+
+ /* Split the arguments for the appropriate objects */
+ for (n=0; n<argc; n+=2) {
+ len = strlen(argv[n]);
+ found = 0;
+
+ for (i=0; i<numLists; i++) {
+ for (specPtr=specsList[i];
+ specPtr->type != TK_CONFIG_END;
+ specPtr++) {
+
+ if (specPtr->argvName == NULL) {
+ continue;
+ }
+
+ if (strncmp(argv[n], specPtr->argvName, len) == 0) {
+ arg[i].argv[arg[i].argc++] = argv[n ];
+ arg[i].argv[arg[i].argc++] = argv[n+1];
+ found = 1;
+ break;
+ }
+ }
+ }
+ if (found == 0) {
+ Tcl_AppendResult(interp, "unknown option \"", argv[n],
+ "\"", (char *) NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ done:
+ if (code == TCL_ERROR) {
+ Tix_FreeArgumentList(argListPtr);
+ }
+ return code;
+}
+
+int
+Tix_MultiConfigureInfo(interp, tkwin, specsList, numLists, widgRecList,
+ argvName, flags, request)
+ Tcl_Interp *interp; /* Interpreter for error reporting. */
+ Tk_Window tkwin; /* Window corresponding to widgRec. */
+ Tk_ConfigSpec **specsList; /* Describes legal options. */
+ int numLists;
+ CONST84 char **widgRecList; /* Record whose fields contain current
+ * values for options. */
+ CONST84 char *argvName; /* If non-NULL, indicates a single option
+ * whose info is to be returned. Otherwise
+ * info is returned for all options. */
+ int flags; /* Used to specify additional flags
+ * that must be present in config specs
+ * for them to be considered. */
+ int request;
+{
+ int i, found;
+ Tk_ConfigSpec *specPtr;
+ Tcl_DString dString;
+ size_t len;
+ CONST84 char *result;
+
+ if (argvName != NULL) {
+ len = strlen(argvName);
+ for (found=0,i=0; i<numLists; i++) {
+ for (specPtr=specsList[i];
+ specPtr->type != TK_CONFIG_END;
+ specPtr++) {
+
+ if (specPtr->argvName == NULL) {
+ continue;
+ }
+
+ if (strncmp(argvName, specPtr->argvName, len) == 0) {
+ found = 1;
+ goto done;
+ }
+ }
+ }
+ done:
+ if (!found) {
+ Tcl_AppendResult(interp, "unknown option \"", argvName,
+ "\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ if (request == TIX_CONFIG_INFO) {
+ if (widgRecList[i] != NULL) {
+ return Tk_ConfigureInfo(interp, tkwin, specsList[i],
+ (char *) widgRecList[i], argvName, flags);
+ } else {
+ return TCL_OK;
+ }
+ } else {
+ if (widgRecList[i] != NULL) {
+ return Tk_ConfigureValue(interp, tkwin, specsList[i],
+ (char *) widgRecList[i], argvName, flags);
+ } else {
+ return TCL_OK;
+ }
+ }
+ }
+
+ Tcl_DStringInit(&dString);
+ for (i=0; i<numLists; i++) {
+ if (i != 0) {
+ Tcl_DStringAppend(&dString, " ", 1);
+ }
+ if (widgRecList[i] != NULL) {
+ Tk_ConfigureInfo(interp, tkwin, specsList[i],
+ (char *) widgRecList[i], NULL, flags);
+ }
+ result = Tcl_GetStringResult(interp);
+ Tcl_DStringAppend(&dString, result, (int) strlen(result));
+ }
+ Tcl_ResetResult(interp);
+ Tcl_DStringResult(interp, &dString);
+ Tcl_DStringFree(&dString);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_ConfigureValue2 --
+ *
+ *
+ * Returns the config information of a entry element (of an HList,
+ * for example) and its display item.
+ *----------------------------------------------------------------------
+ */
+int
+Tix_ConfigureValue2(interp, tkwin, entRec, entConfigSpecs, iPtr,
+ argvName, flags)
+ Tcl_Interp *interp; /* Interpreter for error reporting. */
+ Tk_Window tkwin; /* Window corresponding to widgRec. */
+ CONST84 char * entRec;
+ Tk_ConfigSpec *entConfigSpecs; /* Describes legal options of the entry */
+ Tix_DItem * iPtr; /* points to the entry's data record */
+ CONST84 char *argvName; /* If non-NULL, indicates a single option
+ * whose info is to be returned. Otherwise
+ * info is returned for all options. */
+ int flags; /* Used to specify additional flags
+ * that must be present in config specs
+ * for them to be considered. */
+{
+ Tk_ConfigSpec *specsList[2];
+ CONST84 char *widgRecList[2];
+
+ specsList[0] = entConfigSpecs;
+ specsList[1] = Tix_DItemConfigSpecs(iPtr);
+ widgRecList[1] = (CONST84 char*)iPtr;
+ widgRecList[0] = entRec;
+
+ return Tix_MultiConfigureInfo(interp, tkwin, specsList, 2, widgRecList,
+ argvName, flags, TIX_CONFIG_VALUE);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_ConfigureInfo2 --
+ *
+ *
+ * Returns the config information of a entry element (of an HList,
+ * for example) and its display item.
+ *----------------------------------------------------------------------
+ */
+int
+Tix_ConfigureInfo2(interp, tkwin, entRec, entConfigSpecs, iPtr,
+ argvName, flags)
+ Tcl_Interp *interp; /* Interpreter for error reporting. */
+ Tk_Window tkwin; /* Window corresponding to widgRec. */
+ CONST84 char * entRec;
+ Tk_ConfigSpec *entConfigSpecs; /* Describes legal options of the entry */
+ Tix_DItem * iPtr; /* points to the entry's data record */
+ CONST84 char *argvName; /* If non-NULL, indicates a single option
+ * whose info is to be returned. Otherwise
+ * info is returned for all options. */
+ int flags; /* Used to specify additional flags
+ * that must be present in config specs
+ * for them to be considered. */
+{
+ Tk_ConfigSpec *specsList[2];
+ CONST84 char *widgRecList[2];
+
+ specsList[0] = entConfigSpecs;
+ specsList[1] = Tix_DItemConfigSpecs(iPtr);
+ widgRecList[1] = (CONST84 char*)iPtr;
+ widgRecList[0] = (CONST84 char*)entRec;
+
+ return Tix_MultiConfigureInfo(interp, tkwin, specsList, 2, widgRecList,
+ argvName, flags, TIX_CONFIG_INFO);
+}
+
+int
+Tix_WidgetConfigure2(interp, tkwin, entRec, entConfigSpecs, iPtr,
+ argc, argv, flags, forced, sizeChanged_ret)
+ Tcl_Interp *interp; /* Interpreter for error reporting. */
+ Tk_Window tkwin; /* Window corresponding to widgRec. */
+ CONST84 char * entRec;
+ Tk_ConfigSpec *entConfigSpecs; /* Describes legal options of the entry */
+ Tix_DItem * iPtr; /* points to the entry's data record */
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+ int forced; /* forced configure of DItem? */
+ int * sizeChanged_ret;
+{
+ Tix_ArgumentList argList;
+ Tk_ConfigSpec *specsList[2];
+ CONST84 char *widgRecList[2];
+ int code = TCL_OK;
+ int dummy;
+
+ if (sizeChanged_ret == NULL) {
+ sizeChanged_ret = &dummy;
+ }
+
+ specsList[0] = entConfigSpecs;
+ specsList[1] = Tix_DItemConfigSpecs(iPtr);
+ widgRecList[0] = (CONST84 char*)entRec;
+ widgRecList[1] = (CONST84 char*)iPtr;
+
+ if (Tix_SplitConfig(interp, tkwin, specsList,
+ 2, argc, argv, &argList) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /* Handle the info specific to the entry */
+ if (argList.arg[0].argc > 0) {
+ if (Tk_ConfigureWidget(interp, tkwin,
+ entConfigSpecs, argList.arg[0].argc, argList.arg[0].argv,
+ (char*)entRec, flags) != TCL_OK) {
+
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ if (iPtr == NULL) {
+ goto done;
+ }
+ if (argList.arg[1].argc > 0 || forced) {
+ int oldSize[2];
+ oldSize[0] = iPtr->base.size[0];
+ oldSize[1] = iPtr->base.size[1];
+ if (Tix_DItemConfigure(iPtr, argList.arg[1].argc,
+ argList.arg[1].argv, flags) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (oldSize[0] != iPtr->base.size[0] ||
+ oldSize[1] != iPtr->base.size[1]) {
+ * sizeChanged_ret = 1;
+ } else {
+ * sizeChanged_ret = 0;
+ }
+ }
+
+ done:
+
+ Tix_FreeArgumentList(&argList);
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ *
+ * The Tix Customed Config Options
+ *
+ *----------------------------------------------------------------------
+ */
+/*
+ * The global data structures to use in widget configSpecs arrays
+ *
+ * These are declared in <tixConfig.h>
+ */
+
+Tk_CustomOption tixConfigItemType = {
+ DItemParseProc, DItemPrintProc, 0,
+};
+
+/*----------------------------------------------------------------------
+ * DItemParseProc --
+ *
+ * Parse the text string and store the Tix_DItemType information
+ * inside the widget record.
+ *----------------------------------------------------------------------
+ */
+static int DItemParseProc(clientData, interp, tkwin, value, widRec,offset)
+ ClientData clientData;
+ Tcl_Interp *interp;
+ Tk_Window tkwin;
+ CONST84 char *value;
+ char *widRec;
+ int offset;
+{
+ Tix_DItemInfo *newPtr;
+ Tix_DItemInfo **ptr = (Tix_DItemInfo **)(widRec + offset);
+
+ if (value == NULL) {
+ newPtr = NULL;
+ } else {
+ newPtr = Tix_GetDItemType(interp, value);
+ if (newPtr == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ *ptr = newPtr;
+
+ return TCL_OK;
+}
+
+static char *DItemPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+ ClientData clientData;
+ Tk_Window tkwin;
+ char *widRec;
+ int offset;
+ Tcl_FreeProc **freeProcPtr;
+{
+ Tix_DItemInfo *diTypePtr = *((Tix_DItemInfo**)(widRec+offset));
+
+ if (diTypePtr != NULL) {
+ return diTypePtr->name;
+ } else {
+ return 0;
+ }
+}
+/*----------------------------------------------------------------------
+ *
+ *
+ * PRIVATE INTERFACE
+ *
+ *
+ * The following functions are called by display type implementors
+ *
+ *----------------------------------------------------------------------
+ */
+
+/* The priority is selected > disabled > active > normal */
+
+void
+TixGetColorDItemGC(iPtr, backGC_ret, foreGC_ret, anchorGC_ret, flags)
+ Tix_DItem * iPtr;
+ GC * backGC_ret;
+ GC * foreGC_ret;
+ GC * anchorGC_ret;
+ int flags;
+{
+ TixColorStyle * stylePtr = (TixColorStyle *) iPtr->base.stylePtr;
+ GC dummy;
+ int bg = 0;
+
+ if (backGC_ret == NULL) {
+ backGC_ret = &dummy;
+ }
+ if (foreGC_ret == NULL) {
+ foreGC_ret = &dummy;
+ }
+ if (anchorGC_ret == NULL) {
+ anchorGC_ret = &dummy;
+ }
+
+ if (flags & TIX_DITEM_SELECTED_FG) {
+ *foreGC_ret = stylePtr->colors[TIX_DITEM_SELECTED].foreGC;
+ }
+ else if (flags & TIX_DITEM_DISABLED_FG) {
+ *foreGC_ret = stylePtr->colors[TIX_DITEM_DISABLED].foreGC;
+ }
+ else if (flags & TIX_DITEM_ACTIVE_FG) {
+ *foreGC_ret = stylePtr->colors[TIX_DITEM_ACTIVE].foreGC;
+ }
+ else if (flags & TIX_DITEM_NORMAL_FG) {
+ *foreGC_ret = stylePtr->colors[TIX_DITEM_NORMAL].foreGC;
+ }
+ else {
+ *foreGC_ret = None;
+ }
+
+ if (flags & TIX_DITEM_SELECTED_BG) {
+ bg = TIX_DITEM_SELECTED;
+ } else if (flags & TIX_DITEM_DISABLED_BG) {
+ bg = TIX_DITEM_DISABLED;
+ } else if (flags & TIX_DITEM_ACTIVE_BG) {
+ bg = TIX_DITEM_ACTIVE;
+ } else if (flags & TIX_DITEM_NORMAL_BG) {
+ bg = TIX_DITEM_NORMAL;
+ } else {
+ bg = -1;
+ }
+
+ if (bg != -1) {
+ *backGC_ret = stylePtr->colors[bg].backGC;
+ } else {
+ *backGC_ret = None;
+ }
+
+
+ if ((flags & TIX_DITEM_ANCHOR) && (bg != -1)) {
+ *anchorGC_ret = stylePtr->colors[bg].anchorGC;
+ } else {
+ *anchorGC_ret = None;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixDItemGetAnchor --
+ *
+ * Calculate the position of the element according to its anchor
+ *----------------------------------------------------------------------
+ */
+void
+TixDItemGetAnchor(anchor, x, y, cav_w, cav_h, width, height, x_ret, y_ret)
+ Tk_Anchor anchor;
+ int x;
+ int y;
+ int cav_w;
+ int cav_h;
+ int width;
+ int height;
+ int * x_ret;
+ int * y_ret;
+{
+ if (width > cav_w) {
+ * x_ret = x;
+ } else {
+ int rem = cav_w - width;
+
+ switch (anchor) {
+ case TK_ANCHOR_NW: case TK_ANCHOR_W: case TK_ANCHOR_SW:
+ * x_ret = x;
+ break;
+ case TK_ANCHOR_N: case TK_ANCHOR_CENTER: case TK_ANCHOR_S:
+ * x_ret = x + rem/2;
+ break;
+ default:
+ * x_ret = x + rem;
+ }
+ }
+ if (height > cav_h) {
+ * y_ret = y;
+ }
+ else {
+ int rem = cav_h - height;
+ switch (anchor) {
+ case TK_ANCHOR_NW: case TK_ANCHOR_N: case TK_ANCHOR_NE:
+ * y_ret = y;
+ break;
+ case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E:
+ * y_ret = y + rem/2;
+ if ((rem % 2) == 1) {
+ /* Usually it looks better if we shift down one pixel
+ * if the hight of the region is an odd number of pixels
+ */
+ * y_ret += 1;
+ }
+ break;
+ default:
+ * y_ret = y + rem;
+ }
+ }
+}
+
+int
+Tix_DItemFillNormalBG(drawable, subRegPtr, iPtr, x, y, width, height,
+ xOffset, yOffset, flags)
+ Drawable drawable; /* Where to display this item */
+ TixpSubRegion *subRegPtr;
+ Tix_DItem * iPtr; /* Item to display */
+ int x; /* x pos of top-left corner of region
+ * to display item in */
+ int y; /* y pos of top-left corner of region */
+ int width; /* width of region */
+ int height; /* height of region */
+ int xOffset; /* X offset of item within region */
+ int yOffset; /* Y offset of item within region */
+ int flags; /* Controls how fg/bg/anchor lines are
+ * drawn */
+{
+ GC gc;
+
+ if ((flags & TIX_DITEM_NORMAL_BG) == 0) {
+ return 0;
+ }
+
+ if (width == iPtr->base.size[0] && height == iPtr->base.size[1] &&
+ xOffset == 0 && yOffset == 0 &&
+ (flags & TIX_DITEM_OTHER_BG) != 0) {
+ /*
+ * The background area will be filled by another bg color, so
+ * there's no need to fill it with NORMAL_BG here.
+ */
+
+ return 0;
+ }
+
+ gc = iPtr->base.stylePtr->colors[TIX_DITEM_NORMAL].backGC;
+ if (gc != None) {
+ TixpSubRegFillRectangle(iPtr->base.ddPtr->display, drawable,
+ gc, subRegPtr, x, y, width, height);
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_DItemDrawBackground --
+ *
+ * Display the background color of the item. The background and
+ * foreground of the item are displayed according to the flags
+ * parameter:
+ *
+ * If TIX_DITEM_NORMAL_BG is specified in flags, the entire {x, y,
+ * width, height} region is filled with the NORMAL_BG.
+ *
+ * If one of the following is specified, a filled highlight rect
+ * is drawn around the selectable area of the item.
+ *
+ * TIX_DITEM_ACTIVE_BG
+ * TIX_DITEM_SELECTED_BG
+ * TIX_DITEM_DISABLED_BG
+ *
+ * In addition, if TIX_DITEM_ANCHOR is specified in flags, an
+ * anchor rectangle is drawn around the selectable area of the
+ * item.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tix_DItemDrawBackground(drawable, subRegPtr, iPtr, x, y, width, height,
+ xOffset, yOffset, flags)
+ Drawable drawable; /* Where to display this item */
+ TixpSubRegion *subRegPtr;
+ Tix_DItem * iPtr; /* Item to display */
+ int x; /* x pos of top-left corner of region
+ * to display item in */
+ int y; /* y pos of top-left corner of region */
+ int width; /* width of region */
+ int height; /* height of region */
+ int xOffset; /* X offset of item within region */
+ int yOffset; /* Y offset of item within region */
+ int flags; /* Controls how fg/bg/anchor lines are
+ * drawn */
+{
+ Display * display = iPtr->base.ddPtr->display;
+ GC backGC, anchorGC;
+ int bodyX, bodyY, bodyW, bodyH;
+
+ TixGetColorDItemGC(iPtr, &backGC, NULL, &anchorGC, flags);
+
+ /*
+ * Fill the entire region with the normal background color first
+ * (if necessary).
+ */
+
+ Tix_DItemFillNormalBG(drawable, subRegPtr, iPtr, x, y, width, height,
+ xOffset, yOffset, flags);
+
+ /*
+ * Calculate the location of the item body.
+ */
+
+ TixDItemGetAnchor(iPtr->base.stylePtr->anchor, x, y, width, height,
+ iPtr->base.size[0], iPtr->base.size[1], &x, &y);
+
+ x += xOffset;
+ y += yOffset;
+
+ bodyX = x + iPtr->base.selX;
+ bodyY = y + iPtr->base.selY;
+ bodyW = iPtr->base.selW;
+ bodyH = iPtr->base.selH;
+
+ /*
+ * Fill the selected background and draw anchor lines only around
+ * the item body itself
+ */
+
+ if ((flags & TIX_DITEM_OTHER_BG) && (backGC != None)) {
+ TixpSubRegSetClip(display, subRegPtr, backGC);
+ TixpSubRegFillRectangle(display, drawable, backGC,
+ subRegPtr, bodyX, bodyY, bodyW, bodyH);
+ TixpSubRegUnsetClip(display, subRegPtr, backGC);
+ }
+
+ if (anchorGC != None) {
+ TixpSubRegSetClip(display, subRegPtr, anchorGC);
+ TixpSubRegDrawAnchorLines(display, drawable,
+ anchorGC, subRegPtr, bodyX, bodyY, bodyW, bodyH);
+ TixpSubRegUnsetClip(display, subRegPtr, anchorGC);
+ }
+}
Added: external/tix-8.4.2.x/generic/tixDef.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDef.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,69 @@
+/*
+ * tixDef.h --
+ *
+ * This file defines the defaults for all options for all of
+ * the Tix widgets.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDef.h,v 1.6 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#ifndef TIX_DEFAULT
+#define TIX_DEFAULT
+
+/*
+ * 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"
+
+#if defined(__WIN32__) || defined(_WIN32)
+
+/*
+ * Defaults from Tk
+ */
+
+#define CTL_FONT "{MS Sans Serif} 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"
+
+# include <tixWinDefault.h>
+#else
+# if defined(MAC_TCL)
+# include <tixMacDefault.h>
+# else
+
+#define NORMAL_BG "#d9d9d9"
+#define ACTIVE_BG "#ececec"
+#define SELECT_BG "#c3c3c3"
+#define TROUGH "#c3c3c3"
+#define INDICATOR "#b03060"
+#define DISABLED "#a3a3a3"
+
+# include <tixUnixDefault.h>
+# endif
+#endif
+
+#endif /* TIX_DEFAULT */
Added: external/tix-8.4.2.x/generic/tixDiITxt.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDiITxt.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,839 @@
+/*
+ * tixDiITxt.c --
+ *
+ * This file implements one of the "Display Items" in the Tix library :
+ * Image-text display items.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDiITxt.c,v 1.6 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tk.h>
+#include <tixInt.h>
+#include <tixDef.h>
+
+#define DEF_IMAGETEXTITEM_BITMAP ""
+#define DEF_IMAGETEXTITEM_IMAGE ""
+#define DEF_IMAGETEXTITEM_TYPE "imagetext"
+#define DEF_IMAGETEXTITEM_SHOWIMAGE "1"
+#define DEF_IMAGETEXTITEM_SHOWTEXT "1"
+#define DEF_IMAGETEXTITEM_STYLE ""
+#define DEF_IMAGETEXTITEM_TEXT ""
+#define DEF_IMAGETEXTITEM_UNDERLINE "-1"
+
+static Tk_ConfigSpec imageTextItemConfigSpecs[] = {
+
+ {TK_CONFIG_BITMAP, "-bitmap", "bitmap", "Bitmap",
+ DEF_IMAGETEXTITEM_BITMAP, Tk_Offset(TixImageTextItem, bitmap),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-image", "image", "Image",
+ DEF_IMAGETEXTITEM_IMAGE, Tk_Offset(TixImageTextItem, imageString),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_IMAGETEXTITEM_TYPE, Tk_Offset(TixImageTextItem, diTypePtr),
+ 0, &tixConfigItemType},
+
+ {TK_CONFIG_INT, "-showimage", "showImage", "ShowImage",
+ DEF_IMAGETEXTITEM_SHOWIMAGE, Tk_Offset(TixImageTextItem, showImage), 0},
+
+ {TK_CONFIG_INT, "-showtext", "showText", "ShowText",
+ DEF_IMAGETEXTITEM_SHOWTEXT, Tk_Offset(TixImageTextItem, showText), 0},
+
+ {TK_CONFIG_CUSTOM, "-style", "imageTextStyle", "ImageTextStyle",
+ DEF_IMAGETEXTITEM_STYLE, Tk_Offset(TixImageTextItem, stylePtr),
+ TK_CONFIG_NULL_OK, &tixConfigItemStyle},
+
+ {TK_CONFIG_STRING, "-text", "text", "Text",
+ DEF_IMAGETEXTITEM_TEXT, Tk_Offset(TixImageTextItem, text),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_INT, "-underline", "underline", "Underline",
+ DEF_IMAGETEXTITEM_UNDERLINE, Tk_Offset(TixImageTextItem, underline), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ *
+ * Configuration options for Text Styles
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define DEF_IMAGETEXTSTYLE_NORMAL_FG_COLOR NORMAL_FG
+#define DEF_IMAGETEXTSTYLE_NORMAL_FG_MONO BLACK
+#define DEF_IMAGETEXTSTYLE_NORMAL_BG_COLOR TIX_EDITOR_BG
+#define DEF_IMAGETEXTSTYLE_NORMAL_BG_MONO WHITE
+
+#define DEF_IMAGETEXTSTYLE_ACTIVE_FG_COLOR NORMAL_FG
+#define DEF_IMAGETEXTSTYLE_ACTIVE_FG_MONO WHITE
+#define DEF_IMAGETEXTSTYLE_ACTIVE_BG_COLOR TIX_EDITOR_BG
+#define DEF_IMAGETEXTSTYLE_ACTIVE_BG_MONO BLACK
+
+#define DEF_IMAGETEXTSTYLE_SELECTED_FG_COLOR SELECT_FG
+#define DEF_IMAGETEXTSTYLE_SELECTED_FG_MONO WHITE
+#define DEF_IMAGETEXTSTYLE_SELECTED_BG_COLOR SELECT_BG
+#define DEF_IMAGETEXTSTYLE_SELECTED_BG_MONO BLACK
+
+#define DEF_IMAGETEXTSTYLE_DISABLED_FG_COLOR BLACK
+#define DEF_IMAGETEXTSTYLE_DISABLED_FG_MONO BLACK
+#define DEF_IMAGETEXTSTYLE_DISABLED_BG_COLOR TIX_EDITOR_BG
+#define DEF_IMAGETEXTSTYLE_DISABLED_BG_MONO WHITE
+
+#define DEF_IMAGETEXTSTYLE_FONT CTL_FONT
+#define DEF_IMAGETEXTSTYLE_GAP "4"
+#define DEF_IMAGETEXTSTYLE_PADX "2"
+#define DEF_IMAGETEXTSTYLE_PADY "2"
+#define DEF_IMAGETEXTSTYLE_JUSTIFY "left"
+#define DEF_IMAGETEXTSTYLE_WLENGTH "0"
+#define DEF_IMAGETEXTSTYLE_ANCHOR "w"
+
+
+static Tk_ConfigSpec imageTextStyleConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
+ DEF_IMAGETEXTSTYLE_ANCHOR, Tk_Offset(TixImageTextStyle, anchor), 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_IMAGETEXTSTYLE_FONT, Tk_Offset(TixImageTextStyle, font), 0},
+
+ {TK_CONFIG_PIXELS, "-gap", "gap", "Gap",
+ DEF_IMAGETEXTSTYLE_GAP, Tk_Offset(TixImageTextStyle, gap), 0},
+
+ {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justyfy",
+ DEF_IMAGETEXTSTYLE_JUSTIFY, Tk_Offset(TixImageTextStyle, justify),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_IMAGETEXTSTYLE_PADX, Tk_Offset(TixImageTextStyle, pad[0]), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_IMAGETEXTSTYLE_PADY, Tk_Offset(TixImageTextStyle, pad[1]), 0},
+
+ {TK_CONFIG_PIXELS, "-wraplength", "wrapLength", "WrapLength",
+ DEF_IMAGETEXTSTYLE_WLENGTH, Tk_Offset(TixImageTextStyle, wrapLength),
+ 0},
+
+/* The following is automatically generated */
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_IMAGETEXTSTYLE_NORMAL_BG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_IMAGETEXTSTYLE_NORMAL_BG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_IMAGETEXTSTYLE_NORMAL_FG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_IMAGETEXTSTYLE_NORMAL_FG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_IMAGETEXTSTYLE_ACTIVE_BG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_IMAGETEXTSTYLE_ACTIVE_BG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_IMAGETEXTSTYLE_ACTIVE_FG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_IMAGETEXTSTYLE_ACTIVE_FG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_IMAGETEXTSTYLE_SELECTED_BG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_IMAGETEXTSTYLE_SELECTED_BG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_IMAGETEXTSTYLE_SELECTED_FG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_IMAGETEXTSTYLE_SELECTED_FG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_IMAGETEXTSTYLE_DISABLED_BG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_IMAGETEXTSTYLE_DISABLED_BG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_IMAGETEXTSTYLE_DISABLED_FG_COLOR,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_IMAGETEXTSTYLE_DISABLED_FG_MONO,
+ Tk_Offset(TixImageTextStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ * Forward declarations for procedures defined later in this file:
+ *----------------------------------------------------------------------
+ */
+static void ImageProc _ANSI_ARGS_((ClientData clientData,
+ int x, int y, int width, int height,
+ int imgWidth, int imgHeight));
+static void Tix_ImageTextItemCalculateSize _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static char * Tix_ImageTextItemComponent _ANSI_ARGS_((
+ Tix_DItem * iPtr, int x, int y));
+static int Tix_ImageTextItemConfigure _ANSI_ARGS_((
+ Tix_DItem * iPtr, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItem * Tix_ImageTextItemCreate _ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr));
+static void Tix_ImageTextItemDisplay _ANSI_ARGS_((
+ Drawable drawable, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flag));
+static void Tix_ImageTextItemFree _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_ImageTextItemLostStyle _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_ImageTextItemStyleChanged _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static int Tix_ImageTextStyleConfigure _ANSI_ARGS_((
+ Tix_DItemStyle* style, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItemStyle * Tix_ImageTextStyleCreate _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ Tix_DItemInfo * diTypePtr, char * name));
+static void Tix_ImageTextStyleFree _ANSI_ARGS_((
+ Tix_DItemStyle* style));
+static void Tix_ImageTextStyleSetTemplate _ANSI_ARGS_((
+ Tix_DItemStyle* style,
+ Tix_StyleTemplate * tmplPtr));
+
+Tix_DItemInfo tix_ImageTextItemType = {
+ "imagetext", /* type */
+ TIX_DITEM_IMAGETEXT,
+ Tix_ImageTextItemCreate, /* createProc */
+ Tix_ImageTextItemConfigure,
+ Tix_ImageTextItemCalculateSize,
+ Tix_ImageTextItemComponent,
+ Tix_ImageTextItemDisplay,
+ Tix_ImageTextItemFree,
+ Tix_ImageTextItemStyleChanged,
+ Tix_ImageTextItemLostStyle,
+
+ Tix_ImageTextStyleCreate,
+ Tix_ImageTextStyleConfigure,
+ Tix_ImageTextStyleFree,
+ Tix_ImageTextStyleSetTemplate,
+
+ imageTextItemConfigSpecs,
+ imageTextStyleConfigSpecs,
+ NULL, /*next */
+};
+
+
+/*----------------------------------------------------------------------
+ * Tix_ImageText --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_DItem * Tix_ImageTextItemCreate(ddPtr, diTypePtr)
+ Tix_DispData * ddPtr;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixImageTextItem * itPtr;
+
+ itPtr = (TixImageTextItem*) ckalloc(sizeof(TixImageTextItem));
+
+ itPtr->diTypePtr = diTypePtr;
+ itPtr->ddPtr = ddPtr;
+ itPtr->stylePtr = NULL;
+ itPtr->clientData = 0;
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+
+ itPtr->bitmap = None;
+ itPtr->bitmapW = 0;
+ itPtr->bitmapH = 0;
+
+ itPtr->imageString = NULL;
+ itPtr->image = NULL;
+ itPtr->imageW = 0;
+ itPtr->imageH = 0;
+
+ itPtr->numChars = 0; /* TODO: this is currently not used */
+ itPtr->text = NULL;
+ itPtr->textW = 0;
+ itPtr->textH = 0;
+ itPtr->underline = -1;
+
+ itPtr->showImage = 1;
+ itPtr->showText = 1;
+
+ return (Tix_DItem *)itPtr;
+}
+
+static void Tix_ImageTextItemFree(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageTextItem * itPtr = (TixImageTextItem *) iPtr;
+
+ if (itPtr->image) {
+ Tk_FreeImage(itPtr->image);
+ }
+ if (itPtr->stylePtr) {
+ TixDItemStyleFree(iPtr, (Tix_DItemStyle*)itPtr->stylePtr);
+ }
+
+ Tk_FreeOptions(imageTextItemConfigSpecs, (char *)itPtr,
+ itPtr->ddPtr->display, 0);
+ ckfree((char*)itPtr);
+}
+
+static int Tix_ImageTextItemConfigure(iPtr, argc, argv, flags)
+ Tix_DItem * iPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixImageTextItem * itPtr = (TixImageTextItem *) iPtr;
+ TixImageTextStyle * oldStyle = itPtr->stylePtr;
+
+ if (Tk_ConfigureWidget(itPtr->ddPtr->interp, itPtr->ddPtr->tkwin,
+ imageTextItemConfigSpecs,
+ argc, argv, (char *)itPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (itPtr->stylePtr == NULL) {
+ itPtr->stylePtr = (TixImageTextStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_ImageTextItemType, iPtr, NULL);
+ }
+
+ /*
+ * Free the old images for the widget, if there were any.
+ */
+ if (itPtr->image != NULL) {
+ Tk_FreeImage(itPtr->image);
+ itPtr->image = NULL;
+ }
+
+ if (itPtr->imageString != NULL) {
+ itPtr->image = Tk_GetImage(itPtr->ddPtr->interp, itPtr->ddPtr->tkwin,
+ itPtr->imageString, ImageProc, (ClientData) itPtr);
+ if (itPtr->image == NULL) {
+ return TCL_ERROR;
+ }
+ }
+
+ if (oldStyle != NULL && itPtr->stylePtr != oldStyle) {
+ Tix_ImageTextItemStyleChanged(iPtr);
+ }
+ else {
+ Tix_ImageTextItemCalculateSize((Tix_DItem*)itPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_ImageTextItemDisplay --
+ *
+ * Display an imagetext item. {x, y, width, height} specifies a
+ * region for to display this item in. {xOffset, yOffset} gives
+ * the offset of the top-left corner of the text item relative
+ * to the top-left corder of the region.
+ *
+ * Background and foreground of the item are displayed according
+ * to the flags parameter.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+Tix_ImageTextItemDisplay(drawable, iPtr, x, y, width, height,
+ xOffset, yOffset, flags)
+ Drawable drawable; /* Where to display this item */
+ Tix_DItem * iPtr; /* Item to display */
+ int x; /* x pos of top-left corner of region
+ * to display item in */
+ int y; /* y pos of top-left corner of region */
+ int width; /* width of region */
+ int height; /* height of region */
+ int xOffset; /* X offset of item within region */
+ int yOffset; /* Y offset of item within region */
+ int flags; /* Controls how fg/bg/anchor lines are
+ * drawn */
+{
+ TixImageTextItem *itPtr = (TixImageTextItem *)iPtr;
+ GC foreGC, bitmapGC;
+ TixpSubRegion subReg;
+ Display * display = itPtr->ddPtr->display;
+
+ if ((width <= 0) || (height <= 0)) {
+ return;
+ }
+
+ TixGetColorDItemGC(iPtr, NULL, &foreGC, NULL, flags);
+
+ TixpStartSubRegionDraw(display, drawable, foreGC,
+ &subReg, 0, 0, x, y, width, height,
+ itPtr->size[0] + xOffset, itPtr->size[1] + yOffset);
+
+ Tix_DItemDrawBackground(drawable, &subReg, iPtr, x, y, width, height,
+ xOffset, yOffset, flags);
+
+ /*
+ * Calculate the location of the item body according to anchor settings.
+ */
+
+ TixDItemGetAnchor(iPtr->base.stylePtr->anchor, x, y, width, height,
+ iPtr->base.size[0], iPtr->base.size[1], &x, &y);
+
+ x += xOffset;
+ y += yOffset;
+
+ /*
+ * Draw the foreground items
+ */
+
+ if (itPtr->image != NULL) {
+ int bitY;
+
+ bitY = itPtr->size[1] - itPtr->imageH - 2*itPtr->stylePtr->pad[1];
+
+ if (bitY > 0) {
+ bitY = bitY / 2 + (bitY %2);
+ } else {
+ bitY = 0;
+ }
+ if (itPtr->showImage && foreGC != None) {
+ TixpSubRegDrawImage(&subReg, itPtr->image, 0, 0,
+ itPtr->imageW, itPtr->imageH, drawable,
+ x + itPtr->stylePtr->pad[0],
+ y + itPtr->stylePtr->pad[1] + bitY);
+ }
+ x += itPtr->imageW + itPtr->stylePtr->gap;
+ }
+ else if (itPtr->bitmap != None) {
+ int bitY;
+
+ bitY = itPtr->size[1] - itPtr->bitmapH - 2*itPtr->stylePtr->pad[1];
+ if (bitY > 0) {
+ bitY = bitY / 2 + (bitY %2);
+ } else {
+ bitY = 0;
+ }
+
+ if (itPtr->showImage && foreGC != None) {
+ if ((flags & TIX_DITEM_ALL_BG) != 0) {
+ /*
+ * If we draw the background, the bitmap is never
+ * displayed as selected, so we choose the normal GC.
+ */
+
+ bitmapGC = itPtr->stylePtr->colors[TIX_DITEM_NORMAL].foreGC;
+ } else {
+ /*
+ * The caller has already drawn the background. foreGC
+ * is the most compatible GC to be used with the background.
+ */
+
+ bitmapGC = foreGC;
+ }
+
+ TixpSubRegDrawBitmap(display, drawable, bitmapGC,
+ &subReg, itPtr->bitmap, 0, 0,
+ itPtr->bitmapW, itPtr->bitmapH,
+ x + itPtr->stylePtr->pad[0],
+ y + itPtr->stylePtr->pad[1] + bitY,
+ 1);
+ }
+ x += itPtr->bitmapW + itPtr->stylePtr->gap;
+ }
+
+ if (itPtr->text && itPtr->showText && foreGC != None) {
+ int textY;
+
+ textY = itPtr->size[1] - itPtr->textH - 2*itPtr->stylePtr->pad[1];
+ if (textY > 0) {
+ textY = textY / 2 + (textY %2);
+ } else {
+ textY = 0;
+ }
+
+ TixpSubRegDisplayText(display, drawable, foreGC, &subReg,
+ itPtr->stylePtr->font, itPtr->text, -1,
+ x + itPtr->stylePtr->pad[0],
+ y + itPtr->stylePtr->pad[1] + textY,
+ itPtr->textW,
+ itPtr->stylePtr->justify,
+ itPtr->underline);
+ }
+
+ TixpEndSubRegionDraw(display, drawable, foreGC,
+ &subReg);
+}
+
+static void
+Tix_ImageTextItemCalculateSize(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageTextItem *itPtr = (TixImageTextItem *)iPtr;
+ char * text;
+
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+
+ /*
+ * Note: the size of the image or the text are used even when
+ * the showImage or showText options are off. These two options are
+ * used to "blank" the respective components temporarily without
+ * affecting the geometry of the ditem. The main is to indicate
+ * transfer during drag+drop.
+ *
+ * If you want the image or text to completely disappear, config them
+ * to NULL
+ */
+
+ if (itPtr->image != NULL) {
+ Tk_SizeOfImage(itPtr->image, &itPtr->imageW, &itPtr->imageH);
+
+ itPtr->size[0] = itPtr->imageW + itPtr->stylePtr->gap;
+ itPtr->size[1] = itPtr->imageH;
+ }
+ else if (itPtr->bitmap != None) {
+ Tk_SizeOfBitmap(itPtr->ddPtr->display, itPtr->bitmap, &itPtr->bitmapW,
+ &itPtr->bitmapH);
+
+ itPtr->size[0] = itPtr->bitmapW + itPtr->stylePtr->gap;
+ itPtr->size[1] = itPtr->bitmapH;
+ }
+
+ text = itPtr->text;
+ if (text == NULL || text[0] == '\0') {
+ /*
+ * Use one space character so that the height of the item
+ * would be the same as a regular small item, and the width
+ * of the item won't be too tiny.
+ */
+
+ text = " ";
+ }
+
+ TixComputeTextGeometry(itPtr->stylePtr->font, text,
+ -1, itPtr->stylePtr->wrapLength,
+ &itPtr->textW, &itPtr->textH);
+
+ itPtr->size[0] += itPtr->textW;
+
+ if (itPtr->textH > itPtr->size[1]) {
+ itPtr->size[1] = itPtr->textH;
+ }
+
+ itPtr->size[0] += 2*itPtr->stylePtr->pad[0];
+ itPtr->size[1] += 2*itPtr->stylePtr->pad[1];
+
+ itPtr->selX = 0;
+ itPtr->selY = 0;
+ itPtr->selW = itPtr->size[0];
+ itPtr->selH = itPtr->size[1];
+
+ if (itPtr->image != NULL) {
+ itPtr->selX = itPtr->imageW + itPtr->stylePtr->gap;
+ itPtr->selW -= itPtr->selX;
+ } else if (itPtr->bitmap != None) {
+ itPtr->selX = itPtr->bitmapW + itPtr->stylePtr->gap;
+ itPtr->selW -= itPtr->selX;
+ }
+}
+
+static char * Tix_ImageTextItemComponent(iPtr, x, y)
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+{
+ /* TODO: Unimplemented */
+#if 0
+ TixImageTextItem *itPtr = (TixImageTextItem *)iPtr;
+#endif
+
+ static char * body = "body";
+
+ return body;
+}
+
+
+static void Tix_ImageTextItemStyleChanged(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageTextItem *itPtr = (TixImageTextItem *)iPtr;
+
+ if (itPtr->stylePtr == NULL) {
+ /* Maybe we haven't set the style to default style yet */
+ return;
+ }
+ Tix_ImageTextItemCalculateSize(iPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc(iPtr);
+ }
+}
+static void Tix_ImageTextItemLostStyle(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageTextItem *itPtr = (TixImageTextItem *)iPtr;
+
+ itPtr->stylePtr = (TixImageTextStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_ImageTextItemType, iPtr, NULL);
+
+ Tix_ImageTextItemStyleChanged(iPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImageProc --
+ *
+ * This procedure is invoked by the image code whenever the manager
+ * for an image does something that affects the size of contents
+ * of an image displayed in this widget.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Arranges for the HList to get redisplayed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImageProc(clientData, x, y, width, height, imgWidth, imgHeight)
+ ClientData clientData; /* Pointer to widget record. */
+ int x, y; /* Upper left pixel (within image)
+ * that must be redisplayed. */
+ int width, height; /* Dimensions of area to redisplay
+ * (may be <= 0). */
+ int imgWidth, imgHeight; /* New dimensions of image. */
+{
+ TixImageTextItem *itPtr = (TixImageTextItem *)clientData;
+
+ Tix_ImageTextItemCalculateSize((Tix_DItem *)itPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc((Tix_DItem *)itPtr);
+ }
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * Display styles
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+static Tix_DItemStyle *
+Tix_ImageTextStyleCreate(interp, tkwin, diTypePtr, name)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ char * name;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixImageTextStyle * stylePtr =
+ (TixImageTextStyle *)ckalloc(sizeof(TixImageTextStyle));
+
+ stylePtr->font = NULL;
+ stylePtr->gap = 0;
+ stylePtr->justify = TK_JUSTIFY_LEFT;
+ stylePtr->wrapLength = 0;
+
+ return (Tix_DItemStyle *)stylePtr;
+}
+
+static int
+Tix_ImageTextStyleConfigure(style, argc, argv, flags)
+ Tix_DItemStyle *style;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixImageTextStyle * stylePtr = (TixImageTextStyle *)style;
+ XGCValues gcValues;
+ GC newGC;
+ int i, isNew;
+
+ if (stylePtr->font == NULL) {
+ isNew = 1;
+ } else {
+ isNew = 0;
+ }
+
+ /*
+ * TODO: gap, wrapLength, etc changes: need to call TixDItemStyleChanged
+ */
+
+ if (!(flags &TIX_DONT_CALL_CONFIG)) {
+ if (Tk_ConfigureWidget(stylePtr->interp, stylePtr->tkwin,
+ imageTextStyleConfigSpecs,
+ argc, argv, (char *)stylePtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ gcValues.font = TixFontId(stylePtr->font);
+ gcValues.graphics_exposures = False;
+
+ for (i=0; i<4; i++) {
+ /*
+ * Foreground GC
+ */
+
+ gcValues.background = stylePtr->colors[i].bg->pixel;
+ gcValues.foreground = stylePtr->colors[i].fg->pixel;
+ newGC = Tk_GetGC(stylePtr->tkwin,
+ GCFont|GCForeground|GCBackground|GCGraphicsExposures, &gcValues);
+
+ if (stylePtr->colors[i].foreGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].foreGC);
+ }
+ stylePtr->colors[i].foreGC = newGC;
+
+ /*
+ * Background GC
+ */
+
+ gcValues.foreground = stylePtr->colors[i].bg->pixel;
+ newGC = Tk_GetGC(stylePtr->tkwin,
+ GCFont|GCForeground|GCGraphicsExposures, &gcValues);
+
+ if (stylePtr->colors[i].backGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].backGC);
+ }
+ stylePtr->colors[i].backGC = newGC;
+
+ /*
+ * Anchor GC
+ */
+
+ newGC = Tix_GetAnchorGC(stylePtr->tkwin,
+ stylePtr->colors[i].bg);
+
+ if (stylePtr->colors[i].anchorGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].anchorGC);
+ }
+ stylePtr->colors[i].anchorGC = newGC;
+ }
+
+ if (!isNew) {
+ TixDItemStyleChanged(stylePtr->diTypePtr, (Tix_DItemStyle *)stylePtr);
+ }
+
+ return TCL_OK;
+}
+
+static void Tix_ImageTextStyleFree(style)
+ Tix_DItemStyle *style;
+{
+ TixImageTextStyle * stylePtr = (TixImageTextStyle *)style;
+
+ Tk_FreeOptions(imageTextStyleConfigSpecs, (char *)stylePtr,
+ Tk_Display(stylePtr->tkwin), 0);
+ ckfree((char *)stylePtr);
+}
+
+static int bg_flags [4] = {
+ TIX_DITEM_NORMAL_BG,
+ TIX_DITEM_ACTIVE_BG,
+ TIX_DITEM_SELECTED_BG,
+ TIX_DITEM_DISABLED_BG
+};
+static int fg_flags [4] = {
+ TIX_DITEM_NORMAL_FG,
+ TIX_DITEM_ACTIVE_FG,
+ TIX_DITEM_SELECTED_FG,
+ TIX_DITEM_DISABLED_FG
+};
+
+static void
+Tix_ImageTextStyleSetTemplate(style, tmplPtr)
+ Tix_DItemStyle* style;
+ Tix_StyleTemplate * tmplPtr;
+{
+ TixImageTextStyle * stylePtr = (TixImageTextStyle *)style;
+ int i;
+
+ if (tmplPtr->flags & TIX_DITEM_FONT) {
+ if (stylePtr->font != NULL) {
+ TixFreeFont(stylePtr->font);
+ }
+ stylePtr->font = TixGetFont(
+ stylePtr->interp, stylePtr->tkwin,
+ TixNameOfFont(tmplPtr->font));
+ }
+ if (tmplPtr->flags & TIX_DITEM_PADX) {
+ stylePtr->pad[0] = tmplPtr->pad[0];
+ }
+ if (tmplPtr->flags & TIX_DITEM_PADY) {
+ stylePtr->pad[1] = tmplPtr->pad[1];
+ }
+
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & bg_flags[i]) {
+ if (stylePtr->colors[i].bg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].bg);
+ }
+ stylePtr->colors[i].bg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].bg));
+ }
+ }
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & fg_flags[i]) {
+ if (stylePtr->colors[i].fg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].fg);
+ }
+ stylePtr->colors[i].fg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].fg));
+ }
+ }
+
+ Tix_ImageTextStyleConfigure(style, 0, 0, TIX_DONT_CALL_CONFIG);
+}
Added: external/tix-8.4.2.x/generic/tixDiImg.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDiImg.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,623 @@
+/*
+ * tixDiImgTxt.c --
+ *
+ * This file implements one of the "Display Items" in the Tix library :
+ * Image-text display items.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDiImg.c,v 1.4 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+
+/*
+ * If the item has a really small text, or no text at all, use
+ * this size. This makes the drawing of selection more sane.
+ */
+
+#define MIN_IMAGE_WIDTH 2
+#define MIN_IMAGE_HEIGHT 2
+
+#define DEF_IMAGEITEM_BITMAP ""
+#define DEF_IMAGEITEM_IMAGE ""
+#define DEF_IMAGEITEM_TYPE "image"
+#define DEF_IMAGEITEM_SHOWIMAGE "1"
+#define DEF_IMAGEITEM_SHOWTEXT "1"
+#define DEF_IMAGEITEM_STYLE ""
+#define DEF_IMAGEITEM_TEXT ""
+#define DEF_IMAGEITEM_UNDERLINE "-1"
+
+static Tk_ConfigSpec imageItemConfigSpecs[] = {
+
+ {TK_CONFIG_STRING, "-image", "image", "Image",
+ DEF_IMAGEITEM_IMAGE, Tk_Offset(TixImageItem, imageString),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_IMAGEITEM_TYPE, Tk_Offset(TixImageItem, diTypePtr),
+ 0, &tixConfigItemType},
+
+ {TK_CONFIG_CUSTOM, "-style", "imageStyle", "ImageStyle",
+ DEF_IMAGEITEM_STYLE, Tk_Offset(TixImageItem, stylePtr),
+ TK_CONFIG_NULL_OK, &tixConfigItemStyle},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ *
+ * Configuration options for Text Styles
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define DEF_IMAGESTYLE_NORMAL_FG_COLOR NORMAL_FG
+#define DEF_IMAGESTYLE_NORMAL_FG_MONO BLACK
+#define DEF_IMAGESTYLE_NORMAL_BG_COLOR TIX_EDITOR_BG
+#define DEF_IMAGESTYLE_NORMAL_BG_MONO WHITE
+
+#define DEF_IMAGESTYLE_ACTIVE_FG_COLOR NORMAL_FG
+#define DEF_IMAGESTYLE_ACTIVE_FG_MONO WHITE
+#define DEF_IMAGESTYLE_ACTIVE_BG_COLOR TIX_EDITOR_BG
+#define DEF_IMAGESTYLE_ACTIVE_BG_MONO BLACK
+
+#define DEF_IMAGESTYLE_SELECTED_FG_COLOR SELECT_FG
+#define DEF_IMAGESTYLE_SELECTED_FG_MONO WHITE
+#define DEF_IMAGESTYLE_SELECTED_BG_COLOR SELECT_BG
+#define DEF_IMAGESTYLE_SELECTED_BG_MONO BLACK
+
+#define DEF_IMAGESTYLE_DISABLED_FG_COLOR NORMAL_FG
+#define DEF_IMAGESTYLE_DISABLED_FG_MONO BLACK
+#define DEF_IMAGESTYLE_DISABLED_BG_COLOR TIX_EDITOR_BG
+#define DEF_IMAGESTYLE_DISABLED_BG_MONO WHITE
+
+#define DEF_IMAGESTYLE_PADX "0"
+#define DEF_IMAGESTYLE_PADY "0"
+#define DEF_IMAGESTYLE_ANCHOR "w"
+
+
+static Tk_ConfigSpec imageStyleConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
+ DEF_IMAGESTYLE_ANCHOR, Tk_Offset(TixImageStyle, anchor), 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_IMAGESTYLE_PADX, Tk_Offset(TixImageStyle, pad[0]), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_IMAGESTYLE_PADY, Tk_Offset(TixImageStyle, pad[1]), 0},
+
+/* The following was automatically generated */
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_IMAGESTYLE_NORMAL_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_IMAGESTYLE_NORMAL_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_IMAGESTYLE_NORMAL_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_IMAGESTYLE_NORMAL_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_IMAGESTYLE_ACTIVE_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_IMAGESTYLE_ACTIVE_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_IMAGESTYLE_ACTIVE_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_IMAGESTYLE_ACTIVE_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_IMAGESTYLE_SELECTED_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_IMAGESTYLE_SELECTED_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_IMAGESTYLE_SELECTED_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_IMAGESTYLE_SELECTED_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_IMAGESTYLE_DISABLED_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_IMAGESTYLE_DISABLED_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_IMAGESTYLE_DISABLED_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_IMAGESTYLE_DISABLED_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ * Forward declarations for procedures defined later in this file:
+ *----------------------------------------------------------------------
+ */
+static void ImageProc _ANSI_ARGS_((ClientData clientData,
+ int x, int y, int width, int height,
+ int imgWidth, int imgHeight));
+static void Tix_ImageItemCalculateSize _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static char * Tix_ImageItemComponent _ANSI_ARGS_((
+ Tix_DItem * iPtr, int x, int y));
+static int Tix_ImageItemConfigure _ANSI_ARGS_((
+ Tix_DItem * iPtr, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItem * Tix_ImageItemCreate _ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr));
+static void Tix_ImageItemDisplay _ANSI_ARGS_((
+ Drawable drawable, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flag));
+static void Tix_ImageItemFree _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_ImageItemLostStyle _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_ImageItemStyleChanged _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static int Tix_ImageStyleConfigure _ANSI_ARGS_((
+ Tix_DItemStyle* style, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItemStyle * Tix_ImageStyleCreate _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ Tix_DItemInfo * diTypePtr, char * name));
+static void Tix_ImageStyleFree _ANSI_ARGS_((
+ Tix_DItemStyle* style));
+static void Tix_ImageStyleSetTemplate _ANSI_ARGS_((
+ Tix_DItemStyle* style,
+ Tix_StyleTemplate * tmplPtr));
+
+Tix_DItemInfo tix_ImageItemType = {
+ "image", /* type */
+ TIX_DITEM_IMAGE,
+ Tix_ImageItemCreate, /* createProc */
+ Tix_ImageItemConfigure,
+ Tix_ImageItemCalculateSize,
+ Tix_ImageItemComponent,
+ Tix_ImageItemDisplay,
+ Tix_ImageItemFree,
+ Tix_ImageItemStyleChanged,
+ Tix_ImageItemLostStyle,
+
+ Tix_ImageStyleCreate, /* styleCreateProc */
+ Tix_ImageStyleConfigure,
+ Tix_ImageStyleFree,
+ Tix_ImageStyleSetTemplate,
+
+ imageItemConfigSpecs,
+ imageStyleConfigSpecs,
+ NULL, /*next */
+};
+
+
+/*----------------------------------------------------------------------
+ * Tix_Image --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_DItem * Tix_ImageItemCreate(ddPtr, diTypePtr)
+ Tix_DispData * ddPtr;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixImageItem * itPtr;
+
+ itPtr = (TixImageItem*) ckalloc(sizeof(TixImageItem));
+
+ itPtr->diTypePtr = diTypePtr;
+ itPtr->ddPtr = ddPtr;
+ itPtr->stylePtr = NULL;
+ itPtr->clientData = 0;
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+
+ itPtr->imageString = NULL;
+ itPtr->image = NULL;
+ itPtr->imageW = 0;
+ itPtr->imageH = 0;
+
+ return (Tix_DItem *)itPtr;
+}
+
+static void Tix_ImageItemFree(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageItem * itPtr = (TixImageItem *) iPtr;
+
+ if (itPtr->image) {
+ Tk_FreeImage(itPtr->image);
+ }
+ if (itPtr->stylePtr) {
+ TixDItemStyleFree(iPtr, (Tix_DItemStyle*)itPtr->stylePtr);
+ }
+
+ Tk_FreeOptions(imageItemConfigSpecs, (char *)itPtr,
+ itPtr->ddPtr->display, 0);
+ ckfree((char*)itPtr);
+}
+
+static int Tix_ImageItemConfigure(iPtr, argc, argv, flags)
+ Tix_DItem * iPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixImageItem * itPtr = (TixImageItem *) iPtr;
+ TixImageStyle * oldStyle = itPtr->stylePtr;
+
+ if (Tk_ConfigureWidget(itPtr->ddPtr->interp, itPtr->ddPtr->tkwin,
+ imageItemConfigSpecs,
+ argc, argv, (char *)itPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (itPtr->stylePtr == NULL) {
+ itPtr->stylePtr = (TixImageStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_ImageItemType, iPtr, NULL);
+ }
+
+ /*
+ * Free the old images for the widget, if there were any.
+ */
+ if (itPtr->image != NULL) {
+ Tk_FreeImage(itPtr->image);
+ itPtr->image = NULL;
+ }
+
+ if (itPtr->imageString != NULL) {
+ itPtr->image = Tk_GetImage(itPtr->ddPtr->interp, itPtr->ddPtr->tkwin,
+ itPtr->imageString, ImageProc, (ClientData) itPtr);
+ if (itPtr->image == NULL) {
+ return TCL_ERROR;
+ }
+ }
+
+ if (oldStyle != NULL && itPtr->stylePtr != oldStyle) {
+ Tix_ImageItemStyleChanged(iPtr);
+ }
+ else {
+ Tix_ImageItemCalculateSize((Tix_DItem*)itPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_ImageItemDisplay --
+ *
+ * Display an image item. {x, y, width, height} specifies a
+ * region for to display this item in. {xOffset, yOffset} gives
+ * the offset of the top-left corner of the image item relative
+ * to the top-left corder of the region.
+ *
+ * Background and foreground of the item are displayed according
+ * to the flags parameter.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+Tix_ImageItemDisplay(drawable, iPtr, x, y, width, height, xOffset, yOffset,
+ flags)
+ Drawable drawable;
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+ int width;
+ int height;
+ int flags;
+{
+ TixImageItem *itPtr = (TixImageItem *)iPtr;
+ Display * display = itPtr->ddPtr->display;
+ TixpSubRegion subReg;
+ GC foreGC;
+
+ if ((width <= 0) || (height <= 0)) {
+ return;
+ }
+
+ TixGetColorDItemGC(iPtr, NULL, &foreGC, NULL, flags);
+
+ TixpStartSubRegionDraw(display, drawable, foreGC,
+ &subReg, 0, 0, x, y, width, height,
+ itPtr->size[0] + xOffset, itPtr->size[1] + yOffset);
+
+ Tix_DItemDrawBackground(drawable, &subReg, iPtr, x, y, width, height,
+ xOffset, yOffset, flags);
+
+ /*
+ * Calculate the location of the image according to anchor settings.
+ */
+
+ TixDItemGetAnchor(iPtr->base.stylePtr->anchor, x, y, width, height,
+ iPtr->base.size[0], iPtr->base.size[1], &x, &y);
+
+ if (itPtr->image != NULL) {
+ /*
+ * Draw the image.
+ */
+
+ int bitY;
+
+ bitY = itPtr->size[1] - itPtr->imageH - 2*itPtr->stylePtr->pad[1];
+
+ if (bitY > 0) {
+ bitY = bitY / 2;
+ } else {
+ bitY = 0;
+ }
+
+ x += xOffset;
+ y += yOffset;
+
+ TixpSubRegDrawImage(&subReg, itPtr->image, 0, 0, itPtr->imageW,
+ itPtr->imageH, drawable,
+ x + itPtr->stylePtr->pad[0],
+ y + itPtr->stylePtr->pad[1] + bitY);
+ }
+
+ TixpEndSubRegionDraw(display, drawable, foreGC,
+ &subReg);
+}
+
+static void
+Tix_ImageItemCalculateSize(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageItem *itPtr = (TixImageItem *)iPtr;
+
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+
+ if (itPtr->image != NULL) {
+ Tk_SizeOfImage(itPtr->image, &itPtr->imageW, &itPtr->imageH);
+
+ itPtr->size[0] = itPtr->imageW;
+ itPtr->size[1] = itPtr->imageH;
+ } else {
+ itPtr->size[0] = MIN_IMAGE_WIDTH;
+ itPtr->size[0] = MIN_IMAGE_HEIGHT;
+ }
+
+ itPtr->size[0] += 2*itPtr->stylePtr->pad[0];
+ itPtr->size[1] += 2*itPtr->stylePtr->pad[1];
+
+ itPtr->selX = 0;
+ itPtr->selY = 0;
+ itPtr->selW = itPtr->size[0];
+ itPtr->selH = itPtr->size[1];
+}
+
+static char * Tix_ImageItemComponent(iPtr, x, y)
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+{
+#if 0
+ TixImageItem *itPtr = (TixImageItem *)iPtr;
+#endif
+ static char * body = "body";
+
+ return body;
+}
+
+
+static void Tix_ImageItemStyleChanged(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageItem *itPtr = (TixImageItem *)iPtr;
+
+ if (itPtr->stylePtr == NULL) {
+ /* Maybe we haven't set the style to default style yet */
+ return;
+ }
+ Tix_ImageItemCalculateSize(iPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc(iPtr);
+ }
+}
+static void Tix_ImageItemLostStyle(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixImageItem *itPtr = (TixImageItem *)iPtr;
+
+ itPtr->stylePtr = (TixImageStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_ImageItemType, iPtr, NULL);
+
+ Tix_ImageItemStyleChanged(iPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImageProc --
+ *
+ * This procedure is invoked by the image code whenever the manager
+ * for an image does something that affects the size of contents
+ * of an image displayed in this widget.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Arranges for the HList to get redisplayed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImageProc(clientData, x, y, width, height, imgWidth, imgHeight)
+ ClientData clientData; /* Pointer to widget record. */
+ int x, y; /* Upper left pixel (within image)
+ * that must be redisplayed. */
+ int width, height; /* Dimensions of area to redisplay
+ * (may be <= 0). */
+ int imgWidth, imgHeight; /* New dimensions of image. */
+{
+ TixImageItem *itPtr = (TixImageItem *)clientData;
+
+ Tix_ImageItemCalculateSize((Tix_DItem *)itPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc((Tix_DItem *)itPtr);
+ }
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * Display styles
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_DItemStyle *
+Tix_ImageStyleCreate(interp, tkwin, diTypePtr, name)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ char * name;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixImageStyle * stylePtr =
+ (TixImageStyle *)ckalloc(sizeof(TixImageStyle));
+
+ return (Tix_DItemStyle *)stylePtr;
+}
+
+static int
+Tix_ImageStyleConfigure(style, argc, argv, flags)
+ Tix_DItemStyle *style;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixImageStyle * stylePtr = (TixImageStyle *)style;
+ int oldPadX;
+ int oldPadY;
+
+ oldPadX = stylePtr->pad[0];
+ oldPadY = stylePtr->pad[1];
+
+ if (!(flags &TIX_DONT_CALL_CONFIG)) {
+ if (Tk_ConfigureWidget(stylePtr->interp, stylePtr->tkwin,
+ imageStyleConfigSpecs,
+ argc, argv, (char *)stylePtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ TixDItemStyleConfigureGCs(style);
+
+ if (oldPadX != stylePtr->pad[0] || oldPadY != stylePtr->pad[1]) {
+ TixDItemStyleChanged(stylePtr->diTypePtr, (Tix_DItemStyle *)stylePtr);
+ }
+
+ return TCL_OK;
+}
+
+static void Tix_ImageStyleFree(style)
+ Tix_DItemStyle *style;
+{
+ TixImageStyle * stylePtr = (TixImageStyle *)style;
+
+ Tk_FreeOptions(imageStyleConfigSpecs, (char *)stylePtr,
+ Tk_Display(stylePtr->tkwin), 0);
+ ckfree((char *)stylePtr);
+}
+
+static int bg_flags [4] = {
+ TIX_DITEM_NORMAL_BG,
+ TIX_DITEM_ACTIVE_BG,
+ TIX_DITEM_SELECTED_BG,
+ TIX_DITEM_DISABLED_BG
+};
+static int fg_flags [4] = {
+ TIX_DITEM_NORMAL_FG,
+ TIX_DITEM_ACTIVE_FG,
+ TIX_DITEM_SELECTED_FG,
+ TIX_DITEM_DISABLED_FG
+};
+
+static void
+Tix_ImageStyleSetTemplate(style, tmplPtr)
+ Tix_DItemStyle* style;
+ Tix_StyleTemplate * tmplPtr;
+{
+ TixImageStyle * stylePtr = (TixImageStyle *)style;
+ int i;
+
+ if (tmplPtr->flags & TIX_DITEM_PADX) {
+ stylePtr->pad[0] = tmplPtr->pad[0];
+ }
+ if (tmplPtr->flags & TIX_DITEM_PADY) {
+ stylePtr->pad[1] = tmplPtr->pad[1];
+ }
+
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & bg_flags[i]) {
+ if (stylePtr->colors[i].bg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].bg);
+ }
+ stylePtr->colors[i].bg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].bg));
+ }
+ }
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & fg_flags[i]) {
+ if (stylePtr->colors[i].fg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].fg);
+ }
+ stylePtr->colors[i].fg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].fg));
+ }
+ }
+
+ Tix_ImageStyleConfigure(style, 0, 0, TIX_DONT_CALL_CONFIG);
+}
Added: external/tix-8.4.2.x/generic/tixDiStyle.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDiStyle.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1070 @@
+/*
+ * tixDiStyle.c --
+ *
+ * This file implements the "Display Item Styles" in the Tix library.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDiStyle.c,v 1.6 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+typedef struct StyleLink {
+ Tix_DItemInfo * diTypePtr;
+ Tix_DItemStyle* stylePtr;
+ struct StyleLink * next;
+} StyleLink;
+
+typedef struct StyleInfo {
+ Tix_StyleTemplate * tmplPtr;
+ Tix_StyleTemplate tmpl;
+ StyleLink * linkHead;
+} StyleInfo;
+
+
+static int DItemStyleParseProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin,
+ CONST84 char *value,char *widRec, int offset));
+static char * DItemStylePrintProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin,
+ char *widRec, int offset,
+ Tcl_FreeProc **freeProcPtr));
+static Tix_DItemStyle* FindDefaultStyle _ANSI_ARGS_((
+ Tix_DItemInfo * diTypePtr, Tk_Window tkwin));
+static Tix_DItemStyle* FindStyle _ANSI_ARGS_((
+ CONST84 char *styleName, Tcl_Interp *interp));
+static Tix_DItemStyle* GetDItemStyle _ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr,
+ CONST84 char *styleName, int *isNew_ret));
+static void ListAdd _ANSI_ARGS_((Tix_DItemStyle * stylePtr,
+ Tix_DItem *iPtr));
+static void ListDelete _ANSI_ARGS_((Tix_DItemStyle * stylePtr,
+ Tix_DItem *iPtr));
+static void ListDeleteAll _ANSI_ARGS_((Tix_DItemStyle * stylePtr));
+static void StyleCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static int StyleCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char **argv));
+static int StyleConfigure _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_DItemStyle* stylePtr, int argc,
+ CONST84 char **argv, int flags));
+static void StyleDestroy _ANSI_ARGS_((ClientData clientData));
+static void DeleteStyle _ANSI_ARGS_((Tix_DItemStyle * stylePtr));
+static void DefWindowStructureProc _ANSI_ARGS_((
+ ClientData clientData, XEvent *eventPtr));
+static void RefWindowStructureProc _ANSI_ARGS_((
+ ClientData clientData, XEvent *eventPtr));
+static void SetDefaultStyle _ANSI_ARGS_((Tix_DItemInfo *diTypePtr,
+ Tk_Window tkwin, Tix_DItemStyle * stylePtr));
+
+static TIX_DECLARE_SUBCMD(StyleConfigCmd);
+static TIX_DECLARE_SUBCMD(StyleCGetCmd);
+static TIX_DECLARE_SUBCMD(StyleDeleteCmd);
+
+static Tcl_HashTable defaultTable;
+
+/*
+ * This macro returns a hashtable to convert from style names (such as
+ * "tixStyle0") to Tix_DItemStyle structures.
+ */
+
+#define GetStyleTable(x) \
+ (TixGetHashTable((x), "tixStyleTab", NULL, TCL_STRING_KEYS))
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * TixInitializeDisplayItems --
+ *
+ * Initializes the Display Item subsystem.
+ *
+ * Results:
+ * Nothing
+ *
+ * Side effects:
+ * Built-in Display Types styles are created.
+ *
+ *--------------------------------------------------------------
+ */
+
+void
+TixInitializeDisplayItems()
+{
+ static int inited = 0;
+
+ if (!inited) {
+ inited = 1;
+ Tcl_InitHashTable(&defaultTable, TCL_ONE_WORD_KEYS);
+
+ Tix_AddDItemType(&tix_ImageTextItemType);
+ Tix_AddDItemType(&tix_TextItemType);
+ Tix_AddDItemType(&tix_WindowItemType);
+ Tix_AddDItemType(&tix_ImageItemType);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * TixDItemStyleFree --
+ *
+ * When an item does not need a style anymore (when the item
+ * is destroyed, e.g.), it must call this procedute to free the
+ * style).
+ *
+ * Results:
+ * Nothing
+ *
+ * Side effects:
+ * The item is freed from the list of attached items in the style.
+ * Also, the style will be freed if it was already destroyed and
+ * it has no more items attached to it.
+ *
+ *--------------------------------------------------------------
+ */
+
+void
+TixDItemStyleFree(iPtr, stylePtr)
+ Tix_DItem *iPtr;
+ Tix_DItemStyle * stylePtr;
+{
+ ListDelete(stylePtr, iPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_ItemStyleCmd --
+ *
+ * This procedure is invoked to process the "tixItemStyle" Tcl
+ * command.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * A new widget is created and configured.
+ *
+ *--------------------------------------------------------------
+ */
+
+int
+Tix_ItemStyleCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tix_DItemInfo * diTypePtr;
+ Tk_Window tkwin = (Tk_Window)clientData;
+ CONST84 char * styleName = NULL;
+ Tix_DispData dispData;
+ char buff[16 + TCL_INTEGER_SPACE];
+ int i, n;
+ static int counter = 0;
+ Tix_DItemStyle * stylePtr;
+
+ if (argc < 2) {
+ return Tix_ArgcError(interp, argc, argv, 1,
+ "itemtype ?option value ...");
+ }
+
+ if ((diTypePtr=Tix_GetDItemType(interp, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * Parse the -refwindow option: this tells the style to use this
+ * window to query the default values for background, foreground
+ * etc. Usually, you should set the -refwindow to the window that
+ * holds the display items which are controlled by this style.
+ */
+
+ if (argc > 2) {
+ size_t len;
+ if (argc %2 != 0) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ return TCL_ERROR;
+ }
+ for (n=i=2; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-refwindow", len) == 0) {
+ if ((tkwin=Tk_NameToWindow(interp,argv[i+1],tkwin)) == NULL) {
+ return TCL_ERROR;
+ }
+ continue;
+ }
+ if (strncmp(argv[i], "-stylename", len) == 0) {
+ styleName = argv[i+1];
+ if (FindStyle(styleName, interp) != NULL) {
+ Tcl_AppendResult(interp, "style \"", argv[i+1],
+ "\" already exists", NULL);
+ return TCL_ERROR;
+ }
+ continue;
+ }
+
+ if (n!=i) {
+ argv[n] = argv[i];
+ argv[n+1] = argv[i+1];
+ }
+ n+=2;
+ }
+ argc = n;
+ }
+
+ if (styleName == NULL) {
+ /*
+ * No name is given, we'll make a unique name by default. The
+ * following loop hopefully will not run forever (unless
+ * the user has created more than 4 billion styles with default
+ * names ...:-)
+ */
+
+ while (1) {
+ sprintf(buff, "tixStyle%d", counter++);
+ if (Tcl_FindHashEntry(GetStyleTable(interp), buff) == NULL) {
+ styleName = buff;
+ break;
+ }
+ }
+ }
+
+ dispData.interp = interp;
+ dispData.display = Tk_Display(tkwin);
+ dispData.tkwin = tkwin;
+
+ if ((stylePtr = GetDItemStyle(&dispData, diTypePtr,
+ styleName, NULL)) == NULL) {
+ return TCL_ERROR;
+ }
+ if (StyleConfigure(interp, stylePtr, argc-2, argv+2, 0) != TCL_OK) {
+ DeleteStyle(stylePtr);
+ return TCL_ERROR;
+ }
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ RefWindowStructureProc, (ClientData)stylePtr);
+
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, styleName, NULL);
+ return TCL_OK;
+}
+
+static int
+StyleCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp;
+ int argc;
+ CONST84 char **argv;
+{
+ int code;
+
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "cget", 1, 1, StyleCGetCmd,
+ "option"},
+ {TIX_DEFAULT_LEN, "configure", 0, TIX_VAR_ARGS, StyleConfigCmd,
+ "?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "delete", 0, 0, StyleDeleteCmd,
+ ""},
+ };
+
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? arg ?arg ...?",
+ };
+
+ Tk_Preserve(clientData);
+ code = Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc, argv);
+ Tk_Release(clientData);
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * "cget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+StyleCGetCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tix_DItemStyle* stylePtr= (Tix_DItemStyle*) clientData;
+
+ return Tk_ConfigureValue(interp, stylePtr->base.tkwin,
+ stylePtr->base.diTypePtr->styleConfigSpecs,
+ (char *)stylePtr, argv[0], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+StyleConfigCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tix_DItemStyle* stylePtr= (Tix_DItemStyle*) clientData;
+
+ if (argc == 0) {
+ return Tk_ConfigureInfo(interp, stylePtr->base.tkwin,
+ stylePtr->base.diTypePtr->styleConfigSpecs,
+ (char *)stylePtr, (char *) NULL, 0);
+ } else if (argc == 1) {
+ return Tk_ConfigureInfo(interp, stylePtr->base.tkwin,
+ stylePtr->base.diTypePtr->styleConfigSpecs,
+ (char *)stylePtr, argv[0], 0);
+ } else {
+ return StyleConfigure(interp, stylePtr, argc, argv,
+ TK_CONFIG_ARGV_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+StyleDeleteCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tix_DItemStyle* stylePtr= (Tix_DItemStyle*) clientData;
+
+ if (stylePtr->base.flags & TIX_STYLE_DEFAULT) {
+ Tcl_AppendResult(interp, "Cannot delete default item style",
+ NULL);
+ return TCL_ERROR;
+ }
+
+ DeleteStyle(stylePtr);
+ return TCL_OK;
+}
+
+static int
+StyleConfigure(interp, stylePtr, argc, argv, flags)
+ Tcl_Interp *interp; /* Used for error reporting. */
+ Tix_DItemStyle* stylePtr; /* Information about the style; may or may
+ * not already have values for some fields. */
+ int argc; /* Number of valid entries in argv. */
+ CONST84 char **argv; /* Arguments. */
+ int flags; /* Flags to pass to Tk_ConfigureWidget. */
+{
+ Tix_DItemInfo * diTypePtr = stylePtr->base.diTypePtr;
+
+ if (diTypePtr->styleConfigureProc(stylePtr, argc, argv, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * StyleDestroy --
+ *
+ * Destroy a display style.
+ *----------------------------------------------------------------------
+ */
+static void
+StyleDestroy(clientData)
+ ClientData clientData;
+{
+ Tix_DItemStyle* stylePtr= (Tix_DItemStyle*) clientData;
+ int i;
+
+ if ((stylePtr->base.flags & TIX_STYLE_DEFAULT)) {
+ /*
+ * If this is the default style for the display items, we
+ * can't tell the display items that it has lost its style,
+ * otherwise the ditem will just attempt to create the default
+ * style again, and we will go into an infinite loop
+ */
+ if (stylePtr->base.refCount != 0) {
+ /*
+ * If the refcount is not zero, this style will NOT be
+ * destroyed. The real destroy will be triggered if all
+ * DItems associated with this style is destroyed (in the
+ * ListDelete() function).
+ *
+ * If a widget is destroyed, it is the responsibility of the
+ * widget writer to delete all DItems associated with this
+ * widget. We can discover memory leak if the widget is
+ * destroyed but some default styles associated with it still
+ * exist
+ */
+ return;
+ }
+ } else {
+ stylePtr->base.refCount = 0;
+ }
+
+ Tcl_DeleteHashTable(&stylePtr->base.items);
+ ckfree((char*)stylePtr->base.name);
+
+ for (i=0; i<4; i++) {
+ if (stylePtr->base.colors[i].backGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->base.tkwin),
+ stylePtr->base.colors[i].backGC);
+ }
+ if (stylePtr->base.colors[i].foreGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->base.tkwin),
+ stylePtr->base.colors[i].foreGC);
+ }
+ if (stylePtr->base.colors[i].anchorGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->base.tkwin),
+ stylePtr->base.colors[i].anchorGC);
+ }
+ }
+
+ stylePtr->base.diTypePtr->styleFreeProc(stylePtr);
+}
+
+static void
+StyleCmdDeletedProc(clientData)
+ ClientData clientData;
+{
+ Tix_DItemStyle * stylePtr = (Tix_DItemStyle *)clientData;
+
+ stylePtr->base.styleCmd = NULL;
+ if (stylePtr->base.flags & TIX_STYLE_DEFAULT) {
+ /*
+ * Don't do anything
+ * ToDo: maybe should give a background warning:
+ */
+ } else {
+ DeleteStyle(stylePtr);
+ }
+}
+
+static void
+DeleteStyle(stylePtr)
+ Tix_DItemStyle * stylePtr;
+{
+ Tcl_HashEntry * hashPtr;
+
+ if (!(stylePtr->base.flags & TIX_STYLE_DELETED)) {
+ stylePtr->base.flags |= TIX_STYLE_DELETED;
+
+ /*
+ * Delete the Tcl command of this style
+ */
+
+ if (stylePtr->base.styleCmd != NULL) {
+ Tcl_DeleteCommand(stylePtr->base.interp,
+ Tcl_GetCommandName(stylePtr->base.interp,
+ stylePtr->base.styleCmd));
+ }
+
+ /*
+ * Remove info about this style from the hash table.
+ */
+
+ hashPtr = Tcl_FindHashEntry(GetStyleTable(stylePtr->base.interp),
+ stylePtr->base.name);
+ if (hashPtr != NULL) {
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ ListDeleteAll(stylePtr);
+
+ /*
+ * Make sure the event handler is removed. Otherwise we'd crash
+ * when the interpreter exits.
+ */
+
+ Tk_DeleteEventHandler(stylePtr->base.tkwin, StructureNotifyMask,
+ RefWindowStructureProc, (ClientData)stylePtr);
+
+ /*
+ * Schedule it to be free'd
+ */
+
+ Tk_EventuallyFree((ClientData)stylePtr, (Tix_FreeProc *)StyleDestroy);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * FindDefaultStyle --
+ *
+ * Return the default style of the given type of ditem for the
+ * given tkwin, if such a default style exists.
+ *
+ * Results:
+ * Pointer to the default style or NULL.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+static Tix_DItemStyle*
+FindDefaultStyle(diTypePtr, tkwin)
+ Tix_DItemInfo * diTypePtr;
+ Tk_Window tkwin;
+{
+ Tcl_HashEntry *hashPtr;
+ StyleInfo * infoPtr;
+ StyleLink * linkPtr;
+
+ if ((hashPtr=Tcl_FindHashEntry(&defaultTable, (char*)tkwin)) == NULL) {
+ return NULL;
+ }
+ infoPtr = (StyleInfo *)Tcl_GetHashValue(hashPtr);
+ for (linkPtr = infoPtr->linkHead; linkPtr; linkPtr=linkPtr->next) {
+ if (linkPtr->diTypePtr == diTypePtr) {
+ return linkPtr->stylePtr;
+ }
+ }
+ return NULL;
+}
+
+static void SetDefaultStyle(diTypePtr, tkwin, stylePtr)
+ Tix_DItemInfo * diTypePtr;
+ Tk_Window tkwin;
+ Tix_DItemStyle * stylePtr;
+{
+ Tcl_HashEntry *hashPtr;
+ StyleInfo * infoPtr;
+ StyleLink * newPtr;
+ int isNew;
+
+ newPtr = (StyleLink *)ckalloc(sizeof(StyleLink));
+ newPtr->diTypePtr = diTypePtr;
+ newPtr->stylePtr = stylePtr;
+
+ hashPtr = Tcl_CreateHashEntry(&defaultTable, (char*)tkwin, &isNew);
+
+ if (!isNew) {
+ infoPtr = (StyleInfo *)Tcl_GetHashValue(hashPtr);
+ if (infoPtr->tmplPtr) {
+ if (diTypePtr->styleSetTemplateProc != NULL) {
+ diTypePtr->styleSetTemplateProc(stylePtr,
+ infoPtr->tmplPtr);
+ }
+ }
+ } else {
+ infoPtr = (StyleInfo *)ckalloc(sizeof(StyleInfo));
+ infoPtr->linkHead = NULL;
+ infoPtr->tmplPtr = NULL;
+
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ DefWindowStructureProc, (ClientData)tkwin);
+ Tcl_SetHashValue(hashPtr, (char*)infoPtr);
+ }
+ newPtr->next = infoPtr->linkHead;
+ infoPtr->linkHead = newPtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGetDefaultDItemStyle --
+ *
+ * Gets the default style for an item if the application doesn't
+ * explicitly give it an style with the -style switch.
+ *
+ * Results:
+ * The default style.
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tix_DItemStyle*
+TixGetDefaultDItemStyle(ddPtr, diTypePtr, iPtr, oldStylePtr)
+ Tix_DispData * ddPtr; /* Info about the display. */
+ Tix_DItemInfo * diTypePtr; /* Info about the DItem type. */
+ Tix_DItem *iPtr; /* Get default style for this DItem. */
+ Tix_DItemStyle* oldStylePtr; /* ?? */
+{
+ Tcl_DString dString;
+ Tix_DItemStyle* stylePtr;
+ int isNew;
+
+ stylePtr = FindDefaultStyle(diTypePtr, ddPtr->tkwin);
+ if (stylePtr == NULL) {
+ /*
+ * Format default name for this style+window
+ */
+ Tcl_DStringInit(&dString);
+ Tcl_DStringAppend(&dString, "style", 5);
+ Tcl_DStringAppend(&dString, Tk_PathName(ddPtr->tkwin),
+ (int) strlen(Tk_PathName(ddPtr->tkwin)));
+ Tcl_DStringAppend(&dString, ":", 1);
+ Tcl_DStringAppend(&dString, diTypePtr->name,
+ (int) strlen(diTypePtr->name));
+
+ /*
+ * Create the new style
+ */
+ stylePtr = GetDItemStyle(ddPtr, diTypePtr, dString.string, &isNew);
+ if (isNew) {
+ diTypePtr->styleConfigureProc(stylePtr, 0, NULL, 0);
+ stylePtr->base.flags |= TIX_STYLE_DEFAULT;
+ }
+
+ SetDefaultStyle(diTypePtr, ddPtr->tkwin, stylePtr);
+ Tcl_DStringFree(&dString);
+ }
+
+ if (oldStylePtr) {
+ ListDelete(oldStylePtr, iPtr);
+ }
+ ListAdd(stylePtr, iPtr);
+
+ return stylePtr;
+}
+
+void Tix_SetDefaultStyleTemplate(tkwin, tmplPtr)
+ Tk_Window tkwin;
+ Tix_StyleTemplate * tmplPtr;
+{
+ Tcl_HashEntry * hashPtr;
+ StyleInfo * infoPtr;
+ StyleLink * linkPtr;
+ int isNew;
+
+ hashPtr=Tcl_CreateHashEntry(&defaultTable, (char*)tkwin, &isNew);
+ if (!isNew) {
+ infoPtr = (StyleInfo *)Tcl_GetHashValue(hashPtr);
+ infoPtr->tmplPtr = &infoPtr->tmpl;
+ infoPtr->tmpl = *tmplPtr;
+
+ for (linkPtr = infoPtr->linkHead; linkPtr; linkPtr=linkPtr->next) {
+ if (linkPtr->diTypePtr->styleSetTemplateProc != NULL) {
+ linkPtr->diTypePtr->styleSetTemplateProc(linkPtr->stylePtr,
+ tmplPtr);
+ }
+ }
+ } else {
+ infoPtr = (StyleInfo *)ckalloc(sizeof(StyleInfo));
+ infoPtr->linkHead = NULL;
+ infoPtr->tmplPtr = &infoPtr->tmpl;
+ infoPtr->tmpl = *tmplPtr;
+
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ DefWindowStructureProc, (ClientData)tkwin);
+ Tcl_SetHashValue(hashPtr, (char*)infoPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * GetDItemStyle --
+ *
+ * Returns an ItemStyle with the given name.
+ *
+ * Results:
+ * Pointer to the given Tix_DItsmStyle.
+ *
+ * Side effects:
+ * If the style doesn't already exist, it is allocated.
+ *----------------------------------------------------------------------
+ */
+
+static Tix_DItemStyle*
+GetDItemStyle(ddPtr, diTypePtr, styleName, isNew_ret)
+ Tix_DispData * ddPtr;
+ Tix_DItemInfo * diTypePtr;
+ CONST84 char * styleName;
+ int * isNew_ret;
+{
+ Tcl_HashEntry *hashPtr;
+ int isNew, i;
+ Tix_DItemStyle * stylePtr;
+
+ hashPtr = Tcl_CreateHashEntry(GetStyleTable(ddPtr->interp),
+ styleName, &isNew);
+ if (!isNew) {
+ stylePtr = (Tix_DItemStyle *)Tcl_GetHashValue(hashPtr);
+ } else {
+ stylePtr = diTypePtr->styleCreateProc(ddPtr->interp,
+ ddPtr->tkwin, diTypePtr, (char *) styleName);
+ stylePtr->base.styleCmd = Tcl_CreateCommand(ddPtr->interp,
+ styleName, StyleCmd, (ClientData)stylePtr,
+ StyleCmdDeletedProc);
+ stylePtr->base.interp = ddPtr->interp;
+ stylePtr->base.tkwin = ddPtr->tkwin;
+ stylePtr->base.diTypePtr = diTypePtr;
+ stylePtr->base.name = tixStrDup(styleName);
+ stylePtr->base.pad[0] = 0;
+ stylePtr->base.pad[1] = 0;
+ stylePtr->base.anchor = TK_ANCHOR_CENTER;
+ stylePtr->base.refCount = 0;
+ stylePtr->base.flags = 0;
+ for (i=0; i<4; i++) {
+ stylePtr->base.colors[i].bg = NULL;
+ stylePtr->base.colors[i].fg = NULL;
+ stylePtr->base.colors[i].backGC= None;
+ stylePtr->base.colors[i].foreGC = None;
+ stylePtr->base.colors[i].anchorGC = None;
+ }
+
+ Tcl_InitHashTable(&stylePtr->base.items, TCL_ONE_WORD_KEYS);
+
+ Tcl_SetHashValue(hashPtr, (char*)stylePtr);
+ }
+
+ if (isNew_ret != NULL) {
+ * isNew_ret = isNew;
+ }
+
+ return stylePtr;
+}
+
+static Tix_DItemStyle *
+FindStyle(styleName, interp)
+ CONST84 char *styleName;
+ Tcl_Interp *interp; /* Current interpreter. */
+{
+ Tix_DItemStyle* retval = NULL;
+ Tcl_HashEntry *hashPtr;
+
+ if ((hashPtr=Tcl_FindHashEntry(GetStyleTable(interp), styleName))!= NULL) {
+ retval = (Tix_DItemStyle *)Tcl_GetHashValue(hashPtr);
+ }
+
+ return retval;
+}
+
+/*----------------------------------------------------------------------
+ * TixDItemStyleChanged --
+ *
+ * Tell each Ditem that are affected by this style that the style
+ * has changed. The Ditems will respond by updating their
+ * attributes according to the new values of the style.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixDItemStyleChanged(diTypePtr, stylePtr)
+ Tix_DItemInfo * diTypePtr;
+ Tix_DItemStyle * stylePtr;
+{
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+ Tix_DItem * iPtr;
+
+ for (hashPtr = Tcl_FirstHashEntry(&stylePtr->base.items, &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+
+ iPtr = (Tix_DItem *)Tcl_GetHashValue(hashPtr);
+ diTypePtr->styleChangedProc(iPtr);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * ListAdd --
+ *
+ * Add an item to the list of items affected by a style.
+ *----------------------------------------------------------------------
+ */
+
+static void
+ListAdd(stylePtr, iPtr)
+ Tix_DItemStyle * stylePtr;
+ Tix_DItem *iPtr;
+{
+ Tcl_HashEntry *hashPtr;
+ int isNew;
+
+ hashPtr = Tcl_CreateHashEntry(&stylePtr->base.items, (char*)iPtr, &isNew);
+ if (!isNew) {
+ panic("DItem is already associated with style");
+ } else {
+ Tcl_SetHashValue(hashPtr, (char*)iPtr);
+ }
+ ++ stylePtr->base.refCount;
+}
+
+static void
+ListDelete(stylePtr, iPtr)
+ Tix_DItemStyle * stylePtr;
+ Tix_DItem *iPtr;
+{
+ Tcl_HashEntry *hashPtr;
+
+ hashPtr = Tcl_FindHashEntry(&stylePtr->base.items, (char*)iPtr);
+ if (hashPtr == NULL) {
+ panic("DItem is not associated with style");
+ }
+ Tcl_DeleteHashEntry(hashPtr);
+ stylePtr->base.refCount--;
+
+ if ((stylePtr->base.refCount == 0) &&
+ (stylePtr->base.flags & TIX_STYLE_DELETED) &&
+ (stylePtr->base.flags & TIX_STYLE_DEFAULT)) {
+ Tk_EventuallyFree((ClientData)stylePtr, (Tix_FreeProc *)StyleDestroy);
+ }
+}
+
+static void
+ListDeleteAll(stylePtr)
+ Tix_DItemStyle * stylePtr;
+{
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+ Tix_DItem * iPtr;
+
+ for (hashPtr = Tcl_FirstHashEntry(&stylePtr->base.items, &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+
+ iPtr = (Tix_DItem *)Tcl_GetHashValue(hashPtr);
+ if (stylePtr->base.diTypePtr->lostStyleProc != NULL) {
+ stylePtr->base.diTypePtr->lostStyleProc(iPtr);
+ }
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * DefWindowStructureProc --
+ *
+ * This procedure is invoked whenever StructureNotify events
+ * occur for a window that has some default style(s) associated with it
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The style(s) associated with this window will all be deleted.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+DefWindowStructureProc(clientData, eventPtr)
+ ClientData clientData; /* Pointer to record describing window item. */
+ XEvent *eventPtr; /* Describes what just happened. */
+{
+ Tk_Window tkwin = (Tk_Window)clientData;
+ Tcl_HashEntry *hashPtr;
+ StyleInfo * infoPtr;
+ StyleLink * linkPtr, *toFree;
+
+ if (eventPtr->type != DestroyNotify) {
+ return;
+ }
+
+ if ((hashPtr=Tcl_FindHashEntry(&defaultTable, (char*)tkwin)) == NULL) {
+ return;
+ }
+
+ infoPtr = (StyleInfo *)Tcl_GetHashValue(hashPtr);
+ for (linkPtr = infoPtr->linkHead; linkPtr; ) {
+ toFree = linkPtr;
+ linkPtr=linkPtr->next;
+
+ DeleteStyle(toFree->stylePtr);
+ ckfree((char*)toFree);
+ }
+
+ ckfree((char*)infoPtr);
+ Tcl_DeleteHashEntry(hashPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * RefWindowStructureProc --
+ *
+ * This procedure is invoked when the refwindow of a non-default
+ * style is deleted.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The style is deleted.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+RefWindowStructureProc(clientData, eventPtr)
+ ClientData clientData; /* Pointer to record describing window item. */
+ XEvent *eventPtr; /* Describes what just happened. */
+{
+ Tix_DItemStyle * stylePtr = (Tix_DItemStyle *)clientData;
+
+ if (eventPtr->type == DestroyNotify) {
+ /*
+ * If some DItems are still associated with this window, they
+ * will receive a "LostStyle" notification.
+ */
+ DeleteStyle(stylePtr);
+ }
+}
+
+/*----------------------------------------------------------------------
+ *
+ * The Tix Customed Config Options
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*
+ * The global data structures to use in widget configSpecs arrays
+ *
+ * These are declared in <tix.h>
+ */
+
+Tk_CustomOption tixConfigItemStyle = {
+ DItemStyleParseProc, DItemStylePrintProc, 0,
+};
+
+/*----------------------------------------------------------------------
+ * DItemStyleParseProc --
+ *
+ * Parse the text string and store the Tix_DItemStyleType information
+ * inside the widget record.
+ *----------------------------------------------------------------------
+ */
+static int DItemStyleParseProc(clientData, interp, tkwin, value, widRec,offset)
+ ClientData clientData;
+ Tcl_Interp *interp;
+ Tk_Window tkwin;
+ CONST84 char *value;
+ char *widRec; /* Must point to a valid Tix_DItem struct */
+ int offset;
+{
+ Tix_DItem * iPtr = (Tix_DItem *)widRec;
+ Tix_DItemStyle ** ptr = (Tix_DItemStyle **)(widRec + offset);
+ Tix_DItemStyle * oldPtr = *ptr;
+ Tix_DItemStyle * newPtr;
+
+ if (value == NULL || strlen(value) == 0) {
+ /*
+ * User gives a NULL string -- meaning he wants the default
+ * style
+ */
+ if (oldPtr && oldPtr->base.flags & TIX_STYLE_DEFAULT) {
+ /*
+ * This ditem is already associated with a default style. Let's
+ * keep it.
+ */
+ newPtr = oldPtr;
+ } else {
+ if (oldPtr) {
+ ListDelete(oldPtr, iPtr);
+ }
+ newPtr = NULL;
+ }
+ } else {
+ if ((newPtr = FindStyle(value, interp)) == NULL) {
+ goto not_found;
+ }
+ if (newPtr->base.flags & TIX_STYLE_DELETED) {
+ goto not_found;
+ }
+ if (newPtr->base.diTypePtr != iPtr->base.diTypePtr) {
+ Tcl_AppendResult(interp, "Style type mismatch ",
+ "Needed ", iPtr->base.diTypePtr->name, " style but got ",
+ newPtr->base.diTypePtr->name, " style", NULL);
+ return TCL_ERROR;
+ }
+ if (oldPtr != newPtr) {
+ if (oldPtr != NULL) {
+ ListDelete(oldPtr, iPtr);
+ }
+ ListAdd(newPtr, iPtr);
+ }
+ }
+
+ *ptr = newPtr;
+ return TCL_OK;
+
+not_found:
+ Tcl_AppendResult(interp, "Display style \"", value,
+ "\" not found", NULL);
+ return TCL_ERROR;
+}
+
+static char *DItemStylePrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+ ClientData clientData;
+ Tk_Window tkwin;
+ char *widRec;
+ int offset;
+ Tcl_FreeProc **freeProcPtr;
+{
+ Tix_DItemStyle *stylePtr = *((Tix_DItemStyle**)(widRec+offset));
+
+ if (stylePtr != NULL) {
+ return stylePtr->base.name;
+ } else {
+ return 0;
+ }
+}
+
+void
+TixDItemStyleConfigureGCs(style)
+ Tix_DItemStyle *style;
+{
+ TixColorStyle * stylePtr = (TixColorStyle *)style;
+ XGCValues gcValues;
+ GC newGC;
+ int i;
+
+ gcValues.graphics_exposures = False;
+ for (i=0; i<4; i++) {
+ /*
+ * Foreground GC
+ */
+
+ gcValues.background = stylePtr->colors[i].bg->pixel;
+ gcValues.foreground = stylePtr->colors[i].fg->pixel;
+ newGC = Tk_GetGC(stylePtr->tkwin,
+ GCForeground|GCBackground|GCGraphicsExposures, &gcValues);
+
+ if (stylePtr->colors[i].foreGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].foreGC);
+ }
+ stylePtr->colors[i].foreGC = newGC;
+
+ /*
+ * Background GC
+ */
+
+ gcValues.foreground = stylePtr->colors[i].bg->pixel;
+ newGC = Tk_GetGC(stylePtr->tkwin,
+ GCForeground|GCGraphicsExposures, &gcValues);
+
+ if (stylePtr->colors[i].backGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].backGC);
+ }
+ stylePtr->colors[i].backGC = newGC;
+
+ /*
+ * Anchor GC
+ */
+
+ newGC = Tix_GetAnchorGC(stylePtr->tkwin,
+ stylePtr->colors[i].bg);
+
+ if (stylePtr->colors[i].anchorGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].anchorGC);
+ }
+ stylePtr->colors[i].anchorGC = newGC;
+ }
+}
Added: external/tix-8.4.2.x/generic/tixDiText.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDiText.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,651 @@
+/*
+ * tixDiText.c --
+ *
+ * This file implements one of the "Display Items" in the Tix library :
+ * Text display items.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDiText.c,v 1.7 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+
+/*
+ * If the item has a really small text, or no text at all, use
+ * this size. This makes the drawing of selection lines more sane.
+ */
+
+#define MIN_TEXT_WIDTH 2
+#define MIN_TEXT_HEIGHT 2
+
+/*----------------------------------------------------------------------
+ *
+ * Configuration options for Text Items
+ *
+ *----------------------------------------------------------------------
+ */
+
+static Tk_ConfigSpec textItemConfigSpecs[] = {
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_TEXTITEM_TYPE, Tk_Offset(TixTextItem, diTypePtr),
+ 0, &tixConfigItemType},
+ {TK_CONFIG_CUSTOM, "-style", "textStyle", "TextStyle",
+ DEF_TEXTITEM_STYLE, Tk_Offset(TixTextItem, stylePtr),
+ TK_CONFIG_NULL_OK, &tixConfigItemStyle},
+ {TK_CONFIG_STRING, "-text", "text", "Text",
+ DEF_TEXTITEM_TEXT, Tk_Offset(TixTextItem, text),
+ TK_CONFIG_NULL_OK},
+ {TK_CONFIG_INT, "-underline", "underline", "Underline",
+ DEF_TEXTITEM_UNDERLINE, Tk_Offset(TixTextItem, underline), 0},
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+
+/*----------------------------------------------------------------------
+ *
+ * Configuration options for Text Styles
+ *
+ *----------------------------------------------------------------------
+ */
+
+static Tk_ConfigSpec textStyleConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
+ DEF_TEXTSTYLE_ANCHOR, Tk_Offset(TixTextStyle, anchor), 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+#if 0
+ /* %bordercolor not used */
+ {TK_CONFIG_COLOR,"-bordercolor","borderColor","BorderColor",
+ DEF_TEXTSTYLE_BORDER_COLOR_COLOR, Tk_Offset(TixTextStyle, borderColor),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR,"-bordercolor","borderColor","BorderColor",
+ DEF_TEXTSTYLE_BORDER_COLOR_MONO, Tk_Offset(TixTextStyle, borderColor),
+ TK_CONFIG_MONO_ONLY},
+#endif
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_TEXTSTYLE_FONT, Tk_Offset(TixTextStyle, font), 0},
+
+ {TK_CONFIG_JUSTIFY, "-justify", "justify", "Justyfy",
+ DEF_TEXTSTYLE_JUSTIFY, Tk_Offset(TixTextStyle, justify),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_TEXTSTYLE_PADX, Tk_Offset(TixTextStyle, pad[0]), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_TEXTSTYLE_PADY, Tk_Offset(TixTextStyle, pad[1]), 0},
+
+ {TK_CONFIG_PIXELS, "-wraplength", "wrapLength", "WrapLength",
+ DEF_TEXTSTYLE_WLENGTH, Tk_Offset(TixTextStyle, wrapLength), 0},
+
+/* The following is automatically generated */
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_TEXTSTYLE_NORMAL_BG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_TEXTSTYLE_NORMAL_BG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_TEXTSTYLE_NORMAL_FG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_TEXTSTYLE_NORMAL_FG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_TEXTSTYLE_ACTIVE_BG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_TEXTSTYLE_ACTIVE_BG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_TEXTSTYLE_ACTIVE_FG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_TEXTSTYLE_ACTIVE_FG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_TEXTSTYLE_SELECTED_BG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_TEXTSTYLE_SELECTED_BG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_TEXTSTYLE_SELECTED_FG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_TEXTSTYLE_SELECTED_FG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_TEXTSTYLE_DISABLED_BG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_TEXTSTYLE_DISABLED_BG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_TEXTSTYLE_DISABLED_FG_COLOR,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_TEXTSTYLE_DISABLED_FG_MONO,
+ Tk_Offset(TixTextStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+
+/*----------------------------------------------------------------------
+ * Forward declarations for procedures defined later in this file:
+ *----------------------------------------------------------------------
+ */
+static void Tix_TextItemCalculateSize _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static char * Tix_TextItemComponent _ANSI_ARGS_((
+ Tix_DItem * iPtr, int x, int y));
+static int Tix_TextItemConfigure _ANSI_ARGS_((
+ Tix_DItem * iPtr, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItem * Tix_TextItemCreate _ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr));
+static void Tix_TextItemDisplay _ANSI_ARGS_((
+ Drawable drawable, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flags));
+static void Tix_TextItemFree _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_TextItemLostStyle _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_TextItemStyleChanged _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static int Tix_TextStyleConfigure _ANSI_ARGS_((
+ Tix_DItemStyle* style, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItemStyle * Tix_TextStyleCreate _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ Tix_DItemInfo * diTypePtr, char * name));
+static void Tix_TextStyleFree _ANSI_ARGS_((
+ Tix_DItemStyle* style));
+static void Tix_TextStyleSetTemplate _ANSI_ARGS_((
+ Tix_DItemStyle* style,
+ Tix_StyleTemplate * tmplPtr));
+
+Tix_DItemInfo tix_TextItemType = {
+ "text", /* type */
+ TIX_DITEM_TEXT,
+ Tix_TextItemCreate, /* createProc */
+ Tix_TextItemConfigure,
+ Tix_TextItemCalculateSize,
+ Tix_TextItemComponent,
+ Tix_TextItemDisplay,
+ Tix_TextItemFree,
+ Tix_TextItemStyleChanged,
+ Tix_TextItemLostStyle,
+
+ Tix_TextStyleCreate,
+ Tix_TextStyleConfigure,
+ Tix_TextStyleFree,
+ Tix_TextStyleSetTemplate,
+
+ textItemConfigSpecs,
+ textStyleConfigSpecs,
+ NULL, /*next */
+};
+
+/*----------------------------------------------------------------------
+ * Tix_TextItemCreate --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_DItem * Tix_TextItemCreate(ddPtr, diTypePtr)
+ Tix_DispData * ddPtr;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixTextItem * itPtr;
+
+ itPtr = (TixTextItem*) ckalloc(sizeof(TixTextItem));
+
+ itPtr->diTypePtr = &tix_TextItemType;
+ itPtr->ddPtr = ddPtr;
+ itPtr->stylePtr = (TixTextStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_TextItemType,
+ (Tix_DItem*)itPtr, NULL);
+ itPtr->clientData = 0;
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+ itPtr->selX = 0;
+ itPtr->selY = 0;
+ itPtr->selW = 0;
+ itPtr->selH = 0;
+
+ itPtr->numChars = 0;
+ itPtr->text = NULL;
+ itPtr->textW = 0;
+ itPtr->textH = 0;
+ itPtr->underline = -1;
+
+ return (Tix_DItem *)itPtr;
+}
+
+static void Tix_TextItemFree(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixTextItem * itPtr = (TixTextItem *) iPtr;
+
+ if (itPtr->stylePtr) {
+ TixDItemStyleFree(iPtr, (Tix_DItemStyle*)itPtr->stylePtr);
+ }
+
+ Tk_FreeOptions(textItemConfigSpecs, (char *)itPtr,
+ itPtr->ddPtr->display, 0);
+ ckfree((char*)itPtr);
+}
+
+static int
+Tix_TextItemConfigure(iPtr, argc, argv, flags)
+ Tix_DItem * iPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixTextItem * itPtr = (TixTextItem *) iPtr;
+ TixTextStyle * oldStyle = itPtr->stylePtr;
+
+ if (Tk_ConfigureWidget(itPtr->ddPtr->interp, itPtr->ddPtr->tkwin,
+ textItemConfigSpecs,
+ argc, argv, (char *)itPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (itPtr->stylePtr == NULL) {
+ itPtr->stylePtr = (TixTextStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_TextItemType, iPtr, NULL);
+ }
+
+ if (oldStyle != NULL && itPtr->stylePtr != oldStyle) {
+ Tix_TextItemStyleChanged(iPtr);
+ }
+ else {
+ Tix_TextItemCalculateSize((Tix_DItem*)itPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_TextItemDisplay --
+ *
+ * Display a text item. {x, y, width, height} specifies a region
+ * for to display this item in. {xOffset, yOffset} gives the
+ * offset of the top-left corner of the text item relative to
+ * the top-left corder of the region.
+ *
+ * Background and foreground of the item are displayed according
+ * to the flags parameter.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+Tix_TextItemDisplay(drawable, iPtr, x, y, width, height, xOffset, yOffset,
+ flags)
+ Drawable drawable;
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+ int width;
+ int height;
+ int xOffset;
+ int yOffset;
+ int flags;
+{
+ TixTextItem *itPtr = (TixTextItem *)iPtr;
+ Display * display = iPtr->base.ddPtr->display;
+ TixpSubRegion subReg;
+ GC foreGC;
+
+ if ((width <= 0) || (height <= 0)) {
+ return;
+ }
+
+ TixGetColorDItemGC(iPtr, NULL, &foreGC, NULL, flags);
+
+ TixpStartSubRegionDraw(display, drawable, foreGC,
+ &subReg, 0, 0, x, y, width, height,
+ itPtr->size[0] + xOffset, itPtr->size[1] + yOffset);
+
+ Tix_DItemDrawBackground(drawable, &subReg, iPtr, x, y, width, height,
+ xOffset, yOffset, flags);
+
+ /*
+ * Calculate the location of the text according to anchor settings.
+ */
+
+ TixDItemGetAnchor(iPtr->base.stylePtr->anchor, x, y, width, height,
+ iPtr->base.size[0], iPtr->base.size[1], &x, &y);
+
+ if (foreGC != None && itPtr->text != NULL) {
+ /*
+ * Draw the text
+ */
+
+ x += itPtr->stylePtr->pad[0] + xOffset;
+ y += itPtr->stylePtr->pad[1] + yOffset;
+
+ TixpSubRegDisplayText(display, drawable, foreGC,
+ &subReg, itPtr->stylePtr->font, itPtr->text,
+ itPtr->numChars, x, y, itPtr->textW, itPtr->stylePtr->justify,
+ itPtr->underline);
+ }
+
+ TixpEndSubRegionDraw(display, drawable, foreGC,
+ &subReg);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_TextItemComponent --
+ *
+ * Identifies the sub-component of this text item at the given
+ * {x, y} location. Text items are not divided into sub-components
+ * so the string "body" is always returned.
+ *
+ * The returned string is statically allocated.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static char *
+Tix_TextItemComponent(iPtr, x, y)
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+{
+ static char * body = "body";
+
+ return body;
+}
+
+
+static void
+Tix_TextItemCalculateSize(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixTextItem *itPtr = (TixTextItem *)iPtr;
+ char * text = itPtr->text;
+ if (text == NULL || *text == '\0') {
+ /*
+ * Use one space character so that the height of the item
+ * would be the same as a regular small item, and the width
+ * of the item won't be too tiny.
+ */
+
+ text = " ";
+ }
+
+ itPtr->numChars = -1;
+ TixComputeTextGeometry(itPtr->stylePtr->font, text, -1,
+ itPtr->stylePtr->wrapLength, &itPtr->textW, &itPtr->textH);
+ itPtr->size[0] = itPtr->textW;
+ itPtr->size[1] = itPtr->textH;
+
+ itPtr->size[0] += 2*itPtr->stylePtr->pad[0];
+ itPtr->size[1] += 2*itPtr->stylePtr->pad[1];
+
+ itPtr->selX = 0;
+ itPtr->selY = 0;
+ itPtr->selW = itPtr->size[0];
+ itPtr->selH = itPtr->size[1];
+}
+
+static void
+Tix_TextItemStyleChanged(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixTextItem *itPtr = (TixTextItem *)iPtr;
+
+ if (itPtr->stylePtr == NULL) {
+ /* Maybe we haven't set the style to default style yet */
+ return;
+ }
+ Tix_TextItemCalculateSize(iPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc(iPtr);
+ }
+}
+
+static void
+Tix_TextItemLostStyle(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixTextItem *itPtr = (TixTextItem *)iPtr;
+
+ itPtr->stylePtr = (TixTextStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_TextItemType, iPtr, NULL);
+
+ Tix_TextItemStyleChanged(iPtr);
+}
+/*----------------------------------------------------------------------
+ *
+ *
+ * Display styles
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_DItemStyle *
+Tix_TextStyleCreate(interp, tkwin, diTypePtr, name)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ char * name;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixTextStyle * stylePtr = (TixTextStyle *)ckalloc(sizeof(TixTextStyle));
+
+ stylePtr->font = NULL;
+ stylePtr->justify = TK_JUSTIFY_LEFT;
+ stylePtr->wrapLength = 0;
+
+ return (Tix_DItemStyle *)stylePtr;
+}
+
+static int
+Tix_TextStyleConfigure(style, argc, argv, flags)
+ Tix_DItemStyle *style;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixTextStyle * stylePtr = (TixTextStyle *)style;
+ XGCValues gcValues;
+ GC newGC;
+ int i, isNew;
+
+ if (stylePtr->font == NULL) {
+ isNew = 1;
+ } else {
+ isNew = 0;
+ }
+
+ /*
+ * TODO: gap, wrapLength, etc changes: need to call TixDItemStyleChanged
+ */
+
+ if (!(flags &TIX_DONT_CALL_CONFIG)) {
+ if (Tk_ConfigureWidget(stylePtr->interp, stylePtr->tkwin,
+ textStyleConfigSpecs,
+ argc, argv, (char *)stylePtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ gcValues.font = TixFontId(stylePtr->font);
+ gcValues.graphics_exposures = False;
+
+ for (i=0; i<4; i++) {
+ /*
+ * Foreground GC
+ */
+
+ gcValues.background = stylePtr->colors[i].bg->pixel;
+ gcValues.foreground = stylePtr->colors[i].fg->pixel;
+ newGC = Tk_GetGC(stylePtr->tkwin,
+ GCFont|GCForeground|GCBackground|GCGraphicsExposures, &gcValues);
+
+ if (stylePtr->colors[i].foreGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].foreGC);
+ }
+ stylePtr->colors[i].foreGC = newGC;
+
+ /*
+ * Background GC
+ */
+
+ gcValues.foreground = stylePtr->colors[i].bg->pixel;
+ newGC = Tk_GetGC(stylePtr->tkwin,
+ GCFont|GCForeground|GCGraphicsExposures, &gcValues);
+
+ if (stylePtr->colors[i].backGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].backGC);
+ }
+ stylePtr->colors[i].backGC = newGC;
+
+ /*
+ * Anchor GC
+ */
+
+ newGC = Tix_GetAnchorGC(stylePtr->tkwin,
+ stylePtr->colors[i].bg);
+
+ if (stylePtr->colors[i].anchorGC != None) {
+ Tk_FreeGC(Tk_Display(stylePtr->tkwin),
+ stylePtr->colors[i].anchorGC);
+ }
+ stylePtr->colors[i].anchorGC = newGC;
+ }
+
+ if (!isNew) {
+ TixDItemStyleChanged(stylePtr->diTypePtr, (Tix_DItemStyle *)stylePtr);
+ }
+
+ return TCL_OK;
+}
+
+static void
+Tix_TextStyleFree(style)
+ Tix_DItemStyle *style;
+{
+ TixTextStyle * stylePtr = (TixTextStyle *)style;
+
+ Tk_FreeOptions(textStyleConfigSpecs, (char *)stylePtr,
+ Tk_Display(stylePtr->tkwin), 0);
+ ckfree((char *)stylePtr);
+}
+
+static int bg_flags [4] = {
+ TIX_DITEM_NORMAL_BG,
+ TIX_DITEM_ACTIVE_BG,
+ TIX_DITEM_SELECTED_BG,
+ TIX_DITEM_DISABLED_BG
+};
+static int fg_flags [4] = {
+ TIX_DITEM_NORMAL_FG,
+ TIX_DITEM_ACTIVE_FG,
+ TIX_DITEM_SELECTED_FG,
+ TIX_DITEM_DISABLED_FG
+};
+
+
+static void
+Tix_TextStyleSetTemplate(style, tmplPtr)
+ Tix_DItemStyle* style;
+ Tix_StyleTemplate * tmplPtr;
+{
+ TixTextStyle * stylePtr = (TixTextStyle *)style;
+ int i;
+
+ if (tmplPtr->flags & TIX_DITEM_FONT) {
+ if (stylePtr->font != NULL) {
+ TixFreeFont(stylePtr->font);
+ }
+ stylePtr->font = TixGetFont(
+ stylePtr->interp, stylePtr->tkwin,
+ TixNameOfFont(tmplPtr->font));
+ }
+ if (tmplPtr->flags & TIX_DITEM_PADX) {
+ stylePtr->pad[0] = tmplPtr->pad[0];
+ }
+ if (tmplPtr->flags & TIX_DITEM_PADY) {
+ stylePtr->pad[1] = tmplPtr->pad[1];
+ }
+
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & bg_flags[i]) {
+ if (stylePtr->colors[i].bg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].bg);
+ }
+ stylePtr->colors[i].bg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].bg));
+ }
+ }
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & fg_flags[i]) {
+ if (stylePtr->colors[i].fg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].fg);
+ }
+ stylePtr->colors[i].fg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].fg));
+ }
+ }
+
+ Tix_TextStyleConfigure(style, 0, 0, TIX_DONT_CALL_CONFIG);
+}
Added: external/tix-8.4.2.x/generic/tixDiWin.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixDiWin.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,934 @@
+/*
+ * tixDiWin.c --
+ *
+ * This file implements one of the "Display Items" in the Tix library :
+ * WindowItem display items.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixDiWin.c,v 1.3 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+
+/*----------------------------------------------------------------------
+ *
+ * Data structures used by this file
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------
+ *
+ * Private data definition
+ *
+ *----------------------------------------------------------------------
+ */
+
+static Tix_ListInfo mapWinListInfo = {
+ Tk_Offset(TixWindowItem, next),
+ TIX_UNDEFINED,
+};
+
+#define DEF_WINDOWITEM_WINDOW ""
+#define DEF_WINDOWITEM_STYLE ""
+#define DEF_WINDOWITEM_TYPE "window"
+
+static Tk_ConfigSpec windowItemConfigSpecs[] = {
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_WINDOWITEM_TYPE, Tk_Offset(TixWindowItem, diTypePtr),
+ 0, &tixConfigItemType},
+
+ {TK_CONFIG_CUSTOM, "-style", "windowStyle", "WindowStyle",
+ DEF_WINDOWITEM_STYLE, Tk_Offset(TixWindowItem, stylePtr),
+ TK_CONFIG_NULL_OK, &tixConfigItemStyle},
+
+ {TK_CONFIG_SYNONYM, "-widget", (char *) NULL, (char *) NULL,
+ (char *)NULL, 0, 0},
+
+ {TK_CONFIG_WINDOW, "-window", "window", "Window",
+ DEF_WINDOWITEM_WINDOW, Tk_Offset(TixWindowItem, tkwin), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+/*----------------------------------------------------------------------
+ *
+ * Configuration options for Window Styles
+ *
+ *----------------------------------------------------------------------
+ */
+#define DEF_WINDOWSTYLE_PADX "0"
+#define DEF_WINDOWSTYLE_PADY "0"
+#define DEF_WINDOWSTYLE_ANCHOR "w"
+
+#define SELECTED_BG SELECT_BG
+#define DISABLED_BG DISABLED
+
+#define DEF_WINDOWSTYLE_NORMAL_FG_COLOR BLACK
+#define DEF_WINDOWSTYLE_NORMAL_FG_MONO BLACK
+#define DEF_WINDOWSTYLE_NORMAL_BG_COLOR NORMAL_BG
+#define DEF_WINDOWSTYLE_NORMAL_BG_MONO WHITE
+
+#define DEF_WINDOWSTYLE_ACTIVE_FG_COLOR BLACK
+#define DEF_WINDOWSTYLE_ACTIVE_FG_MONO WHITE
+#define DEF_WINDOWSTYLE_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_WINDOWSTYLE_ACTIVE_BG_MONO BLACK
+
+#define DEF_WINDOWSTYLE_SELECTED_FG_COLOR BLACK
+#define DEF_WINDOWSTYLE_SELECTED_FG_MONO WHITE
+#define DEF_WINDOWSTYLE_SELECTED_BG_COLOR SELECTED_BG
+#define DEF_WINDOWSTYLE_SELECTED_BG_MONO BLACK
+
+#define DEF_WINDOWSTYLE_DISABLED_FG_COLOR BLACK
+#define DEF_WINDOWSTYLE_DISABLED_FG_MONO BLACK
+#define DEF_WINDOWSTYLE_DISABLED_BG_COLOR DISABLED_BG
+#define DEF_WINDOWSTYLE_DISABLED_BG_MONO WHITE
+
+static Tk_ConfigSpec windowStyleConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
+ DEF_WINDOWSTYLE_ANCHOR, Tk_Offset(TixWindowStyle, anchor), 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_WINDOWSTYLE_PADX, Tk_Offset(TixWindowStyle, pad[0]), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_WINDOWSTYLE_PADY, Tk_Offset(TixWindowStyle, pad[1]), 0},
+
+/* The following was automatically generated */
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_WINDOWSTYLE_NORMAL_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-background","background","Background",
+ DEF_WINDOWSTYLE_NORMAL_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_WINDOWSTYLE_NORMAL_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-foreground","foreground","Foreground",
+ DEF_WINDOWSTYLE_NORMAL_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_NORMAL].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_WINDOWSTYLE_ACTIVE_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activebackground","activeBackground","ActiveBackground",
+ DEF_WINDOWSTYLE_ACTIVE_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_WINDOWSTYLE_ACTIVE_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-activeforeground","activeForeground","ActiveForeground",
+ DEF_WINDOWSTYLE_ACTIVE_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_ACTIVE].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_WINDOWSTYLE_SELECTED_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectbackground","selectBackground","SelectBackground",
+ DEF_WINDOWSTYLE_SELECTED_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_WINDOWSTYLE_SELECTED_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-selectforeground","selectForeground","SelectForeground",
+ DEF_WINDOWSTYLE_SELECTED_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_SELECTED].fg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_WINDOWSTYLE_DISABLED_BG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledbackground","disabledBackground","DisabledBackground",
+ DEF_WINDOWSTYLE_DISABLED_BG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].bg),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_WINDOWSTYLE_DISABLED_FG_COLOR,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_COLOR,"-disabledforeground","disabledForeground","DisabledForeground",
+ DEF_WINDOWSTYLE_DISABLED_FG_MONO,
+ Tk_Offset(TixImageStyle,colors[TIX_DITEM_DISABLED].fg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ * Forward declarations for procedures defined later in this file:
+ *----------------------------------------------------------------------
+ */
+static void SubWindowLostSlaveProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin));
+static void SubWindowRequestProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin));
+static void SubWindowStructureProc _ANSI_ARGS_((
+ ClientData clientData, XEvent *eventPtr));
+static char * Tix_WindowItemComponent _ANSI_ARGS_((
+ Tix_DItem * iPtr, int x, int y));
+static void Tix_WindowItemCalculateSize _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static int Tix_WindowItemConfigure _ANSI_ARGS_((
+ Tix_DItem * iPtr, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItem * Tix_WindowItemCreate _ANSI_ARGS_((
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr));
+static void Tix_WindowItemDisplay _ANSI_ARGS_((
+ Drawable drawable, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flags));
+static void Tix_WindowItemFree _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_WindowItemLostStyle _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_WindowItemStyleChanged _ANSI_ARGS_((
+ Tix_DItem * iPtr));
+static void Tix_WindowItemUnmap _ANSI_ARGS_((
+ TixWindowItem *itPtr));
+static int Tix_WindowStyleConfigure _ANSI_ARGS_((
+ Tix_DItemStyle* style, int argc, CONST84 char ** argv,
+ int flags));
+static Tix_DItemStyle * Tix_WindowStyleCreate _ANSI_ARGS_((
+ Tcl_Interp *interp, Tk_Window tkwin,
+ Tix_DItemInfo * diTypePtr, char * name));
+static void Tix_WindowStyleFree _ANSI_ARGS_((
+ Tix_DItemStyle* style));
+static void Tix_WindowStyleSetTemplate _ANSI_ARGS_((
+ Tix_DItemStyle* style,
+ Tix_StyleTemplate * tmplPtr));
+static void UnmanageWindow _ANSI_ARGS_((Tix_DItem * iPtr,
+ Tk_Window tkwin));
+static void ManageWindow _ANSI_ARGS_((Tix_DItem * iPtr,
+ Tk_Window tkwin));
+
+Tix_DItemInfo tix_WindowItemType = {
+ "window", /* type */
+ TIX_DITEM_WINDOW,
+ Tix_WindowItemCreate, /* createProc */
+ Tix_WindowItemConfigure,
+ Tix_WindowItemCalculateSize,
+ Tix_WindowItemComponent,
+ Tix_WindowItemDisplay,
+ Tix_WindowItemFree,
+ Tix_WindowItemStyleChanged,
+ Tix_WindowItemLostStyle,
+
+ Tix_WindowStyleCreate,
+ Tix_WindowStyleConfigure,
+ Tix_WindowStyleFree,
+ Tix_WindowStyleSetTemplate,
+
+ windowItemConfigSpecs,
+ windowStyleConfigSpecs,
+
+ NULL, /*next */
+};
+
+/*
+ * The structure below defines the official type record for the
+ * placer:
+ */
+static Tk_GeomMgr windowItemGeomType = {
+ "tixWindowItem", /* name */
+ SubWindowRequestProc, /* requestProc */
+ SubWindowLostSlaveProc, /* lostSlaveProc */
+};
+
+/*----------------------------------------------------------------------
+ * Tix_WindowItemCreate --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static Tix_DItem * Tix_WindowItemCreate(ddPtr, diTypePtr)
+ Tix_DispData * ddPtr;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixWindowItem * itPtr;
+
+ itPtr = (TixWindowItem*) ckalloc(sizeof(TixWindowItem));
+
+ itPtr->diTypePtr = diTypePtr;
+ itPtr->ddPtr = ddPtr;
+ itPtr->stylePtr = NULL;
+ itPtr->clientData = 0;
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+
+ itPtr->tkwin = NULL;
+
+ return (Tix_DItem *)itPtr;
+}
+
+/* %% */
+static void Tix_WindowItemFree(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixWindowItem * itPtr = (TixWindowItem *) iPtr;
+
+ if (itPtr->tkwin) {
+ Tk_DeleteEventHandler(itPtr->tkwin, StructureNotifyMask,
+ SubWindowStructureProc, (ClientData) itPtr);
+ Tk_ManageGeometry(itPtr->tkwin, (Tk_GeomMgr *)NULL,
+ (ClientData) NULL);
+ Tk_UnmapWindow(itPtr->tkwin);
+ }
+ if (itPtr->stylePtr) {
+ TixDItemStyleFree(iPtr, (Tix_DItemStyle*)itPtr->stylePtr);
+ }
+
+ Tk_FreeOptions(windowItemConfigSpecs, (char *)itPtr,
+ itPtr->ddPtr->display, 0);
+
+ ckfree((char*)itPtr);
+}
+
+/*----------------------------------------------------------------------
+ * ManageWindow --
+ *
+ * Associate this sub-window with the window item.
+ *
+ * Side effect:
+ * itPtr->tkwin is changed.
+ *----------------------------------------------------------------------
+ */
+
+static void
+ManageWindow(iPtr, tkwin)
+ Tix_DItem * iPtr;
+ Tk_Window tkwin;
+{
+ TixWindowItem * itPtr = (TixWindowItem *) iPtr;
+
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ SubWindowStructureProc, (ClientData) itPtr);
+ Tk_ManageGeometry(tkwin, &windowItemGeomType,
+ (ClientData) itPtr);
+
+ itPtr->tkwin = tkwin;
+}
+
+/*----------------------------------------------------------------------
+ * UnmanageWindow --
+ *
+ * Disassociate this sub-window from the window item.
+ *
+ * Note:
+ * the tkwin parameter may not equal to itPtr->tkwin.
+ *----------------------------------------------------------------------
+ */
+
+static void
+UnmanageWindow(iPtr, tkwin)
+ Tix_DItem * iPtr;
+ Tk_Window tkwin;
+{
+ TixWindowItem * itPtr = (TixWindowItem *) iPtr;
+
+ Tk_DeleteEventHandler(tkwin, StructureNotifyMask,
+ SubWindowStructureProc, (ClientData) itPtr);
+ Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)NULL,
+ (ClientData) NULL);
+ Tk_UnmapWindow(tkwin);
+}
+
+static int Tix_WindowItemConfigure(iPtr, argc, argv, flags)
+ Tix_DItem * iPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixWindowItem * itPtr = (TixWindowItem *) iPtr;
+ TixWindowStyle * oldStyle = itPtr->stylePtr;
+ Tk_Window oldWindow;
+
+ oldWindow = itPtr->tkwin;
+
+ if (Tk_ConfigureWidget(itPtr->ddPtr->interp, itPtr->ddPtr->tkwin,
+ windowItemConfigSpecs,
+ argc, argv, (char *)itPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (itPtr->stylePtr == NULL) {
+ itPtr->stylePtr = (TixWindowStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_WindowItemType, iPtr, NULL);
+ }
+
+ if (oldWindow != itPtr->tkwin) {
+ if (oldWindow != NULL) {
+ UnmanageWindow(iPtr, oldWindow);
+ }
+ if (itPtr->tkwin != NULL) {
+ /*
+ * Make sure that the master window is the parent of the
+ * window associated with the item.
+ * Also, don't allow a top-level window to be
+ * managed inside a master window.
+ */
+ if (Tk_Parent(itPtr->tkwin) != itPtr->ddPtr->tkwin) {
+ Tcl_AppendResult(itPtr->ddPtr->interp, "can't use ",
+ Tk_PathName(itPtr->tkwin),
+ " in a window item of the master widget: must be a child",
+ " of ", Tk_PathName(itPtr->ddPtr->tkwin), (char *) NULL);
+ goto badWindow;
+ }
+ if (((Tk_FakeWin *) (itPtr->tkwin))->flags & TK_TOP_LEVEL) {
+ Tcl_AppendResult(itPtr->ddPtr->interp,
+ "can't manage toplevel window",
+ Tk_PathName(itPtr->tkwin),
+ " as a window item of ", Tk_PathName(itPtr->ddPtr->tkwin),
+ (char *) NULL);
+ goto badWindow;
+ }
+ ManageWindow(iPtr, itPtr->tkwin);
+ }
+ }
+
+ if (oldStyle != NULL && itPtr->stylePtr != oldStyle) {
+ Tix_WindowItemStyleChanged(iPtr);
+ }
+ else {
+ Tix_WindowItemCalculateSize((Tix_DItem*)itPtr);
+ }
+
+ return TCL_OK;
+
+badWindow:
+
+ itPtr->tkwin = NULL;
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_WindowItemDisplay --
+ *
+ * Display an window item. {x, y, width, height} specifies a
+ * region for to display this item in. {xOffset, yOffset} gives
+ * the offset of the top-left corner of the window item relative
+ * to the top-left corder of the region.
+ *
+ * Background and foreground of the item are displayed according
+ * to the flags parameter.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The geometry management calls such as Tk_MoveResizeWindow()
+ * may cause repaints in the parent window that owns this item,
+ * but it shouldn't enter an infinite loop.
+ * Tk_MoveResizeWindow (or the underlying windowing system?) will
+ * supress repaint events if the window's geometry is not changed
+ * by the Tk_MoveResizeWindow call.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+Tix_WindowItemDisplay(drawable, iPtr, x, y, width, height, xOffset, yOffset,
+ flags)
+ Drawable drawable;
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+ int width;
+ int height;
+ int flags;
+{
+ TixWindowItem *itPtr = (TixWindowItem *)iPtr;
+ Display * display = itPtr->ddPtr->display;
+ TixpSubRegion subReg;
+ GC foreGC;
+ int winX, winY, winH, winW;
+
+ if (itPtr->tkwin == NULL) {
+ return;
+ }
+
+ TixGetColorDItemGC(iPtr, NULL, &foreGC, NULL, flags);
+
+ TixpStartSubRegionDraw(display, drawable, foreGC,
+ &subReg, 0, 0, x, y, width, height,
+ itPtr->size[0] + xOffset, itPtr->size[1] + yOffset);
+
+ Tix_DItemDrawBackground(drawable, &subReg, iPtr, x, y, width, height,
+ xOffset, yOffset, flags);
+
+ /*
+ * Calculate the location of the window according to anchor settings.
+ */
+
+ TixDItemGetAnchor(itPtr->stylePtr->anchor, x, y, width, height,
+ itPtr->size[0], itPtr->size[1], &x, &y);
+
+ winX = xOffset + itPtr->stylePtr->pad[0];
+ winY = yOffset + itPtr->stylePtr->pad[1];
+ winW = itPtr->size[0] - 2*itPtr->stylePtr->pad[0];
+ winH = itPtr->size[1] - 2*itPtr->stylePtr->pad[1];
+
+ if (winW + winX > width) {
+ winW = width - winX;
+ }
+ if (winH + winY > height) {
+ winH = height - winY;
+ }
+
+ winX += x;
+ winY += y;
+
+ if (width < 1 || height < 1 || winW < 1 || winH < 1) {
+ if (itPtr->ddPtr->tkwin != Tk_Parent(itPtr->tkwin)) {
+ Tk_UnmaintainGeometry(itPtr->tkwin, itPtr->ddPtr->tkwin);
+ }
+
+ Tk_UnmapWindow(itPtr->tkwin);
+ } else {
+ if (itPtr->ddPtr->tkwin == Tk_Parent(itPtr->tkwin)) {
+ Tk_MapWindow(itPtr->tkwin);
+ Tk_MoveResizeWindow(itPtr->tkwin, winX, winY, winW, winH);
+ } else {
+ Tk_MaintainGeometry(itPtr->tkwin, itPtr->ddPtr->tkwin,
+ winX, winY, winW, winH);
+ }
+ }
+
+ TixpEndSubRegionDraw(display, drawable, foreGC,
+ &subReg);
+}
+
+static void
+Tix_WindowItemCalculateSize(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixWindowItem *itPtr = (TixWindowItem*)iPtr;
+
+ if (itPtr->tkwin != NULL) {
+ itPtr->size[0] = Tk_ReqWidth (itPtr->tkwin);
+ itPtr->size[1] = Tk_ReqHeight(itPtr->tkwin);
+ } else {
+ itPtr->size[0] = 0;
+ itPtr->size[1] = 0;
+ }
+
+ itPtr->size[0] += 2*itPtr->stylePtr->pad[0];
+ itPtr->size[1] += 2*itPtr->stylePtr->pad[1];
+
+ itPtr->selX = 0;
+ itPtr->selY = 0;
+ itPtr->selW = itPtr->size[0];
+ itPtr->selH = itPtr->size[1];
+}
+
+static char * Tix_WindowItemComponent(iPtr, x, y)
+ Tix_DItem * iPtr;
+ int x;
+ int y;
+{
+#if 0
+ TixWindowItem *itPtr = (TixWindowItem *)iPtr;
+#endif
+ static char * body = "body";
+
+ return body;
+}
+
+
+static void Tix_WindowItemStyleChanged(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixWindowItem *itPtr = (TixWindowItem *)iPtr;
+
+ if (itPtr->stylePtr == NULL) {
+ /* Maybe we haven't set the style to default style yet */
+ return;
+ }
+ Tix_WindowItemCalculateSize(iPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc(iPtr);
+ }
+}
+static void Tix_WindowItemLostStyle(iPtr)
+ Tix_DItem * iPtr;
+{
+ TixWindowItem *itPtr = (TixWindowItem *)iPtr;
+
+ itPtr->stylePtr = (TixWindowStyle*)TixGetDefaultDItemStyle(
+ itPtr->ddPtr, &tix_WindowItemType, iPtr, NULL);
+
+ Tix_WindowItemStyleChanged(iPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * SubWindowStructureProc --
+ *
+ * This procedure is invoked whenever StructureNotify events
+ * occur for a window that's managed as part of a display
+ * item. This procudure's only purpose is to clean up when
+ * windows are deleted.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The window is disassociated from the window item when it is
+ * deleted.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+SubWindowStructureProc(clientData, eventPtr)
+ ClientData clientData; /* Pointer to record describing window item. */
+ XEvent *eventPtr; /* Describes what just happened. */
+{
+ TixWindowItem * itPtr = (TixWindowItem *)clientData;
+ int oldWidth, oldHeight;
+
+ if (eventPtr->type == DestroyNotify) {
+ itPtr->tkwin = NULL;
+ }
+ oldWidth = itPtr->size[0];
+ oldHeight = itPtr->size[1];
+ Tix_WindowItemCalculateSize((Tix_DItem*)itPtr);
+
+ if (oldWidth != itPtr->size[0] || oldHeight != itPtr->size[1]) {
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc((Tix_DItem*)itPtr);
+ }
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * SubWindowRequestProc --
+ *
+ * This procedure is invoked whenever a window that's associated
+
+ * with a display item changes its requested dimensions.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The size and location on the screen of the window may change,
+ * depending on the options specified for the window item.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+SubWindowRequestProc(clientData, tkwin)
+ ClientData clientData; /* Pointer to record for window item.*/
+ Tk_Window tkwin; /* Window that changed its desired
+ * size. */
+{
+ TixWindowItem *itPtr = (TixWindowItem *) clientData;
+
+ Tix_WindowItemCalculateSize((Tix_DItem*)itPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc((Tix_DItem*)itPtr);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * SubWindowLostSlaveProc --
+ *
+ * This procedure is invoked by Tk whenever some other geometry
+ * claims control over a slave that used to be managed by us.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Forgets all information about the slave.
+ *
+ *--------------------------------------------------------------
+ */
+ /* ARGSUSED */
+static void
+SubWindowLostSlaveProc(clientData, tkwin)
+ ClientData clientData; /* TixWindowItem structure for slave
+ * window that was stolen away. */
+ Tk_Window tkwin; /* Tk's handle for the slave window. */
+{
+ TixWindowItem *itPtr = (TixWindowItem *) clientData;
+
+ if (itPtr->tkwin == NULL) {
+ return;
+ } else {
+ itPtr->tkwin = NULL;
+ }
+
+ Tk_DeleteEventHandler(tkwin, StructureNotifyMask,
+ SubWindowStructureProc, (ClientData) itPtr);
+ Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)NULL,
+ (ClientData) NULL);
+ if (itPtr->ddPtr->tkwin != Tk_Parent(tkwin)) {
+ Tk_UnmaintainGeometry(tkwin, itPtr->ddPtr->tkwin);
+ }
+ Tk_UnmapWindow(tkwin);
+
+ /*
+ * Inform the owner that the size has changed
+ */
+ Tix_WindowItemCalculateSize((Tix_DItem*)itPtr);
+ if (itPtr->ddPtr->sizeChangedProc != NULL) {
+ itPtr->ddPtr->sizeChangedProc((Tix_DItem*)itPtr);
+ }
+}
+/*----------------------------------------------------------------------
+ * Tix_WindowItemUnmap --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+Tix_WindowItemUnmap(itPtr)
+ TixWindowItem *itPtr;
+{
+ Tk_Window tkwin = itPtr->tkwin;
+
+ if (tkwin == NULL) {
+ return;
+ }
+
+ if (itPtr->ddPtr->tkwin != Tk_Parent(tkwin)) {
+ Tk_UnmaintainGeometry(tkwin, itPtr->ddPtr->tkwin);
+ }
+ Tk_UnmapWindow(tkwin);
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * Display styles
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+static Tix_DItemStyle *
+Tix_WindowStyleCreate(interp, tkwin, diTypePtr, name)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ char * name;
+ Tix_DItemInfo * diTypePtr;
+{
+ TixWindowStyle * stylePtr =
+ (TixWindowStyle *)ckalloc(sizeof(TixWindowStyle));
+
+ return (Tix_DItemStyle *)stylePtr;
+}
+
+static int
+Tix_WindowStyleConfigure(style, argc, argv, flags)
+ Tix_DItemStyle *style;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+{
+ TixWindowStyle * stylePtr = (TixWindowStyle *)style;
+ int oldPadX;
+ int oldPadY;
+
+ oldPadX = stylePtr->pad[0];
+ oldPadY = stylePtr->pad[1];
+
+ if (!(flags &TIX_DONT_CALL_CONFIG)) {
+ if (Tk_ConfigureWidget(stylePtr->interp, stylePtr->tkwin,
+ windowStyleConfigSpecs,
+ argc, argv, (char *)stylePtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ TixDItemStyleConfigureGCs(style);
+
+ if (oldPadX != stylePtr->pad[0] || oldPadY != stylePtr->pad[1]) {
+ TixDItemStyleChanged(stylePtr->diTypePtr, (Tix_DItemStyle *)stylePtr);
+ }
+
+ return TCL_OK;
+}
+
+static void Tix_WindowStyleFree(style)
+ Tix_DItemStyle *style;
+{
+ TixWindowStyle * stylePtr = (TixWindowStyle *)style;
+
+ Tk_FreeOptions(windowStyleConfigSpecs, (char *)stylePtr,
+ Tk_Display(stylePtr->tkwin), 0);
+ ckfree((char *)stylePtr);
+}
+
+static int bg_flags [4] = {
+ TIX_DITEM_NORMAL_BG,
+ TIX_DITEM_ACTIVE_BG,
+ TIX_DITEM_SELECTED_BG,
+ TIX_DITEM_DISABLED_BG
+};
+static int fg_flags [4] = {
+ TIX_DITEM_NORMAL_FG,
+ TIX_DITEM_ACTIVE_FG,
+ TIX_DITEM_SELECTED_FG,
+ TIX_DITEM_DISABLED_FG
+};
+
+static void
+Tix_WindowStyleSetTemplate(style, tmplPtr)
+ Tix_DItemStyle* style;
+ Tix_StyleTemplate * tmplPtr;
+{
+ TixWindowStyle * stylePtr = (TixWindowStyle *)style;
+ int i;
+
+ if (tmplPtr->flags & TIX_DITEM_PADX) {
+ stylePtr->pad[0] = tmplPtr->pad[0];
+ }
+ if (tmplPtr->flags & TIX_DITEM_PADY) {
+ stylePtr->pad[1] = tmplPtr->pad[1];
+ }
+
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & bg_flags[i]) {
+ if (stylePtr->colors[i].bg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].bg);
+ }
+ stylePtr->colors[i].bg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].bg));
+ }
+ }
+ for (i=0; i<4; i++) {
+ if (tmplPtr->flags & fg_flags[i]) {
+ if (stylePtr->colors[i].fg != NULL) {
+ Tk_FreeColor(stylePtr->colors[i].fg);
+ }
+ stylePtr->colors[i].fg = Tk_GetColor(
+ stylePtr->interp, stylePtr->tkwin,
+ Tk_NameOfColor(tmplPtr->colors[i].fg));
+ }
+ }
+
+ Tix_WindowStyleConfigure(style, 0, 0, TIX_DONT_CALL_CONFIG);
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ * Mapped Window List Handling
+ *
+ *
+ * Maintaining a list of mapped window items. Every host widgets should
+ * call these functions so that unwanted window items will not appear
+ * on the screen.
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+void Tix_SetWindowItemSerial(lPtr, iPtr, serial)
+ Tix_LinkList * lPtr;
+ Tix_DItem * iPtr;
+ int serial;
+{
+ TixWindowItem * itPtr = (TixWindowItem *)iPtr;
+ TixWindowItem * curr;
+ Tix_ListIterator li;
+ Tix_LinkListIteratorInit(&li);
+
+ itPtr->serial = serial;
+
+ for (Tix_LinkListStart(&mapWinListInfo, lPtr, &li);
+ !Tix_LinkListDone(&li);
+ Tix_LinkListNext (&mapWinListInfo, lPtr, &li)) {
+
+ curr = (TixWindowItem*)li.curr;
+
+ if (curr == itPtr) {
+ /* Don't want any duplication */
+ return;
+ }
+ }
+ Tix_LinkListAppend(&mapWinListInfo, lPtr, (char*)itPtr, 0);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * UnmapWindows --
+ *
+ * We need to unmap all those windows that were displayed last time
+ * but should be now invisible.
+ * Otherwise we will have some unwanted child windows floating
+ * around.
+ *----------------------------------------------------------------------
+ */
+void Tix_UnmapInvisibleWindowItems(lPtr, serial)
+ Tix_LinkList * lPtr;
+ int serial;
+{
+ TixWindowItem * curr;
+ Tix_ListIterator li;
+ Tix_LinkListIteratorInit(&li);
+
+ for (Tix_LinkListStart(&mapWinListInfo, lPtr, &li);
+ !Tix_LinkListDone(&li);
+ Tix_LinkListNext (&mapWinListInfo, lPtr, &li)) {
+
+ curr = (TixWindowItem*)li.curr;
+ if (curr->serial != serial) {
+ Tix_WindowItemUnmap(curr);
+ Tix_LinkListDelete(&mapWinListInfo, lPtr, &li);
+ }
+ }
+}
+
+void
+Tix_WindowItemListRemove(lPtr, iPtr)
+ Tix_LinkList * lPtr;
+ Tix_DItem * iPtr;
+{
+ TixWindowItem * curr;
+ Tix_ListIterator li;
+ Tix_LinkListIteratorInit(&li);
+
+ for (Tix_LinkListStart(&mapWinListInfo, lPtr, &li);
+ !Tix_LinkListDone(&li);
+ Tix_LinkListNext (&mapWinListInfo, lPtr, &li)) {
+
+ curr = (TixWindowItem*)li.curr;
+ if (curr == (TixWindowItem*)iPtr) {
+ Tix_WindowItemUnmap(curr);
+ Tix_LinkListDelete(&mapWinListInfo, lPtr, &li);
+ return;
+ }
+ }
+}
Added: external/tix-8.4.2.x/generic/tixError.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixError.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,80 @@
+
+/* $Id: tixError.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixError.c --
+ *
+ * Implements error handlers for Tix.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+int Tix_ArgcError(interp, argc, argv, prefixCount, message)
+ Tcl_Interp * interp;
+ int argc;
+ CONST84 char ** argv;
+ int prefixCount;
+ CONST84 char * message;
+{
+ int i;
+
+ Tcl_AppendResult(interp, "wrong # of arguments, should be \"",(char*)NULL);
+
+ for (i=0; i<prefixCount && i<argc; i++) {
+ Tcl_AppendResult(interp, argv[i], " ", (char*)NULL);
+ }
+
+ Tcl_AppendResult(interp, message, "\".", (char*)NULL);
+
+ return TCL_ERROR;
+}
+
+int Tix_ValueMissingError(interp, spec)
+ Tcl_Interp * interp;
+ CONST84 char * spec;
+{
+ Tcl_AppendResult(interp, "value for \"", spec,
+ "\" missing", (char*)NULL);
+ return TCL_ERROR;
+}
+
+
+/*----------------------------------------------------------------------
+ * Tix_UnknownPublicMethodError --
+ *
+ *
+ * ToDo: sort the list of commands.
+ *----------------------------------------------------------------------
+ */
+int Tix_UnknownPublicMethodError(interp, cPtr, widRec, method)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char * widRec;
+ CONST84 char * method;
+{
+ int i;
+ CONST84 char * lead = "";
+
+ Tcl_AppendResult(interp, "unknown option \"", method,
+ "\": must be ",
+ (char*)NULL);
+
+ for (i=0; i<cPtr->nMethods-1; i++) {
+ Tcl_AppendResult(interp, lead, cPtr->methods[i], (char*)NULL);
+ lead = ", ";
+ }
+ if (cPtr->nMethods>1) {
+ Tcl_AppendResult(interp, " or ", (char*)NULL);
+ }
+ if (cPtr->nMethods>0) {
+ Tcl_AppendResult(interp, cPtr->methods[i], (char*)NULL);
+ }
+ return TCL_ERROR;
+}
Added: external/tix-8.4.2.x/generic/tixForm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixForm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,2114 @@
+
+/* $Id: tixForm.c,v 1.3 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixForm.c --
+ *
+ * Implements the tixForm geometry manager, which has similar
+ * capability as the Motif Form geometry manager. Please
+ * refer to the documentation for the use of tixForm.
+ *
+ * This file implements the basic algorithm of tixForm.
+ *
+ * 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.
+ *
+ */
+
+/*
+ *
+ * ToDo:
+ *
+ * (1) Delete the master structure when there is no more client to manage
+ *
+ * Possible bugs:
+ * (1) a client is deleted but the master doesn't know
+ * (clientPtr->tkwin == NULL)
+ * (2) Whan a client S is deleted or detached from the master, all other
+ * clients attached to S must delete their reference to S
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixForm.h>
+#define DEBUG 0
+
+
+typedef struct SpringLink {
+ struct SpringLink * next;
+ FormInfo *clientPtr;
+} SpringLink;
+
+
+typedef struct SpringList {
+ SpringLink * head, * tail;
+ int num;
+} SpringList;
+
+
+/*
+ * SubCommands of the tixForm command.
+ */
+static TIX_DECLARE_SUBCMD(TixFm_SetGrid);
+static TIX_DECLARE_SUBCMD(TixFm_SetClient);
+static TIX_DECLARE_SUBCMD(TixFm_Check);
+static TIX_DECLARE_SUBCMD(TixFm_Forget);
+EXTERN TIX_DECLARE_SUBCMD(TixFm_Info);
+static TIX_DECLARE_SUBCMD(TixFm_Slaves);
+static TIX_DECLARE_SUBCMD(TixFm_Spring);
+
+static void ArrangeGeometry _ANSI_ARGS_((ClientData clientData));
+static void ArrangeWhenIdle _ANSI_ARGS_((MasterInfo * masterPtr));
+static void CancelArrangeWhenIdle _ANSI_ARGS_((
+ MasterInfo * masterPtr));
+static void CalculateMasterSize _ANSI_ARGS_((MasterInfo *master));
+static void CheckIntergrity _ANSI_ARGS_((FormInfo * clientPtr));
+static MasterInfo * GetMasterInfo _ANSI_ARGS_((Tk_Window tkwin,
+ int create));
+static void MasterStructureProc _ANSI_ARGS_((ClientData clientData,
+ XEvent * eventPtr));
+static int PinnClient _ANSI_ARGS_((FormInfo *clientPtr));
+static int PinnClientSide _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which, int isSelf));
+static int PlaceClientSide _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which, int isSelf));
+static int TestAndArrange _ANSI_ARGS_((MasterInfo *masterPtr));
+static int TixFm_CheckArgv _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char ** argv));
+static void TixFm_LostSlaveProc _ANSI_ARGS_((
+ ClientData clientData, Tk_Window tkwin));
+static void TixFm_ReqProc _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin));
+static int PlaceAllClients _ANSI_ARGS_((MasterInfo *masterPtr));
+static int PlaceClient _ANSI_ARGS_((FormInfo *clientPtr));
+static int PlaceSide_AttOpposite _ANSI_ARGS_((
+ FormInfo *clientPtr, int axis, int which));
+static int PlaceSide_AttAbsolute _ANSI_ARGS_((
+ FormInfo *clientPtr, int axis, int which));
+static int PlaceSide_AttNone _ANSI_ARGS_((
+ FormInfo *clientPtr, int axis, int which));
+static int PlaceSide_AttParallel _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which));
+static int PlaceSimpleCase _ANSI_ARGS_((
+ FormInfo *clientPtr, int axis, int which));
+static int PlaceWithSpring _ANSI_ARGS_((
+ FormInfo *clientPtr, int axis, int which));
+static int ReqSize _ANSI_ARGS_((Tk_Window tkwin,
+ int axis));
+static void UnmapClient _ANSI_ARGS_((FormInfo *clientPtr));
+static void MapClient _ANSI_ARGS_((FormInfo *clientPtr,
+ int x, int y, int width, int height));
+static int PinnSide_AttNone _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which));
+static int PinnSide_AttPercent _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which));
+static int PinnSide_AttOpposite _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which));
+static int PinnSide_AttParallel _ANSI_ARGS_((FormInfo *clientPtr,
+ int axis, int which));
+static SpringLink * AllocSpringLink _ANSI_ARGS_((void));
+static void FreeSpringLink _ANSI_ARGS_((SpringLink * link));
+static void FreeSpringList _ANSI_ARGS_((SpringList * listPtr));
+static void AddRightSprings _ANSI_ARGS_((SpringList * listPtr,
+ FormInfo *clientPtr));
+static void AddLeftSprings _ANSI_ARGS_((SpringList * listPtr,
+ FormInfo *clientPtr));
+
+/*
+ * A macro used to simplify the "pinn client" code
+ */
+#define PINN_CLIENT_SIDE(client, axis, which, isSelf) \
+ if (PinnClientSide(client, axis, which, isSelf) == TCL_ERROR) { \
+ return TCL_ERROR; \
+ }
+/*
+ * A macro used to simplify the "place client" code
+ */
+#define PLACE_CLIENT_SIDE(client, axis, which, isSelf) \
+ if (PlaceClientSide(client, axis, which, isSelf) == TCL_ERROR) { \
+ return TCL_ERROR; \
+ }
+
+/*
+ * Information about the Form geometry manager.
+ */
+static Tk_GeomMgr formType = {
+ "tixForm", /* name */
+ TixFm_ReqProc, /* requestProc */
+ TixFm_LostSlaveProc, /* lostSlaveProc */
+};
+
+/*
+ * Hash table used to map from Tk_Window tokens to corresponding
+ * FormInfo structures:
+ */
+static Tcl_HashTable formInfoHashTable;
+static Tcl_HashTable masterInfoHashTable;
+
+/*
+ * Have static variables in this module been initialized?
+ */
+static initialized = 0;
+
+static int ReqSize(tkwin, axis)
+ Tk_Window tkwin;
+ int axis;
+{
+ if (axis == AXIS_X) {
+ return Tk_ReqWidth(tkwin);
+ } else {
+ return Tk_ReqHeight(tkwin);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_FormCmd --
+ *
+ * This procedure is invoked to process the "tixForm" Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+int
+Tix_FormCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "check", 1, 1, TixFm_Check,
+ "master",},
+ {TIX_DEFAULT_LEN, "configure", 1, TIX_VAR_ARGS, TixFm_SetClient,
+ "slave ?-flag value ...?",},
+ {TIX_DEFAULT_LEN, "forget", 1, TIX_VAR_ARGS, TixFm_Forget,
+ "slave ?slave ...?",},
+ {TIX_DEFAULT_LEN, "grid", 1, TIX_VAR_ARGS, TixFm_SetGrid,
+ "master ?x_grids y_grids?"},
+ {TIX_DEFAULT_LEN, "info", 1, 2, TixFm_Info,
+ "slave ?-flag?",},
+ {TIX_DEFAULT_LEN, "slaves", 1, 1, TixFm_Slaves,
+ "master",},
+ {TIX_DEFAULT_LEN, "spring", 3, 3, TixFm_Spring,
+ "slave side strength",},
+ {TIX_DEFAULT_LEN, TIX_DEFAULT_SUBCMD, 0, 0, TixFm_SetClient, 0,
+ TixFm_CheckArgv,}
+ };
+
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? arg ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc, argv);
+}
+
+/*----------------------------------------------------------------------
+ *
+ * TixFm_SetGrid --
+ *
+ * Sets some defaults for the master window
+ *
+ *----------------------------------------------------------------------
+ */
+static int TixFm_SetGrid(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ char buff[100];
+ Tk_Window topLevel = (Tk_Window) clientData;
+ Tk_Window master;
+ MasterInfo* masterPtr;
+
+ master = Tk_NameToWindow(interp, argv[0], topLevel);
+
+ if (master == NULL) {
+ return TCL_ERROR;
+ } else {
+ masterPtr = GetMasterInfo(master, 1);
+ }
+
+ if (argc != 1 && argc != 3) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be ",
+ "tixForm grid master ?x_grids y_grids?", NULL);
+ return TCL_ERROR;
+ }
+
+ if (argc == 1) {
+ sprintf(buff, "%d %d", masterPtr->grids[0], masterPtr->grids[1]);
+ Tcl_AppendResult(interp, buff, NULL);
+ }
+ else {
+ int x, y;
+ if (Tcl_GetInt(interp, argv[1], &x) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[2], &y) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (x <=0 || y <=0) {
+ Tcl_AppendResult(interp, "Grid sizes must be positive integers",
+ NULL);
+ return TCL_ERROR;
+ }
+ masterPtr->grids[0] = x;
+ masterPtr->grids[1] = y;
+
+ ArrangeWhenIdle(masterPtr);
+ }
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ *
+ * TixFm_Forget --
+ *
+ * Sets some defaults for the master window
+ *
+ *----------------------------------------------------------------------
+ */
+static int TixFm_Forget(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ FormInfo * clientPtr;
+ Tk_Window topLevel = (Tk_Window) clientData;
+ int i;
+
+ for (i=0; i<argc; i++) {
+ clientPtr = TixFm_FindClientPtrByName(interp, argv[i], topLevel);
+ if (clientPtr == NULL) {
+ return TCL_ERROR;
+ }
+ else {
+ TixFm_ForgetOneClient(clientPtr);
+ }
+ }
+
+ return TCL_OK;
+}
+
+void TixFm_ForgetOneClient(clientPtr)
+ FormInfo * clientPtr;
+{
+ if (clientPtr != NULL) {
+ Tk_DeleteEventHandler(clientPtr->tkwin, StructureNotifyMask,
+ TixFm_StructureProc, (ClientData) clientPtr);
+ Tk_ManageGeometry(clientPtr->tkwin, (Tk_GeomMgr *) NULL,
+ (ClientData) NULL);
+ if (clientPtr->master->tkwin != Tk_Parent(clientPtr->tkwin)) {
+ Tk_UnmaintainGeometry(clientPtr->tkwin,
+ clientPtr->master->tkwin);
+ }
+ Tk_UnmapWindow(clientPtr->tkwin);
+ TixFm_Unlink(clientPtr);
+ }
+}
+
+/*----------------------------------------------------------------------
+ *
+ * TixFm_Slaves --
+ *
+ * retuen the pathnames of the clients of a master window
+ *
+ *----------------------------------------------------------------------
+ */
+static int TixFm_Slaves(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window topLevel = (Tk_Window) clientData;
+ Tk_Window master;
+ MasterInfo* masterPtr;
+ FormInfo * clientPtr;
+
+ master = Tk_NameToWindow(interp, argv[0], topLevel);
+
+ if (master == NULL) {
+ return TCL_ERROR;
+ } else {
+ masterPtr = GetMasterInfo(master, 0);
+ }
+
+ if (masterPtr == 0) {
+ Tcl_AppendResult(interp, "Window \"", argv[0],
+ "\" is not a tixForm master window", NULL);
+ return TCL_ERROR;
+ }
+
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ Tcl_AppendElement(interp, Tk_PathName(clientPtr->tkwin));
+ }
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ *
+ * TixFm_Spring --
+ *
+ * Sets the spring strength of a slave's attachment sides
+ *
+ *----------------------------------------------------------------------
+ */
+static int TixFm_Spring(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window topLevel = (Tk_Window) clientData;
+ Tk_Window tkwin;
+ FormInfo * clientPtr;
+ int strength;
+ int i, j;
+ size_t len;
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[0], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if ((clientPtr = TixFm_GetFormInfo(tkwin, 0)) == NULL) {
+ Tcl_AppendResult(interp, "Window \"", argv[0],
+ "\" is not managed by the tixForm manager", NULL);
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetInt(interp, argv[2], &strength) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ len = strlen(argv[1]);
+ if (strncmp(argv[1], "-top", len) == 0) {
+ i = 1; j = 0;
+ }
+ else if (strncmp(argv[1], "-bottom", len) == 0) {
+ i = 1; j = 1;
+ }
+ else if (strncmp(argv[1], "-left", len) == 0) {
+ i = 0; j = 0;
+ }
+ else if (strncmp(argv[1], "-right", len) == 0) {
+ i = 0; j = 1;
+ }
+ else {
+ Tcl_AppendResult(interp, "Unknown option \"", argv[1],
+ "\"", NULL);
+ return TCL_ERROR;
+ }
+
+ clientPtr->spring[i][j] = strength;
+
+ if (clientPtr->attType[i][j] == ATT_OPPOSITE) {
+ FormInfo * oppo;
+
+ oppo = clientPtr->att[i][j].widget;
+ oppo->spring[i][!j] = strength;
+
+ if (strength != 0 && clientPtr->strWidget[i][j] == NULL) {
+ clientPtr->strWidget[i][j] = oppo;
+
+ if (oppo->strWidget[i][!j] != clientPtr) {
+ if (oppo->strWidget[i][!j] != NULL) {
+ oppo->strWidget[i][!j]->strWidget[i][j] = NULL;
+ oppo->strWidget[i][!j]->spring[i][j] = 0;
+ }
+ }
+ oppo->strWidget[i][!j] = clientPtr;
+ }
+ }
+
+ ArrangeWhenIdle(clientPtr->master);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ *
+ * TixFm_Check --
+ *
+ * Tests whether the master has circular reference.
+ *
+ *----------------------------------------------------------------------
+ */
+static int TixFm_Check(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ MasterInfo * masterPtr;
+ Tk_Window topLevel = (Tk_Window) clientData;
+ Tk_Window master;
+
+ master = Tk_NameToWindow(interp, argv[0], topLevel);
+ if (master == NULL) {
+ return TCL_ERROR;
+ }
+
+ masterPtr = GetMasterInfo(master, 1);
+
+ if (TestAndArrange(masterPtr) == TCL_OK) {
+ /* OK: no circular dependency */
+ Tcl_AppendResult(interp, "0", NULL);
+ } else {
+ /* Bad: circular dependency */
+ Tcl_AppendResult(interp, "1", NULL);
+ }
+ return TCL_OK;
+}
+
+/* Check the arguments to the default subcommand: TixFm_SetClient()
+ */
+static int TixFm_CheckArgv(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ if ((argc >=1) && (argv[0][0] != '.')) {
+ return 0; /* sorry, we expect a window name */
+ } else {
+ return 1;
+ }
+}
+
+
+static int TixFm_SetClient(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window topLevel = (Tk_Window) clientData;
+ Tk_Window client, master;
+ FormInfo * clientPtr;
+ MasterInfo * masterPtr;
+ CONST84 char *pathName; /* path name of the client window */
+
+ if (argc < 1 || (((argc-1) %2) != 0)) {
+ Tcl_AppendResult(interp, "Wrong # of arguments, should be ",
+ "tixForm configure slave ?-flag value ...?", NULL);
+ return TCL_ERROR;
+ }
+ pathName = argv[0];
+ argc -=1;
+ argv +=1;
+
+ client = Tk_NameToWindow(interp, pathName, topLevel);
+
+ if (client == NULL) {
+ return TCL_ERROR;
+ } else if (Tk_IsTopLevel(client)) {
+ Tcl_AppendResult(interp, "can't put \"", pathName,
+ "\"in a form: it's a top-level window", (char *) NULL);
+ return TCL_ERROR;
+ } else {
+ clientPtr = TixFm_GetFormInfo(client, 1);
+ }
+
+ /* Check if the first argument is "-in". If so,
+ * reset the master of this client
+ */
+ if (argc >= 2 && strcmp(argv[0], "-in")==0) {
+ if ((master=Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+ argc -= 2;
+ argv += 2;
+ masterPtr = GetMasterInfo(master, 1);
+ }
+ else if (clientPtr->master == NULL) {
+ if ((master = Tk_Parent(client))==NULL) {
+ return TCL_ERROR;
+ }
+ masterPtr = GetMasterInfo(master, 1);
+ }
+ else {
+ masterPtr =clientPtr->master;
+ }
+
+ if (clientPtr->master != masterPtr) {
+ if (clientPtr->master != NULL) {
+ /* Take clientPtr from old master */
+ Tk_ManageGeometry(clientPtr->tkwin, (Tk_GeomMgr *) NULL,
+ (ClientData) NULL);
+ if (clientPtr->master->tkwin != Tk_Parent(clientPtr->tkwin)) {
+ Tk_UnmaintainGeometry(clientPtr->tkwin,
+ clientPtr->master->tkwin);
+ }
+ TixFm_UnlinkFromMaster(clientPtr);
+ }
+
+ /* attach the client to the master */
+ TixFm_AddToMaster(masterPtr, clientPtr);
+ }
+
+ if (argc > 0) {
+ if (TixFm_Configure(clientPtr, topLevel, interp, argc,
+ argv)==TCL_ERROR){
+ return TCL_ERROR;
+ }
+ }
+
+ ArrangeWhenIdle(clientPtr->master);
+
+ return TCL_OK;
+}
+
+
+/* The caller of this function needs to find out a pointer to a client
+ * that is already managed by tixForm.
+ */
+FormInfo * TixFm_FindClientPtrByName(interp, name, topLevel)
+ Tcl_Interp * interp;
+ CONST84 char * name;
+ Tk_Window topLevel;
+{
+ Tk_Window tkwin;
+ FormInfo * clientPtr;
+
+ if ((tkwin = Tk_NameToWindow(interp, name, topLevel)) == NULL) {
+ return NULL;
+ }
+
+ if ((clientPtr = TixFm_GetFormInfo(tkwin, 0)) == NULL) {
+ Tcl_AppendResult(interp, "Window \"", name,
+ "\" is not managed by the tixForm manager", NULL);
+ return NULL;
+ }
+ return clientPtr;
+}
+
+
+static int TestAndArrange(masterPtr)
+ MasterInfo *masterPtr;
+{
+ FormInfo *clientPtr;
+ int i,j;
+
+ /*
+ * First mark all clients as unpinned, and clean the opposite flags,
+ * Check the attachment intergrity
+ */
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ if (clientPtr->tkwin != NULL) {
+ for (i=0; i<2; i++) {
+ for (j=0; j<2; j++) {
+ clientPtr->side[i][j].pcnt = 0;
+ clientPtr->side[i][j].disp = 0;
+ }
+ /* clear all flags */
+ clientPtr->sideFlags[i] = 0;
+ }
+ clientPtr->depend = 0;
+ CheckIntergrity(clientPtr);
+ }
+ }
+
+ /*
+ * Try to determine all the client's geometry
+ */
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ if (clientPtr->tkwin == NULL) { /* it was deleted */
+ continue;
+ }
+ for (i=0; i<2; i++) {
+ if ((clientPtr->sideFlags[i] & PINNED_ALL) != PINNED_ALL) {
+ if (PinnClient(clientPtr) == TCL_ERROR) {
+ /*
+ * Detected circular dependency
+ */
+ return TCL_ERROR;
+ }
+ break;
+ }
+ }
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * UnmapClient
+ *
+ * Unmap the client from the screen, using different methods according to
+ * the relationship between the client and slave.
+ */
+static void UnmapClient(clientPtr)
+ FormInfo *clientPtr;
+{
+ if (clientPtr->master->tkwin == Tk_Parent(clientPtr->tkwin)) {
+ Tk_UnmapWindow(clientPtr->tkwin);
+ }
+ else {
+ Tk_UnmaintainGeometry(clientPtr->tkwin, clientPtr->master->tkwin);
+ Tk_UnmapWindow(clientPtr->tkwin);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * MapClient
+ *
+ * Map the client to the screen, using different methods according to
+ * the relationship between the client and slave.
+ */
+static void MapClient(clientPtr, x, y, width, height)
+ FormInfo *clientPtr;
+ int x;
+ int y;
+ int width;
+ int height;
+{
+ if (clientPtr->master->tkwin == Tk_Parent(clientPtr->tkwin)) {
+ Tk_MoveResizeWindow(clientPtr->tkwin, x, y, width, height);
+ Tk_MapWindow(clientPtr->tkwin);
+ }
+ else {
+ Tk_MaintainGeometry(clientPtr->tkwin, clientPtr->master->tkwin,
+ x, y, width, height);
+ Tk_MapWindow(clientPtr->tkwin);
+ }
+}
+
+static void ArrangeWhenIdle(masterPtr)
+ MasterInfo * masterPtr;
+{
+ if (!(masterPtr->flags.repackPending || masterPtr->flags.isDeleted)) {
+ masterPtr->flags.repackPending = 1;
+ Tk_DoWhenIdle(ArrangeGeometry, (ClientData) masterPtr);
+ }
+}
+
+static void
+CancelArrangeWhenIdle(masterPtr)
+ MasterInfo * masterPtr;
+{
+ if (masterPtr->flags.repackPending) {
+ Tk_CancelIdleCall(ArrangeGeometry, (ClientData) masterPtr);
+ masterPtr->flags.repackPending = 0;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * ArrangeGeometry --
+ *
+ * The heart of the Form geometry manager: calculates the sizes of
+ * the clients and the master, then arrange the clients inside the
+ * master according to their attachments.
+ */
+static void ArrangeGeometry(clientData)
+ ClientData clientData; /* Structure describing parent whose clients
+ * are to be re-layed out. */
+{
+ MasterInfo *masterPtr;
+ FormInfo *clientPtr;
+ int i, j, coord[2][2];
+ int mSize[2]; /* Size of master */
+ int cSize[2]; /* Size of client */
+ int intBWidth; /* internal borderWidth of master */
+
+ masterPtr = (MasterInfo *) clientData;
+
+ if (((Tk_FakeWin *) (masterPtr->tkwin))->flags & TK_ALREADY_DEAD) {
+ masterPtr->flags.repackPending = 0;
+ return;
+ }
+
+ if (masterPtr->flags.isDeleted) {
+ return;
+ }
+
+ if (masterPtr->numClients == 0) {
+ masterPtr->flags.repackPending = 0;
+ return;
+ }
+
+ if (TestAndArrange(masterPtr)) { /* Detected circular dependency */
+ fprintf(stderr, "circular dependency.\n");
+ masterPtr->flags.repackPending = 0;
+ return;
+ }
+
+ /*
+ * Try to determine the required size of the master
+ */
+ CalculateMasterSize(masterPtr);
+
+ /*
+ * If the requested size is not equal to the actual size of the master,
+ * we might have to ask TK to change the master's geometry
+ */
+
+ if ((masterPtr->reqSize[0] != Tk_ReqWidth(masterPtr->tkwin))
+ || (masterPtr->reqSize[1] != Tk_ReqHeight(masterPtr->tkwin))) {
+
+ if (masterPtr->numRequests++ > 50) {
+ fprintf(stderr,
+ "(TixForm) Error:Trying to use more than one geometry\n\
+ manager for the same master window.\n\
+ Giving up after 50 iterations.\n");
+ } else {
+ masterPtr->flags.repackPending = 0;
+ Tk_GeometryRequest(masterPtr->tkwin,
+ masterPtr->reqSize[0], masterPtr->reqSize[1]);
+
+ ArrangeWhenIdle(masterPtr);
+ return;
+ }
+ }
+
+ masterPtr->numRequests = 0;
+
+ if (!Tk_IsMapped(masterPtr->tkwin)) {
+ goto done;
+ }
+
+ intBWidth = Tk_InternalBorderWidth(masterPtr->tkwin);
+ mSize[0] = Tk_Width(masterPtr->tkwin) - 2*intBWidth;
+ mSize[1] = Tk_Height(masterPtr->tkwin) - 2*intBWidth;
+
+ if (mSize[0] < 1 || mSize[1] <1) {
+ /* Master is not visible. Don't bother to place the clients
+ */
+ masterPtr->flags.repackPending = 0;
+ return;
+ }
+
+ /*
+ * Now set all the client's geometry
+ */
+ if (PlaceAllClients(masterPtr) != TCL_OK) {
+ panic("circular dependency");
+ }
+
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ if (clientPtr->tkwin == NULL) {
+ continue;
+ }
+ for (i=0; i<2; i++) {
+ for (j=0; j<2; j++) {
+ coord[i][j] = clientPtr->posn[i][j];
+ if (j == 1) {
+ coord[i][j] -= 1;
+ }
+ }
+ cSize[i] = coord[i][1] - coord[i][0]
+ - clientPtr->pad[i][0] - clientPtr->pad[i][1] + 1;
+ }
+
+ if ((cSize[0] <= 0) || (cSize[1] <= 0)) {
+ /*
+ * Window is too small, don't even bother to map
+ */
+ UnmapClient(clientPtr);
+ } else if ((coord[0][1] < 0) || (coord[1][1] < 0)) {
+ /*
+ * Window is outside of the master (left or top)
+ */
+ UnmapClient(clientPtr);
+ } else if ((coord[0][0] > mSize[0]) || (coord[1][0] > mSize[1])) {
+ /*
+ * Window is outside of the master (bottom or right)
+ */
+ UnmapClient(clientPtr);
+ } else {
+ /*
+ * Window is visible, then map it
+ */
+ MapClient(clientPtr,
+ coord[0][0] + clientPtr->pad[0][0] + intBWidth,
+ coord[1][0] + clientPtr->pad[1][0] + intBWidth,
+ cSize[0], cSize[1]);
+ }
+ }
+
+ done:
+ masterPtr->flags.repackPending = 0;
+}
+
+static int
+PinnSide_AttNone(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to pinn down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ int reqSize;
+
+ if (clientPtr->attType[axis][NEXT_SIDE(which)] == ATT_NONE) {
+ if (which == SIDE0) {
+ clientPtr->side[axis][which].pcnt = 0;
+ clientPtr->side[axis][which].disp = 0;
+ return TCL_OK;
+ }
+ }
+
+ reqSize = ReqSize(clientPtr->tkwin, axis) +
+ clientPtr->pad[axis][0] + clientPtr->pad[axis][1];
+
+ PINN_CLIENT_SIDE(clientPtr, axis, NEXT_SIDE(which), 1);
+
+ clientPtr->side[axis][which].pcnt =
+ clientPtr->side[axis][NEXT_SIDE(which)].pcnt;
+
+ switch (which) {
+ case SIDE0:
+ clientPtr->side[axis][which].disp =
+ clientPtr->side[axis][NEXT_SIDE(which)].disp - reqSize;
+ break;
+
+ case SIDE1:
+ clientPtr->side[axis][which].disp =
+ clientPtr->side[axis][NEXT_SIDE(which)].disp + reqSize;
+ break;
+ }
+
+ return TCL_OK;
+}
+
+static int
+PinnSide_AttPercent(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to pinn down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ clientPtr->side[axis][which].pcnt = clientPtr->att[axis][which].grid;
+ clientPtr->side[axis][which].disp = clientPtr->off[axis][which];
+
+ return TCL_OK;
+}
+
+static int
+PinnSide_AttOpposite(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to pinn down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ FormInfo * attachPtr;
+
+ attachPtr = clientPtr->att[axis][which].widget;
+
+ PINN_CLIENT_SIDE(attachPtr, axis, NEXT_SIDE(which), 0);
+
+ clientPtr->side[axis][which].pcnt =
+ attachPtr->side[axis][NEXT_SIDE(which)].pcnt;
+ clientPtr->side[axis][which].disp =
+ attachPtr->side[axis][NEXT_SIDE(which)].disp +
+ clientPtr->off[axis][which];
+
+ return TCL_OK;
+}
+
+static int
+PinnSide_AttParallel(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to pinn down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ FormInfo * attachPtr;
+
+ attachPtr = clientPtr->att[axis][which].widget;
+
+ PINN_CLIENT_SIDE(attachPtr, axis, which, 0);
+
+ clientPtr->side[axis][which].pcnt =
+ attachPtr->side[axis][which].pcnt;
+ clientPtr->side[axis][which].disp =
+ attachPtr->side[axis][which].disp +
+ clientPtr->off[axis][which];
+
+ return TCL_OK;
+}
+
+
+static int PinnClientSide(clientPtr, axis, which, isSelf)
+ FormInfo *clientPtr; /* The client to pinn down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+ int isSelf;
+{
+ if ((which == SIDE0) && (clientPtr->sideFlags[axis] & PINNED_SIDE0)) {
+ /* already pinned */
+ return TCL_OK;
+ }
+ if ((which == SIDE1) && (clientPtr->sideFlags[axis] & PINNED_SIDE1)) {
+ /* already pinned */
+ return TCL_OK;
+ }
+
+ if ((clientPtr->depend > 0) && !isSelf) {
+ /*
+ * circular dependency detected
+ */
+ return TCL_ERROR;
+ }
+ clientPtr->depend ++;
+
+ switch (clientPtr->attType[axis][which]) {
+ case ATT_NONE:
+ if (PinnSide_AttNone(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+
+ case ATT_OPPOSITE:
+ if (PinnSide_AttOpposite(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+
+ case ATT_PARALLEL:
+ if (PinnSide_AttParallel(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+
+ case ATT_GRID:
+ if (PinnSide_AttPercent(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+ }
+
+ if (which == SIDE0) {
+ clientPtr->sideFlags[axis] |= PINNED_SIDE0;
+ } else {
+ clientPtr->sideFlags[axis] |= PINNED_SIDE1;
+ }
+ clientPtr->depend --;
+
+ return TCL_OK;
+}
+
+static int PinnClient(clientPtr)
+ FormInfo *clientPtr;
+{
+ int i;
+
+ for (i=0; i<2; i++) {
+ if (!(clientPtr->sideFlags[i] & PINNED_SIDE0)) {
+ PINN_CLIENT_SIDE(clientPtr, i, SIDE0, 0);
+ }
+ if (!(clientPtr->sideFlags[i] & PINNED_SIDE1)) {
+ PINN_CLIENT_SIDE(clientPtr, i, SIDE1, 0);
+ }
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * CalculateMasterSize --
+ *
+ * This internal procedure is used to find out the required
+ * size of a master window.
+ *
+ * Results:
+ * The return value is a pointer to the FormInfo structure
+ * corresponding to tkwin.
+ *
+ * Side effects:
+ * the reqSize[2] values in masterPtr is updated.
+ *
+ *--------------------------------------------------------------
+ */
+static void CalculateMasterSize(masterPtr)
+ MasterInfo *masterPtr;
+{
+ FormInfo *clientPtr;
+ int i, cSize[2];
+ int req[2];
+ int intBWidth;
+
+ /* Information about the master window */
+ intBWidth = Tk_InternalBorderWidth(masterPtr->tkwin);
+ req[0] = req[1] = 2*intBWidth;
+
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ if (clientPtr->tkwin == NULL) {
+ continue;
+ }
+ cSize[0] = Tk_ReqWidth(clientPtr->tkwin);
+ cSize[1] = Tk_ReqHeight(clientPtr->tkwin);
+ cSize[0] += clientPtr->pad[0][0]+clientPtr->pad[0][1];
+ cSize[1] += clientPtr->pad[1][0]+clientPtr->pad[1][1];
+
+ for (i=0; i<2; i++) {
+ /* The required size of the master depends on
+ * (1) natural sizes of the clients
+ * (2) perc anchor points of the clients
+ * Ideally, the master must include as much visible parts
+ * of the clients as possible. It should also have a size
+ * big enough so that all the clients' requested (natural)
+ * sizes are satisfied. The algorithm is fairly simple, but
+ * it took me quite a while to figure out and it quite difficult
+ * to explain here. Please look at the following in-line
+ * examples.
+ */
+ int p0 = clientPtr->side[i][0].pcnt;
+ int p1 = clientPtr->side[i][1].pcnt;
+ int d0 = clientPtr->side[i][0].disp;
+ int d1 = clientPtr->side[i][1].disp;
+
+ int req0 = 0;
+ int req1 = 0;
+ int reqx = 0;
+
+ if (d0 < 0 && p0 != 0) {
+ req0 = -d0 * masterPtr->grids[i] / p0;
+ }
+ if (d1 > 0 && p1 != masterPtr->grids[i]) {
+ req1 = d1 * masterPtr->grids[i] / (masterPtr->grids[i] - p1);
+ }
+
+ if (p0 == p1) {
+ /* case 1 */
+ /* Example: p0 = p1 = 10%; d0 = -10, d1 = 10
+ * then mSize should at least be 100 pixels so that
+ * side 0 can be visible. They are calculated in the
+ * previous two if statements
+ * result:
+ * size = 100
+ * side0 = 0;
+ * side1 = 20;
+ */
+
+ /* Two sides are attached to the same perc anchor point */
+ if (d0 >= d1) {
+ /* widget invisible */
+ req0 = req1 = 0;
+ }
+ }
+ else if (p0 < p1) {
+ /* case 2 */
+ /* Example: p0 10%, p2 = 20%; cSize = 35, d0 = -5, d1 = 0
+ * then mSize should at least be 300 pixels so that
+ * cSize can be satisfied.
+ * result:
+ * size = 300
+ * side0 = 25;
+ * side1 = 60;
+ */
+ int x = cSize[i];
+ if (p0 != 0 || d0 > 0) {
+ x += d0;
+ }
+ if (p1 != masterPtr->grids[i] || d1 < 0) {
+ x += -d1;
+ }
+ if (x > 0) {
+ reqx = x * masterPtr->grids[i] / (p1 - p0);
+ }
+ }
+ else {
+ /* case 2 */
+ /* This is very similar to case 1, except there are more cases
+ * in which the widget becomes invisible
+ */
+ if (d0 >=0 || d1 <=0) {
+ /* widget invisible */
+ req0 = req1 = 0;
+ }
+ }
+
+ if (req[i] < req0) {
+ req[i] = req0;
+ }
+ if (req[i] < req1) {
+ req[i] = req1;
+ }
+ if (req[i] < reqx) {
+ req[i] = reqx;
+ }
+ }
+ }
+
+ req[0] += 2*intBWidth;
+ req[1] += 2*intBWidth;
+
+ masterPtr->reqSize[0] = (req[0] > 0) ? req[0] : 1;
+ masterPtr->reqSize[1] = (req[1] > 0) ? req[1] : 1;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixFm_StructureProc --
+ *
+ * This procedure is invoked by the Tk event dispatcher in response
+ * to StructureNotify events.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * If a window was just deleted, clean up all its packer-related
+ * information. If it was just resized, repack its clients, if
+ * any.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixFm_StructureProc(clientData, eventPtr)
+ ClientData clientData; /* Our information about window
+ * referred to by eventPtr. */
+ XEvent *eventPtr; /* Describes what just happened. */
+{
+ FormInfo *clientPtr = (FormInfo *) clientData;
+
+ switch (eventPtr->type) {
+ case ConfigureNotify:
+ ArrangeWhenIdle(clientPtr->master);
+ break;
+
+ case DestroyNotify:
+ if (clientPtr->master) {
+ TixFm_Unlink(clientPtr);
+ }
+ break;
+
+ case MapNotify:
+ break;
+
+ case UnmapNotify:
+ break;
+ }
+}
+
+static void
+TixFm_ReqProc(clientData, tkwin)
+ ClientData clientData; /* TixForm's information about
+ * window that got new preferred
+ * geometry. */
+ Tk_Window tkwin; /* Other Tk-related information
+ * about the window. */
+{
+ FormInfo *clientPtr = (FormInfo *) clientData;
+
+ if (clientPtr) {
+ ArrangeWhenIdle(clientPtr->master);
+ }
+}
+
+static void
+MasterStructureProc(clientData, eventPtr)
+ ClientData clientData; /* Our information about window
+ * referred to by eventPtr. */
+ XEvent *eventPtr; /* Describes what just happened. */
+{
+ MasterInfo *masterPtr = (MasterInfo *) clientData;
+
+ switch (eventPtr->type) {
+ case ConfigureNotify:
+ if (masterPtr->numClients > 0) {
+ ArrangeWhenIdle(masterPtr);
+ }
+ break;
+
+ case DestroyNotify:
+ TixFm_DeleteMaster(masterPtr);
+ break;
+
+ case MapNotify:
+ break;
+
+ case UnmapNotify:
+ break;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * TixFm_LostSlaveProc --
+ *
+ * This procedure is invoked by Tk whenever some other geometry
+ * claims control over a slave that used to be managed by us.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Forgets all packer-related information about the slave.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+TixFm_LostSlaveProc(clientData, tkwin)
+ ClientData clientData; /* Form structure for slave window that
+ * was stolen away. */
+ Tk_Window tkwin; /* Tk's handle for the slave window. */
+{
+ FormInfo *clientPtr = (FormInfo *) clientData;
+
+ Tk_DeleteEventHandler(clientPtr->tkwin, StructureNotifyMask,
+ TixFm_StructureProc, (ClientData) clientPtr);
+ if (clientPtr->master->tkwin != Tk_Parent(clientPtr->tkwin)) {
+ Tk_UnmaintainGeometry(clientPtr->tkwin, clientPtr->master->tkwin);
+ }
+ Tk_UnmapWindow(clientPtr->tkwin);
+ TixFm_Unlink(clientPtr);
+}
+
+/*
+ * Do some basic integrity checking
+ * --> right, left cannot both attach to none
+ * --> top, bottom cannot both attach to none.
+ * Otherwise, top or left is always set to attach at {pixel 0}
+ */
+static void CheckIntergrity(clientPtr)
+ FormInfo * clientPtr;
+{
+#if 0
+ /* Check the X axis */
+ if ((clientPtr->attType[0][0] == ATT_NONE)
+ &&(clientPtr->attType[0][1] == ATT_NONE)) {
+ clientPtr->attType[0][0] = ATT_DEFAULT_PIXEL;
+ clientPtr->att[0][0].grid = 0;
+ }
+
+ /* Check the Y axis */
+ if ((clientPtr->attType[1][0] == ATT_NONE)
+ &&(clientPtr->attType[1][1] == ATT_NONE)) {
+ clientPtr->attType[1][0] = ATT_DEFAULT_PIXEL;
+ clientPtr->att[1][0].grid = 0;
+ }
+#endif
+}
+
+/*----------------------------------------------------------------------
+ * Memory management routines
+ *
+ *----------------------------------------------------------------------
+ */
+void TixFm_AddToMaster(masterPtr, clientPtr)
+ MasterInfo *masterPtr;
+ FormInfo *clientPtr;
+{
+ if (clientPtr->master == masterPtr) {
+ /* already in master */
+ return;
+ }
+
+ if (clientPtr->master != NULL) {
+ /* We have to migrate the widget to a different parent*/
+ }
+
+ clientPtr->master = masterPtr;
+
+ if (masterPtr->client == NULL) {
+ masterPtr->client = clientPtr;
+ masterPtr->client_tail = clientPtr;
+ } else {
+ masterPtr->client_tail->next = clientPtr;
+ }
+ clientPtr->next = NULL;
+ masterPtr->client_tail = clientPtr;
+
+ ++ masterPtr->numClients;
+
+ /* Manage its geometry using my proc */
+ Tk_ManageGeometry(clientPtr->tkwin, &formType, (ClientData)clientPtr);
+}
+
+void TixFm_UnlinkFromMaster(clientPtr)
+ FormInfo *clientPtr;
+{
+ MasterInfo *masterPtr;
+ FormInfo *ptr, *prev;
+
+#if DEBUG
+ fprintf(stderr, "unlinking %s\n", Tk_PathName(clientPtr->tkwin));
+#endif
+
+ masterPtr = clientPtr->master;
+
+ /* First: get rid of the reference of this widget from other clients */
+ for (ptr=masterPtr->client; ptr; ptr=ptr->next) {
+ if (ptr != clientPtr) {
+ int i, j;
+ for (i=0; i<2; i++) {
+ for (j=0; j<2; j++) {
+ switch (ptr->attType[i][j]) {
+ case ATT_OPPOSITE:
+ case ATT_PARALLEL:
+ if (ptr->att[i][j].widget == clientPtr) {
+ ptr->attType[i][j] = ATT_GRID;
+ ptr->att[i][j].grid = 0;
+ ptr->off[i][j] = ptr->posn[i][j];
+ }
+ break;
+ }
+ }
+ if (ptr->strWidget[i][j] == clientPtr) {
+ ptr->strWidget[i][j] = 0;
+ }
+ }
+ }
+ }
+
+ /* Second: delete this client from the list */
+ for (prev=ptr=masterPtr->client; ptr; prev=ptr,ptr=ptr->next) {
+ if (ptr == clientPtr) {
+ if (prev==ptr) {
+ if (masterPtr->numClients == 1) {
+ masterPtr->client_tail = NULL;
+ }
+ masterPtr->client = ptr->next;
+ }
+ else {
+ if (ptr->next == NULL) {
+ masterPtr->client_tail = prev;
+ }
+ prev->next = ptr->next;
+ }
+ break;
+ }
+ }
+ -- masterPtr->numClients;
+}
+
+void TixFm_FreeMasterInfo(clientData)
+ ClientData clientData;
+{
+ MasterInfo *masterPtr = (MasterInfo *)clientData;
+ ckfree((char*)masterPtr);
+}
+
+void TixFm_DeleteMaster(masterPtr)
+ MasterInfo *masterPtr;
+{
+ Tcl_HashEntry *hPtr;
+ FormInfo *clientPtr, * toFree;
+
+ if (masterPtr->flags.isDeleted) {
+ return;
+ }
+
+ Tk_DeleteEventHandler(masterPtr->tkwin, StructureNotifyMask,
+ MasterStructureProc, (ClientData) masterPtr);
+
+ clientPtr=masterPtr->client;
+ while(clientPtr) {
+ toFree = clientPtr;
+ clientPtr = clientPtr->next;
+ TixFm_ForgetOneClient(toFree);
+ }
+
+ hPtr = Tcl_FindHashEntry(&masterInfoHashTable,(char*)masterPtr->tkwin);
+ if (hPtr) {
+ Tcl_DeleteHashEntry(hPtr);
+ }
+ CancelArrangeWhenIdle(masterPtr);
+ masterPtr->flags.isDeleted = 1;
+ Tk_EventuallyFree((ClientData)masterPtr,
+ (Tix_FreeProc*)TixFm_FreeMasterInfo);
+}
+
+
+void TixFm_Unlink(clientPtr)
+ FormInfo *clientPtr;
+{
+ Tcl_HashEntry *hPtr;
+ MasterInfo *masterPtr;
+
+ /* Delete this clientPtr from the master's list */
+ TixFm_UnlinkFromMaster(clientPtr);
+
+ /* Eventually free this clientPtr structure */
+ hPtr = Tcl_FindHashEntry(&formInfoHashTable,(char*)clientPtr->tkwin);
+ if (hPtr != NULL) {
+ Tcl_DeleteHashEntry(hPtr);
+ }
+ clientPtr->tkwin = NULL;
+ masterPtr = clientPtr->master;
+ ckfree((char*)clientPtr);
+
+ ArrangeWhenIdle(masterPtr);
+}
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * TixFm_GetFormInfo --
+ *
+ * This internal procedure is used to locate a FormInfo
+ * structure for a given window, creating one if one
+ * doesn't exist already.
+ *
+ * Results:
+ * The return value is a pointer to the FormInfo structure
+ * corresponding to tkwin.
+ *
+ * Side effects:
+ * A new FormInfo structure may be created. If so, then
+ * a callback is set up to clean things up when the
+ * window is deleted.
+ *
+ *--------------------------------------------------------------
+ */
+FormInfo *
+TixFm_GetFormInfo(tkwin, create)
+ Tk_Window tkwin; /* Token for window for which
+ * FormInfo structure is desired. */
+ int create;
+{
+ FormInfo *clientPtr;
+ Tcl_HashEntry *hPtr;
+ int isNew;
+ int i,j;
+
+ if (!initialized) {
+ initialized = 1;
+ Tcl_InitHashTable(&formInfoHashTable, TCL_ONE_WORD_KEYS);
+ Tcl_InitHashTable(&masterInfoHashTable, TCL_ONE_WORD_KEYS);
+ }
+
+ /*
+ * See if there's already FormInfo for this window. If not,
+ * then create a new one.
+ */
+ if (!create) {
+ hPtr = Tcl_FindHashEntry(&formInfoHashTable, (char *)tkwin);
+ if (!hPtr) {
+ return NULL;
+ } else {
+ return (FormInfo *) Tcl_GetHashValue(hPtr);
+ }
+ } else {
+ hPtr = Tcl_CreateHashEntry(&formInfoHashTable, (char *) tkwin, &isNew);
+ if (!isNew) {
+ return (FormInfo *) Tcl_GetHashValue(hPtr);
+ } else {
+ clientPtr = (FormInfo *) ckalloc(sizeof(FormInfo));
+ clientPtr->tkwin = tkwin;
+ clientPtr->master = NULL;
+ clientPtr->next = NULL;
+
+ for (i=0; i< 2; i++) {
+ for (j=0; j< 2; j++) {
+ clientPtr->attType[i][j] = ATT_NONE;
+ clientPtr->att[i][j].grid = 0;
+ clientPtr->att[i][j].widget = NULL;
+ clientPtr->off[i][j] = 0;
+
+ clientPtr->pad[i][j] = 0;
+ clientPtr->side[i][j].pcnt = 0;
+ clientPtr->side[i][j].disp = 0;
+
+ clientPtr->spring[i][j] = -1;
+ clientPtr->strWidget[i][j] = 0;
+ }
+ clientPtr->springFail[i] = 0;
+ clientPtr->fill[i] = 0;
+ }
+
+ Tcl_SetHashValue(hPtr, clientPtr);
+
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ TixFm_StructureProc, (ClientData) clientPtr);
+
+ return clientPtr;
+ }
+ }
+}
+
+static MasterInfo *
+GetMasterInfo(tkwin, create)
+ Tk_Window tkwin; /* Token for window for which
+ * FormInfo structure is desired. */
+ int create; /* Should I create the MasterInfo if it
+ * does not exist? */
+{
+ MasterInfo *masterPtr;
+ Tcl_HashEntry *hPtr;
+ int isNew;
+
+ if (!initialized) {
+ initialized = 1;
+ Tcl_InitHashTable(&formInfoHashTable, TCL_ONE_WORD_KEYS);
+ Tcl_InitHashTable(&masterInfoHashTable, TCL_ONE_WORD_KEYS);
+ }
+
+ /*
+ * See if there's already FormInfo for this window. If not,
+ * then create a new one.
+ */
+ if (!create) {
+ hPtr = Tcl_FindHashEntry(&masterInfoHashTable, (char *)tkwin);
+ if (!hPtr) {
+ return NULL;
+ } else {
+ return (MasterInfo *) Tcl_GetHashValue(hPtr);
+ }
+ } else {
+ hPtr = Tcl_CreateHashEntry(&masterInfoHashTable, (char *)tkwin,
+ &isNew);
+ if (!isNew) {
+ masterPtr = (MasterInfo *) Tcl_GetHashValue(hPtr);
+ }
+ else {
+ masterPtr = (MasterInfo *) ckalloc(sizeof(MasterInfo));
+ masterPtr->tkwin = tkwin;
+ masterPtr->client = NULL;
+ masterPtr->client_tail = NULL;
+ masterPtr->flags.repackPending = 0;
+ masterPtr->flags.isDeleted = 0;
+ masterPtr->numClients = 0;
+ masterPtr->numRequests = 0;
+ masterPtr->grids[0] = 100;
+ masterPtr->grids[1] = 100;
+
+ Tcl_SetHashValue(hPtr, masterPtr);
+ }
+ }
+
+ /* TK BUG:
+ *
+ * It seems like if you destroy some slaves TK will delete the event
+ * handler. So for sure we just create it every time a slave is created.
+ *
+ * Note: calling Tk_CreateEventHandler with same arguments twice won't
+ * create two instances of the same event handler: Thus safe to call
+ * blindly.
+ */
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ MasterStructureProc, (ClientData) masterPtr);
+#if 0
+ Tk_ManageGeometry(tkwin, (Tk_GeomMgr *)&masterType,
+ (ClientData) masterPtr);
+#endif
+ return masterPtr;
+}
+
+/*----------------------------------------------------------------------
+ * PLace the clients
+ *----------------------------------------------------------------------
+ */
+static int PlaceSide_AttNone(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ int reqSize;
+
+ if (clientPtr->attType[axis][NEXT_SIDE(which)] == ATT_NONE) {
+ if (which == SIDE0) {
+ clientPtr->posn[axis][which] = 0;
+ return TCL_OK;
+ }
+ }
+
+ reqSize = ReqSize(clientPtr->tkwin, axis) +
+ clientPtr->pad[axis][0] + clientPtr->pad[axis][1];
+
+
+ PLACE_CLIENT_SIDE(clientPtr, axis, NEXT_SIDE(which), 1);
+
+ switch (which) {
+ case SIDE0:
+ clientPtr->posn[axis][which] =
+ clientPtr->posn[axis][NEXT_SIDE(which)] - reqSize;
+ break;
+
+ case SIDE1:
+ clientPtr->posn[axis][which] =
+ clientPtr->posn[axis][NEXT_SIDE(which)] + reqSize;
+ break;
+ }
+
+ return TCL_OK;
+}
+
+static int PlaceSide_AttAbsolute(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ int mSize[2];
+ MasterInfo * masterPtr = clientPtr->master;
+ int intBWidth = Tk_InternalBorderWidth(masterPtr->tkwin);
+ mSize[0] = Tk_Width(masterPtr->tkwin) - 2*intBWidth;
+ mSize[1] = Tk_Height(masterPtr->tkwin) - 2*intBWidth;
+
+ clientPtr->posn[axis][which] =
+ mSize[axis] * clientPtr->side[axis][which].pcnt/masterPtr->grids[axis] +
+ clientPtr->side[axis][which].disp;
+
+ return TCL_OK;
+}
+
+static int PlaceSide_AttOpposite(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ FormInfo * attachPtr;
+
+ attachPtr = clientPtr->att[axis][which].widget;
+
+ PLACE_CLIENT_SIDE(attachPtr, axis, NEXT_SIDE(which), 0);
+
+ clientPtr->posn[axis][which] = attachPtr->posn[axis][NEXT_SIDE(which)];
+ clientPtr->posn[axis][which] += clientPtr->off[axis][which];
+ return TCL_OK;
+}
+
+static int PlaceSide_AttParallel(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ FormInfo * attachPtr;
+
+ attachPtr = clientPtr->att[axis][which].widget;
+
+ PLACE_CLIENT_SIDE(attachPtr, axis, NEXT_SIDE(which), 0);
+
+ clientPtr->posn[axis][which] = attachPtr->posn[axis][which];
+ clientPtr->posn[axis][which] += clientPtr->off[axis][which];
+
+ return TCL_OK;
+}
+
+
+static int PlaceSimpleCase(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ clientPtr->depend ++;
+
+ switch (clientPtr->attType[axis][which]) {
+ case ATT_NONE:
+ if (PlaceSide_AttNone(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+
+ case ATT_GRID:
+ if (PlaceSide_AttAbsolute(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+
+ case ATT_OPPOSITE:
+ if (PlaceSide_AttOpposite(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+ case ATT_PARALLEL:
+ if (PlaceSide_AttParallel(clientPtr, axis, which) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ break;
+ }
+
+ if (which == SIDE0) {
+ clientPtr->sideFlags[axis] |= PINNED_SIDE0;
+ } else {
+ clientPtr->sideFlags[axis] |= PINNED_SIDE1;
+ }
+ clientPtr->depend --;
+
+ return TCL_OK;
+}
+
+/* ToDo: I'll make this more efficient by pre-allocating some links */
+static SpringLink *
+AllocSpringLink()
+{
+ return (SpringLink *) ckalloc(sizeof(SpringLink));
+}
+
+static void
+FreeSpringLink(link)
+ SpringLink * link;
+{
+ ckfree((char*)link);
+}
+
+static void FreeSpringList(listPtr)
+ SpringList * listPtr;
+{
+ SpringLink * link, * toFree;
+
+ for (link=listPtr->head; link; ) {
+ toFree = link;
+ link=link->next;
+ FreeSpringLink(toFree);
+ }
+}
+
+static void
+AddRightSprings(listPtr, clientPtr)
+ SpringList * listPtr;
+ FormInfo *clientPtr;
+{
+ SpringLink * link = AllocSpringLink();
+
+ link->next = NULL;
+ link->clientPtr = clientPtr;
+
+ if (listPtr->head == NULL) {
+ listPtr->head = listPtr->tail = link;
+ } else {
+ listPtr->tail->next = link;
+ listPtr->tail = link;
+ }
+ ++ listPtr->num;
+}
+
+static void
+AddLeftSprings(listPtr,clientPtr)
+ SpringList * listPtr;
+ FormInfo *clientPtr;
+{
+ SpringLink * link = AllocSpringLink();
+
+ link->next = listPtr->head;
+ link->clientPtr = clientPtr;
+
+ listPtr->head = link;
+ ++ listPtr->num;
+}
+
+static int
+PlaceWithSpring(clientPtr, axis, which)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+{
+ SpringList springs;
+ SpringLink * link;
+ FormInfo *ptr;
+ float boundary[2];
+ float totalSize, totalStrength;
+ int mSize[2];
+ float gap, disp;
+ MasterInfo * masterPtr = clientPtr->master;
+ int intBWidth = Tk_InternalBorderWidth(masterPtr->tkwin);
+
+ springs.head = (SpringLink *)0;
+ springs.tail = (SpringLink *)0;
+ springs.num = 0;
+
+ mSize[0] = Tk_Width(masterPtr->tkwin) - 2*intBWidth;
+ mSize[1] = Tk_Height(masterPtr->tkwin) - 2*intBWidth;
+
+ /* Expand the right side of the spring list */
+ ptr = clientPtr;
+ while (1) {
+ switch (ptr->attType[axis][1]) {
+ case ATT_OPPOSITE:
+ case ATT_NONE:
+ /* Some attachments */
+ AddRightSprings(&springs, ptr);
+
+ if ((ptr = ptr->strWidget[axis][1]) == 0) {
+ goto done1;
+ }
+
+ switch (ptr->attType[axis][0]) {
+ case ATT_GRID:
+ case ATT_PARALLEL:
+ goto done1;
+ }
+ break;
+
+ case ATT_GRID:
+ case ATT_PARALLEL:
+ AddRightSprings(&springs, ptr);
+ goto done1;
+ }
+ }
+
+ done1:
+ /* Expand the left side of the spring list */
+
+ ptr = clientPtr;
+ while (2) {
+ switch (ptr->attType[axis][0]) {
+ case ATT_OPPOSITE:
+ case ATT_NONE:
+ /* Some attachments */
+ if (ptr != clientPtr) {
+ AddLeftSprings(&springs, ptr);
+ }
+
+ if ((ptr = ptr->strWidget[axis][0]) == 0) {
+ goto done2;
+ }
+
+ switch (ptr->attType[axis][1]) {
+ case ATT_PARALLEL:
+ goto done2;
+ }
+ break;
+
+ case ATT_GRID:
+ case ATT_PARALLEL:
+ if (ptr != clientPtr) {
+ AddLeftSprings(&springs, ptr);
+ }
+
+ goto done2;
+ }
+ }
+
+ done2:
+
+ /* Make sure this is a good list (neither ends are none) */
+ if (springs.head == NULL) {
+ /* this should never happen, just to make sure */
+ goto fail;
+ }
+ if (springs.head->clientPtr->attType[axis][0] == ATT_NONE) {
+ goto fail;
+ }
+ if (springs.tail->clientPtr->attType[axis][1] == ATT_NONE) {
+ goto fail;
+ }
+
+ /*
+ * Now calculate the total requested sizes of the spring group
+ */
+ totalSize = (float)(0.0);
+ totalStrength = (float)(0.0);
+ for (link=springs.head; link; link=link->next) {
+ int size = ReqSize(link->clientPtr->tkwin, axis);
+
+ totalSize += size + link->clientPtr->pad[axis][0] +
+ link->clientPtr->pad[axis][1];
+
+ if (link->clientPtr->spring[axis][0] > 0) {
+ totalStrength += link->clientPtr->spring[axis][0];
+ }
+ }
+ if (springs.tail->clientPtr->spring[axis][1] > 0) {
+ totalStrength += springs.tail->clientPtr->spring[axis][1];
+ }
+
+ boundary[0] = (float) mSize[axis] *
+ (float) springs.head->clientPtr->side[axis][0].pcnt /
+ (float) masterPtr->grids[axis] +
+ (float) springs.head->clientPtr->side[axis][0].disp;
+ boundary[1] = (float) mSize[axis] *
+ (float) springs.tail->clientPtr->side[axis][1].pcnt /
+ (float) masterPtr->grids[axis] +
+ (float) springs.tail->clientPtr->side[axis][1].disp;
+
+ /* (4) Now spread the sizes to the members of this list */
+ gap = (float)(boundary[1] - boundary[0]) - totalSize;
+ if (gap < 0) {
+ goto fail;
+ }
+
+ disp = boundary[0];
+ if (totalStrength <= 0.0) {
+ totalStrength = (float)(1.0);
+ }
+ for (link=springs.head; link; link=link->next) {
+ float spring0, spring1;
+ int gap0, gap1;
+ int adjust; /* to overcome round-off errors */
+
+ spring0 = (float)link->clientPtr->spring[axis][0];
+ spring1 = (float)link->clientPtr->spring[axis][1];
+
+ if (spring0 < (float)(0.0)) {
+ spring0 = (float)(0.0);
+ }
+ if (spring1 < (float)(0.0)) {
+ spring1 = (float)(0.0);
+ }
+
+ /* Divide by two: because two consecutive clients share the same
+ * spring; so each of them get a half.
+ */
+ adjust = 0;
+ if (link !=springs.head) {
+ if (spring0 > 0 && link->clientPtr->spring[axis][0] % 2 == 1) {
+ adjust = 1;
+ }
+ spring0 /= (float)(2.0);
+ }
+ if (link !=springs.tail) {
+ spring1 /= (float)(2.0);
+ }
+
+ gap0 = (int)(gap * spring0 / totalStrength) + adjust;
+ gap1 = (int)(gap * spring1 / totalStrength);
+
+ if (link->clientPtr->fill[axis]) {
+ link->clientPtr->posn[axis][0] = (int)disp;
+ disp += gap0;
+ disp += gap1;
+ disp += ReqSize(link->clientPtr->tkwin, axis);
+
+ /* Somehow there may be a round-off right at the end of the
+ * list --> kludge*/
+ if (link->next == NULL) {
+ disp = boundary[1];
+ }
+ link->clientPtr->posn[axis][1] = (int)disp;
+ } else {
+ disp += gap0;
+ link->clientPtr->posn[axis][0] = (int)disp;
+ disp += ReqSize(link->clientPtr->tkwin, axis);
+ link->clientPtr->posn[axis][1] = (int)disp;
+ disp += gap1;
+
+ /*
+ * Somehow there may be a round-off right at the end of the
+ * list --> kludge
+ */
+ if (link->next == NULL && gap1 < 0.001) {
+ link->clientPtr->posn[axis][1] = (int)boundary[1];
+ }
+ }
+
+ link->clientPtr->sideFlags[axis] |= PINNED_SIDE0;
+ link->clientPtr->sideFlags[axis] |= PINNED_SIDE1;
+ }
+
+ FreeSpringList(&springs);
+ return TCL_OK;
+
+ fail:
+ for (link=springs.head; link; link=link->next) {
+ link->clientPtr->springFail[axis] = 1;
+ }
+ FreeSpringList(&springs);
+ return TCL_ERROR;
+}
+
+static int PlaceClientSide(clientPtr, axis, which, isSelf)
+ FormInfo *clientPtr; /* The client to Place down */
+ int axis; /* 0 = x axis, 1 = yaxis */
+ int which; /* 0 = min side, 1= max side */
+ int isSelf;
+{
+ if ((which == SIDE0) && (clientPtr->sideFlags[axis] & PINNED_SIDE0)) {
+ /* already Placeed */
+ return TCL_OK;
+ }
+ if ((which == SIDE1) && (clientPtr->sideFlags[axis] & PINNED_SIDE1)) {
+ /* already Placeed */
+ return TCL_OK;
+ }
+
+ if ((clientPtr->depend > 0) && !isSelf) {
+ /*
+ * circular dependency detected
+ */
+ return TCL_ERROR;
+ }
+
+ /* No spring : we just do a "simple case"
+ * The condition is ( (x || x) && (x || x) )
+ */
+ if ((clientPtr->spring[axis][0] < 0 ||
+ (clientPtr->sideFlags[axis] & PINNED_SIDE0)) &&
+ (clientPtr->spring[axis][1] < 0 ||
+ (clientPtr->sideFlags[axis] & PINNED_SIDE1))) {
+ return PlaceSimpleCase(clientPtr, axis, which);
+ }
+ if (clientPtr->springFail[axis]) {
+ return PlaceSimpleCase(clientPtr, axis, which);
+ }
+
+ if (PlaceWithSpring(clientPtr, axis, which) != TCL_OK) {
+ /* if comes to here : (1) Not enough space for the spring expansion
+ * (2) Not both end-sides are spring-attached */
+ return PlaceSimpleCase(clientPtr, axis, which);
+ } else {
+ return TCL_OK;
+ }
+}
+
+static int PlaceClient(clientPtr)
+ FormInfo *clientPtr;
+{
+ int i;
+
+ for (i=0; i<2; i++) {
+ if (!(clientPtr->sideFlags[i] & PINNED_SIDE0)) {
+ PLACE_CLIENT_SIDE(clientPtr, i, SIDE0, 0);
+ }
+ if (!(clientPtr->sideFlags[i] & PINNED_SIDE1)) {
+ PLACE_CLIENT_SIDE(clientPtr, i, SIDE1, 0);
+ }
+ }
+
+ return TCL_OK;
+}
+
+static int PlaceAllClients(masterPtr)
+ MasterInfo * masterPtr;
+{
+ FormInfo *clientPtr;
+ int i;
+
+ /*
+ * First mark all clients as unpinned, and clean the opposite flags,
+ */
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ if (clientPtr->tkwin != NULL) {
+ for (i=0; i<2; i++) {
+ /* clear all flags */
+ clientPtr->sideFlags[i] = 0;
+ clientPtr->springFail[i] = 0;
+ }
+ clientPtr->depend = 0;
+ }
+ }
+
+ /*
+ * Now calculate their actual positions on the master
+ */
+ for (clientPtr = masterPtr->client; clientPtr; clientPtr=clientPtr->next) {
+ if (clientPtr->tkwin == NULL) { /* it was deleted */
+ continue;
+ }
+ for (i=0; i<2; i++) {
+ if ((clientPtr->sideFlags[i] & PINNED_ALL) != PINNED_ALL) {
+ if (PlaceClient(clientPtr) == TCL_ERROR) {
+ /*
+ * Detected circular dependency
+ */
+ return TCL_ERROR;
+ }
+ break;
+ }
+ }
+ }
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixForm.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixForm.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,143 @@
+
+/* $Id: tixForm.h,v 1.2 2004/03/28 02:44:56 hobbs 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, CONST84 char **argv));
+
+/* 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_((
+ ClientData clientData));
+EXTERN FormInfo * TixFm_FindClientPtrByName _ANSI_ARGS_((
+ Tcl_Interp * interp, CONST84 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 */
Added: external/tix-8.4.2.x/generic/tixFormMisc.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixFormMisc.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,600 @@
+
+/* $Id: tixFormMisc.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixFormMisc.c --
+ *
+ * Implements the tixForm geometry manager, which has similar
+ * capability as the Motif Form geometry manager. Please
+ * refer to the documentation for the use of tixForm.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tix.h>
+#include <tixForm.h>
+
+/*
+ * SubCommands of the tixForm command.
+ */
+TIX_DECLARE_SUBCMD(TixFm_Info);
+
+static void AttachInfo _ANSI_ARGS_((Tcl_Interp * interp,
+ FormInfo * clientPtr, int axis, int which));
+static int ConfigureAttachment _ANSI_ARGS_((FormInfo *clientPtr,
+ Tk_Window topLevel, Tcl_Interp* interp,
+ int axis, int which, CONST84 char *value));
+static int ConfigureFill _ANSI_ARGS_((
+ FormInfo *clientPtr, Tk_Window tkwin,
+ Tcl_Interp* interp, CONST84 char *value));
+static int ConfigurePadding _ANSI_ARGS_((
+ FormInfo *clientPtr, Tk_Window tkwin,
+ Tcl_Interp* interp, int axis, int which,
+ CONST84 char *value));
+static int ConfigureSpring _ANSI_ARGS_((FormInfo *clientPtr,
+ Tk_Window topLevel, Tcl_Interp* interp,
+ int axis, int which, CONST84 char *value));
+
+
+/*----------------------------------------------------------------------
+ * TixFm_Info --
+ *
+ * Return the information about the attachment of a client window
+ *----------------------------------------------------------------------
+ */
+int TixFm_Info(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window topLevel = (Tk_Window) clientData;
+ FormInfo * clientPtr;
+ char buff[256];
+ int i,j;
+ static CONST84 char *sideNames[2][2] = {
+ {"-left", "-right"},
+ {"-top", "-bottom"}
+ };
+ static CONST84 char *padNames[2][2] = {
+ {"-padleft", "-padright"},
+ {"-padtop", "-padbottom"}
+ };
+
+ clientPtr = TixFm_FindClientPtrByName(interp, argv[0], topLevel);
+ if (clientPtr == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc == 2) {
+ /* user wants some specific info
+ */
+
+ for (i=0; i<2; i++) {
+ for (j=0; j<2; j++) {
+ /* Do you want to know attachment? */
+ if (strcmp(argv[1], sideNames[i][j]) == 0) {
+ AttachInfo(interp, clientPtr, i, j);
+ return TCL_OK;
+ }
+
+ /* Do you want to know padding? */
+ if (strcmp(argv[1], padNames[i][j]) == 0) {
+ sprintf(buff, "%d", clientPtr->pad[i][j]);
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+ }
+ }
+ }
+ Tcl_AppendResult(interp, "Unknown option \"", argv[1], "\"", NULL);
+ return TCL_ERROR;
+ }
+
+ /* Otherwise, give full info */
+
+ for (i=0; i<2; i++) {
+ for (j=0; j<2; j++) {
+ /* The information about attachment */
+ Tcl_AppendResult(interp, sideNames[i][j], " ", NULL);
+ AttachInfo(interp, clientPtr, i, j);
+
+ /* The information about padding */
+ Tcl_AppendResult(interp, padNames[i][j], " ", NULL);
+ sprintf(buff, "%d", clientPtr->pad[i][j]);
+ Tcl_AppendResult(interp, buff, " ", NULL);
+ }
+ }
+ return TCL_OK;
+}
+
+static void AttachInfo(interp, clientPtr, axis, which)
+ Tcl_Interp * interp;
+ FormInfo * clientPtr;
+ int axis;
+ int which;
+{
+ char buff[256];
+
+ switch(clientPtr->attType[axis][which]) {
+ case ATT_NONE:
+ Tcl_AppendElement(interp, "none");
+ break;
+
+ case ATT_GRID:
+ sprintf(buff, "{%%%d %d}", clientPtr->att[axis][which].grid,
+ clientPtr->off[axis][which]);
+ Tcl_AppendResult(interp, buff, " ", NULL);
+ break;
+
+ case ATT_OPPOSITE:
+ sprintf(buff, "%d", clientPtr->off[axis][which]);
+ Tcl_AppendResult(interp, "{",
+ Tk_PathName(clientPtr->att[axis][which].widget->tkwin),
+ " ", buff, "} ", NULL);
+ break;
+
+ case ATT_PARALLEL:
+ sprintf(buff, "%d", clientPtr->off[axis][which]);
+ Tcl_AppendResult(interp, "{&",
+ Tk_PathName(clientPtr->att[axis][which].widget->tkwin),
+ " ", buff, "} ", NULL);
+ break;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Form Parameter Configuration
+ *
+ *----------------------------------------------------------------------
+ */
+static int ConfigureAttachment(clientPtr, topLevel, interp, axis, which, value)
+ FormInfo *clientPtr;
+ Tk_Window topLevel;
+ Tcl_Interp* interp;
+ int axis, which;
+ CONST84 char *value;
+{
+ Tk_Window tkwin;
+ FormInfo * attWidget;
+ int code = TCL_OK;
+ int offset;
+ int grid;
+ int argc;
+ CONST84 char ** argv;
+
+ if (Tcl_SplitList(interp, value, &argc, &argv) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (argc < 1 || argc > 2) {
+ Tcl_AppendResult(interp, "Malformed attachment value \"", value,
+ "\"", NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ switch (argv[0][0]) {
+ case '#': /* Attached to grid */
+ case '%': /* Attached to percent (aka grid) */
+ if (Tcl_GetInt(interp, argv[0]+1, &grid) == TCL_ERROR) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ clientPtr->attType[axis][which] = ATT_GRID;
+ clientPtr->att[axis][which].grid = grid;
+ break;
+
+ case '&': /* Attached to parallel widget */
+ tkwin = Tk_NameToWindow(interp, argv[0]+1, topLevel);
+
+ if (tkwin != NULL) {
+ if (Tk_IsTopLevel(tkwin)) {
+ Tcl_AppendResult(interp, "can't attach to \"", value,
+ "\": it's a top-level window", (char *) NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ attWidget = TixFm_GetFormInfo(tkwin, 1);
+ TixFm_AddToMaster(clientPtr->master, attWidget);
+
+ clientPtr->attType[axis][which] = ATT_PARALLEL;
+ clientPtr->att[axis][which].widget = attWidget;
+ } else {
+ code = TCL_ERROR;
+ goto done;
+ }
+ break;
+
+ case '.': /* Attach to opposite widget */
+ tkwin = Tk_NameToWindow(interp, argv[0], topLevel);
+
+ if (tkwin != NULL) {
+ if (Tk_IsTopLevel(tkwin)) {
+ Tcl_AppendResult(interp, "can't attach to \"", value,
+ "\": it's a top-level window", (char *) NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ attWidget = TixFm_GetFormInfo(tkwin, 1);
+ TixFm_AddToMaster(clientPtr->master, attWidget);
+
+ clientPtr->attType[axis][which] = ATT_OPPOSITE;
+ clientPtr->att[axis][which].widget = attWidget;
+ } else {
+ code = TCL_ERROR;
+ goto done;
+ }
+ break;
+
+ case 'n': /* none */
+ if (argc == 1 && strcmp(argv[0], "none") == 0) {
+ clientPtr->attType[axis][which] = ATT_NONE;
+ goto done;
+ } else {
+ Tcl_AppendResult(interp, "Malformed attachment value \"", value,
+ "\"", NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ break;
+
+ default: /* Check if is attached to pixel */
+ /* If there is only one value, this can be the offset with implicit
+ * anchor point 0% or max_grid%
+ */
+ if (argc != 1) {
+ Tcl_AppendResult(interp, "Malformed attachment value \"", value,
+ "\"", NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+#if 1
+ if (Tk_GetPixels(interp, topLevel, argv[0], &offset) != TCL_OK) {
+#else
+ if (Tcl_GetInt(interp, argv[0], &offset) == TCL_ERROR) {
+#endif
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ clientPtr->attType[axis][which] = ATT_GRID;
+ clientPtr->off [axis][which] = offset;
+ if (offset < 0 || (offset == 0 && strcmp(argv[0], "-0") ==0)) {
+ clientPtr->att[axis][which].grid = clientPtr->master->grids[axis];
+ } else {
+ clientPtr->att[axis][which].grid = 0;
+ }
+
+ goto done; /* We have already gotten both anchor and offset */
+ }
+
+ if (argc == 2) {
+#if 1
+ if (Tk_GetPixels(interp, topLevel, argv[1], &offset) != TCL_OK) {
+#else
+ if (Tcl_GetInt(interp, argv[1], &offset) == TCL_ERROR) {
+#endif
+ code = TCL_ERROR;
+ goto done;
+ }
+ clientPtr->off[axis][which] = offset;
+ } else {
+ clientPtr->off[axis][which] = 0;
+ }
+
+ done:
+ if (argv) {
+ ckfree((char*) argv);
+ }
+ if (code == TCL_ERROR) {
+ clientPtr->attType[axis][which] = ATT_NONE;
+ clientPtr->off[axis][which] = 0;
+ }
+ return code;
+}
+
+static int ConfigurePadding(clientPtr, tkwin, interp, axis, which, value)
+ FormInfo *clientPtr;
+ Tk_Window tkwin;
+ Tcl_Interp* interp;
+ int axis, which;
+ CONST84 char *value;
+{
+ int p_value;
+
+ if (Tk_GetPixels(interp, tkwin, value, &p_value) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ else {
+ clientPtr->pad[axis][which] = p_value;
+ return TCL_OK;
+ }
+}
+
+static int ConfigureFill(clientPtr, tkwin, interp, value)
+ FormInfo *clientPtr;
+ Tk_Window tkwin;
+ Tcl_Interp* interp;
+ CONST84 char *value;
+{
+ size_t len = strlen(value);
+
+ if (strncmp(value, "x", len) == 0) {
+ clientPtr->fill[AXIS_X] = 1;
+ clientPtr->fill[AXIS_Y] = 0;
+ }
+ else if (strncmp(value, "y", len) == 0) {
+ clientPtr->fill[AXIS_X] = 0;
+ clientPtr->fill[AXIS_Y] = 1;
+ }
+ else if (strncmp(value, "both", len) == 0) {
+ clientPtr->fill[AXIS_X] = 1;
+ clientPtr->fill[AXIS_Y] = 1;
+ }
+ else if (strncmp(value, "none", len) == 0) {
+ clientPtr->fill[AXIS_X] = 0;
+ clientPtr->fill[AXIS_Y] = 0;
+ }
+ else {
+ Tcl_AppendResult(interp, "bad fill style \"", value,
+ "\": must be none, x, y, or both", NULL);
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+}
+
+static int ConfigureSpring(clientPtr, topLevel, interp, axis, which, value)
+ FormInfo *clientPtr;
+ Tk_Window topLevel;
+ Tcl_Interp* interp;
+ int axis, which;
+ CONST84 char *value;
+{
+ int strength;
+ int i = axis, j = which;
+
+ if (Tcl_GetInt(interp, value, &strength) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ clientPtr->spring[i][j] = strength;
+
+ if (clientPtr->attType[i][j] == ATT_OPPOSITE) {
+ FormInfo * oppo;
+
+ oppo = clientPtr->att[i][j].widget;
+ oppo->spring[i][!j] = strength;
+
+ if (strength != 0 && clientPtr->strWidget[i][j] == NULL) {
+ clientPtr->strWidget[i][j] = oppo;
+
+ if (oppo->strWidget[i][!j] != clientPtr) {
+ if (oppo->strWidget[i][!j] != NULL) {
+ oppo->strWidget[i][!j]->strWidget[i][j] = NULL;
+ oppo->strWidget[i][!j]->spring[i][j] = 0;
+ }
+ }
+ oppo->strWidget[i][!j] = clientPtr;
+ }
+ }
+
+ return TCL_OK;
+}
+
+int TixFm_Configure(clientPtr, topLevel, interp, argc, argv)
+ FormInfo *clientPtr;
+ Tk_Window topLevel;
+ Tcl_Interp* interp;
+ int argc;
+ CONST84 char **argv;
+{
+ int i, flag, value;
+
+ for (i=0; i< argc; i+=2) {
+ flag = i;
+ value = i+1;
+
+ if (strcmp(argv[flag], "-in") == 0) {
+ /* Reset the parent of the widget
+ */
+ Tcl_AppendResult(interp,
+ "\"-in \" must be the first option given to tixForm", NULL);
+ return TCL_ERROR;
+ } else if (strcmp(argv[flag], "-l") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-left") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-r") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-right") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-top") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-t") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-bottom") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-b") == 0) {
+ if (ConfigureAttachment(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-padx") == 0) {
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-pady") == 0) {
+ if (ConfigurePadding(clientPtr,topLevel,interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-padleft") == 0) {
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-lp") == 0) {
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-padright")== 0){
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-rp")== 0){
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-padtop")== 0) {
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-tp")== 0) {
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag],"-padbottom")== 0){
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag],"-bp")== 0){
+ if (ConfigurePadding(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-leftspring") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-ls") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 0, 0, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-rightspring") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-rs") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 0, 1, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-topspring") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-ts") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 1, 0, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-bottomspring") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-bs") == 0) {
+ if (ConfigureSpring(clientPtr, topLevel, interp,
+ 1, 1, argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else if (strcmp(argv[flag], "-fill") == 0) {
+ if (ConfigureFill(clientPtr, topLevel, interp,
+ argv[value]) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+ } else {
+ Tcl_AppendResult(interp, "Wrong option \"",
+ argv[i], "\".", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ /*
+ * Clear the previously set default attachment if the opposide
+ * edge is attached.
+ */
+
+#if 0
+ /* (1) The X axis */
+ if ((clientPtr->attType[0][0] == ATT_DEFAULT_PIXEL)
+ &&(clientPtr->attType[0][1] != ATT_NONE)) {
+ clientPtr->attType[0][0] = ATT_NONE;
+ }
+
+ /* (2) The Y axis */
+ if ((clientPtr->attType[1][0] == ATT_DEFAULT_PIXEL)
+ &&(clientPtr->attType[1][1] != ATT_NONE)) {
+ clientPtr->attType[1][0] = ATT_NONE;
+ }
+#endif
+
+ return TCL_OK;
+}
+
Added: external/tix-8.4.2.x/generic/tixGeometry.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGeometry.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,360 @@
+
+/* $Id: tixGeometry.c,v 1.4 2005/03/25 20:15:53 hobbs Exp $ */
+
+/*
+ * tixGeometry.c --
+ *
+ * TCL bindings of TK Geometry Management 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+static Tcl_HashTable clientTable; /* hash table for geometry managers */
+
+static void StructureProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static void GeoReqProc _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin));
+static void GeoLostSlaveProc _ANSI_ARGS_((ClientData clientData,
+ Tk_Window tkwin));
+
+typedef struct ClientStruct {
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ char * command;
+ unsigned isDeleted : 1;
+} ClientStruct;
+
+static Tk_GeomMgr geoType = {
+ "tixGeometry", /* name */
+ GeoReqProc, /* requestProc */
+ GeoLostSlaveProc, /* lostSlaveProc */
+};
+
+/*----------------------------------------------------------------------
+ *
+ * Geometry Management Hooks
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+/*----------------------------------------------------------------------
+ *
+ * The following functions handles the geometry requests of the clients
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void FreeClientStruct(clientData)
+ ClientData clientData;
+{
+ ClientStruct * cnPtr = (ClientStruct *) clientData;
+
+ ckfree((char*)cnPtr->command);
+ ckfree((char*)cnPtr);
+}
+
+/* This function is called when the clients initiates a geometry
+ * request i.e., a button changes its text and now needs a larger
+ * width
+ *
+ */
+static void
+GeoReqProc(clientData, tkwin)
+ ClientData clientData; /* Information about
+ * window that got new preferred
+ * geometry. */
+ Tk_Window tkwin; /* Other Tk-related information
+ * about the window. */
+{
+ ClientStruct * cnPtr = (ClientStruct *) clientData;
+ int result;
+
+ if (cnPtr->isDeleted) {
+ return;
+ }
+
+ result = Tix_GlobalVarEval(cnPtr->interp, cnPtr->command, " -request ",
+ Tk_PathName(cnPtr->tkwin), (char*)NULL);
+
+ if (result != TCL_OK) {
+ Tcl_AddErrorInfo(cnPtr->interp,
+ "\n (geometry request command executed by tixManageGeometry)");
+ Tk_BackgroundError(cnPtr->interp);
+ }
+}
+
+/*
+ * This function is called when the clients is grabbed by another
+ * geometry manager. %% Should inform with a -lost call
+ */
+static void
+GeoLostSlaveProc(clientData, tkwin)
+ ClientData clientData; /* Information about
+ * window that got new preferred
+ * geometry. */
+ Tk_Window tkwin; /* Other Tk-related information
+ * about the window. */
+{
+ ClientStruct * cnPtr = (ClientStruct *) clientData;
+ Tcl_HashEntry * hashPtr;
+ int result;
+
+ if (cnPtr->isDeleted) {
+ return;
+ }
+
+ result = Tix_GlobalVarEval(cnPtr->interp, cnPtr->command, " -lostslave ",
+ Tk_PathName(cnPtr->tkwin), (char*)NULL);
+
+ if (result != TCL_OK) {
+ Tcl_AddErrorInfo(cnPtr->interp,
+ "\n (geometry request command executed by tixManageGeometry)");
+ Tk_BackgroundError(cnPtr->interp);
+ }
+
+ hashPtr = Tcl_FindHashEntry(&clientTable, (char *)tkwin);
+ if (hashPtr) {
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ cnPtr->isDeleted = 1;
+ Tk_EventuallyFree((ClientData) cnPtr, (Tix_FreeProc*)FreeClientStruct);
+}
+
+
+static void StructureProc(clientData, eventPtr)
+ ClientData clientData;
+ XEvent *eventPtr;
+{
+ ClientStruct * cnPtr = (ClientStruct *) clientData;
+ Tcl_HashEntry * hashPtr;
+
+ if (eventPtr->type == DestroyNotify) {
+ if (cnPtr->isDeleted) {
+ return;
+ }
+
+ hashPtr = Tcl_FindHashEntry(&clientTable, (char *)cnPtr->tkwin);
+ if (hashPtr) {
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ cnPtr->isDeleted = 1;
+ Tk_EventuallyFree((ClientData) cnPtr, (Tix_FreeProc*)FreeClientStruct);
+ }
+}
+
+
+/*
+ *
+ * argv[1] = clientPathName
+ * argv[2] = managerCommand <-- can have arguments
+ *
+ * %% add possibility to delete a manager
+ *
+ */
+TIX_DEFINE_CMD(Tix_ManageGeometryCmd)
+{
+ Tk_Window topLevel = (Tk_Window)clientData;
+ Tk_Window tkwin;
+ ClientStruct * cnPtr;
+ Tcl_HashEntry * hashPtr;
+ int isNew;
+ static int inited = 0;
+
+ if (argc!=3) {
+ return Tix_ArgcError(interp, argc, argv, 1, "pathname command");
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (!inited) {
+ Tcl_InitHashTable(&clientTable, TCL_ONE_WORD_KEYS);
+ inited = 1;
+ }
+
+ hashPtr = Tcl_CreateHashEntry(&clientTable, (char *)tkwin, &isNew);
+
+ if (!isNew) {
+ cnPtr = (ClientStruct *) Tcl_GetHashValue(hashPtr);
+ ckfree(cnPtr->command);
+ cnPtr->command = tixStrDup(argv[2]);
+ } else {
+ cnPtr = (ClientStruct *) ckalloc(sizeof(ClientStruct));
+ cnPtr->tkwin = tkwin;
+ cnPtr->interp = interp;
+ cnPtr->command = tixStrDup(argv[2]);
+ cnPtr->isDeleted = 0;
+ Tcl_SetHashValue(hashPtr, cnPtr);
+
+ Tk_ManageGeometry(tkwin, &geoType, (ClientData)cnPtr);
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ StructureProc, (ClientData)cnPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ *
+ * The following are TCL bindings for the TK geometry functions.
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*
+ *
+ * argv[1] = clientPathName
+ * argv[2] = req width
+ * argv[3] = req height
+ *
+ */
+TIX_DEFINE_CMD(Tix_GeometryRequestCmd)
+{
+ Tk_Window topLevel = (Tk_Window)clientData;
+ Tk_Window tkwin;
+ int reqWidth;
+ int reqHeight;
+
+ if (argc != 4) {
+ return Tix_ArgcError(interp, argc, argv, 1,
+ "pathname reqwidth reqheight");
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (Tk_GetPixels(interp, tkwin, argv[2], &reqWidth) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (Tk_GetPixels(interp, tkwin, argv[3], &reqHeight) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ Tk_GeometryRequest(tkwin, reqWidth, reqHeight);
+ return TCL_OK;
+}
+
+/*
+ *
+ * argv[1] = clientPathName
+ * argv[2] = width
+ * argv[3] = height
+ * argv[4] = width
+ * argv[5] = height
+ *
+ */
+TIX_DEFINE_CMD(Tix_MoveResizeWindowCmd)
+{
+ Tk_Window topLevel = (Tk_Window)clientData;
+ Tk_Window tkwin;
+ int x, y;
+ int width;
+ int height;
+
+ if (argc != 6) {
+ return Tix_ArgcError(interp, argc, argv, 1,
+ "pathname x y width height");
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (Tk_GetPixels(interp, tkwin, argv[2], &x) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (Tk_GetPixels(interp, tkwin, argv[3], &y) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (Tk_GetPixels(interp, tkwin, argv[4], &width) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (Tk_GetPixels(interp, tkwin, argv[5], &height) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ Tk_MoveResizeWindow(tkwin, x, y, width, height);
+ return TCL_OK;
+}
+
+/*
+ *
+ * argv[1] = clientPathName
+ *
+ */
+TIX_DEFINE_CMD(Tix_MapWindowCmd)
+{
+ Tk_Window topLevel = (Tk_Window)clientData;
+ Tk_Window tkwin;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc, argv, 1, "pathname");
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tk_MapWindow(tkwin);
+ return TCL_OK;
+}
+
+/*
+ * Tix_FlushXCmd -- calls XFlush()
+ * argv[1] = pathName
+ *
+ */
+TIX_DEFINE_CMD(Tix_FlushXCmd)
+{
+ Tk_Window topLevel = (Tk_Window)clientData;
+ Tk_Window tkwin;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc, argv, 1, "pathname");
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+#if !defined(__WIN32__) && !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */
+ XFlush(Tk_Display(tkwin));
+#endif
+ return TCL_OK;
+}
+
+/*
+ *
+ * argv[1] = clientPathName
+ *
+ */
+TIX_DEFINE_CMD(Tix_UnmapWindowCmd)
+{
+ Tk_Window topLevel = (Tk_Window)clientData;
+ Tk_Window tkwin;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc, argv, 1, "pathname");
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, argv[1], topLevel)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tk_UnmapWindow(tkwin);
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixGrData.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrData.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,912 @@
+
+/* $Id: tixGrData.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixGrData.c --
+ *
+ * This module manipulates the data structure for a Grid 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixGrid.h>
+
+/* need "(unsigned int)" to prevent sign-extension on 64-bit machines, and
+ * "(unsigned long)" to avoid an egcs warning
+ */
+#define FIX(X) ((char*)(unsigned long)(unsigned int)(X))
+
+static int FindRowCol _ANSI_ARGS_((TixGridDataSet * dataSet,
+ int x, int y, TixGridRowCol * rowcol[2],
+ Tcl_HashEntry * hashPtrs[2]));
+static TixGridRowCol * InitRowCol _ANSI_ARGS_((int index));
+static int RowColMaxSize _ANSI_ARGS_((WidgetPtr wPtr,
+ int which, TixGridRowCol *rowCol,
+ TixGridSize * defSize));
+
+static TixGridRowCol *
+InitRowCol(index)
+ int index;
+{
+ TixGridRowCol * rowCol = (TixGridRowCol *)ckalloc(sizeof(TixGridRowCol));
+
+ rowCol->dispIndex = index;
+ rowCol->size.sizeType = TIX_GR_DEFAULT;
+ rowCol->size.sizeValue = 0;
+ rowCol->size.charValue = 0;
+ rowCol->size.pad0 = 2;
+ rowCol->size.pad1 = 2;
+ rowCol->size.pixels = 0;
+
+ Tcl_InitHashTable(&rowCol->table, TCL_ONE_WORD_KEYS);
+
+ return rowCol;
+}
+
+/*----------------------------------------------------------------------
+ * TixGridDataSetInit --
+ *
+ * Create an instance of the TixGridDataSet data structure.
+ *
+ *----------------------------------------------------------------------
+ */
+TixGridDataSet *
+TixGridDataSetInit()
+{
+ TixGridDataSet * dataSet =(TixGridDataSet*)ckalloc(sizeof(TixGridDataSet));
+
+ Tcl_InitHashTable(&dataSet->index[0], TCL_ONE_WORD_KEYS);
+ Tcl_InitHashTable(&dataSet->index[1], TCL_ONE_WORD_KEYS);
+
+ dataSet->maxIdx[0] = -1;
+ dataSet->maxIdx[1] = -1;
+
+ return dataSet;
+}
+
+/*----------------------------------------------------------------------
+ * TixGridDataSetFree --
+ *
+ * Frees an instance of the TixGridDataSet data structure.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixGridDataSetFree(dataSet)
+ TixGridDataSet* dataSet;
+{
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+ TixGridRowCol *rcPtr;
+ int i;
+
+ for (i=0; i<2; i++) {
+ for (hashPtr = Tcl_FirstHashEntry(&dataSet->index[i], &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+ rcPtr = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+ if (rcPtr->table.numEntries > 0) {
+ fprintf(stderr, "Grid hash entry leaked: %d : %d\n", i,
+ rcPtr->dispIndex);
+ }
+
+ Tcl_DeleteHashTable(&rcPtr->table);
+ ckfree((char*)rcPtr);
+ }
+ }
+
+ Tcl_DeleteHashTable(&dataSet->index[0]);
+ Tcl_DeleteHashTable(&dataSet->index[1]);
+ ckfree((char*)dataSet);
+}
+
+/*----------------------------------------------------------------------
+ * TixGridDataFindEntry --
+ *
+ * Results:
+ * Return the element if it exists. Otherwise returns NULL.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+char *
+TixGridDataFindEntry(dataSet, x, y)
+ TixGridDataSet * dataSet;
+ int x;
+ int y;
+{
+ TixGridRowCol *col, *row;
+ Tcl_HashEntry *hashPtr;
+
+ /* (1) Find the row and column */
+ if (!(hashPtr = Tcl_FindHashEntry(&dataSet->index[0], FIX(x)))) {
+ return NULL;
+ }
+ col = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+
+ if (!(hashPtr = Tcl_FindHashEntry(&dataSet->index[1], FIX(y)))) {
+ return NULL;
+ }
+ row = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+
+ /* (2) Find the entry */
+ if (row->table.numEntries < col->table.numEntries) {
+ if (!(hashPtr = Tcl_FindHashEntry(&row->table, (char*)col))) {
+ return NULL;
+ }
+ }
+ else {
+ if (!(hashPtr = Tcl_FindHashEntry(&col->table, (char*)row))) {
+ return NULL;
+ }
+ }
+
+ return (char *)Tcl_GetHashValue(hashPtr);
+}
+
+/*----------------------------------------------------------------------
+ * FindRowCol --
+ *
+ * Internal function: finds row and column info an entry.
+ *
+ * Results:
+ * Returns true if BOTH row and column exist. If so, the row and
+ * column info is returned in the rowcol.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+static int
+FindRowCol(dataSet, x, y, rowcol, hashPtrs)
+ TixGridDataSet * dataSet; /* The Grid dataset. */
+ int x, y; /* Location of the cell. */
+ TixGridRowCol * rowcol[2]; /* Returns information about the row/col. */
+ Tcl_HashEntry * hashPtrs[2];/* Returns hash table info about the row/col.*/
+{
+ hashPtrs[0] = Tcl_FindHashEntry(&dataSet->index[0], FIX(x));
+ if (hashPtrs[0] != NULL) {
+ rowcol[0] = (TixGridRowCol *)Tcl_GetHashValue(hashPtrs[0]);
+ } else {
+ return 0;
+ }
+
+ hashPtrs[1] = Tcl_FindHashEntry(&dataSet->index[1], FIX(y));
+ if (hashPtrs[1] != NULL) {
+ rowcol[1] = (TixGridRowCol *)Tcl_GetHashValue(hashPtrs[1]);
+ } else {
+ return 0;
+ }
+
+ return 1;
+}
+
+/*----------------------------------------------------------------------
+ * TixGridDataCreateEntry --
+ *
+ * Find or create the entry at the specified index.
+ *
+ * Results:
+ * A handle to the entry.
+ *
+ * Side effects:
+ * A new entry is created if it is not already in the dataset.
+ *----------------------------------------------------------------------
+ */
+
+CONST84 char *
+TixGridDataCreateEntry(dataSet, x, y, defaultEntry)
+ TixGridDataSet * dataSet;
+ int x;
+ int y;
+ CONST84 char * defaultEntry;
+{
+ TixGridRowCol *rowcol[2];
+ Tcl_HashEntry *hashPtr;
+ int isNew, i, dispIndex[2];
+
+ dispIndex[0] = x;
+ dispIndex[1] = y;
+
+ for (i=0; i<2; i++) {
+ hashPtr = Tcl_CreateHashEntry(&dataSet->index[i],
+ FIX(dispIndex[i]), &isNew);
+
+ if (!isNew) {
+ rowcol[i] = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+ } else {
+ rowcol[i] = InitRowCol(dispIndex[i]);
+ Tcl_SetHashValue(hashPtr, (char*)rowcol[i]);
+
+ if (dataSet->maxIdx[i] < dispIndex[i]) {
+ dataSet->maxIdx[i] = dispIndex[i];
+ }
+ }
+ }
+
+ hashPtr = Tcl_CreateHashEntry(&rowcol[0]->table,
+ (char*)rowcol[1], &isNew);
+
+ if (!isNew) {
+ return (char *) Tcl_GetHashValue(hashPtr);
+ }
+ else {
+ TixGrEntry *chPtr = (TixGrEntry *)defaultEntry;
+
+ Tcl_SetHashValue(hashPtr, (char*)chPtr);
+ chPtr->entryPtr[0] = hashPtr;
+
+ hashPtr = Tcl_CreateHashEntry(&rowcol[1]->table,
+ (char*)rowcol[0], &isNew);
+ Tcl_SetHashValue(hashPtr, (char*)defaultEntry);
+ chPtr->entryPtr[1] = hashPtr;
+
+ return defaultEntry;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixGridDataDeleteEntry --
+ *
+ * Deletes the entry at the specified index.
+ *
+ * Results:
+ * True iff the entry existed and was deleted.
+ *
+ * Side effects:
+ * If there is an entry at the index, it is deleted.
+ *----------------------------------------------------------------------
+ */
+
+int
+TixGridDataDeleteEntry(dataSet, x, y)
+ TixGridDataSet * dataSet; /* The Grid dataset. */
+ int x; /* Column number of the entry. */
+ int y; /* Row number of the entry. */
+{
+ TixGridRowCol *rowcol[2];
+ Tcl_HashEntry *hashPtrs[2]; /* Hash entries of the row/col. */
+ Tcl_HashEntry *cx, *cy; /* Hash entries of the cell in the row/col. */
+
+ if (!FindRowCol(dataSet, x, y, rowcol, hashPtrs)) {
+ /*
+ * The row and/or the column do not exist.
+ */
+ return 0;
+ }
+
+ cx = Tcl_FindHashEntry(&rowcol[0]->table, (char*)rowcol[1]);
+ cy = Tcl_FindHashEntry(&rowcol[1]->table, (char*)rowcol[0]);
+
+ if (cx == NULL && cy == NULL) {
+ return 0;
+ }
+ else if (cx != NULL && cy != NULL) {
+ Tcl_DeleteHashEntry(cx);
+ Tcl_DeleteHashEntry(cy);
+ }
+ else {
+ panic("Inconsistent grid dataset: (%d,%d) : %x %x", x, y, cx, cy);
+ }
+
+ return 1;
+
+ /*
+ * ToDo: trim down the hash table.
+ */
+}
+
+/* return value: has the size of the grid changed as a result of sorting */
+int
+TixGridDataUpdateSort(dataSet, axis, start, end, items)
+ TixGridDataSet * dataSet;
+ int axis;
+ int start;
+ int end;
+ Tix_GrSortItem *items;
+{
+ TixGridRowCol **ptr;
+ Tcl_HashEntry *hashPtr;
+ int numItems = end - start + 1;
+ int i, k, max;
+
+ if (numItems <= 0) {
+ return 0;
+ }
+
+ ptr = (TixGridRowCol **)ckalloc(numItems * sizeof(TixGridRowCol *));
+
+ for (k=0,i=start; i<=end; i++,k++) {
+ if (!(hashPtr = Tcl_FindHashEntry(&dataSet->index[axis], FIX(i)))) {
+ /*
+ * This row/col doesn't exist
+ */
+ ptr[k] = NULL;
+ } else {
+ ptr[k] = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ }
+
+ max = start;
+ for (k=0,i=start; i<=end; i++,k++) {
+ int pos, isNew;
+ pos = items[k].index - start;
+
+ if (ptr[pos] != NULL) {
+ hashPtr = Tcl_CreateHashEntry(&dataSet->index[axis], FIX(i),
+ &isNew);
+ Tcl_SetHashValue(hashPtr, (char*)ptr[pos]);
+ ptr[pos]->dispIndex = i;
+ max = i;
+ }
+ }
+
+ ckfree((char*)ptr);
+
+ if (end+1 >= dataSet->maxIdx[axis]) {
+ if (dataSet->maxIdx[axis] != max+1) {
+ dataSet->maxIdx[axis] = max+1;
+ return 1; /* size changed */
+ }
+ }
+ return 0; /* size not changed */
+}
+
+
+static int
+RowColMaxSize(wPtr, which, rowCol, defSize)
+ WidgetPtr wPtr;
+ int which; /* 0=cols, 1=rows */
+ TixGridRowCol *rowCol;
+ TixGridSize * defSize;
+{
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+ TixGrEntry * chPtr;
+ int maxSize = 1;
+
+ if (rowCol->table.numEntries == 0) {
+ return defSize->pixels;
+ }
+
+ for (hashPtr = Tcl_FirstHashEntry(&rowCol->table, &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+
+ chPtr = (TixGrEntry *)Tcl_GetHashValue(hashPtr);
+ if (maxSize < chPtr->iPtr->base.size[which]) {
+ maxSize = chPtr->iPtr->base.size[which];
+ }
+ }
+
+ return maxSize;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGridDataGetRowColSize --
+ *
+ * Returns width of a column or height of a row.
+ *
+ * Results:
+ * The width or height.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+int
+TixGridDataGetRowColSize(wPtr, dataSet, which, index, defSize, pad0, pad1)
+ WidgetPtr wPtr; /* Info about Grid widget */
+ TixGridDataSet * dataSet; /* Dataset of the Grid */
+ int which; /* 0=cols, 1=rows */
+ int index; /* Column or row number */
+ TixGridSize * defSize; /* The default size for the grid cells */
+ int *pad0; /* Holds return value of horizontal padding. */
+ int *pad1; /* Holds return value of vertical padding. */
+{
+ TixGridRowCol *rowCol;
+ Tcl_HashEntry *hashPtr;
+ int size;
+
+ if (!(hashPtr = Tcl_FindHashEntry(&dataSet->index[which], FIX(index)))) {
+ size = defSize->pixels;
+ *pad0 = defSize->pad0;
+ *pad1 = defSize->pad1;
+ }
+ else {
+ rowCol = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+
+ switch (rowCol->size.sizeType) {
+ case TIX_GR_AUTO:
+ size = RowColMaxSize(wPtr, which, rowCol, defSize);
+ *pad0 = rowCol->size.pad0;
+ *pad1 = rowCol->size.pad1;
+ break;
+
+ case TIX_GR_DEFINED_PIXEL:
+ size = rowCol->size.sizeValue;
+ *pad0 = rowCol->size.pad0;
+ *pad1 = rowCol->size.pad1;
+ break;
+
+ case TIX_GR_DEFINED_CHAR:
+ size = (int)(rowCol->size.charValue * wPtr->fontSize[which]);
+ *pad0 = rowCol->size.pad0;
+ *pad1 = rowCol->size.pad1;
+ break;
+
+ case TIX_GR_DEFAULT:
+ default: /* some error ?? */
+ if (defSize->sizeType == TIX_GR_AUTO) {
+ size = RowColMaxSize(wPtr, which, rowCol, defSize);
+ } else {
+ size = defSize->pixels;
+ }
+ *pad0 = defSize->pad0;
+ *pad1 = defSize->pad1;
+ }
+ }
+
+ return size;
+}
+
+int
+TixGridDataGetIndex(interp, wPtr, xStr, yStr, xPtr, yPtr)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ CONST84 char * xStr;
+ CONST84 char * yStr;
+ int * xPtr;
+ int * yPtr;
+{
+ CONST84 char * str[2];
+ int * ptr[2];
+ int i;
+
+ str[0] = xStr;
+ str[1] = yStr;
+ ptr[0] = xPtr;
+ ptr[1] = yPtr;
+
+ for (i=0; i<2; i++) {
+ if (str[i] == NULL) { /* ignore this index */
+ continue;
+ }
+
+ if (strcmp(str[i], "max") == 0) {
+ *ptr[i] = wPtr->dataSet->maxIdx[i];
+ if (*ptr[i] < wPtr->hdrSize[i]) {
+ *ptr[i] = wPtr->hdrSize[i];
+ }
+ }
+ else if (strcmp(str[i], "end") == 0) {
+ *ptr[i] = wPtr->dataSet->maxIdx[i] + 1;
+ if (*ptr[i] < wPtr->hdrSize[i]) {
+ *ptr[i] = wPtr->hdrSize[i];
+ }
+ } else {
+ if (Tcl_GetInt(interp, str[i], ptr[i]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+ if (*ptr[i] < 0) {
+ *ptr[i] = 0;
+ }
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGridDataConfigRowColSize --
+ *
+ * Configure width of column or height of rows.
+ *
+ * Results:
+ * Standard Tcl result.
+ *
+ * Side effects:
+ * The column/rows size will be changed in an idle event.
+ *----------------------------------------------------------------------
+ */
+
+int
+TixGridDataConfigRowColSize(interp, wPtr, dataSet, which, index, argc, argv,
+ argcErrorMsg, changed_ret)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ TixGridDataSet * dataSet;
+ int which; /* 0=cols, 1=rows */
+ int index;
+ int argc;
+ CONST84 char ** argv;
+ CONST84 char * argcErrorMsg;
+ int *changed_ret; /* Returns whether size has been changed. */
+{
+ TixGridRowCol *rowCol;
+ Tcl_HashEntry *hashPtr;
+ int isNew, code;
+
+ hashPtr = Tcl_CreateHashEntry(&dataSet->index[which], FIX(index), &isNew);
+
+ if (!isNew) {
+ rowCol = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+ } else {
+ rowCol = InitRowCol(index);
+ Tcl_SetHashValue(hashPtr, (char*)rowCol);
+
+ if (dataSet->maxIdx[which] < index) {
+ dataSet->maxIdx[which] = index;
+ }
+ }
+
+ code = Tix_GrConfigSize(interp, wPtr, argc, argv, &rowCol->size,
+ argcErrorMsg, changed_ret);
+
+ if (changed_ret) {
+ *changed_ret |= isNew;
+ }
+
+ return code;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGridDataGetGridSize --
+ *
+ * Returns the number of rows and columns of the grid.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+/*
+ * ToDo: maintain numCol and numRow info while adding entries.
+ */
+
+void
+TixGridDataGetGridSize(dataSet, numCol_ret, numRow_ret)
+ TixGridDataSet * dataSet;
+ int *numCol_ret;
+ int *numRow_ret;
+{
+ int maxSize[2], i;
+ Tcl_HashEntry *hashPtr;
+ Tcl_HashSearch hashSearch;
+ TixGridRowCol * rowCol;
+
+ maxSize[0] = 1;
+ maxSize[1] = 1;
+
+ if (dataSet->index[0].numEntries == 0 || dataSet->index[1].numEntries==0) {
+ goto done;
+ }
+
+ for (i=0; i<2; i++) {
+
+ for (hashPtr = Tcl_FirstHashEntry(&dataSet->index[i], &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+
+ rowCol = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+ if (maxSize[i] < rowCol->dispIndex+1) {
+ maxSize[i] = rowCol->dispIndex+1;
+ }
+ }
+ }
+
+ done:
+ if (numCol_ret) {
+ *numCol_ret = maxSize[0];
+ }
+ if (numRow_ret) {
+ *numRow_ret = maxSize[1];
+ }
+}
+
+
+/*
+ * the following four functions return true if done -- no more rows or cells
+ * are left to traverse
+ */
+
+int
+TixGrDataFirstRow(dataSet, rowSearchPtr)
+ TixGridDataSet* dataSet;
+ Tix_GrDataRowSearch * rowSearchPtr;
+{
+ rowSearchPtr->hashPtr = Tcl_FirstHashEntry(&dataSet->index[0],
+ &rowSearchPtr->hashSearch);
+
+ if (rowSearchPtr->hashPtr != NULL) {
+ rowSearchPtr->row = (TixGridRowCol *)Tcl_GetHashValue(
+ rowSearchPtr->hashPtr);
+ return 0;
+ } else {
+ rowSearchPtr->row = NULL;
+ return 1;
+ }
+}
+
+int
+TixGrDataNextRow(rowSearchPtr)
+ Tix_GrDataRowSearch * rowSearchPtr;
+{
+ rowSearchPtr->hashPtr = Tcl_NextHashEntry(&rowSearchPtr->hashSearch);
+
+ if (rowSearchPtr->hashPtr != NULL) {
+ rowSearchPtr->row = (TixGridRowCol *)Tcl_GetHashValue(
+ rowSearchPtr->hashPtr);
+ return 0;
+ } else {
+ rowSearchPtr->row = NULL;
+ return 1;
+ }
+}
+
+int
+TixGrDataFirstCell(rowSearchPtr, cellSearchPtr)
+ Tix_GrDataRowSearch * rowSearchPtr;
+ Tix_GrDataCellSearch * cellSearchPtr;
+{
+ cellSearchPtr->hashPtr = Tcl_FirstHashEntry(&rowSearchPtr->row->table,
+ &cellSearchPtr->hashSearch);
+
+ if (cellSearchPtr->hashPtr != NULL) {
+ cellSearchPtr->data = (char *)Tcl_GetHashValue(
+ cellSearchPtr->hashPtr);
+ return 0;
+ } else {
+ cellSearchPtr->data = NULL;
+ return 1;
+ }
+}
+
+int
+TixGrDataNextCell(cellSearchPtr)
+ Tix_GrDataCellSearch * cellSearchPtr;
+{
+ cellSearchPtr->hashPtr = Tcl_NextHashEntry(&cellSearchPtr->hashSearch);
+
+ if (cellSearchPtr->hashPtr != NULL) {
+ cellSearchPtr->data = (char *)Tcl_GetHashValue(
+ cellSearchPtr->hashPtr);
+ return 0;
+ } else {
+ cellSearchPtr->data = NULL;
+ return 1;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixGridDataDeleteSearchedEntry --
+ *
+ * Deletes an entry returned by one of the search functions.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * If there is an entry at the index, it is deleted.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixGridDataDeleteSearchedEntry(cellSearchPtr)
+ Tix_GrDataCellSearch * cellSearchPtr;
+{
+ TixGrEntry * chPtr = (TixGrEntry *)cellSearchPtr->data;
+
+ Tcl_DeleteHashEntry(chPtr->entryPtr[0]);
+ Tcl_DeleteHashEntry(chPtr->entryPtr[1]);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGridDataDeleteRange --
+ *
+ * Deletes the rows (columns) at the given range.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The given rows (columns) are deleted.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixGridDataDeleteRange(wPtr, dataSet, which, from, to)
+ WidgetPtr wPtr; /* Info about the grid widget. */
+ TixGridDataSet * dataSet; /* Dataset of the Grid */
+ int which; /* 0=cols, 1=rows */
+ int from; /* Starting column/row. */
+ int to; /* Ending column/row (inclusive). */
+{
+ int tmp, i, other, deleted = 0;
+
+ if (from < 0 ) {
+ from = 0;
+ }
+ if (to < 0 ) {
+ to = 0;
+ }
+ if (from > to) {
+ tmp = to;
+ to = from;
+ from = tmp;
+ }
+ if (which == 0) {
+ other = 1;
+ } else {
+ other = 0;
+ }
+
+ for (i=from; i<=to; i++) {
+ Tcl_HashEntry *hashPtr, *hp, *toDel;
+ TixGridRowCol *rcPtr, *rcp;
+ Tcl_HashSearch hashSearch;
+
+ hashPtr = Tcl_FindHashEntry(&dataSet->index[which], FIX(i));
+ if (hashPtr != NULL) {
+ rcPtr = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+
+ for (hp = Tcl_FirstHashEntry(&dataSet->index[other], &hashSearch);
+ hp;
+ hp = Tcl_NextHashEntry(&hashSearch)) {
+
+ rcp = (TixGridRowCol *)Tcl_GetHashValue(hp);
+ toDel = Tcl_FindHashEntry(&rcp->table, (char*)rcPtr);
+ if (toDel != NULL) {
+ TixGrEntry * chPtr;
+
+ chPtr = (TixGrEntry *)Tcl_GetHashValue(toDel);
+ if (chPtr) {
+ deleted = 1;
+ Tix_GrFreeElem(chPtr);
+ }
+
+ Tcl_DeleteHashEntry(toDel);
+ }
+ }
+
+ Tcl_DeleteHashEntry(hashPtr);
+ Tcl_DeleteHashTable(&rcPtr->table);
+ ckfree((char*)rcPtr);
+ }
+ }
+
+ if (deleted) {
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGridDataMoveRange --
+ *
+ * Moves a range of row (columns) by a given offset. E.g. move 2-4 by 2
+ * changes the rows 2,3,4 to 4,5,6.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Rows (columns) at locations where the given rows will be moved
+ * to are deleted.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixGridDataMoveRange(wPtr, dataSet, which, from, to, by)
+ WidgetPtr wPtr; /* Info about the grid widget. */
+ TixGridDataSet * dataSet; /* Dataset of the Grid */
+ int which; /* 0=cols, 1=rows */
+ int from; /* Starting column/row. */
+ int to; /* Ending column/row (inclusive). */
+ int by; /* The distance of the move. */
+{
+ int tmp, i, s, e, incr;
+ int df, dt; /* Rows inside this range will be deleted
+ * before the given rows are moved. */
+
+ if (by == 0) {
+ return;
+ }
+ if (from < 0 ) {
+ from = 0;
+ }
+ if (to < 0 ) {
+ to = 0;
+ }
+ if (from > to) {
+ tmp = to;
+ to = from;
+ from = tmp;
+ }
+
+ if ((from + by) < 0) {
+ /*
+ * Delete the leading rows that will be moved beyond the top of grid.
+ */
+ int n; /* Number of rows to delete. */
+
+ n = - (from + by);
+ if (n > (to - from + 1)) {
+ n = to - from + 1;
+ }
+ TixGridDataDeleteRange(wPtr, dataSet, which, from, (from+n-1));
+ from = from + n;
+
+ if (from > to) {
+ /*
+ * All the rows have been deleted.
+ */
+ return;
+ }
+ }
+
+ /*
+ * Delete rows at locations where the given rows will be moved to.
+ */
+ df = from + by;
+ dt = to + by;
+
+ if (by > 0) {
+ if (df <= to) {
+ df = to + 1;
+ }
+ } else {
+ if (dt >= from) {
+ dt = from - 1;
+ }
+ }
+ TixGridDataDeleteRange(wPtr, dataSet, which, df, dt);
+
+ /*
+ * Rename the rows.
+ */
+ if (by > 0) {
+ s = to;
+ e = from-1;
+ incr = -1;
+ } else {
+ s = from;
+ e = to+1;
+ incr = 1;
+ }
+
+ for (i=s; i!=e; i+=incr) {
+ Tcl_HashEntry *hashPtr;
+ TixGridRowCol *rcPtr;
+ int isNew;
+
+ hashPtr = Tcl_FindHashEntry(&dataSet->index[which], FIX(i));
+ if (hashPtr != NULL) {
+ rcPtr = (TixGridRowCol *)Tcl_GetHashValue(hashPtr);
+ rcPtr->dispIndex = i+by;
+ Tcl_DeleteHashEntry(hashPtr);
+ hashPtr = Tcl_CreateHashEntry(&dataSet->index[which], FIX(i+by),
+ &isNew);
+ Tcl_SetHashValue(hashPtr, (char*)rcPtr);
+ }
+ }
+}
Added: external/tix-8.4.2.x/generic/tixGrData.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrData.h Tue Mar 18 19:38:59 2008
@@ -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
Added: external/tix-8.4.2.x/generic/tixGrFmt.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrFmt.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,793 @@
+
+/* $Id: tixGrFmt.c,v 1.3 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixGrFmt.c --
+ *
+ * This module handles the formatting of the elements inside a Grid
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <tixGrid.h>
+
+typedef struct FormatStruct {
+ int x1, y1, x2, y2;
+} FormatStruct;
+
+typedef struct BorderFmtStruct {
+ int x1, y1, x2, y2;
+ Tk_3DBorder border;
+ Tk_3DBorder selectBorder; /* the border color color */
+ int borderWidth; /* Width of 3-D borders. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int xon, xoff;
+ int yon, yoff;
+ int filled;
+} BorderFmtStruct;
+
+typedef struct GridFmtStruct {
+ int x1, y1, x2, y2;
+ Tk_3DBorder border; /* the border color color */
+ Tk_3DBorder selectBorder; /* the border color color */
+ Tk_3DBorder bgBorder; /* the background color */
+ int borderWidth; /* Width of 3-D borders. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int xon, xoff;
+ int yon, yoff;
+ Tk_Anchor anchor;
+ int filled;
+} GridFmtStruct;
+
+static TIX_DECLARE_SUBCMD(Tix_GrFormatBorder);
+static TIX_DECLARE_SUBCMD(Tix_GrFormatGrid);
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrFormat);
+
+typedef int CFG_TYPE;
+
+static int Tix_GrSaveColor _ANSI_ARGS_((WidgetPtr wPtr,
+ CFG_TYPE type, void * ptr));
+static void GetBlockPosn _ANSI_ARGS_((WidgetPtr wPtr, int x1,
+ int y1, int x2, int y2, int * bx1, int * by1,
+ int * bx2, int * by2));
+static void GetRenderPosn _ANSI_ARGS_((WidgetPtr wPtr,
+ int bx1, int by1, int bx2, int by2, int * rx1,
+ int * ry1, int * rx2, int * ry2));
+static void Tix_GrFillCells _ANSI_ARGS_((WidgetPtr wPtr,
+ Tk_3DBorder border, Tk_3DBorder selectBorder,
+ int bx1, int by1, int bx2, int by2,
+ int borderWidth, int relief, int filled,
+ int bw[2][2]));
+static int GetInfo _ANSI_ARGS_((WidgetPtr wPtr,
+ Tcl_Interp *interp, int argc, CONST84 char **argv,
+ FormatStruct * infoPtr,
+ Tk_ConfigSpec * configSpecs));
+
+#define DEF_GRID_ANCHOR "se"
+#define DEF_GRID_BORDER_XOFF "0"
+#define DEF_GRID_BORDER_XON "1"
+#define DEF_GRID_BORDER_YOFF "0"
+#define DEF_GRID_BORDER_YON "1"
+#define DEF_GRID_GRIDLINE_XOFF "0"
+#define DEF_GRID_GRIDLINE_XON "1"
+#define DEF_GRID_GRIDLINE_YOFF "0"
+#define DEF_GRID_GRIDLINE_YON "1"
+#define DEF_GRID_FILLED "0"
+#define DEF_GRID_BORDER_COLOR NORMAL_BG
+#define DEF_GRID_BORDER_MONO WHITE
+#define DEF_GRID_GRIDLINE_COLOR BLACK
+#define DEF_GRID_GRIDLINE_MONO BLACK
+
+static Tk_ConfigSpec borderConfigSpecs[] = {
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_GRID_BG_COLOR, Tk_Offset(BorderFmtStruct, border),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_GRID_BG_MONO, Tk_Offset(BorderFmtStruct, border),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
+ DEF_GRID_BORDER_WIDTH, Tk_Offset(BorderFmtStruct, borderWidth), 0},
+ {TK_CONFIG_BOOLEAN, "-filled", "filled", "Filled",
+ DEF_GRID_FILLED, Tk_Offset(BorderFmtStruct, filled), 0},
+ {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
+ DEF_GRID_RELIEF, Tk_Offset(BorderFmtStruct, relief), 0},
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_GRID_SELECT_BG_COLOR, Tk_Offset(BorderFmtStruct, selectBorder),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_GRID_SELECT_BG_MONO, Tk_Offset(BorderFmtStruct, selectBorder),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_INT, "-xoff", "xoff", "Xoff",
+ DEF_GRID_BORDER_XOFF, Tk_Offset(BorderFmtStruct, xoff), 0},
+ {TK_CONFIG_INT, "-xon", "xon", "Xon",
+ DEF_GRID_BORDER_XON, Tk_Offset(BorderFmtStruct, xon), 0},
+ {TK_CONFIG_INT, "-yoff", "yoff", "Yoff",
+ DEF_GRID_BORDER_YOFF, Tk_Offset(BorderFmtStruct, yoff), 0},
+ {TK_CONFIG_INT, "-yon", "yon", "Yon",
+ DEF_GRID_BORDER_YON, Tk_Offset(BorderFmtStruct, yon), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec gridConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", "anchor", "Anchor",
+ DEF_GRID_ANCHOR, Tk_Offset(GridFmtStruct, anchor), 0},
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_GRID_BG_COLOR, Tk_Offset(GridFmtStruct, bgBorder),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_GRID_BG_COLOR, Tk_Offset(GridFmtStruct, bgBorder),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_BORDER, "-bordercolor", "borderColor", "BorderColor",
+ DEF_GRID_GRIDLINE_COLOR, Tk_Offset(GridFmtStruct, border),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_BORDER, "-bordercolor", "borderColor", "BorderColor",
+ DEF_GRID_GRIDLINE_MONO, Tk_Offset(GridFmtStruct, border),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
+ DEF_GRID_BORDER_WIDTH, Tk_Offset(GridFmtStruct, borderWidth), 0},
+ {TK_CONFIG_BOOLEAN, "-filled", "filled", "Filled",
+ DEF_GRID_FILLED, Tk_Offset(GridFmtStruct, filled), 0},
+ {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
+ DEF_GRID_RELIEF, Tk_Offset(GridFmtStruct, relief), 0},
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_GRID_SELECT_BG_COLOR, Tk_Offset(GridFmtStruct, selectBorder),
+ TK_CONFIG_COLOR_ONLY},
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_GRID_SELECT_BG_MONO, Tk_Offset(GridFmtStruct, selectBorder),
+ TK_CONFIG_MONO_ONLY},
+ {TK_CONFIG_INT, "-xoff", "xoff", "Xoff",
+ DEF_GRID_GRIDLINE_XOFF, Tk_Offset(GridFmtStruct, xoff), 0},
+ {TK_CONFIG_INT, "-xon", "xon", "Xon",
+ DEF_GRID_GRIDLINE_XON, Tk_Offset(GridFmtStruct, xon), 0},
+ {TK_CONFIG_INT, "-yoff", "yoff", "Yoff",
+ DEF_GRID_GRIDLINE_YOFF, Tk_Offset(GridFmtStruct, yoff), 0},
+ {TK_CONFIG_INT, "-yon", "yon", "Yon",
+ DEF_GRID_GRIDLINE_YON, Tk_Offset(GridFmtStruct, yon), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+int
+Tix_GrFormat(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "border", 4, TIX_VAR_ARGS, Tix_GrFormatBorder,
+ "x1 y1 x2 y2 ?option value ...?"},
+ {TIX_DEFAULT_LEN, "grid", 4, TIX_VAR_ARGS, Tix_GrFormatGrid,
+ "x1 y1 x2 y2 ?option value ...?"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? ?arg ...?",
+ };
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (wPtr->renderInfo == NULL) {
+ Tcl_AppendResult(interp, "the \"format\" command can only be called ",
+ "by the -formatcmd handler of the tixGrid widget", NULL);
+ return TCL_ERROR;
+ }
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+
+
+static int
+GetInfo(wPtr, interp, argc, argv, infoPtr, configSpecs)
+ WidgetPtr wPtr;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+ FormatStruct * infoPtr;
+ Tk_ConfigSpec * configSpecs;
+{
+ int temp;
+
+ if (argc < 4) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 2, "x1 y1 x2 y2 ...");
+ }
+ if (Tcl_GetInt(interp, argv[0], &infoPtr->x1) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &infoPtr->y1) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[2], &infoPtr->x2) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[3], &infoPtr->y2) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tk_ConfigureWidget(interp, wPtr->dispData.tkwin, configSpecs,
+ argc-4, argv+4, (char *)infoPtr, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (infoPtr->x1 > infoPtr->x2) {
+ temp = infoPtr->x1;
+ infoPtr->x1 = infoPtr->x2;
+ infoPtr->x2 = temp;
+ }
+ if (infoPtr->y1 > infoPtr->y2) {
+ temp = infoPtr->y1;
+ infoPtr->y1 = infoPtr->y2;
+ infoPtr->y2 = temp;
+ }
+
+ /* trivial rejects */
+ if (infoPtr->x1 > wPtr->renderInfo->fmt.x2) {
+ return TCL_BREAK;
+ }
+ if (infoPtr->x2 < wPtr->renderInfo->fmt.x1) {
+ return TCL_BREAK;
+ }
+ if (infoPtr->y1 > wPtr->renderInfo->fmt.y2) {
+ return TCL_BREAK;
+ }
+ if (infoPtr->y2 < wPtr->renderInfo->fmt.y1) {
+ return TCL_BREAK;
+ }
+
+ /* the area is indeed visible, do some clipping */
+ if (infoPtr->x1 < wPtr->renderInfo->fmt.x1) {
+ infoPtr->x1 = wPtr->renderInfo->fmt.x1;
+ }
+ if (infoPtr->x2 > wPtr->renderInfo->fmt.x2) {
+ infoPtr->x2 = wPtr->renderInfo->fmt.x2;
+ }
+ if (infoPtr->y1 < wPtr->renderInfo->fmt.y1) {
+ infoPtr->y1 = wPtr->renderInfo->fmt.y1;
+ }
+ if (infoPtr->y2 > wPtr->renderInfo->fmt.y2) {
+ infoPtr->y2 = wPtr->renderInfo->fmt.y2;
+ }
+
+ return TCL_OK;
+}
+
+static void
+GetBlockPosn(wPtr, x1, y1, x2, y2, bx1, by1, bx2, by2)
+ WidgetPtr wPtr;
+ int x1; /* cell index */
+ int x2;
+ int y1;
+ int y2;
+ int * bx1; /* block index */
+ int * by1;
+ int * bx2;
+ int * by2;
+{
+ *bx1 = x1;
+ *bx2 = x2;
+ *by1 = y1;
+ *by2 = y2;
+
+ switch (wPtr->renderInfo->fmt.whichArea) {
+ case TIX_S_MARGIN:
+ break;
+ case TIX_X_MARGIN:
+ *bx1 -= wPtr->scrollInfo[0].offset;
+ *bx2 -= wPtr->scrollInfo[0].offset;
+ break;
+ case TIX_Y_MARGIN:
+ *by1 -= wPtr->scrollInfo[1].offset;
+ *by2 -= wPtr->scrollInfo[1].offset;
+ break;
+ case TIX_MAIN:
+ *bx1 -= wPtr->scrollInfo[0].offset;
+ *bx2 -= wPtr->scrollInfo[0].offset;
+ *by1 -= wPtr->scrollInfo[1].offset;
+ *by2 -= wPtr->scrollInfo[1].offset;
+ break;
+ }
+}
+
+static void
+GetRenderPosn(wPtr, bx1, by1, bx2, by2, rx1, ry1, rx2, ry2)
+ WidgetPtr wPtr;
+ int bx1; /* block index */
+ int by1;
+ int bx2;
+ int by2;
+ int * rx1; /* render buffer position */
+ int * ry1;
+ int * rx2;
+ int * ry2;
+{
+ int x, y, i;
+
+
+ for (x=0,i=0; i<=bx2; i++) {
+ if (i == bx1) {
+ *rx1 = x;
+ }
+ if (i == bx2) {
+ *rx2 = x + wPtr->mainRB->dispSize[0][i].total - 1;
+ break;
+
+ }
+ x += wPtr->mainRB->dispSize[0][i].total;
+ }
+
+
+ for (y=0,i=0; i<=by2; i++) {
+ if (i == by1) {
+ *ry1 = y;
+ }
+ if (i == by2) {
+ *ry2 = y + wPtr->mainRB->dispSize[1][i].total - 1;
+ break;
+ }
+ y += wPtr->mainRB->dispSize[1][i].total;
+ }
+
+ *rx1 += wPtr->renderInfo->origin[0];
+ *rx2 += wPtr->renderInfo->origin[0];
+ *ry1 += wPtr->renderInfo->origin[1];
+ *ry2 += wPtr->renderInfo->origin[1];
+}
+
+static void
+Tix_GrFillCells(wPtr, border, selectBorder, bx1, by1, bx2, by2,
+ borderWidth, relief, filled, bw)
+ WidgetPtr wPtr;
+ Tk_3DBorder border;
+ Tk_3DBorder selectBorder;
+ int bx1;
+ int by1;
+ int bx2;
+ int by2;
+ int borderWidth;
+ int relief;
+ int filled;
+ int bw[2][2];
+{
+ int rx1, ry1, rx2, ry2;
+ int i, j;
+ Tk_3DBorder targetBorder;
+
+ for (i=bx1; i<=bx2; i++) {
+ for (j=by1; j<=by2; j++) {
+
+ if (filled) {
+ GetRenderPosn(wPtr, i, j, i, j, &rx1,&ry1, &rx2,&ry2);
+
+ if (wPtr->mainRB->elms[i][j].selected) {
+ targetBorder = selectBorder;
+ } else {
+ targetBorder = border;
+ }
+
+ Tk_Fill3DRectangle(wPtr->dispData.tkwin,
+ wPtr->renderInfo->drawable,
+ targetBorder, rx1, ry1, rx2-rx1+1, ry2-ry1+1,
+ 0, TK_RELIEF_FLAT);
+
+ wPtr->mainRB->elms[i][j].filled = 1;
+ } else {
+ if (!wPtr->mainRB->elms[i][j].filled) {
+ if (i == bx1) {
+ if (wPtr->mainRB->elms[i][j].borderW[0][0] < bw[0][0]){
+ wPtr->mainRB->elms[i][j].borderW[0][0] = bw[0][0];
+ }
+ }
+ if (i == bx2) {
+ if (wPtr->mainRB->elms[i][j].borderW[0][1] < bw[0][1]){
+ wPtr->mainRB->elms[i][j].borderW[0][1] = bw[0][1];
+ }
+ }
+ if (j == by1) {
+ if (wPtr->mainRB->elms[i][j].borderW[1][0] < bw[1][0]){
+ wPtr->mainRB->elms[i][j].borderW[1][0] = bw[1][0];
+ }
+ }
+ if (j == by2) {
+ if (wPtr->mainRB->elms[i][j].borderW[1][1] < bw[1][1]){
+ wPtr->mainRB->elms[i][j].borderW[1][1] = bw[1][1];
+ }
+ }
+ }
+ }
+ }
+ }
+ if (borderWidth > 0) {
+ GetRenderPosn(wPtr, bx1, by1, bx2, by2, &rx1,&ry1, &rx2,&ry2);
+
+ if (bx1 == bx2 && by1 == by2) {
+ /* special case: if a single cell is selected, we invert the
+ * border */
+
+ if (wPtr->mainRB->elms[bx1][by1].selected) {
+ if (relief == TK_RELIEF_RAISED) {
+ relief = TK_RELIEF_SUNKEN;
+ }
+ else if (relief == TK_RELIEF_SUNKEN) {
+ relief = TK_RELIEF_RAISED;
+ }
+ }
+ }
+
+ Tk_Draw3DRectangle(wPtr->dispData.tkwin,
+ wPtr->renderInfo->drawable,
+ border, rx1, ry1, rx2-rx1+1, ry2-ry1+1,
+ borderWidth, relief);
+ }
+}
+
+static int
+Tix_GrFormatBorder(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ BorderFmtStruct info;
+ int code = TCL_OK;
+ int bx1, bx2, by1, by2;
+ int i, j;
+
+ info.x1 = 0;
+ info.y1 = 0;
+ info.x2 = 0;
+ info.y2 = 0;
+ info.border = NULL;
+ info.borderWidth = 0;
+ info.selectBorder = NULL;
+ info.relief = TK_RELIEF_FLAT;
+ info.xon = 0;
+ info.xoff = 0;
+ info.yon = 0;
+ info.yoff = 0;
+ info.filled = 0;
+
+ if ((code = GetInfo(wPtr, interp, argc, argv, (FormatStruct*)&info,
+ borderConfigSpecs))!= TCL_OK) {
+ goto done;
+ }
+
+ /*
+ * If the xon is not specified, then by default the xon is encloses the
+ * whole region. Same for yon.
+ */
+ if (info.xon == 0) {
+ info.xon = info.x2 - info.x1 + 1;
+ info.xoff = 0;
+ }
+ if (info.yon == 0) {
+ info.yon = info.y2 - info.y1 + 1;
+ info.yoff = 0;
+ }
+
+ GetBlockPosn(wPtr, info.x1, info.y1, info.x2, info.y2,
+ &bx1, &by1, &bx2, &by2);
+
+#if 0
+ /* now it works */
+#ifdef __WIN32__
+ if (bx1 == 0 && bx2 == 0 && by1 == 0 && by2 == 0) {
+ /* some how this doesn't work in BC++ 4.5 */
+ goto done;
+ }
+#endif
+#endif
+
+ for (i=bx1; i<=bx2; i+=(info.xon+info.xoff)) {
+ for (j=by1; j<=by2; j+=(info.yon+info.yoff)) {
+ int _bx1, _by1, _bx2, _by2;
+ int borderWidths[2][2];
+
+ _bx1 = i;
+ _bx2 = i+info.xon-1;
+ _by1 = j;
+ _by2 = j+info.yon-1;
+
+ if (_bx2 > bx2) {
+ _bx2 = bx2;
+ }
+ if (_by2 > by2) {
+ _by2 = by2;
+ }
+
+ borderWidths[0][0] = info.borderWidth;
+ borderWidths[0][1] = info.borderWidth;
+ borderWidths[1][0] = info.borderWidth;
+ borderWidths[1][1] = info.borderWidth;
+
+ Tix_GrFillCells(wPtr, info.border, info.selectBorder,
+ _bx1, _by1, _bx2, _by2,
+ info.borderWidth, info.relief, info.filled, borderWidths);
+ }
+ }
+
+ done:
+ if (code == TCL_BREAK) {
+ code = TCL_OK;
+ }
+ if (code == TCL_OK) {
+ if (Tix_GrSaveColor(wPtr, TK_CONFIG_BORDER, (void*)info.border) == 0) {
+ info.border = (Tk_3DBorder)NULL;
+ }
+ if (Tix_GrSaveColor(wPtr, TK_CONFIG_BORDER, (void*)info.selectBorder)
+ == 0) {
+ info.selectBorder = (Tk_3DBorder)NULL;
+ }
+ Tk_FreeOptions(borderConfigSpecs, (char *)&info,
+ wPtr->dispData.display, 0);
+ }
+ return code;
+}
+
+static int
+Tix_GrFormatGrid(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ GridFmtStruct info;
+ int code = TCL_OK;
+ int rx1, rx2, ry1, ry2;
+ int bx1, bx2, by1, by2;
+ int i, j;
+ GC gc;
+ int borderWidths[2][2];
+
+ info.x1 = 0;
+ info.y1 = 0;
+ info.x2 = 0;
+ info.y2 = 0;
+ info.border = NULL;
+ info.selectBorder = NULL;
+ info.bgBorder = NULL;
+ info.borderWidth = 0;
+ info.relief = TK_RELIEF_FLAT;
+ info.xon = 1;
+ info.xoff = 0;
+ info.yon = 1;
+ info.yoff = 0;
+ info.filled = 0;
+
+ if ((code = GetInfo(wPtr, interp, argc, argv, (FormatStruct*)&info,
+ gridConfigSpecs))!= TCL_OK) {
+ goto done;
+ }
+ gc = Tk_3DBorderGC(wPtr->dispData.tkwin, info.border,
+ TK_3D_FLAT_GC);
+
+ GetBlockPosn(wPtr, info.x1, info.y1, info.x2, info.y2,
+ &bx1, &by1, &bx2, &by2);
+
+ borderWidths[0][0] = 0;
+ borderWidths[0][1] = 0;
+ borderWidths[1][0] = 0;
+ borderWidths[1][1] = 0;
+
+ switch(info.anchor) {
+ case TK_ANCHOR_N:
+ case TK_ANCHOR_NE:
+ case TK_ANCHOR_NW:
+ borderWidths[1][0] = info.borderWidth;
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ switch(info.anchor) {
+ case TK_ANCHOR_SE:
+ case TK_ANCHOR_S:
+ case TK_ANCHOR_SW:
+ borderWidths[1][1] = info.borderWidth;
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ switch(info.anchor) {
+ case TK_ANCHOR_SW:
+ case TK_ANCHOR_W:
+ case TK_ANCHOR_NW:
+ borderWidths[0][0] = info.borderWidth;
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ switch(info.anchor) {
+ case TK_ANCHOR_NE:
+ case TK_ANCHOR_E:
+ case TK_ANCHOR_SE:
+ borderWidths[0][1] = info.borderWidth;
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+
+ for (i=bx1; i<=bx2; i+=(info.xon+info.xoff)) {
+ for (j=by1; j<=by2; j+=(info.yon+info.yoff)) {
+ int _bx1, _by1, _bx2, _by2;
+
+ _bx1 = i;
+ _bx2 = i+info.xon-1;
+ _by1 = j;
+ _by2 = j+info.yon-1;
+
+ if (_bx2 > bx2) {
+ _bx2 = bx2;
+ }
+ if (_by2 > by2) {
+ _by2 = by2;
+ }
+
+ Tix_GrFillCells(wPtr, info.bgBorder, info.selectBorder,
+ _bx1, _by1, _bx2, _by2, 0, TK_RELIEF_FLAT, info.filled,
+ borderWidths);
+
+ if (info.borderWidth > 0) {
+ GetRenderPosn(wPtr, _bx1, _by1, _bx2, _by2,
+ &rx1,&ry1, &rx2,&ry2);
+
+ switch(info.anchor) {
+ case TK_ANCHOR_N:
+ case TK_ANCHOR_NE:
+ case TK_ANCHOR_NW:
+ XDrawLine(wPtr->dispData.display,
+ wPtr->renderInfo->drawable, gc,
+ rx1, ry1, rx2, ry1);
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ switch(info.anchor) {
+ case TK_ANCHOR_SE:
+ case TK_ANCHOR_S:
+ case TK_ANCHOR_SW:
+ XDrawLine(wPtr->dispData.display,
+ wPtr->renderInfo->drawable, gc,
+ rx1, ry2, rx2, ry2);
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ switch(info.anchor) {
+ case TK_ANCHOR_SW:
+ case TK_ANCHOR_W:
+ case TK_ANCHOR_NW:
+ XDrawLine(wPtr->dispData.display,
+ wPtr->renderInfo->drawable, gc,
+ rx1, ry1, rx1, ry2);
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ switch(info.anchor) {
+ case TK_ANCHOR_NE:
+ case TK_ANCHOR_E:
+ case TK_ANCHOR_SE:
+ XDrawLine(wPtr->dispData.display,
+ wPtr->renderInfo->drawable, gc,
+ rx2, ry1, rx2, ry2);
+ break;
+ default:
+ ; /* do nothing. This line gets rid of compiler warnings */
+ }
+ }
+ }
+ }
+
+ done:
+ if (code == TCL_BREAK) {
+ code = TCL_OK;
+ }
+ if (code == TCL_OK) {
+ if (Tix_GrSaveColor(wPtr, TK_CONFIG_BORDER, (void*)info.border) == 0) {
+ info.border = (Tk_3DBorder)NULL;
+ }
+ if (Tix_GrSaveColor(wPtr, TK_CONFIG_BORDER, (void*)info.bgBorder)==0) {
+ info.bgBorder = (Tk_3DBorder)NULL;
+ }
+ if (Tix_GrSaveColor(wPtr, TK_CONFIG_BORDER, (void*)info.selectBorder)
+ == 0) {
+ info.selectBorder = (Tk_3DBorder)NULL;
+ }
+ Tk_FreeOptions(gridConfigSpecs, (char *)&info, wPtr->dispData.display,
+ 0);
+ }
+ return code;
+}
+
+
+/* returns 1 if the caller can free the border/color */
+static int Tix_GrSaveColor(wPtr, type, ptr)
+ WidgetPtr wPtr;
+ CFG_TYPE type;
+ void * ptr;
+{
+ long pixel;
+ Tix_ListIterator li;
+ int found;
+ ColorInfo * cPtr;
+
+ if (type == TK_CONFIG_COLOR) {
+ pixel = ((XColor *)ptr)->pixel;
+ } else {
+ pixel = Tk_3DBorderColor((Tk_3DBorder)ptr)->pixel;
+ }
+
+ Tix_SimpleListIteratorInit(&li);
+ for (found = 0, Tix_SimpleListStart(&wPtr->colorInfo, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&wPtr->colorInfo, &li)) {
+
+ cPtr = (ColorInfo *)li.curr;
+ if (cPtr->pixel == pixel) {
+ cPtr->counter = wPtr->colorInfoCounter;
+ return 1;
+
+ }
+ }
+
+ cPtr = (ColorInfo *)ckalloc(sizeof(ColorInfo));
+
+ if (type == TK_CONFIG_COLOR) {
+ cPtr->color = (XColor *)ptr;
+ } else {
+ cPtr->border = (Tk_3DBorder)ptr;
+ }
+ cPtr->type = (int)type;
+ cPtr->pixel = pixel;
+ cPtr->counter = wPtr->colorInfoCounter;
+
+ Tix_SimpleListAppend(&wPtr->colorInfo, (char*)cPtr, 0);
+ return 0;
+}
+
+void
+Tix_GrFreeUnusedColors(wPtr, freeAll)
+ WidgetPtr wPtr;
+ int freeAll;
+{
+ Tix_ListIterator li;
+ ColorInfo * cPtr;
+
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&wPtr->colorInfo, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&wPtr->colorInfo, &li)) {
+
+ cPtr = (ColorInfo *)li.curr;
+ if (freeAll || cPtr->counter < wPtr->colorInfoCounter) {
+ Tix_SimpleListDelete(&wPtr->colorInfo, &li);
+
+ if (cPtr->type == (int)(TK_CONFIG_COLOR)) {
+ Tk_FreeColor(cPtr->color);
+ } else {
+ Tk_Free3DBorder(cPtr->border);
+ }
+ ckfree((char*)cPtr);
+ }
+ }
+}
Added: external/tix-8.4.2.x/generic/tixGrRC.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrRC.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,121 @@
+
+/* $Id: tixGrRC.c,v 1.3 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixGrRC.c --
+ *
+ * This module handles "size" sub-commands.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <tixGrid.h>
+
+static TIX_DECLARE_SUBCMD(Tix_GrRCSize);
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrSetSize);
+
+int
+Tix_GrSetSize(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "row", 1, TIX_VAR_ARGS, Tix_GrRCSize,
+ "index ?option value ...?"},
+ {TIX_DEFAULT_LEN, "column", 1, TIX_VAR_ARGS, Tix_GrRCSize,
+ "index ?option value ...?"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "option index ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+
+static int
+Tix_GrRCSize(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int which, index, code;
+ char errorMsg[300];
+ int changed;
+
+ /* TODO: can the index be <0?? */
+ if (argv[-1][0] == 'c') {
+ which = 0;
+ } else {
+ which = 1;
+ }
+ if (Tcl_GetInt(interp, argv[0], &index) != TCL_OK) {
+ size_t len = strlen(argv[0]);
+
+ Tcl_ResetResult(interp);
+ if (strncmp(argv[0], "default", len) != 0) {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\"; must be an integer or \"default\"", NULL);
+ return TCL_ERROR;
+ } else {
+ /*
+ * Set the default sizes
+ */
+
+ /* Buffer size checked: test=grrc-1.2 */
+ sprintf(errorMsg, "%s %s ?option value ...?", argv[-2], argv[-1]);
+
+ code = Tix_GrConfigSize(interp, wPtr, argc-1, argv+1,
+ &wPtr->defSize[which], errorMsg, &changed);
+
+ /* Handling special cases */
+ if (code == TCL_OK) {
+ switch (wPtr->defSize[which].sizeType) {
+ case TIX_GR_DEFAULT:
+ wPtr->defSize[which].sizeType = TIX_GR_DEFINED_CHAR;
+ if (which == 0) {
+ wPtr->defSize[which].charValue = 10.0;
+ } else {
+ wPtr->defSize[which].charValue = 1.1;
+ }
+ }
+
+ switch (wPtr->defSize[which].sizeType) {
+ case TIX_GR_DEFINED_PIXEL:
+ wPtr->defSize[which].pixels=wPtr->defSize[which].sizeValue;
+ break;
+
+ case TIX_GR_DEFINED_CHAR:
+ wPtr->defSize[which].pixels =
+ (int)(wPtr->defSize[which].charValue *
+ wPtr->fontSize[which]);
+ break;
+ }
+ }
+ }
+ } else {
+ /* Buffer size checked: test=grrc-1.3 */
+ sprintf(errorMsg, "%s %s ?option value ...?", argv[-2], argv[-1]);
+
+ code = TixGridDataConfigRowColSize(interp, wPtr, wPtr->dataSet,
+ which, index, argc-1, argv+1, errorMsg, &changed);
+ }
+
+ if (changed) {
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ }
+
+ return code;
+}
Added: external/tix-8.4.2.x/generic/tixGrSel.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrSel.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,288 @@
+
+/* $Id: tixGrSel.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixGrSel.c --
+ *
+ * This module handles the selection
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <tixGrid.h>
+
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrSelection);
+static TIX_DECLARE_SUBCMD(Tix_GrSelIncludes);
+static TIX_DECLARE_SUBCMD(Tix_GrSelModify);
+
+static int Tix_GrSelIncludes _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char **argv));
+static void Tix_GrAdjustSelection _ANSI_ARGS_((
+ WidgetPtr wPtr, SelectBlock * sbPtr));
+static void Tix_GrMergeSelection _ANSI_ARGS_((
+ WidgetPtr wPtr, SelectBlock * sbPtr));
+
+int
+Tix_GrSelection(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "adjust", 2, 4, Tix_GrSelModify,
+ "x1 y1 ?x2 y2?"},
+ {TIX_DEFAULT_LEN, "clear", 2, 4, Tix_GrSelModify,
+ "x1 y1 ?x2 y2?"},
+ {TIX_DEFAULT_LEN, "includes", 2, 4, Tix_GrSelIncludes,
+ "x1 y1 ?x2 y2?"},
+ {TIX_DEFAULT_LEN, "set", 2, 4, Tix_GrSelModify,
+ "x1 y1 ?x2 y2?"},
+ {TIX_DEFAULT_LEN, "toggle", 2, 4, Tix_GrSelModify,
+ "x1 y1 ?x2 y2?"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+static int
+Tix_GrSelIncludes(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+#if 0
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+#endif
+ return TCL_OK;
+}
+
+static void
+Tix_GrMergeSelection(wPtr, sbPtr)
+ WidgetPtr wPtr;
+ SelectBlock * sbPtr;
+{
+ Tix_ListIterator li;
+
+ switch (sbPtr->type) {
+ case TIX_GR_SET:
+ case TIX_GR_CLEAR:
+ if (sbPtr->range[0][0] == 0 &&
+ sbPtr->range[1][0] == 0 &&
+ sbPtr->range[0][1] == TIX_GR_MAX &&
+ sbPtr->range[1][1] == TIX_GR_MAX) {
+
+ /* clear everything else from the list
+ */
+ Tix_SimpleListIteratorInit(&li);
+
+ for (Tix_SimpleListStart(&wPtr->selList, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&wPtr->selList, &li)) {
+
+ SelectBlock *ptr = (SelectBlock *)li.curr;
+ Tix_SimpleListDelete(&wPtr->selList, &li);
+ ckfree((char*)ptr);
+ }
+ }
+ if (sbPtr->type == TIX_GR_SET) {
+ Tix_SimpleListAppend(&wPtr->selList, (char*)sbPtr, 0);
+ }
+ goto done;
+ }
+
+#if 0
+
+ switch (sbPtr->type) {
+ case TIX_GR_TOGGLE: {
+ }
+ break;
+ case TIX_GR_SET: {
+ Tix_SimpleListAppend(&wPtr->selList, (char*)sbPtr, 0);
+ }
+ break;
+ case TIX_GR_CLEAR: {
+ Tix_SimpleListIteratorInit(&li);
+
+ for (Tix_SimpleListStart(&wPtr->selList, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&wPtr->selList, &li)) {
+ }
+ }
+
+ }
+#else
+
+ Tix_SimpleListAppend(&wPtr->selList, (char*)sbPtr, 0);
+
+#endif
+
+ done:
+ Tix_GrAddChangedRect(wPtr, sbPtr->range, 0);
+}
+
+static void
+Tix_GrAdjustSelection(wPtr, sbPtr)
+ WidgetPtr wPtr;
+ SelectBlock * sbPtr;
+{
+ int changed[2][2];
+ SelectBlock * current;
+
+ current = (SelectBlock*)wPtr->selList.tail;
+
+ /*
+ * The changed region is the union of the area of the current selection
+ * and the adjusted selection.
+ */
+ changed[TIX_X][0] = sbPtr->range[TIX_X][0];
+ changed[TIX_X][1] = sbPtr->range[TIX_X][1];
+ changed[TIX_Y][0] = sbPtr->range[TIX_Y][0];
+ changed[TIX_Y][1] = sbPtr->range[TIX_Y][1];
+
+ if (changed[TIX_X][0] > current->range[TIX_X][0]) {
+ changed[TIX_X][0] = current->range[TIX_X][0];
+ }
+ if (changed[TIX_X][1] < current->range[TIX_X][1]) {
+ changed[TIX_X][1] = current->range[TIX_X][1];
+ }
+ if (changed[TIX_Y][0] > current->range[TIX_Y][0]) {
+ changed[TIX_Y][0] = current->range[TIX_Y][0];
+ }
+ if (changed[TIX_Y][1] < current->range[TIX_Y][1]) {
+ changed[TIX_Y][1] = current->range[TIX_Y][1];
+ }
+
+ /* Adjust the current selection according to sbPtr */
+ current->range[TIX_X][0] = sbPtr->range[TIX_X][0];
+ current->range[TIX_X][1] = sbPtr->range[TIX_X][1];
+ current->range[TIX_Y][0] = sbPtr->range[TIX_Y][0];
+ current->range[TIX_Y][1] = sbPtr->range[TIX_Y][1];
+
+ /* Set the changed area */
+ Tix_GrAddChangedRect(wPtr, changed, 0);
+
+ /* sbPtr is no longer needed */
+ ckfree((char*)sbPtr);
+}
+
+static int
+Tix_GrSelModify(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int type, adjust = 0;
+ SelectBlock * sbPtr = NULL;
+ int tmp;
+
+ if (argc != 2 && argc != 4) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 2, "x1 y1 ?x2 y2?");
+ }
+
+ /*
+ * (1) find out the type of operation.
+ */
+ if (argv[-1][0] == 'a') {
+ if (wPtr->selList.numItems <= 0) {
+ /*
+ * There is nothing in the selection list to adjust!
+ */
+ Tcl_AppendResult(interp, "selection list is empty", NULL);
+ return TCL_ERROR;
+ }
+ adjust = 1;
+ type = 0;
+ }
+ else if (argv[-1][0] == 'c') {
+ type = TIX_GR_CLEAR;
+ }
+ else if (argv[-1][0] == 's') {
+ type = TIX_GR_SET;
+ }
+ else {
+ type = TIX_GR_TOGGLE;
+ }
+
+ sbPtr = (SelectBlock*)ckalloc(sizeof(SelectBlock));
+ sbPtr->type = type;
+
+ if (Tcl_GetInt(interp, argv[0], &sbPtr->range[0][0]) != TCL_OK) {
+ goto error;
+ }
+ if (Tcl_GetInt(interp, argv[1], &sbPtr->range[1][0]) != TCL_OK) {
+ goto error;
+ }
+ if (argc == 4) {
+ if (Tcl_GetInt(interp, argv[2], &sbPtr->range[0][1]) != TCL_OK) {
+ if (strcmp(argv[2], "max") == 0) {
+ Tcl_ResetResult(interp);
+ sbPtr->range[0][1] = TIX_GR_MAX;
+ } else {
+ goto error;
+ }
+ }
+ if (Tcl_GetInt(interp, argv[3], &sbPtr->range[1][1]) != TCL_OK) {
+ if (strcmp(argv[3], "max") == 0) {
+ Tcl_ResetResult(interp);
+ sbPtr->range[1][1] = TIX_GR_MAX;
+ } else {
+ goto error;
+ }
+ }
+ } else {
+ sbPtr->range[0][1] = sbPtr->range[0][0];
+ sbPtr->range[1][1] = sbPtr->range[1][0];
+ }
+
+ if (wPtr->selectUnit != tixRowUid) {
+ if (sbPtr->range[0][0] > sbPtr->range[0][1]) {
+ tmp = sbPtr->range[0][1];
+ sbPtr->range[0][1] = sbPtr->range[0][0];
+ sbPtr->range[0][0] = tmp;
+ }
+ } else {
+ sbPtr->range[0][0] = 0;
+ sbPtr->range[0][1] = TIX_GR_MAX;
+ }
+
+ if (wPtr->selectUnit != tixColumnUid) {
+ if (sbPtr->range[1][0] > sbPtr->range[1][1]) {
+ tmp = sbPtr->range[1][1];
+ sbPtr->range[1][1] = sbPtr->range[1][0];
+ sbPtr->range[1][0] = tmp;
+ }
+ } else {
+ sbPtr->range[1][0] = 0;
+ sbPtr->range[1][1] = TIX_GR_MAX;
+ }
+
+ if (adjust) {
+ Tix_GrAdjustSelection(wPtr, sbPtr);
+ sbPtr = NULL;
+ } else {
+ Tix_GrMergeSelection(wPtr, sbPtr);
+ }
+ wPtr->toComputeSel = 1;
+ return TCL_OK;
+
+ error:
+ if (sbPtr) {
+ ckfree((char*)sbPtr);
+ }
+ return TCL_ERROR;
+}
Added: external/tix-8.4.2.x/generic/tixGrSort.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrSort.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,464 @@
+
+/* $Id: tixGrSort.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixGrSel.c --
+ *
+ * This module handles the sorting of the Grid 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixGrid.h>
+
+/*
+ * The variables below are used to implement the "lsort" command.
+ * Unfortunately, this use of static variables prevents "lsort"
+ * from being thread-safe, but there's no alternative given the
+ * current implementation of qsort. In a threaded environment
+ * these variables should be made thread-local if possible, or else
+ * "lsort" needs internal mutual exclusion.
+ */
+
+static Tcl_Interp *sortInterp = NULL; /* Interpreter for "lsort" command.
+ * NULL means no lsort is active. */
+static enum {ASCII, INTEGER, REAL, COMMAND} sortMode;
+ /* Mode for sorting:compare as strings,
+ * compare as numbers, or call
+ * user-defined command for
+ * comparison. */
+static Tcl_DString sortCmd; /* Holds command if mode is COMMAND.
+ * pre-initialized to hold base of
+ * command. */
+static int sortIncreasing; /* 0 means sort in decreasing order,
+ * 1 means increasing order. */
+static int sortCode; /* Anything other than TCL_OK means a
+ * problem occurred while sorting; this
+ * executing a comparison command, so
+ * the sort was aborted. */
+
+/*
+ * Forward declarations for procedures defined in this file:
+ */
+
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrSort);
+
+static int SortCompareProc _ANSI_ARGS_((CONST VOID *first,
+ CONST VOID *second));
+char * Tix_GrGetCellText _ANSI_ARGS_((WidgetPtr wPtr,
+ int x, int y));
+Tix_GrSortItem * Tix_GrGetSortItems _ANSI_ARGS_((WidgetPtr wPtr,
+ int axis, int start, int end, int sortKeyIndex));
+void Tix_GrFreeSortItems _ANSI_ARGS_((WidgetPtr wPtr,
+ Tix_GrSortItem * items, int numItems));
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tcl_LsortCmd --
+ *
+ * This procedure is invoked to process the "lsort" Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+ /* ARGSUSED */
+
+char *
+Tix_GrGetCellText(wPtr, x, y)
+ WidgetPtr wPtr;
+ int x;
+ int y;
+{
+ TixGrEntry* chPtr;
+
+ if ((chPtr = (TixGrEntry*) TixGridDataFindEntry(wPtr->dataSet, x, y))) {
+ switch (Tix_DItemType(chPtr->iPtr)) {
+ case TIX_DITEM_TEXT:
+ return chPtr->iPtr->text.text;
+ case TIX_DITEM_IMAGETEXT:
+ return chPtr->iPtr->imagetext.text;
+ default:
+ return NULL;
+ }
+ } else {
+ return NULL;
+ }
+}
+
+Tix_GrSortItem *
+Tix_GrGetSortItems(wPtr, axis, start, end, sortKeyIndex)
+ WidgetPtr wPtr;
+ int axis;
+ int start;
+ int end;
+ int sortKeyIndex;
+{
+ int i, k, numItems;
+ Tix_GrSortItem *items;
+
+ if (end <= start) {
+ /* sanity check: no need to sort */
+ return (Tix_GrSortItem *) NULL;
+ }
+
+ numItems = end-start+1;
+ items = (Tix_GrSortItem *)ckalloc(sizeof(Tix_GrSortItem) * numItems);
+
+ for (k=0,i=start; i<=end; i++, k++) {
+ items[k].index = i;
+ if (axis == 0) {
+ items[k].data = Tix_GrGetCellText(wPtr, i, sortKeyIndex);
+ } else {
+ items[k].data = Tix_GrGetCellText(wPtr, sortKeyIndex, i);
+ }
+ }
+
+ return items;
+}
+
+
+void
+Tix_GrFreeSortItems(wPtr, items, numItems)
+ WidgetPtr wPtr;
+ Tix_GrSortItem * items;
+ int numItems;
+{
+ ckfree((char*)items);
+}
+
+int
+Tix_GrSort(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int i, axis, otherAxis, start, end;
+ size_t len;
+ Tix_GrSortItem *items = NULL;
+ int numItems;
+ CONST84 char *command = NULL; /* Initialization needed only to
+ * prevent compiler warning. */
+ int sortKeyIndex;
+ int gridSize[2];
+
+ /*-------------------------------------------------------------------
+ * Argument parsing
+ *-------------------------------------------------------------------
+ */
+ if (sortInterp != NULL) {
+ interp->result = "can't invoke the tixGrid sort command recursively";
+ return TCL_ERROR;
+ }
+
+ /* Figure out the sorting dimension
+ */
+ len = strlen(argv[0]);
+ if (strncmp(argv[0], "rows", len)==0) {
+ axis = 1;
+ otherAxis = 0;
+ } else if (strncmp(argv[0], "column", len)==0) {
+ axis = 0;
+ otherAxis = 1;
+ } else {
+ Tcl_AppendResult(interp, "wrong dimension \"", argv[0],
+ "\", should be row or column", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /* get the start and end index
+ */
+ if (axis == 0) {
+ if (TixGridDataGetIndex(interp, wPtr, argv[1], NULL, &start, NULL)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (TixGridDataGetIndex(interp, wPtr, argv[2], NULL, &end, NULL)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ if (TixGridDataGetIndex(interp, wPtr, NULL, argv[1], NULL, &start)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (TixGridDataGetIndex(interp, wPtr, NULL, argv[2], NULL, &end)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ /* Check the range
+ */
+ TixGridDataGetGridSize(wPtr->dataSet, &gridSize[0], &gridSize[1]);
+ if (start > end) {
+ int tmp = start;
+ start = end;
+ end = tmp;
+ }
+ if (start >= gridSize[axis]) {
+ /* no need to sort */
+ return TCL_OK;
+ }
+ if (end == start) {
+ /* no need to sort */
+ return TCL_OK;
+ }
+
+ /* get the options
+ */
+ if ((argc-3) %2 != 0) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ return TCL_ERROR;
+ }
+ sortInterp = interp;
+ sortMode = ASCII;
+ sortIncreasing = 1;
+ sortCode = TCL_OK;
+ sortKeyIndex = wPtr->hdrSize[otherAxis]; /* by default, use the first
+ * scrollable item as the key
+ */
+ for (i=3; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-type", len) == 0) {
+ if (strcmp(argv[i+1], "ascii") == 0) {
+ sortMode = ASCII;
+ } else if (strcmp(argv[i+1], "integer") == 0) {
+ sortMode = INTEGER;
+ } else if (strcmp(argv[i+1], "real") == 0) {
+ sortMode = REAL;
+ } else {
+ Tcl_AppendResult(interp, "wrong type \"", argv[i+1],
+ "\": must be ascii, integer or real", (char *) NULL);
+ sortCode = TCL_ERROR;
+ goto done;
+ }
+ }
+ else if (strncmp(argv[i], "-order", len) == 0) {
+ if (strcmp(argv[i+1], "increasing") == 0) {
+ sortIncreasing = 1;
+ } else if (strcmp(argv[i+1], "decreasing") == 0) {
+ sortIncreasing = 0;
+ } else {
+ Tcl_AppendResult(interp, "wrong order \"", argv[i+1],
+ "\": must be increasing or decreasing", (char *) NULL);
+ sortCode = TCL_ERROR;
+ goto done;
+ }
+ }
+ else if (strncmp(argv[i], "-key", len) == 0) {
+ if (axis == 0) {
+ /* sort columns: the key is a column index (1) */
+ if (TixGridDataGetIndex(interp, wPtr, NULL, argv[i+1], NULL,
+ &sortKeyIndex) !=TCL_OK) {
+ sortCode = TCL_ERROR;
+ goto done;
+ }
+ } else {
+ /* sort rows: the key is a row index (0)*/
+ if (TixGridDataGetIndex(interp, wPtr, argv[i+1], NULL,
+ &sortKeyIndex, NULL) !=TCL_OK) {
+ sortCode = TCL_ERROR;
+ goto done;
+ }
+ }
+ }
+ else if (strncmp(argv[i], "-command", len) == 0) {
+ sortMode = COMMAND;
+ command = argv[i+1];
+ }
+ else {
+ Tcl_AppendResult(interp, "wrong option \"", argv[i],
+ "\": must be -command, -key, -order or -type", (char *) NULL);
+ sortCode = TCL_ERROR;
+ goto done;
+ }
+ }
+ if (sortMode == COMMAND) {
+ Tcl_DStringInit(&sortCmd);
+ Tcl_DStringAppend(&sortCmd, command, -1);
+ }
+
+ /*------------------------------------------------------------------
+ * SORTING
+ *------------------------------------------------------------------
+ */
+ /* prepare the array to be sorted */
+ numItems = end - start + 1;
+ items = Tix_GrGetSortItems(wPtr, axis, start, end, sortKeyIndex);
+
+ if (items != NULL) {
+ int sizeChanged;
+
+ qsort((VOID *)items, (size_t)numItems, sizeof(Tix_GrSortItem),
+ SortCompareProc);
+
+ for (i=0; i<numItems; i++) {
+ printf("%d\n", items[i].index);
+ }
+ sizeChanged = TixGridDataUpdateSort(wPtr->dataSet, axis, start, end,
+ items);
+ if (sizeChanged) {
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ } else {
+ wPtr->toResetRB = 1;
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ }
+
+ Tix_GrFreeSortItems(wPtr, items, numItems);
+ }
+
+ /* Done */
+ if (sortCode == TCL_OK) {
+ Tcl_ResetResult(interp);
+ }
+ if (sortMode == COMMAND) {
+ Tcl_DStringFree(&sortCmd);
+ }
+
+ done:
+ sortInterp = NULL;
+ return sortCode;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * SortCompareProc --
+ *
+ * This procedure is invoked by qsort to determine the proper
+ * ordering between two elements.
+ *
+ * Results:
+ * < 0 means first is "smaller" than "second", > 0 means "first"
+ * is larger than "second", and 0 means they should be treated
+ * as equal.
+ *
+ * Side effects:
+ * None, unless a user-defined comparison command does something
+ * weird.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+SortCompareProc(first, second)
+ CONST VOID *first, *second; /* Elements to be compared. */
+{
+ int order;
+ char *firstString = ((Tix_GrSortItem*)first )->data;
+ char *secondString = ((Tix_GrSortItem*)second)->data;
+
+ order = 0;
+ if (sortCode != TCL_OK) {
+ /*
+ * Once an error has occurred, skip any future comparisons
+ * so as to preserve the error message in sortInterp->result.
+ */
+
+ return order;
+ }
+ if (firstString == NULL && secondString == NULL) {
+ /* equal */
+ return order;
+ }
+ if (secondString == NULL) {
+ /* first larger than second */
+ order = 1;
+ goto done;
+ }
+ if (firstString == NULL) {
+ order = -1;
+ goto done;
+ }
+
+ if (sortMode == ASCII) {
+ order = strcmp(firstString, secondString);
+ } else if (sortMode == INTEGER) {
+ int a, b;
+
+ if ((Tcl_GetInt(sortInterp, firstString, &a) != TCL_OK)
+ || (Tcl_GetInt(sortInterp, secondString, &b) != TCL_OK)) {
+ Tcl_AddErrorInfo(sortInterp,
+ "\n (converting list element from string to integer)");
+ sortCode = TCL_ERROR;
+ return order;
+ }
+ if (a > b) {
+ order = 1;
+ } else if (b > a) {
+ order = -1;
+ }
+ } else if (sortMode == REAL) {
+ double a, b;
+
+ if ((Tcl_GetDouble(sortInterp, firstString, &a) != TCL_OK)
+ || (Tcl_GetDouble(sortInterp, secondString, &b) != TCL_OK)) {
+ Tcl_AddErrorInfo(sortInterp,
+ "\n (converting list element from string to real)");
+ sortCode = TCL_ERROR;
+ return order;
+ }
+ if (a > b) {
+ order = 1;
+ } else if (b > a) {
+ order = -1;
+ }
+ } else {
+ int oldLength;
+ char *end;
+
+ /*
+ * Generate and evaluate a command to determine which string comes
+ * first.
+ */
+
+ oldLength = Tcl_DStringLength(&sortCmd);
+ Tcl_DStringAppendElement(&sortCmd, firstString);
+ Tcl_DStringAppendElement(&sortCmd, secondString);
+ sortCode = Tcl_Eval(sortInterp, Tcl_DStringValue(&sortCmd));
+ Tcl_DStringTrunc(&sortCmd, oldLength);
+ if (sortCode != TCL_OK) {
+ Tcl_AddErrorInfo(sortInterp,
+ "\n (user-defined comparison command)");
+ return order;
+ }
+
+ /*
+ * Parse the result of the command.
+ */
+
+ order = strtol(sortInterp->result, &end, 0);
+ if ((end == sortInterp->result) || (*end != 0)) {
+ Tcl_ResetResult(sortInterp);
+ Tcl_AppendResult(sortInterp,
+ "comparison command returned non-numeric result",
+ (char *) NULL);
+ sortCode = TCL_ERROR;
+ return order;
+ }
+ }
+
+done:
+ if (!sortIncreasing) {
+ order = -order;
+ }
+ return order;
+}
Added: external/tix-8.4.2.x/generic/tixGrUtl.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrUtl.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,205 @@
+
+/* $Id: tixGrUtl.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixGrUtl.c --
+ *
+ * Utility functions for Grid
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <tixGrid.h>
+
+#ifndef UCHAR
+#define UCHAR(c) ((unsigned char) (c))
+#endif
+
+/* string must be a real number plus "char". E.g, "3.0char" */
+int
+Tix_GetChars(interp, string, doublePtr)
+ Tcl_Interp *interp; /* Use this for error reporting. */
+ CONST84 char *string; /* String describing a justification style. */
+ double *doublePtr; /* Place to store converted result. */
+{
+ char *end;
+ double d;
+
+ d = strtod(string, &end);
+ if (end == string) {
+ goto error;
+ }
+ while ((*end != '\0') && isspace(*end)) {
+ end++;
+ }
+ if (strncmp(end, "char", 4) != 0) {
+ goto error;
+ }
+ for (end+=4; (*end != '\0') && isspace(UCHAR(*end)); end++) {
+ ;
+ }
+ if (*end != '\0') {
+ goto error;
+ }
+ if (d < 0) {
+ goto error;
+ }
+
+ *doublePtr = d;
+ return TCL_OK;
+
+ error:
+ Tcl_AppendResult(interp, "bad screen distance \"", string,
+ "\"", (char *) NULL);
+ return TCL_ERROR;
+}
+
+
+int Tix_GrConfigSize(interp, wPtr, argc, argv, sizePtr, argcErrorMsg,
+ changed_ret)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+ int argc;
+ CONST84 char **argv;
+ TixGridSize *sizePtr;
+ CONST84 char * argcErrorMsg;
+ int *changed_ret;
+{
+ int pixels;
+ double chars;
+ int i;
+ TixGridSize newSize;
+ int changed = 0;
+
+ if (argc == 0) {
+ char buff[40];
+
+ Tcl_AppendResult(interp, "-size ", NULL);
+
+ switch (sizePtr->sizeType) {
+ case TIX_GR_AUTO:
+ Tcl_AppendResult(interp, "auto", NULL);
+ break;
+
+ case TIX_GR_DEFAULT:
+ Tcl_AppendResult(interp, "default", NULL);
+ break;
+
+ case TIX_GR_DEFINED_PIXEL:
+ sprintf(buff, "%d", sizePtr->sizeValue);
+ Tcl_AppendResult(interp, buff, NULL);
+ break;
+
+ case TIX_GR_DEFINED_CHAR:
+ sprintf(buff, "%fchar", sizePtr->charValue);
+ Tcl_AppendResult(interp, buff, NULL);
+ break;
+
+ default:
+ Tcl_AppendResult(interp, "default", NULL);
+ break;
+ }
+
+ Tcl_AppendResult(interp, " -pad0 ", NULL);
+ sprintf(buff, "%d", sizePtr->pad0);
+ Tcl_AppendResult(interp, buff, NULL);
+
+ Tcl_AppendResult(interp, " -pad1 ", NULL);
+ sprintf(buff, "%d", sizePtr->pad1);
+ Tcl_AppendResult(interp, buff, NULL);
+
+ return TCL_OK;
+ }
+
+ if ((argc %2) != 0) {
+ Tcl_AppendResult(interp, "value missing for option \"",
+ argv[argc-1], "\"", NULL);
+ return TCL_ERROR;
+ }
+
+ newSize = *sizePtr;
+
+ for (i=0; i<argc; i+=2) {
+
+ if (strncmp("-size", argv[i], strlen(argv[i])) == 0) {
+ if (strcmp(argv[i+1], "auto")==0) {
+ newSize.sizeType = TIX_GR_AUTO;
+ newSize.sizeValue = 0;
+ }
+ else if (strcmp(argv[i+1], "default")==0) {
+ newSize.sizeType = TIX_GR_DEFAULT;
+ newSize.sizeValue = 0;
+ }
+ else if (Tk_GetPixels(interp, wPtr->dispData.tkwin, argv[i+1],
+ &pixels) == TCL_OK) {
+
+ newSize.sizeType = TIX_GR_DEFINED_PIXEL;
+ newSize.sizeValue = pixels;
+ }
+ else {
+ Tcl_ResetResult(interp);
+ if (Tix_GetChars(interp, argv[i+1], &chars) == TCL_OK) {
+ newSize.sizeType = TIX_GR_DEFINED_CHAR;
+ newSize.charValue = chars;
+ }
+ else {
+ return TCL_ERROR;
+ }
+ }
+ }
+ else if (strcmp("-pad0", argv[i]) == 0) {
+ if (Tk_GetPixels(interp, wPtr->dispData.tkwin, argv[i+1],
+ &pixels) == TCL_OK) {
+
+ newSize.pad0 = pixels;
+ }
+ else {
+ return TCL_ERROR;
+ }
+ }
+ else if (strcmp("-pad1", argv[i]) == 0) {
+ if (Tk_GetPixels(interp, wPtr->dispData.tkwin, argv[i+1],
+ &pixels) == TCL_OK) {
+
+ newSize.pad1 = pixels;
+ }
+ else {
+ return TCL_ERROR;
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "Unknown option \"", argv[i],
+ "\"; must be -pad0, -pad1 or -size", NULL);
+ return TCL_ERROR;
+ }
+ }
+
+ if (changed_ret) {
+ if (sizePtr->sizeType != newSize.sizeType) {
+ changed = 1;
+ }
+ if (sizePtr->sizeValue != newSize.sizeValue) {
+ changed = 1;
+ }
+ if (sizePtr->charValue != newSize.charValue) {
+ changed = 1;
+ }
+ if (sizePtr->pad1 != newSize.pad0) {
+ changed = 1;
+ }
+ if (sizePtr->pad1 != newSize.pad1) {
+ changed = 1;
+ }
+ *changed_ret = changed;
+ }
+
+ *sizePtr = newSize;
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixGrid.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrid.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,3312 @@
+/*
+ * tixGrid.c --
+ *
+ * This module implements "tixGrid" widgets.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixGrid.c,v 1.5 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <tixGrid.h>
+
+/*
+ * Information used for argv parsing.
+ */
+static Tk_ConfigSpec configSpecs[] = {
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ DEF_GRID_BG_COLOR, Tk_Offset(WidgetRecord, normalBg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ DEF_GRID_BG_MONO, Tk_Offset(WidgetRecord, normalBg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
+ DEF_GRID_BORDER_WIDTH, Tk_Offset(WidgetRecord, borderWidth), 0},
+
+ {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
+ DEF_GRID_CURSOR, Tk_Offset(WidgetRecord, cursor),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-editdonecmd", "editDoneCmd", "EditDoneCmd",
+ DEF_GRID_EDITDONE_COMMAND, Tk_Offset(WidgetRecord, editDoneCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-editnotifycmd", "editNotifyCmd", "EditNotifyCmd",
+ DEF_GRID_EDITNOTIFY_COMMAND, Tk_Offset(WidgetRecord, editNotifyCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_BOOLEAN, "-floatingcols", "floatingCols", "FloatingCols",
+ DEF_GRID_FLOATING_COLS, Tk_Offset(WidgetRecord, floatRange[1]), 0},
+
+ {TK_CONFIG_BOOLEAN, "-floatingrows", "floatingRows", "FloatingRows",
+ DEF_GRID_FLOATING_ROWS, Tk_Offset(WidgetRecord, floatRange[0]), 0},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_GRID_FONT, Tk_Offset(WidgetRecord, font), 0},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_GRID_FG_COLOR, Tk_Offset(WidgetRecord, normalFg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_GRID_FG_MONO, Tk_Offset(WidgetRecord, normalFg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_STRING, "-formatcmd", "formatCmd", "FormatCmd",
+ DEF_GRID_FORMAT_COMMAND, Tk_Offset(WidgetRecord, formatCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_PIXELS, "-height", "height", "Height",
+ DEF_GRID_HEIGHT, Tk_Offset(WidgetRecord, reqSize[1]), 0},
+
+ {TK_CONFIG_BORDER, "-highlightbackground", "highlightBackground",
+ "HighlightBackground",
+ DEF_GRID_BG_COLOR, Tk_Offset(WidgetRecord, border),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-highlightbackground", "highlightBackground",
+ "HighlightBackground",
+ DEF_GRID_BG_MONO, Tk_Offset(WidgetRecord, border),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
+ DEF_GRID_HIGHLIGHT_COLOR, Tk_Offset(WidgetRecord, highlightColorPtr),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
+ DEF_GRID_HIGHLIGHT_MONO, Tk_Offset(WidgetRecord, highlightColorPtr),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
+ "HighlightThickness",
+ DEF_GRID_HIGHLIGHT_WIDTH, Tk_Offset(WidgetRecord, highlightWidth), 0},
+
+ {TK_CONFIG_INT, "-leftmargin", "leftMargin", "LeftMargin",
+ DEF_GRID_LEFT_MARGIN, Tk_Offset(WidgetRecord, hdrSize[0]), 0},
+
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_GRID_ITEM_TYPE, Tk_Offset(WidgetRecord, diTypePtr),
+ 0, &tixConfigItemType},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_GRID_PADX, Tk_Offset(WidgetRecord, padX), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_GRID_PADY, Tk_Offset(WidgetRecord, padY), 0},
+
+ {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
+ DEF_GRID_RELIEF, Tk_Offset(WidgetRecord, relief), 0},
+
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_GRID_SELECT_BG_COLOR, Tk_Offset(WidgetRecord, selectBorder),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_GRID_SELECT_BG_MONO, Tk_Offset(WidgetRecord, selectBorder),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth","BorderWidth",
+ DEF_GRID_SELECT_BORDERWIDTH,Tk_Offset(WidgetRecord, selBorderWidth),0},
+
+ {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
+ DEF_GRID_SELECT_FG_COLOR, Tk_Offset(WidgetRecord, selectFg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
+ DEF_GRID_SELECT_FG_MONO, Tk_Offset(WidgetRecord, selectFg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_UID, "-selectmode", "selectMode", "SelectMode",
+ DEF_GRID_SELECT_MODE, Tk_Offset(WidgetRecord, selectMode), 0},
+
+ {TK_CONFIG_UID, "-selectunit", "selectUnit", "SelectUnit",
+ DEF_GRID_SELECT_UNIT, Tk_Offset(WidgetRecord, selectUnit), 0},
+
+ {TK_CONFIG_STRING, "-sizecmd", "sizeCmd", "SizeCmd",
+ DEF_GRID_SIZE_COMMAND, Tk_Offset(WidgetRecord, sizeCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_UID, "-state", (char*)NULL, (char*)NULL,
+ DEF_GRID_STATE, Tk_Offset(WidgetRecord, state), 0},
+
+ {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
+ DEF_GRID_TAKE_FOCUS, Tk_Offset(WidgetRecord, takeFocus),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_INT, "-topmargin", "topMargin", "TopMargin",
+ DEF_GRID_TOP_MARGIN, Tk_Offset(WidgetRecord, hdrSize[1]), 0},
+
+ {TK_CONFIG_PIXELS, "-width", "width", "Width",
+ DEF_GRID_WIDTH, Tk_Offset(WidgetRecord, reqSize[0]), 0},
+
+ {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
+ DEF_GRID_X_SCROLL_COMMAND,
+ Tk_Offset(WidgetRecord, scrollInfo[0].command),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
+ DEF_GRID_Y_SCROLL_COMMAND,
+ Tk_Offset(WidgetRecord, scrollInfo[1].command),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec entryConfigSpecs[] = {
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+ /* These are standard procedures for TK widgets
+ * implemeted in C
+ */
+
+static void WidgetCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static int WidgetConfigure _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, CONST84 char **argv,
+ int flags));
+static void WidgetDestroy _ANSI_ARGS_((ClientData clientData));
+static void WidgetEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static int WidgetCommand _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *, int argc, CONST84 char **argv));
+static void WidgetDisplay _ANSI_ARGS_((ClientData clientData));
+static void WidgetComputeGeometry _ANSI_ARGS_((
+ ClientData clientData));
+static void IdleHandler _ANSI_ARGS_((
+ ClientData clientData));
+ /* Extra procedures for this widget
+ */
+static int ConfigElement _ANSI_ARGS_((WidgetPtr wPtr,
+ TixGrEntry *chPtr, int argc, CONST84 char ** argv,
+ int flags, int forced));
+static void Tix_GrDisplayMainBody _ANSI_ARGS_((
+ WidgetPtr wPtr, Drawable buffer,
+ int winW, int winH));
+static void Tix_GrDrawBackground _ANSI_ARGS_((WidgetPtr wPtr,
+ RenderInfo * riPtr,Drawable drawable));
+static void Tix_GrDrawCells _ANSI_ARGS_((WidgetPtr wPtr,
+ RenderInfo * riPtr,Drawable drawable));
+static void Tix_GrDrawSites _ANSI_ARGS_((WidgetPtr wPtr,
+ RenderInfo * riPtr,Drawable drawable));
+int Tix_GrGetElementPosn _ANSI_ARGS_((
+ WidgetPtr wPtr, int x, int y,
+ int rect[2][2], int clipOK, int isSite,
+ int isScr, int nearest));
+static void UpdateScrollBars _ANSI_ARGS_((WidgetPtr wPtr,
+ int sizeChanged));
+static void GetScrollFractions _ANSI_ARGS_((
+ WidgetPtr wPtr, Tix_GridScrollInfo *siPtr,
+ double * first_ret, double * last_ret));
+static void Tix_GrDItemSizeChanged _ANSI_ARGS_((
+ Tix_DItem *iPtr));
+static TixGrEntry * Tix_GrFindCreateElem _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, int x, int y));
+static TixGrEntry * Tix_GrFindElem _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, int x, int y));
+static void Tix_GrPropagateSize _ANSI_ARGS_((
+ WidgetPtr wPtr, TixGrEntry * chPtr));
+static RenderBlock * Tix_GrAllocateRenderBlock _ANSI_ARGS_((
+ WidgetPtr wPtr, int winW, int winH,
+ int *exactW, int *exactH));
+static void Tix_GrFreeRenderBlock _ANSI_ARGS_((
+ WidgetPtr wPtr, RenderBlock * rbPtr));
+static void Tix_GrComputeSelection _ANSI_ARGS_((
+ WidgetPtr wPtr));
+static int Tix_GrBBox _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, int x, int y));
+static int TranslateFromTo _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, int argc, CONST84 char **argv, int *from,
+ int * to, int *which));
+static void Tix_GrComputeSubSelection _ANSI_ARGS_((
+ WidgetPtr wPtr, int rect[2][2], int offs[2]));
+static int Tix_GrCallFormatCmd _ANSI_ARGS_((WidgetPtr wPtr,
+ int which));
+static void RecalScrollRegion _ANSI_ARGS_((WidgetPtr wPtr,
+ int winW, int winH,
+ Tix_GridScrollInfo *scrollInfo));
+static void Tix_GrResetRenderBlocks _ANSI_ARGS_((WidgetPtr wPtr));
+
+static TIX_DECLARE_SUBCMD(Tix_GrBdType);
+static TIX_DECLARE_SUBCMD(Tix_GrCGet);
+static TIX_DECLARE_SUBCMD(Tix_GrConfig);
+static TIX_DECLARE_SUBCMD(Tix_GrDelete);
+static TIX_DECLARE_SUBCMD(Tix_GrEdit);
+static TIX_DECLARE_SUBCMD(Tix_GrEntryCget);
+static TIX_DECLARE_SUBCMD(Tix_GrEntryConfig);
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrFormat);
+static TIX_DECLARE_SUBCMD(Tix_GrGeometryInfo);
+static TIX_DECLARE_SUBCMD(Tix_GrInfo);
+static TIX_DECLARE_SUBCMD(Tix_GrIndex);
+static TIX_DECLARE_SUBCMD(Tix_GrMove);
+static TIX_DECLARE_SUBCMD(Tix_GrNearest);
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrSelection);
+static TIX_DECLARE_SUBCMD(Tix_GrSet);
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrSetSize);
+static TIX_DECLARE_SUBCMD(Tix_GrSetSite);
+EXTERN TIX_DECLARE_SUBCMD(Tix_GrSort);
+static TIX_DECLARE_SUBCMD(Tix_GrView);
+static TIX_DECLARE_SUBCMD(Tix_GrUnset);
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_GridCmd --
+ *
+ * This procedure is invoked to process the "tixGrid" Tcl
+ * command. It creates a new "TixGrid" widget.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * A new widget is created and configured.
+ *
+ *--------------------------------------------------------------
+ */
+int
+Tix_GridCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window mainwin = (Tk_Window) clientData;
+ WidgetPtr wPtr;
+ Tk_Window tkwin;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " pathName ?options?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ tkwin = Tk_CreateWindowFromPath(interp, mainwin, argv[1], (char *) NULL);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tk_SetClass(tkwin, "TixGrid");
+
+ /*
+ * Allocate and initialize the widget record.
+ */
+ wPtr = (WidgetPtr) ckalloc(sizeof(WidgetRecord));
+
+ wPtr->dispData.tkwin = tkwin;
+ wPtr->dispData.display = Tk_Display(tkwin);
+ wPtr->dispData.interp = interp;
+ wPtr->dispData.sizeChangedProc = Tix_GrDItemSizeChanged;
+ wPtr->font = NULL;
+ wPtr->normalBg = NULL;
+ wPtr->normalFg = NULL;
+ wPtr->command = NULL;
+ wPtr->border = NULL;
+ wPtr->borderWidth = 0;
+ wPtr->selectBorder = NULL;
+ wPtr->selBorderWidth = 0;
+ wPtr->selectFg = NULL;
+ wPtr->backgroundGC = None;
+ wPtr->selectGC = None;
+ wPtr->anchorGC = None;
+ wPtr->highlightWidth = 0;
+ wPtr->highlightColorPtr = NULL;
+ wPtr->highlightGC = None;
+ wPtr->relief = TK_RELIEF_FLAT;
+ wPtr->cursor = None;
+ wPtr->selectMode = NULL;
+ wPtr->selectUnit = NULL;
+ wPtr->anchor[0] = TIX_SITE_NONE;
+ wPtr->anchor[1] = TIX_SITE_NONE;
+ wPtr->dragSite[0] = TIX_SITE_NONE;
+ wPtr->dragSite[1] = TIX_SITE_NONE;
+ wPtr->dropSite[0] = TIX_SITE_NONE;
+ wPtr->dropSite[1] = TIX_SITE_NONE;
+ wPtr->browseCmd = 0;
+ wPtr->formatCmd = 0;
+ wPtr->editDoneCmd = 0;
+ wPtr->editNotifyCmd = 0;
+ wPtr->sizeCmd = 0;
+ wPtr->takeFocus = NULL;
+ wPtr->serial = 0;
+ wPtr->mainRB = (RenderBlock*)NULL;
+ wPtr->hdrSize[0] = 1;
+ wPtr->hdrSize[1] = 1;
+ wPtr->expArea.x1 = 10000;
+ wPtr->expArea.y1 = 10000;
+ wPtr->expArea.x2 = 0;
+ wPtr->expArea.y2 = 0;
+ wPtr->dataSet = TixGridDataSetInit();
+ wPtr->renderInfo = NULL;
+ wPtr->defSize[0].sizeType = TIX_GR_DEFINED_CHAR;
+ wPtr->defSize[0].charValue = 10.0;
+ wPtr->defSize[0].pad0 = 2;
+ wPtr->defSize[0].pad1 = 2;
+ wPtr->defSize[1].sizeType = TIX_GR_DEFINED_CHAR;
+ wPtr->defSize[1].charValue = 1.2;
+ wPtr->defSize[1].pad0 = 2;
+ wPtr->defSize[1].pad1 = 2;
+ wPtr->gridSize[0] = 0;
+ wPtr->gridSize[1] = 0;
+ wPtr->reqSize[0] = 0;
+ wPtr->reqSize[1] = 0;
+ wPtr->state = tixNormalUid;
+ wPtr->colorInfoCounter = 0;
+
+ /* The flags */
+ wPtr->idleEvent = 0;
+ wPtr->toRedraw = 0;
+ wPtr->toResize = 0;
+ wPtr->toResetRB = 0;
+ wPtr->toComputeSel = 0;
+ wPtr->toRedrawHighlight = 0;
+
+ wPtr->scrollInfo[0].command = NULL;
+ wPtr->scrollInfo[1].command = NULL;
+
+ wPtr->scrollInfo[0].max = 1;
+ wPtr->scrollInfo[0].unit = 1;
+ wPtr->scrollInfo[0].offset = 0;
+ wPtr->scrollInfo[0].window = 1.0;
+ wPtr->scrollInfo[1].max = 1;
+ wPtr->scrollInfo[1].unit = 1;
+ wPtr->scrollInfo[1].offset = 0;
+ wPtr->scrollInfo[1].window = 1.0;
+
+ Tix_SimpleListInit(&wPtr->colorInfo);
+ Tix_SimpleListInit(&wPtr->selList);
+ Tix_SimpleListInit(&wPtr->mappedWindows);
+
+ Tk_CreateEventHandler(wPtr->dispData.tkwin,
+ ExposureMask|StructureNotifyMask|FocusChangeMask,
+ WidgetEventProc, (ClientData) wPtr);
+ wPtr->widgetCmd = Tcl_CreateCommand(interp,
+ Tk_PathName(wPtr->dispData.tkwin), WidgetCommand, (ClientData) wPtr,
+ WidgetCmdDeletedProc);
+
+ if (WidgetConfigure(interp, wPtr, argc-2, argv+2, 0) != TCL_OK) {
+ Tk_DestroyWindow(wPtr->dispData.tkwin);
+ return TCL_ERROR;
+ }
+
+ interp->result = Tk_PathName(wPtr->dispData.tkwin);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetConfigure --
+ *
+ * This procedure is called to process an argv/argc list in
+ * conjunction with the Tk option database to configure (or
+ * reconfigure) a List widget.
+ *
+ * Results:
+ * The return value is a standard Tcl result. If TCL_ERROR is
+ * returned, then interp->result contains an error message.
+ *
+ * Side effects:
+ * Configuration information, such as colors, border width,
+ * etc. get set for wPtr; old resources get freed,
+ * if there were any.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+WidgetConfigure(interp, wPtr, argc, argv, flags)
+ Tcl_Interp *interp; /* Used for error reporting. */
+ WidgetPtr wPtr; /* Information about widget. */
+ int argc; /* Number of valid entries in argv. */
+ CONST84 char **argv; /* Arguments. */
+ int flags; /* Flags to pass to
+ * Tk_ConfigureWidget. */
+{
+ XGCValues gcValues;
+ GC newGC;
+ TixFont oldfont;
+ Tix_StyleTemplate stTmpl;
+
+ oldfont = wPtr->font;
+
+ if (Tk_ConfigureWidget(interp, wPtr->dispData.tkwin, configSpecs,
+ argc, argv, (char *) wPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ wPtr->bdPad = wPtr->highlightWidth + wPtr->borderWidth;
+
+ if ((wPtr->state != tixNormalUid) && (wPtr->state != tixDisabledUid)) {
+ Tcl_AppendResult(interp, "bad state value \"", wPtr->state,
+ "\": must be normal or disabled", (char *) NULL);
+ wPtr->state = tixNormalUid;
+ return TCL_ERROR;
+ }
+
+ if (oldfont != wPtr->font) {
+ int i;
+
+ /*
+ * Font has been changed (initialized), we need to reset the render
+ * blocks
+ */
+ wPtr->toResetRB = 1;
+
+ TixComputeTextGeometry(wPtr->font, "0", 1,
+ 0, &wPtr->fontSize[0], &wPtr->fontSize[1]);
+
+ /* Recalculate the default size of the cells
+ */
+ for (i=0; i<2; i++) {
+ switch (wPtr->defSize[i].sizeType) {
+ case TIX_GR_DEFINED_CHAR:
+ wPtr->defSize[i].pixels = (int)
+ (wPtr->defSize[i].charValue * wPtr->fontSize[i]);
+ break;
+ case TIX_GR_AUTO:
+ if (i==0) {
+ wPtr->defSize[i].pixels = 10 * wPtr->fontSize[0];
+ }
+ if (i==1) {
+ wPtr->defSize[i].pixels = 1 * wPtr->fontSize[1];
+ }
+ break;
+ }
+ }
+ }
+
+ /*
+ * A few options need special processing, such as setting the
+ * background from a 3-D border, or filling in complicated
+ * defaults that couldn't be specified to Tk_ConfigureWidget.
+ */
+
+ Tk_SetBackgroundFromBorder(wPtr->dispData.tkwin, wPtr->border);
+
+ /*
+ * Note: GraphicsExpose events are disabled in normalGC because it's
+ * used to copy stuff from an off-screen pixmap onto the screen (we know
+ * that there's no problem with obscured areas).
+ */
+
+ /* The background GC */
+ gcValues.foreground = wPtr->normalBg->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCGraphicsExposures, &gcValues);
+ if (wPtr->backgroundGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->backgroundGC);
+ }
+ wPtr->backgroundGC = newGC;
+
+ /* The selected text GC */
+ gcValues.font = TixFontId(wPtr->font);
+ gcValues.foreground = wPtr->selectFg->pixel;
+ gcValues.background = Tk_3DBorderColor(wPtr->selectBorder)->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCFont|GCGraphicsExposures, &gcValues);
+ if (wPtr->selectGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->selectGC);
+ }
+ wPtr->selectGC = newGC;
+
+ /* The dotted anchor lines */
+ gcValues.foreground = wPtr->normalFg->pixel;
+ gcValues.background = wPtr->normalBg->pixel;
+ gcValues.graphics_exposures = False;
+ gcValues.line_style = LineDoubleDash;
+ gcValues.dashes = 2;
+ gcValues.subwindow_mode = IncludeInferiors;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCGraphicsExposures|GCLineStyle|GCDashList|
+ GCSubwindowMode, &gcValues);
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC);
+ }
+ wPtr->anchorGC = newGC;
+
+ /* The highlight border */
+ gcValues.background = wPtr->selectFg->pixel;
+ gcValues.foreground = wPtr->highlightColorPtr->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCGraphicsExposures, &gcValues);
+ if (wPtr->highlightGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->highlightGC);
+ }
+ wPtr->highlightGC = newGC;
+
+ /* We must set the options of the default styles so that
+ * -- the default styles will change according to what is in
+ * stTmpl
+ */
+ stTmpl.font = wPtr->font;
+ stTmpl.pad[0] = wPtr->padX;
+ stTmpl.pad[1] = wPtr->padY;
+ stTmpl.colors[TIX_DITEM_NORMAL].fg = wPtr->normalFg;
+ stTmpl.colors[TIX_DITEM_NORMAL].bg = wPtr->normalBg;
+ stTmpl.colors[TIX_DITEM_SELECTED].fg= wPtr->selectFg;
+ stTmpl.colors[TIX_DITEM_SELECTED].bg= Tk_3DBorderColor(wPtr->selectBorder);
+ stTmpl.flags = TIX_DITEM_FONT|TIX_DITEM_NORMAL_BG|
+ TIX_DITEM_SELECTED_BG|TIX_DITEM_NORMAL_FG|TIX_DITEM_SELECTED_FG |
+ TIX_DITEM_PADX|TIX_DITEM_PADY;
+
+ Tix_SetDefaultStyleTemplate(wPtr->dispData.tkwin, &stTmpl);
+
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+
+ return TCL_OK;
+}
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetCommand --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+
+static int
+WidgetCommand(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about the widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int code;
+
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "anchor", 1, 3, Tix_GrSetSite,
+ "option ?x y?"},
+ {TIX_DEFAULT_LEN, "bdtype", 2, 4, Tix_GrBdType,
+ "x y ?xbdWidth ybdWidth?"},
+ {TIX_DEFAULT_LEN, "cget", 1, 1, Tix_GrCGet,
+ "option"},
+ {TIX_DEFAULT_LEN, "configure", 0, TIX_VAR_ARGS, Tix_GrConfig,
+ "?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "delete", 2, 3, Tix_GrDelete,
+ "option from ?to?"},
+ {TIX_DEFAULT_LEN, "dragsite", 1, 3, Tix_GrSetSite,
+ "option ?x y?"},
+ {TIX_DEFAULT_LEN, "dropsite", 1, 3, Tix_GrSetSite,
+ "option ?x y?"},
+ {TIX_DEFAULT_LEN, "entrycget", 3, 3, Tix_GrEntryCget,
+ "x y option"},
+ {TIX_DEFAULT_LEN, "edit", 1, 3, Tix_GrEdit,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "entryconfigure", 2, TIX_VAR_ARGS, Tix_GrEntryConfig,
+ "x y ?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "format", 1, TIX_VAR_ARGS, Tix_GrFormat,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "geometryinfo", 0, 2, Tix_GrGeometryInfo,
+ "?width height?"},
+ {TIX_DEFAULT_LEN, "info", 1, TIX_VAR_ARGS, Tix_GrInfo,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "index", 2, 2, Tix_GrIndex,
+ "x y"},
+ {TIX_DEFAULT_LEN, "move", 4, 4, Tix_GrMove,
+ "option from to by"},
+ {TIX_DEFAULT_LEN, "nearest", 2, 2, Tix_GrNearest,
+ "x y"},
+#if 0
+ {TIX_DEFAULT_LEN, "see", 1, 1, Tix_GrSee,
+ "x y"},
+#endif
+ {TIX_DEFAULT_LEN, "selection", 3, 5, Tix_GrSelection,
+ "option x1 y1 ?x2 y2?"},
+ {TIX_DEFAULT_LEN, "set", 2, TIX_VAR_ARGS, Tix_GrSet,
+ "x y ?option value ...?"},
+ {TIX_DEFAULT_LEN, "size", 1, TIX_VAR_ARGS, Tix_GrSetSize,
+ "option ?args ...?"},
+#ifndef __WIN32__
+ {TIX_DEFAULT_LEN, "sort", 3, TIX_VAR_ARGS, Tix_GrSort,
+ "dimension start end ?args ...?"},
+#endif
+ {TIX_DEFAULT_LEN, "unset", 2, 2, Tix_GrUnset,
+ "x y"},
+ {TIX_DEFAULT_LEN, "xview", 0, 3, Tix_GrView,
+ "args"},
+ {TIX_DEFAULT_LEN, "yview", 0, 3, Tix_GrView,
+ "args"},
+ };
+
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? arg ?arg ...?",
+ };
+
+ Tk_Preserve(clientData);
+ code = Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc, argv);
+ Tk_Release(clientData);
+
+ return code;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on Lists.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * When the window gets deleted, internal structures get
+ * cleaned up. When it gets exposed, it is redisplayed.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+WidgetEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int x2, y2;
+
+ switch (eventPtr->type) {
+ case DestroyNotify:
+ if (wPtr->dispData.tkwin != NULL) {
+ wPtr->dispData.tkwin = NULL;
+ Tcl_DeleteCommand(wPtr->dispData.interp,
+ Tcl_GetCommandName(wPtr->dispData.interp, wPtr->widgetCmd));
+ }
+ Tix_GrCancelDoWhenIdle(wPtr);
+ Tk_EventuallyFree((ClientData) wPtr, (Tix_FreeProc*)WidgetDestroy);
+ break;
+
+ case ConfigureNotify:
+ wPtr->expArea.x1 = 0;
+ wPtr->expArea.y1 = 0;
+ wPtr->expArea.x2 = Tk_Width (wPtr->dispData.tkwin) - 1;
+ wPtr->expArea.y2 = Tk_Height(wPtr->dispData.tkwin) - 1;
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ break;
+
+ case Expose:
+ if (wPtr->expArea.x1 > eventPtr->xexpose.x) {
+ wPtr->expArea.x1 = eventPtr->xexpose.x;
+ }
+ if (wPtr->expArea.y1 > eventPtr->xexpose.y) {
+ wPtr->expArea.y1 = eventPtr->xexpose.y;
+ }
+ x2 = eventPtr->xexpose.x + eventPtr->xexpose.width - 1;
+ y2 = eventPtr->xexpose.y + eventPtr->xexpose.height - 1;
+
+ if (wPtr->expArea.x2 < x2) {
+ wPtr->expArea.x2 = x2;
+ }
+ if (wPtr->expArea.y2 < y2) {
+ wPtr->expArea.y2 = y2;
+ }
+ wPtr->toRedrawHighlight = 1;
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ break;
+
+ case FocusIn:
+ wPtr->hasFocus = 1;
+ wPtr->toRedrawHighlight = 1;
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ break;
+
+ case FocusOut:
+ wPtr->hasFocus = 0;
+ wPtr->toRedrawHighlight = 1;
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ break;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDestroy --
+ *
+ * This procedure is invoked by Tk_EventuallyFree or Tk_Release
+ * to clean up the internal structure of a List at a safe time
+ * (when no-one is using it anymore).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Everything associated with the List is freed up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+WidgetDestroy(clientData)
+ ClientData clientData; /* Info about the Grid widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (wPtr->dataSet) {
+ Tix_GrDataRowSearch rowSearch;
+ Tix_GrDataCellSearch cellSearch;
+ int rowDone, cellDone;
+
+ for (rowDone = TixGrDataFirstRow(wPtr->dataSet, &rowSearch);
+ !rowDone;
+ rowDone = TixGrDataNextRow(&rowSearch)) {
+
+
+ for (cellDone = TixGrDataFirstCell(&rowSearch, &cellSearch);
+ !cellDone;
+ cellDone = TixGrDataNextCell(&cellSearch)) {
+
+ TixGridDataDeleteSearchedEntry(&cellSearch);
+ Tix_GrFreeElem((TixGrEntry*)cellSearch.data);
+ }
+ }
+
+ TixGridDataSetFree(wPtr->dataSet);
+ }
+
+ if (wPtr->backgroundGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->backgroundGC);
+ }
+ if (wPtr->selectGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->selectGC);
+ }
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC);
+ }
+ if (wPtr->highlightGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->highlightGC);
+ }
+
+ if (wPtr->mainRB) {
+ Tix_GrFreeRenderBlock(wPtr, wPtr->mainRB);
+ }
+
+ Tix_GrFreeUnusedColors(wPtr, 1);
+
+ if (!Tix_IsLinkListEmpty(wPtr->mappedWindows)) {
+ /*
+ * All mapped windows should have been unmapped when the
+ * the entries were deleted
+ */
+ panic("tixGrid: mappedWindows not NULL");
+ }
+
+ Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->dispData.display, 0);
+ ckfree((char *) wPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetCmdDeletedProc --
+ *
+ * This procedure is invoked when a widget command is deleted. If
+ * the widget isn't already in the process of being destroyed,
+ * this command destroys it.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The widget is destroyed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetCmdDeletedProc(clientData)
+ ClientData clientData; /* Info about Grid widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ /*
+ * This procedure could be invoked either because the window was
+ * destroyed and the command was then deleted (in which case tkwin
+ * is NULL) or because the command was deleted, and then this procedure
+ * destroys the widget.
+ */
+ if (wPtr->dispData.tkwin != NULL) {
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ wPtr->dispData.tkwin = NULL;
+ Tk_DestroyWindow(tkwin);
+ }
+}
+
+static void
+RecalScrollRegion(wPtr, winW, winH, scrollInfo)
+ WidgetPtr wPtr; /* Info about Grid widget. */
+ int winW;
+ int winH;
+ Tix_GridScrollInfo *scrollInfo;
+{
+ int gridSize[2];
+ int winSize[2];
+ int i, k;
+ int count;
+ int visibleSize;
+ int totalSize;
+ int pad0, pad1;
+
+ winSize[0] = winW;
+ winSize[1] = winH;
+
+ TixGridDataGetGridSize(wPtr->dataSet, &gridSize[0],
+ &gridSize[1]);
+
+ for (i=0; i<2; i++) {
+ for (k=0; k<wPtr->hdrSize[i] && k<gridSize[i]; k++) {
+ winSize[i] -= TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ winSize[i] -= pad0 + pad1;
+ }
+ if (winSize[i] <= 0) {
+ /*
+ * The window's contents are not visible.
+ */
+ scrollInfo[i].max = 0;
+ scrollInfo[i].window = 1.0;
+ continue;
+ }
+ if (wPtr->hdrSize[i] >= gridSize[i]) {
+ /*
+ * There is no scrollable stuff in this dimension.
+ */
+ scrollInfo[i].max = 0;
+ scrollInfo[i].window = 1.0;
+ continue;
+ }
+
+ visibleSize = winSize[i];
+
+ for (count=0,k=gridSize[i]-1; k>=wPtr->hdrSize[i]&&k>=0; count++,k--) {
+ winSize[i] -= TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ winSize[i] -= pad0 + pad1;
+
+ if (winSize[i] == 0) {
+ ++ count;
+ break;
+ }
+ else if (winSize[i] < 0) {
+ break;
+ }
+ }
+
+ if (count == 0) {
+ /*
+ * There is only one scrollable element and it is *partially*
+ * visible.
+ */
+ count = 1;
+ }
+ scrollInfo[i].max = (gridSize[i]-wPtr->hdrSize[i]) - count;
+
+ /*
+ * calculate the total pixel size (%%SLOOOOOOW)
+ */
+ for (totalSize=0,k=wPtr->hdrSize[i];k<gridSize[i];k++) {
+ totalSize += TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ totalSize += pad0 + pad1;
+ }
+
+ /*
+ *we may need some left over spaces after the last element.
+ */
+ totalSize += (-winSize[i]);
+
+ scrollInfo[i].window =
+ (double)(visibleSize) / (double)totalSize;
+ }
+ for (i=0; i<2; i++) {
+ if (scrollInfo[i].offset < 0) {
+ scrollInfo[i].offset = 0;
+ }
+ if (scrollInfo[i].offset > scrollInfo[i].max) {
+ scrollInfo[i].offset = scrollInfo[i].max;
+ }
+ }
+}
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetComputeGeometry --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * none
+ *
+ *--------------------------------------------------------------
+ */
+static void
+WidgetComputeGeometry(clientData)
+ ClientData clientData;
+{
+ WidgetPtr wPtr = (WidgetPtr)clientData;
+ int i, k;
+ int gridSize[2];
+ int req[2], pad0, pad1;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+
+ TixGridDataGetGridSize(wPtr->dataSet, &gridSize[0],
+ &gridSize[1]);
+
+ for (i=0; i<2; i++) {
+ int end = wPtr->reqSize[i];
+ if (end == 0) {
+ end = gridSize[0] + 1;
+ }
+ for (req[i]=0,k=0; k<end; k++) {
+ req[i] += TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ req[i] += pad0 + pad1;
+ }
+
+ req[i] += 2*(wPtr->highlightWidth + wPtr->borderWidth);
+ }
+
+ if (Tk_ReqWidth(tkwin) != req[0] || Tk_ReqHeight(tkwin) != req[0]) {
+ Tk_GeometryRequest(tkwin, req[0], req[1]);
+ }
+
+ /* arrange for the widget to be redrawn */
+ wPtr->toResetRB = 1;
+ wPtr->toComputeSel = 1;
+ wPtr->toRedrawHighlight = 1;
+
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+}
+
+static void
+Tix_GrResetRenderBlocks(wPtr)
+ WidgetPtr wPtr;
+{
+ int winW, winH, exactW, exactH;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+
+ winW = Tk_Width (tkwin) - 2*wPtr->highlightWidth - 2*wPtr->borderWidth;
+ winH = Tk_Height(tkwin) - 2*wPtr->highlightWidth - 2*wPtr->borderWidth;
+
+ RecalScrollRegion(wPtr, winW, winH, wPtr->scrollInfo);
+
+ UpdateScrollBars(wPtr, 1);
+
+ if (wPtr->mainRB) {
+ Tix_GrFreeRenderBlock(wPtr, wPtr->mainRB);
+ }
+ wPtr->mainRB = Tix_GrAllocateRenderBlock(wPtr, winW, winH,&exactW,&exactH);
+
+ wPtr->expArea.x1 = 0;
+ wPtr->expArea.y1 = 0;
+ wPtr->expArea.x2 = Tk_Width (wPtr->dispData.tkwin) - 1;
+ wPtr->expArea.y2 = Tk_Height(wPtr->dispData.tkwin) - 1;
+}
+
+/*----------------------------------------------------------------------
+ * DItemSizeChanged --
+ *
+ * This is called whenever the size of one of the HList's items
+ * changes its size.
+ *----------------------------------------------------------------------
+ */
+static void
+Tix_GrDItemSizeChanged(iPtr)
+ Tix_DItem *iPtr;
+{
+ WidgetPtr wPtr = (WidgetPtr)iPtr->base.clientData;
+
+ if (wPtr) {
+ /* double-check: perhaps we haven't set the clientData yet! */
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_GrDoWhenIdle --
+ *----------------------------------------------------------------------
+ */
+void
+Tix_GrDoWhenIdle(wPtr, type)
+ WidgetPtr wPtr;
+ int type;
+{
+ switch (type) {
+ case TIX_GR_RESIZE:
+ wPtr->toResize = 1;
+ break;
+ case TIX_GR_REDRAW:
+ wPtr->toRedraw = 1;
+ break;
+ }
+
+ if (!wPtr->idleEvent) {
+ wPtr->idleEvent = 1;
+ Tk_DoWhenIdle(IdleHandler, (ClientData)wPtr);
+ }
+}
+
+static void
+IdleHandler(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (!wPtr->idleEvent) { /* sanity check */
+ return;
+ }
+ wPtr->idleEvent = 0;
+
+ if (wPtr->toResize) {
+ wPtr->toResize = 0;
+ WidgetComputeGeometry(clientData);
+ }
+ else if (wPtr->toRedraw) {
+ wPtr->toRedraw = 0;
+ WidgetDisplay(clientData);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_GrCancelDoWhenIdle --
+ *----------------------------------------------------------------------
+ */
+void
+Tix_GrCancelDoWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ wPtr->toResize = 0;
+ wPtr->toRedraw = 0;
+
+ if (wPtr->idleEvent) {
+ Tk_CancelIdleCall(IdleHandler, (ClientData)wPtr);
+ wPtr->idleEvent = 0;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * WidgetDisplay --
+ *
+ * Display the widget: the borders, the background and the entries.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetDisplay(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Drawable buffer = None;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ int winH, winW, expW, expH;
+ GC highlightGC;
+
+ if (!Tk_IsMapped(tkwin)) {
+ return;
+ }
+ wPtr->serial ++;
+
+ winW = Tk_Width(tkwin) - 2*wPtr->highlightWidth - 2*wPtr->borderWidth;
+ winH = Tk_Height(tkwin) - 2*wPtr->highlightWidth - 2*wPtr->borderWidth;
+
+ if (winW <= 0 || winH <= 0) { /* nothing to draw */
+ goto done;
+ }
+
+ if (wPtr->toResetRB) {
+ Tix_GrResetRenderBlocks(wPtr);
+ wPtr->toResetRB = 0;
+ }
+ if (wPtr->toComputeSel) {
+ Tix_GrComputeSelection(wPtr);
+ wPtr->toComputeSel = 0;
+ }
+
+ /* clip the exposed area to the visible part of the widget,
+ * just in case some of the routines had made it larger than
+ * it should be
+ */
+ if (wPtr->expArea.x1 < wPtr->bdPad) {
+ wPtr->expArea.x1 = wPtr->bdPad;
+ }
+ if (wPtr->expArea.y1 < wPtr->bdPad) {
+ wPtr->expArea.y1 = wPtr->bdPad;
+ }
+ if (wPtr->expArea.x2 >= Tk_Width(tkwin) - wPtr->bdPad) {
+ wPtr->expArea.x2 = Tk_Width(tkwin) - wPtr->bdPad - 1;
+ }
+ if (wPtr->expArea.y2 >= Tk_Height(tkwin) - wPtr->bdPad) {
+ wPtr->expArea.y2 = Tk_Height(tkwin) - wPtr->bdPad - 1;
+ }
+
+ expW = wPtr->expArea.x2 - wPtr->expArea.x1 + 1;
+ expH = wPtr->expArea.y2 - wPtr->expArea.y1 + 1;
+
+ if (expW <= 0 || expH <= 0) { /* no cells to draw */
+ goto drawBorder;
+ }
+
+ buffer = Tix_GetRenderBuffer(wPtr->dispData.display, Tk_WindowId(tkwin),
+ expW, expH, Tk_Depth(tkwin));
+
+ if (buffer == Tk_WindowId(tkwin)) {
+ /* clear the window directly */
+ XFillRectangle(wPtr->dispData.display, buffer, wPtr->backgroundGC,
+ wPtr->expArea.x1, wPtr->expArea.y1,
+ (unsigned) expW, (unsigned) expH);
+ } else {
+ XFillRectangle(wPtr->dispData.display, buffer, wPtr->backgroundGC,
+ 0, 0, (unsigned) expW, (unsigned) expH);
+ }
+
+ if (wPtr->mainRB) {
+ Tix_GrDisplayMainBody(wPtr, buffer, winW, winH);
+ }
+
+ if (buffer != Tk_WindowId(tkwin)) {
+ XCopyArea(wPtr->dispData.display, buffer, Tk_WindowId(tkwin),
+ wPtr->backgroundGC, 0, 0, (unsigned) expW, (unsigned) expH,
+ wPtr->expArea.x1, wPtr->expArea.y1);
+ Tk_FreePixmap(wPtr->dispData.display, buffer);
+ }
+
+ drawBorder:
+ Tk_Draw3DRectangle(tkwin, Tk_WindowId(tkwin), wPtr->border,
+ wPtr->highlightWidth,
+ wPtr->highlightWidth,
+ Tk_Width(tkwin) - 2*wPtr->highlightWidth,
+ Tk_Height(tkwin) - 2*wPtr->highlightWidth,
+ wPtr->borderWidth, wPtr->relief);
+
+ if (wPtr->toRedrawHighlight && wPtr->highlightWidth > 0) {
+ if (wPtr->hasFocus) {
+ highlightGC = wPtr->highlightGC;
+ } else {
+ highlightGC = Tk_3DBorderGC(tkwin, wPtr->border,
+ TK_3D_FLAT_GC);
+ }
+
+ Tk_DrawFocusHighlight(tkwin, highlightGC, wPtr->highlightWidth,
+ Tk_WindowId(tkwin));
+ }
+
+ done:
+ wPtr->expArea.x1 = 10000;
+ wPtr->expArea.y1 = 10000;
+ wPtr->expArea.x2 = 0;
+ wPtr->expArea.y2 = 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_GrDisplayMainBody --
+ *
+ * Draw the background and cells
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+static void Tix_GrDisplayMainBody(wPtr, buffer, winW, winH)
+ WidgetPtr wPtr;
+ Drawable buffer;
+ int winW;
+ int winH;
+{
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ RenderInfo mainRI; /* render info for main body */
+ int i, j;
+
+ if (buffer == Tk_WindowId(tkwin)) {
+ /* rendering directly into the window */
+ mainRI.origin[0] = wPtr->highlightWidth + wPtr->borderWidth;
+ mainRI.origin[1] = wPtr->highlightWidth + wPtr->borderWidth;
+
+ } else {
+ /* rendering into a pixmap */
+ mainRI.origin[0] = wPtr->highlightWidth + wPtr->borderWidth
+ - wPtr->expArea.x1;
+ mainRI.origin[1] = wPtr->highlightWidth + wPtr->borderWidth
+ - wPtr->expArea.y1;
+ }
+
+ mainRI.drawable = buffer;
+ wPtr->colorInfoCounter ++;
+
+ wPtr->renderInfo = &mainRI;
+
+ /* 1. Draw the backgrounds
+ */
+ for (i=0; i<wPtr->mainRB->size[0]; i++) {
+ for (j=0; j<wPtr->mainRB->size[1]; j++) {
+ wPtr->mainRB->elms[i][j].borderW[0][0] = 0;
+ wPtr->mainRB->elms[i][j].borderW[1][0] = 0;
+ wPtr->mainRB->elms[i][j].borderW[0][1] = 0;
+ wPtr->mainRB->elms[i][j].borderW[1][1] = 0;
+ wPtr->mainRB->elms[i][j].filled = 0;
+ }
+ }
+ Tix_GrDrawBackground(wPtr, &mainRI, buffer);
+
+ /* 2. Draw the cells
+ */
+ Tix_GrDrawCells(wPtr, &mainRI, buffer);
+
+ /* 3. Draw the special sites (anchor, drag, drop).
+ */
+ Tix_GrDrawSites(wPtr, &mainRI, buffer);
+
+ /* done */
+ wPtr->renderInfo = NULL;
+
+ /* Free the unwanted colors: they are left overs from the "format"
+ * widget command.
+ */
+ Tix_GrFreeUnusedColors(wPtr, 0);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrDrawCells --
+ *
+ * Redraws the cells of the Grid
+ *----------------------------------------------------------------------
+ */
+static void Tix_GrDrawCells(wPtr, riPtr, drawable)
+ WidgetPtr wPtr;
+ RenderInfo * riPtr;
+ Drawable drawable;
+{
+ int x, y, i, j;
+ int x1, y1, x2, y2;
+ TixGrEntry * chPtr;
+ int margin = wPtr->borderWidth + wPtr->highlightWidth;
+
+ for (x=0,i=0; i<wPtr->mainRB->size[0]; i++) {
+ x1 = x + margin;
+ x2 = x1 - 1 + wPtr->mainRB->dispSize[0][i].total;
+
+ if (x1 > wPtr->expArea.x2) {
+ goto nextCol;
+ }
+ if (x2 < wPtr->expArea.x1) {
+ goto nextCol;
+ }
+ /*
+ * iterate over the columns
+ */
+ for (y=0,j=0; j<wPtr->mainRB->size[1]; j++) {
+ /*
+ * iterate over each item in the column, from top
+ * to bottom
+ */
+ y1 = y + margin;
+ y2 = y1 - 1 + wPtr->mainRB->dispSize[1][j].total;
+
+ if (y1 > wPtr->expArea.y2) {
+ goto nextRow;
+ }
+ if (y2 < wPtr->expArea.y1) {
+ goto nextRow;
+ }
+ if (!wPtr->mainRB->elms[i][j].filled) {
+ if (wPtr->mainRB->elms[i][j].selected) {
+
+ Tk_Fill3DRectangle(wPtr->dispData.tkwin,
+ drawable, wPtr->selectBorder,
+ x+riPtr->origin[0]+
+ wPtr->mainRB->elms[i][j].borderW[0][0],
+ y+riPtr->origin[1]+
+ wPtr->mainRB->elms[i][j].borderW[1][0],
+ wPtr->mainRB->dispSize[0][i].total -
+ wPtr->mainRB->elms[i][j].borderW[0][0] -
+ wPtr->mainRB->elms[i][j].borderW[0][1],
+ wPtr->mainRB->dispSize[1][j].total -
+ wPtr->mainRB->elms[i][j].borderW[1][0] -
+ wPtr->mainRB->elms[i][j].borderW[1][1],
+ 0, TK_RELIEF_FLAT);
+ }
+ }
+
+ chPtr = wPtr->mainRB->elms[i][j].chPtr;
+ if (chPtr != NULL) {
+ if (Tix_DItemType(chPtr->iPtr) == TIX_DITEM_WINDOW) {
+ Tix_DItemDisplay(Tk_WindowId(wPtr->dispData.tkwin),
+ chPtr->iPtr, x1, y1,
+ wPtr->mainRB->dispSize[0][i].size,
+ wPtr->mainRB->dispSize[1][j].size, 0, 0,
+ TIX_DITEM_NORMAL_FG);
+ } else {
+ int drawX, drawY;
+ drawX = x + riPtr->origin[0] +
+ wPtr->mainRB->dispSize[0][i].preBorder;
+ drawY = y + riPtr->origin[1] +
+ wPtr->mainRB->dispSize[1][j].preBorder;
+
+ Tix_DItemDisplay(drawable, chPtr->iPtr,
+ drawX, drawY,
+ wPtr->mainRB->dispSize[0][i].size,
+ wPtr->mainRB->dispSize[1][j].size, 0, 0,
+ TIX_DITEM_NORMAL_FG);
+ }
+ }
+ nextRow:
+ y+= wPtr->mainRB->dispSize[1][j].total;
+ }
+ nextCol:
+ x+= wPtr->mainRB->dispSize[0][i].total;
+ }
+
+ for (i=0; i<wPtr->mainRB->size[0]; i++) {
+ for (j=0; j<wPtr->mainRB->size[1]; j++) {
+ chPtr = wPtr->mainRB->elms[i][j].chPtr;
+ if (chPtr != NULL) {
+ if (Tix_DItemType(chPtr->iPtr) == TIX_DITEM_WINDOW) {
+
+ Tix_SetWindowItemSerial(&wPtr->mappedWindows,
+ chPtr->iPtr, wPtr->serial);
+ }
+ }
+ }
+ }
+
+ /* unmap those windows we mapped the last time */
+ Tix_UnmapInvisibleWindowItems(&wPtr->mappedWindows, wPtr->serial);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrDrawSites --
+ *
+ * Redraws the special sites (anchor, drag, drop)
+ *----------------------------------------------------------------------
+ */
+static void Tix_GrDrawSites(wPtr, riPtr, drawable)
+ WidgetPtr wPtr;
+ RenderInfo * riPtr;
+ Drawable drawable;
+{
+ int rect[2][2];
+ int visible;
+
+ visible = Tix_GrGetElementPosn(wPtr, wPtr->anchor[0], wPtr->anchor[1],
+ rect, 0, 1, 0, 0);
+ if (!visible) {
+ return;
+ }
+
+ Tix_DrawAnchorLines(Tk_Display(wPtr->dispData.tkwin), drawable,
+ wPtr->anchorGC,
+ rect[0][0] + riPtr->origin[0],
+ rect[1][0] + riPtr->origin[1],
+ rect[0][1] - rect[0][0] + 1,
+ rect[1][1] - rect[1][0] + 1);
+}
+
+/*----------------------------------------------------------------------
+ *
+ * Tix_GrGetElementPosn --
+ *
+ * Returns the position of a visible element on the screen.
+ *
+ * Arguments
+ * x,y: index of the element.
+ * rect: stores the return values: four sides of the cell.
+ * clipOK: if true and element is only partially visible, return only
+ * the visible portion.
+ * isSite: if (x,y) is a site, the return value depends on the
+ * selectUnit variable.
+ * isScr: should we return the position within the widget (true)
+ * or within the main display area (false).
+ * nearest:if the element is outside of the widget, should we return
+ * the position of the nearest element?
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tix_GrGetElementPosn(wPtr, x, y, rect, clipOK, isSite, isScr, nearest)
+ WidgetPtr wPtr;
+ int x;
+ int y;
+ int rect[2][2];
+ int clipOK; /* %% ignored */
+ int isSite;
+ int isScr;
+ int nearest;
+{
+ int i, j, pos[2];
+ int axis;
+ int useAxis;
+
+ if (wPtr->selectUnit == tixRowUid) {
+ axis = 0;
+ useAxis = 1;
+ }
+ else if (wPtr->selectUnit == tixColumnUid) {
+ axis = 1;
+ useAxis = 1;
+ }
+ else {
+ axis = 0; /* lint */
+ useAxis = 0;
+ }
+
+ /* %% didn't take care of the headers, etc */
+
+ pos[0] = x;
+ pos[1] = y;
+
+ /* clip the anchor site with the visible cells */
+ for (i=0; i<2; i++) {
+ if (pos[i] == TIX_SITE_NONE) {
+ return 0;
+ }
+
+ if (isSite && useAxis && i == axis) {
+ rect[i][0] = 0;
+ rect[i][1] = wPtr->mainRB->visArea[i]-1;
+ } else {
+ if (pos[i] >= wPtr->hdrSize[i]) {
+ pos[i] -= wPtr->scrollInfo[i].offset;
+ if (pos[i] < wPtr->hdrSize[i]) {
+ /* This cell has been scrolled "under the margins" */
+ return 0;
+ }
+ }
+
+ if (pos[i] < 0) {
+ if (!nearest) {
+ return 0;
+ }
+ pos[i] = 0;
+ }
+ if (pos[i] >= wPtr->mainRB->size[i]) {
+ if (!nearest) {
+ return 0;
+ }
+ pos[i] = wPtr->mainRB->size[i] - 1;
+ }
+ rect[i][0] = 0;
+ for (j=0; j<pos[i]; j++) {
+ rect[i][0] += wPtr->mainRB->dispSize[i][j].total;
+ }
+ rect[i][1] = rect[i][0] + wPtr->mainRB->dispSize[i][j].total - 1;
+ }
+ }
+
+ if (isScr) {
+ rect[0][0] += wPtr->bdPad;
+ rect[1][0] += wPtr->bdPad;
+ rect[0][1] += wPtr->bdPad;
+ rect[1][1] += wPtr->bdPad;
+ }
+
+ return 1;
+}
+
+/*----------------------------------------------------------------------
+ *
+ * "bdtype" sub command --
+ *
+ * Returns if the the screen position is at a border. This is useful
+ * for changing the mouse cursor when the user points at a border
+ * area. This indicates that the border can be adjusted interactively.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrBdType(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ int i, k, screenPos[2], bd[2], pos[2], in[2], bdWidth[2];
+ char buf[100];
+ int inX = 0;
+ int inY = 0;
+
+ if (argc != 2 && argc != 4) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 2,
+ "x y ?xbdWidth ybdWidth?");
+ }
+
+ if (Tcl_GetInt(interp, argv[0], &screenPos[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &screenPos[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (argc == 4) {
+ if (Tcl_GetInt(interp, argv[2], &bdWidth[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[3], &bdWidth[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ bdWidth[0] = -1;
+ bdWidth[1] = -1;
+ }
+
+ if (!Tk_IsMapped(tkwin)) {
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+ }
+
+ if (wPtr->mainRB == NULL || wPtr->toResetRB) {
+ Tix_GrResetRenderBlocks(wPtr);
+ wPtr->toResetRB = 0;
+ }
+
+ screenPos[0] -= wPtr->highlightWidth - wPtr->borderWidth;
+ screenPos[1] -= wPtr->highlightWidth - wPtr->borderWidth;
+
+ for (i=0; i<2; i++) {
+ bd[i] = -1;
+ pos[i] = 0;
+ in[i] = 0;
+ for (k=0; k<wPtr->mainRB->size[i]; k++) {
+ ElmDispSize * elm = &wPtr->mainRB->dispSize[i][k];
+ if (screenPos[i] - elm->total <= 0) {
+ if (bdWidth[i] != -1) {
+ if (screenPos[i] < bdWidth[i]) {
+ bd[i] = k - 1;
+ pos[i] = k;
+ }
+ else if ((elm->total - screenPos[i]) <= bdWidth[i]) {
+ bd[i] = k;
+ pos[i] = k + 1;
+ }
+ else {
+ pos[i] = k;
+ }
+ } else {
+ if (screenPos[i] < elm->preBorder) {
+ bd[i] = k - 1;
+ pos[i] = k;
+ }
+ else if ((screenPos[i] - elm->preBorder - elm->size)>= 0) {
+ bd[i] = k;
+ pos[i] = k + 1;
+ }
+ else {
+ pos[i] = k;
+ }
+ }
+ in[i] = k;
+ break;
+ } else {
+ screenPos[i] -= elm->total;
+ }
+ }
+ }
+
+ if (in[0] < wPtr->hdrSize[0] && bd[1] >= 0) {
+ inY = 1;
+ }
+ else if (in[1] < wPtr->hdrSize[1] && bd[0] >= 0) {
+ inX = 1;
+ }
+
+ if (bd[0] < 0) {
+ bd[0] = 0;
+ }
+ if (bd[1] < 0) {
+ bd[1] = 0;
+ }
+
+ if (inX && inY) {
+ sprintf(buf, "xy %d %d", bd[0], bd[1]);
+ } else if (inX) {
+ sprintf(buf, "x %d %d", bd[0], bd[1]);
+ } else if (inY) {
+ sprintf(buf, "y %d %d", bd[0], bd[1]);
+ } else {
+ buf[0] = '\0';
+ }
+
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, buf, NULL);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "set" sub command --
+ *
+ * Sets the item at the position on the grid. This either creates
+ * a new element or modifies the existing element. (if you don't want
+ * to change the -itemtype of the existing element, it will be more
+ * efficient to call the "itemconfigure" command).
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrSet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ TixGrEntry * chPtr = NULL;
+ Tix_DItem * iPtr;
+ int x, y;
+ CONST84 char * ditemType;
+ int code = TCL_OK;
+
+ /*------------------------------------------------------------
+ * (0) We need to find out where you want to set
+ *------------------------------------------------------------
+ */
+ if (TixGridDataGetIndex(interp, wPtr, argv[0], argv[1], &x, &y)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /*------------------------------------------------------------
+ * (1) We need to determine the option: -itemtype.
+ *------------------------------------------------------------
+ */
+ /* (1.0) Find out the -itemtype, if specified */
+ ditemType = wPtr->diTypePtr->name; /* default value */
+ if (argc > 2) {
+ size_t len;
+ int i;
+ if (argc %2 != 0) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ for (i=2; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-itemtype", len) == 0) {
+ ditemType = argv[i+1];
+ }
+ }
+ }
+
+ if (Tix_GetDItemType(interp, ditemType) == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /*
+ * (2) Get this item (a new item will be allocated if it does not exist
+ * yet)
+ */
+ chPtr = Tix_GrFindCreateElem(interp, wPtr, x, y);
+
+ /* (2.1) The Display item data */
+ if ((iPtr = Tix_DItemCreate(&wPtr->dispData, ditemType)) == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ iPtr->base.clientData = (ClientData)wPtr; /* %%%% */
+
+ if (chPtr->iPtr) {
+ Tix_DItemFree(chPtr->iPtr);
+ }
+ chPtr->iPtr = iPtr;
+
+ if (ConfigElement(wPtr, chPtr, argc-2, argv+2, 0, 1) != TCL_OK) {
+ code = TCL_ERROR; goto done;
+ }
+ Tix_GrPropagateSize(wPtr, chPtr);
+
+ done:
+ if (code == TCL_ERROR) {
+ /* ? */
+ } else {
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ }
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * "unset" sub command
+ *----------------------------------------------------------------------
+ */
+
+static int
+Tix_GrUnset(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ TixGrEntry * chPtr;
+ int x, y;
+
+ if (TixGridDataGetIndex(interp, wPtr, argv[0], argv[1], &x, &y)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ chPtr = Tix_GrFindElem(interp, wPtr, x, y);
+ if (chPtr != NULL) {
+ TixGridDataDeleteEntry(wPtr->dataSet, x, y);
+ Tix_GrFreeElem(chPtr);
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ }
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "cget" sub command --
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrCGet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ return Tk_ConfigureValue(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *)wPtr, argv[0], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (argc == 0) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *) wPtr, (char *) NULL, 0);
+ } else if (argc == 1) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *) wPtr, argv[0], 0);
+ } else {
+ return WidgetConfigure(interp, wPtr, argc, argv,
+ TK_CONFIG_ARGV_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrDelete(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int from, to, which;
+
+ if (TranslateFromTo(interp, wPtr, argc, argv, &from, &to, &which)!=TCL_OK){
+ return TCL_ERROR;
+ }
+ TixGridDataDeleteRange(wPtr, wPtr->dataSet, which, from, to);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "edit" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrEdit(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int x, y;
+ Tcl_DString dstring;
+ char buff[20];
+ size_t len;
+ int code;
+
+ len = strlen(argv[0]);
+ if (strncmp(argv[0], "set", len) == 0) {
+ if (argc != 3) {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ argv[-2], " edit set x y", NULL);
+ }
+ if (TixGridDataGetIndex(interp, wPtr, argv[1], argv[2], &x, &y)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ Tcl_DStringInit(&dstring);
+
+ Tcl_DStringAppendElement(&dstring, "tixGrid:EditCell");
+ Tcl_DStringAppendElement(&dstring, Tk_PathName(wPtr->dispData.tkwin));
+ sprintf(buff, "%d", x);
+ Tcl_DStringAppendElement(&dstring, buff);
+ sprintf(buff, "%d", y);
+ Tcl_DStringAppendElement(&dstring, buff);
+ } else if (strncmp(argv[0], "apply", len) == 0) {
+ if (argc != 1) {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ argv[-2], " edit apply", NULL);
+ }
+ Tcl_DStringInit(&dstring);
+
+ Tcl_DStringAppendElement(&dstring, "tixGrid:EditApply");
+ Tcl_DStringAppendElement(&dstring, Tk_PathName(wPtr->dispData.tkwin));
+ } else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\", must be apply or set", NULL);
+ return TCL_ERROR;
+ }
+
+ code = Tcl_GlobalEval(interp, dstring.string);
+ Tcl_DStringFree(&dstring);
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * "entrycget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrEntryCget(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int x, y;
+ TixGrEntry * chPtr;
+
+ if (TixGridDataGetIndex(interp, wPtr, argv[0], argv[1], &x, &y)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ chPtr = Tix_GrFindElem(interp, wPtr, x, y);
+ if (!chPtr) {
+ Tcl_AppendResult(interp, "entry \"", argv[0], ",", argv[1],
+ "\" does not exist", NULL);
+ return TCL_ERROR;
+ }
+
+ return Tix_ConfigureValue2(interp, wPtr->dispData.tkwin, (char *)chPtr,
+ entryConfigSpecs, chPtr->iPtr, argv[2], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "entryconfigure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrEntryConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int x, y;
+ TixGrEntry * chPtr;
+
+ if (TixGridDataGetIndex(interp, wPtr, argv[0], argv[1], &x, &y)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ chPtr = Tix_GrFindElem(interp, wPtr, x, y);
+ if (!chPtr) {
+ Tcl_AppendResult(interp, "entry \"", argv[0], ",", argv[1],
+ "\" does not exist", NULL);
+ return TCL_ERROR;
+ }
+
+ if (argc == 2) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->iPtr, (char *) NULL, 0);
+ } else if (argc == 3) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->iPtr, (char *) argv[2], 0);
+ } else {
+ return ConfigElement(wPtr, chPtr, argc-2, argv+2,
+ TK_CONFIG_ARGV_ONLY, 0);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "geometryinfo" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrGeometryInfo(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int qSize[2];
+ double first[2], last[2];
+ char string[80];
+ int i;
+ Tix_GridScrollInfo scrollInfo[2];
+
+ if (argc == 2) {
+ if (Tcl_GetInt(interp, argv[0], &qSize[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &qSize[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ qSize[0] = Tk_Width (wPtr->dispData.tkwin);
+ qSize[1] = Tk_Height(wPtr->dispData.tkwin);
+ }
+ qSize[0] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ qSize[1] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+
+ RecalScrollRegion(wPtr, qSize[0], qSize[1], scrollInfo);
+
+ for (i=0; i<2; i++) {
+ qSize[i] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ GetScrollFractions(wPtr, &scrollInfo[i],
+ &first[i], &last[i]);
+ }
+
+ sprintf(string, "{%f %f} {%f %f}", first[0], last[0], first[1], last[1]);
+ Tcl_AppendResult(interp, string, NULL);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "index" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrIndex(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int x, y;
+ char buff[100];
+
+ if (TixGridDataGetIndex(interp, wPtr, argv[0], argv[1], &x, &y)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ sprintf(buff, "%d %d", x, y);
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "info" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrInfo(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ size_t len = strlen(argv[0]);
+ int x, y;
+
+ if (strncmp(argv[0], "bbox", len)==0) {
+ if (argc != 3) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "x y");
+ }
+ if (TixGridDataGetIndex(interp, wPtr, argv[1], argv[2], &x, &y)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ return Tix_GrBBox(interp, wPtr, x, y);
+ }
+ else if (strncmp(argv[0], "exists", len)==0) {
+ if (argc != 3) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "x y");
+ }
+ if (TixGridDataGetIndex(interp, wPtr, argv[1], argv[2], &x, &y)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tix_GrFindElem(interp, wPtr, x, y)) {
+ Tcl_SetResult(interp, "1", TCL_STATIC);
+ } else {
+ Tcl_SetResult(interp, "0", TCL_STATIC);
+ }
+ return TCL_OK;
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\": must be bbox or exists",
+ NULL);
+ return TCL_ERROR;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "move" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrMove(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int from, to, which, by;
+
+ if (TranslateFromTo(interp, wPtr, 3, argv, &from, &to, &which)!=TCL_OK){
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[3], &by) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+TixGridDataMoveRange(wPtr, wPtr->dataSet, which, from, to, by);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "nearest" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrNearest(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ int i, k, screenPos[2], rbPos[2];
+ char buf[100];
+ RenderBlockElem* rePtr;
+
+ if (Tcl_GetInt(interp, argv[0], &screenPos[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &screenPos[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (!Tk_IsMapped(tkwin)) {
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+ }
+
+ if (wPtr->mainRB == NULL || wPtr->toResetRB) {
+ Tix_GrResetRenderBlocks(wPtr);
+ wPtr->toResetRB = 0;
+ }
+
+ screenPos[0] -= wPtr->highlightWidth - wPtr->borderWidth;
+ screenPos[1] -= wPtr->highlightWidth - wPtr->borderWidth;
+
+ for (i=0; i<2; i++) {
+ for (k=0; k<wPtr->mainRB->size[i]; k++) {
+ screenPos[i] -= wPtr->mainRB->dispSize[i][k].total;
+ if (screenPos[i]<=0) {
+ break;
+ }
+ }
+ if (k >= wPtr->mainRB->size[i]) {
+ k = wPtr->mainRB->size[i] - 1;
+ }
+ rbPos[i] = k;
+ }
+ rePtr = &(wPtr->mainRB->elms[rbPos[0]][rbPos[1]]);
+
+ sprintf(buf, "%d %d", rePtr->index[0], rePtr->index[1]);
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, buf, NULL);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "anchor", "dragsite" and "dropsire" sub commands --
+ *
+ * Set/remove the anchor element
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrSetSite(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int changed = 0;
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int * changePtr;
+ size_t len;
+ int changedRect[2][2];
+
+ /*
+ * Determine which site should be changed (the last else clause
+ * doesn't need to check the string because HandleSubCommand
+ * already ensures that only the valid options can be specified.
+ */
+ len = strlen(argv[-1]);
+ if (strncmp(argv[-1], "anchor", len)==0) {
+ changePtr = wPtr->anchor;
+ }
+ else if (strncmp(argv[-1], "dragsite", len)==0) {
+ changePtr = wPtr->dragSite;
+ }
+ else {
+ changePtr = wPtr->dropSite;
+ }
+
+ len = strlen(argv[0]);
+ if (strncmp(argv[0], "get", len)==0) {
+ char buf[100];
+
+ sprintf(buf, "%d %d", changePtr[0], changePtr[1]);
+ Tcl_SetResult(interp, buf, TCL_VOLATILE);
+
+ return TCL_OK;
+ } else if (strncmp(argv[0], "set", len)==0) {
+ if (argc == 3) {
+ int x, y;
+
+ if (TixGridDataGetIndex(interp, wPtr, argv[1], argv[2],
+ &x, &y)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (x != changePtr[0] || y != changePtr[1]) {
+ changedRect[0][0] = x;
+ changedRect[1][0] = y;
+ changedRect[0][1] = changePtr[0];
+ changedRect[1][1] = changePtr[1];
+ changed = 1;
+
+ changePtr[0] = x;
+ changePtr[1] = y;
+ }
+ } else {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ Tk_PathName(wPtr->dispData.tkwin), " ", argv[-1],
+ " set x y", NULL);
+ return TCL_ERROR;
+ }
+ }
+ else if (strncmp(argv[0], "clear", len)==0) {
+ if (argc == 1) {
+ if (changePtr[0] !=TIX_SITE_NONE || changePtr[1] !=TIX_SITE_NONE) {
+ changedRect[0][0] = TIX_SITE_NONE;
+ changedRect[1][0] = TIX_SITE_NONE;
+ changedRect[0][1] = changePtr[0];
+ changedRect[1][1] = changePtr[1];
+ changed = 1;
+
+ changePtr[0] = TIX_SITE_NONE;
+ changePtr[1] = TIX_SITE_NONE;
+ }
+ } else {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ Tk_PathName(wPtr->dispData.tkwin), " ", argv[-1],
+ " clear", NULL);
+ return TCL_ERROR;
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "wrong option \"", argv[0], "\", ",
+ "must be clear, get or set", NULL);
+ return TCL_ERROR;
+ }
+
+ if (changed) {
+ Tix_GrAddChangedRect(wPtr, changedRect, 1);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrAddChangedRect --
+ *
+ * Add the "changed" region to the exposedArea structure.
+ *----------------------------------------------------------------------
+ */
+void
+Tix_GrAddChangedRect(wPtr, changedRect, isSite)
+ WidgetPtr wPtr;
+ int changedRect[2][2];
+ int isSite;
+{
+ int rect[2][2];
+ int visible;
+ int i;
+ int changed = 0;
+
+ if (wPtr->mainRB == NULL) {
+ /*
+ * The grid will be completely refreshed. Don't do anything
+ */
+ return;
+ }
+
+ for (i=0; i<2; i++) {
+ visible = Tix_GrGetElementPosn(wPtr, changedRect[0][i],
+ changedRect[1][i], rect, 1, isSite, 1, 1);
+ if (!visible) {
+ continue;
+ }
+ if (wPtr->expArea.x1 > rect[0][0]) {
+ wPtr->expArea.x1 = rect[0][0];
+ changed = 1;
+ }
+ if (wPtr->expArea.x2 < rect[0][1]) {
+ wPtr->expArea.x2 = rect[0][1];
+ changed = 1;
+ }
+ if (wPtr->expArea.y1 > rect[1][0]) {
+ wPtr->expArea.y1 = rect[1][0];
+ changed = 1;
+ }
+ if (wPtr->expArea.y2 < rect[1][1]) {
+ wPtr->expArea.y2 = rect[1][1];
+ changed = 1;
+ }
+ }
+ if (changed) {
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ }
+}
+
+void Tix_GrScrollPage(wPtr, count, axis)
+ WidgetPtr wPtr;
+ int count;
+ int axis;
+{
+ int k, i = axis;
+ int winSize, sz, start, num;
+ int pad0, pad1;
+
+ Tix_GridScrollInfo * siPtr = &wPtr->scrollInfo[axis];
+ int gridSize[2];
+
+ if (count == 0) {
+ return;
+ }
+
+ TixGridDataGetGridSize(wPtr->dataSet, &gridSize[0],
+ &gridSize[1]);
+
+ if (gridSize[i] < wPtr->hdrSize[i]) { /* no scrollable data */
+ return;
+ }
+
+ if (axis == 0) {
+ winSize = Tk_Width(wPtr->dispData.tkwin);
+ } else {
+ winSize = Tk_Height(wPtr->dispData.tkwin);
+ }
+ winSize -= 2*wPtr->highlightWidth + 2*wPtr->borderWidth;
+
+ for (k=0; k<wPtr->hdrSize[i] && k<gridSize[i]; k++) {
+ winSize -= TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ winSize -= pad0 + pad1;
+ }
+
+ if (winSize <= 0) {
+ return;
+ }
+
+ if (count > 0) {
+ start = siPtr->offset + wPtr->hdrSize[i];
+ for (; count > 0; count--) {
+ sz = winSize;
+
+ for (num=0,k=start; k<gridSize[i]; k++,num++) {
+ sz -= TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ sz -= pad0 + pad1;
+ if (sz == 0) {
+ num++;
+ break;
+ }
+ if (sz < 0) {
+ break;
+ }
+ }
+ if (num==0) {
+ num++;
+ }
+ start += num;
+ }
+ siPtr->offset = start - wPtr->hdrSize[i];
+ }
+ else {
+ start = siPtr->offset + wPtr->hdrSize[i];
+
+ for (; count < 0; count++) {
+ sz = winSize;
+
+ for (num=0,k=start-1; k>=wPtr->hdrSize[i]; k--,num++) {
+ sz -= TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ k, &wPtr->defSize[i], &pad0, &pad1);
+ sz -= pad0 + pad1;
+ if (sz == 0) {
+ num++;
+ break;
+ }
+ if (sz < 0) {
+ break;
+ }
+ }
+ if (num==0) {
+ num++;
+ }
+ start -= num;
+ }
+ siPtr->offset = start - wPtr->hdrSize[i];
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "xview" and "yview" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_GrView(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int axis, oldXOff, oldYOff;
+ Tix_GridScrollInfo * siPtr;
+
+ if (argv[-1][0] == 'x') {
+ axis = 0;
+ } else {
+ axis = 1;
+ }
+
+ oldXOff = wPtr->scrollInfo[0].offset;
+ oldYOff = wPtr->scrollInfo[1].offset;
+
+ if (argc == 0) {
+ char string[100];
+ double first, last;
+
+ GetScrollFractions(wPtr, &wPtr->scrollInfo[axis], &first, &last);
+ sprintf(string, "%f %f", first, last);
+ Tcl_AppendResult(interp, string, NULL);
+ return TCL_OK;
+ }
+ else {
+ int offset;
+ siPtr = &wPtr->scrollInfo[axis];
+
+ if (Tcl_GetInt(interp, argv[0], &offset) == TCL_OK) {
+ /* backward-compatible mode */
+ siPtr->offset = offset;
+ } else {
+ int type, count;
+ double fraction;
+
+ Tcl_ResetResult(interp);
+
+ /* Tk_GetScrollInfo () wants strange argc,argv combinations .. */
+ type = Tk_GetScrollInfo(interp, argc+2, argv-2, &fraction, &count);
+
+ switch (type) {
+ case TK_SCROLL_ERROR:
+ return TCL_ERROR;
+
+ case TK_SCROLL_MOVETO:
+ if (siPtr->window < 1.0) {
+ fraction /= (1.0 - siPtr->window);
+ }
+
+ siPtr->offset = (int)(fraction * (siPtr->max+1));
+ break;
+
+ case TK_SCROLL_PAGES:
+ Tix_GrScrollPage(wPtr, count, axis);
+ break;
+
+ case TK_SCROLL_UNITS:
+ siPtr->offset += count * siPtr->unit;
+ break;
+ }
+ }
+ /* check ... */
+ if (siPtr->offset < 0) {
+ siPtr->offset = 0;
+ }
+ if (siPtr->offset > siPtr->max) {
+ siPtr->offset = siPtr->max;
+ }
+ }
+
+#if 0
+ printf("Configing Scrollbars: (%d %f %d) (%d %f %d)\n",
+ wPtr->scrollInfo[0].max,
+ wPtr->scrollInfo[0].window,
+ wPtr->scrollInfo[0].offset,
+ wPtr->scrollInfo[1].max,
+ wPtr->scrollInfo[1].window,
+ wPtr->scrollInfo[1].offset);
+#endif
+
+ if (oldXOff != wPtr->scrollInfo[0].offset ||
+ oldYOff != wPtr->scrollInfo[1].offset) {
+ wPtr->toResetRB = 1;
+ wPtr->toComputeSel = 1;
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ }
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ *
+ *
+ * Memory Management Section
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ConfigElement(wPtr, chPtr, argc, argv, flags, forced)
+ WidgetPtr wPtr;
+ TixGrEntry *chPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+ int forced;
+{
+ int sizeChanged;
+
+ if (Tix_WidgetConfigure2(wPtr->dispData.interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->iPtr, argc, argv, flags,
+ forced, &sizeChanged) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (sizeChanged) {
+ /* %% be smart here: sometimes the size request doesn't need to
+ * be changed
+ */
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_RESIZE);
+ } else {
+ /* set the exposed area */
+ Tix_GrDoWhenIdle(wPtr, TIX_GR_REDRAW);
+ }
+ return TCL_OK;
+}
+
+static CONST84 char * areaNames[4] = {
+ "s-margin",
+ "x-margin",
+ "y-margin",
+ "main"
+};
+
+static int
+Tix_GrCallFormatCmd(wPtr, which)
+ WidgetPtr wPtr;
+ int which;
+{
+#define STATIC_SPACE_SIZE (128 + TCL_INTEGER_SPACE *4)
+ unsigned int size;
+ int code;
+ char buff[STATIC_SPACE_SIZE];
+ char * cmd = buff;
+
+ size = strlen(wPtr->formatCmd) + 10 + (TCL_INTEGER_SPACE *4) + 10;
+ if (size > STATIC_SPACE_SIZE) {
+ cmd = (char*)ckalloc(size);
+ }
+
+ wPtr->renderInfo->fmt.whichArea = which;
+ sprintf(cmd, "%s %s %d %d %d %d", wPtr->formatCmd, areaNames[which],
+ wPtr->renderInfo->fmt.x1,
+ wPtr->renderInfo->fmt.y1,
+ wPtr->renderInfo->fmt.x2,
+ wPtr->renderInfo->fmt.y2);
+ code = Tcl_EvalEx(wPtr->dispData.interp, cmd, -1, TCL_GLOBAL_ONLY);
+
+ if (code != TCL_OK) {
+ Tcl_AddErrorInfo(wPtr->dispData.interp,
+ "\n (format command executed by tixGrid)");
+ Tk_BackgroundError(wPtr->dispData.interp);
+ }
+
+ if (cmd != buff) {
+ ckfree((char*)cmd);
+ }
+
+ return code;
+#undef STATIC_SPACE_SIZE
+}
+
+
+static void Tix_GrDrawBackground(wPtr, riPtr, drawable)
+ WidgetPtr wPtr;
+ RenderInfo * riPtr;
+ Drawable drawable;
+{
+ int mainSize[2];
+ int visibleHdr[2];
+
+ if (wPtr->formatCmd == NULL) {
+ return;
+ }
+
+ /* The visible size of the main area
+ */
+ mainSize[0] = wPtr->mainRB->size[0] - wPtr->hdrSize[0];
+ mainSize[1] = wPtr->mainRB->size[1] - wPtr->hdrSize[1];
+ if (mainSize[0] < 0) {
+ mainSize[0] = 0;
+ }
+ if (mainSize[1] < 0) {
+ mainSize[1] = 0;
+ }
+
+ /* the visible header size
+ */
+ if (wPtr->mainRB->size[0] < wPtr->hdrSize[0]) {
+ visibleHdr[0] = wPtr->mainRB->size[0];
+ } else {
+ visibleHdr[0] = wPtr->hdrSize[0];
+ }
+ if (wPtr->mainRB->size[1] < wPtr->hdrSize[1]) {
+ visibleHdr[1] = wPtr->mainRB->size[1];
+ } else {
+ visibleHdr[1] = wPtr->hdrSize[1];
+ }
+
+
+ /* the horizontal margin
+ */
+ if (wPtr->hdrSize[1] > 0 && mainSize[0] > 0) {
+ wPtr->renderInfo->fmt.x1 =
+ wPtr->scrollInfo[0].offset + wPtr->hdrSize[0];
+ wPtr->renderInfo->fmt.x2 =
+ wPtr->renderInfo->fmt.x1 + mainSize[0] - 1;
+ wPtr->renderInfo->fmt.y1 = 0;
+ wPtr->renderInfo->fmt.y2 = visibleHdr[1] - 1;
+
+ Tix_GrCallFormatCmd(wPtr, TIX_X_MARGIN);
+ }
+
+ /* the vertical margin
+ */
+ if (wPtr->hdrSize[0] > 0 && mainSize[1] > 0) {
+ wPtr->renderInfo->fmt.x1 = 0;
+ wPtr->renderInfo->fmt.x2 = visibleHdr[0] - 1;
+ wPtr->renderInfo->fmt.y1 =
+ wPtr->scrollInfo[1].offset + wPtr->hdrSize[1];
+ wPtr->renderInfo->fmt.y2 =
+ wPtr->renderInfo->fmt.y1 + mainSize[1] - 1;
+
+ Tix_GrCallFormatCmd(wPtr, TIX_Y_MARGIN);
+ }
+
+ /* the stationary part of the margin
+ */
+ if (visibleHdr[0] > 0 && visibleHdr[1] > 0) {
+ wPtr->renderInfo->fmt.x1 = 0;
+ wPtr->renderInfo->fmt.x2 = visibleHdr[0] - 1;
+ wPtr->renderInfo->fmt.y1 = 0;
+ wPtr->renderInfo->fmt.y2 = visibleHdr[1] - 1;
+
+ Tix_GrCallFormatCmd(wPtr, TIX_S_MARGIN);
+ }
+
+ /* the main area
+ */
+ if (mainSize[0] > 0 && mainSize[1] > 0) {
+ wPtr->renderInfo->fmt.x1 =
+ wPtr->scrollInfo[0].offset + wPtr->hdrSize[0];
+ wPtr->renderInfo->fmt.x2 =
+ wPtr->renderInfo->fmt.x1 + mainSize[0] - 1;
+ wPtr->renderInfo->fmt.y1 =
+ wPtr->scrollInfo[1].offset + wPtr->hdrSize[1];
+ wPtr->renderInfo->fmt.y2 =
+ wPtr->renderInfo->fmt.y1 + mainSize[1] - 1;
+
+ Tix_GrCallFormatCmd(wPtr, TIX_MAIN);
+ }
+}
+
+static void
+Tix_GrComputeSubSelection(wPtr, rect, offs)
+ WidgetPtr wPtr;
+ int rect[2][2];
+ int offs[2];
+{
+ int iMin, iMax, jMin, jMax;
+ Tix_ListIterator li;
+ SelectBlock * sbPtr;
+ int i, j, x, y;
+
+ Tix_SimpleListIteratorInit(&li);
+ for (Tix_SimpleListStart(&wPtr->selList, &li);
+ !Tix_SimpleListDone(&li);
+ Tix_SimpleListNext (&wPtr->selList, &li)) {
+
+ sbPtr = (SelectBlock *)li.curr;
+
+ /* clip the X direction
+ */
+ if (rect[0][0] > sbPtr->range[0][0]) {
+ iMin = rect[0][0];
+ } else {
+ iMin = sbPtr->range[0][0];
+ }
+
+ if (rect[0][1]<sbPtr->range[0][1] || sbPtr->range[0][1]==TIX_GR_MAX) {
+ iMax = rect[0][1];
+ } else {
+ iMax = sbPtr->range[0][1];
+ }
+ if (iMin > iMax) {
+ continue;
+ }
+
+ /* clip the Y direction
+ */
+ if (rect[1][0] > sbPtr->range[1][0]) {
+ jMin = rect[1][0];
+ } else {
+ jMin = sbPtr->range[1][0];
+ }
+ if (rect[1][1]<sbPtr->range[1][1] || sbPtr->range[1][1]==TIX_GR_MAX) {
+ jMax = rect[1][1];
+ } else {
+ jMax = sbPtr->range[1][1];
+ }
+ if (jMin > jMax) {
+ continue;
+ }
+
+ for (i=iMin; i<=iMax; i++) {
+ for (j=jMin; j<=jMax; j++) {
+ x = i - offs[0];
+ y = j - offs[1];
+
+ switch (sbPtr->type) {
+ case TIX_GR_CLEAR:
+ wPtr->mainRB->elms[x][y].selected = 0;
+ break;
+ case TIX_GR_SET:
+ wPtr->mainRB->elms[x][y].selected = 1;
+ break;
+ case TIX_GR_TOGGLE:
+ wPtr->mainRB->elms[x][y].selected =
+ !wPtr->mainRB->elms[x][y].selected;
+ break;
+
+ }
+ }
+ }
+ }
+}
+
+static void Tix_GrComputeSelection(wPtr)
+ WidgetPtr wPtr;
+{
+ int rect[2][2], offs[2];
+ int i, j;
+ int mainSize[2];
+ int visibleHdr[2];
+
+ for (i=0; i<wPtr->mainRB->size[0]; i++) {
+ for (j=0; j<wPtr->mainRB->size[1]; j++) {
+ wPtr->mainRB->elms[i][j].selected = 0;
+ }
+ }
+
+ /* Get the visible size of the main area
+ */
+ mainSize[0] = wPtr->mainRB->size[0] - wPtr->hdrSize[0];
+ mainSize[1] = wPtr->mainRB->size[1] - wPtr->hdrSize[1];
+ if (mainSize[0] < 0) {
+ mainSize[0] = 0;
+ }
+ if (mainSize[1] < 0) {
+ mainSize[1] = 0;
+ }
+
+ /* Get the visible header size
+ */
+ if (wPtr->mainRB->size[0] < wPtr->hdrSize[0]) {
+ visibleHdr[0] = wPtr->mainRB->size[0];
+ } else {
+ visibleHdr[0] = wPtr->hdrSize[0];
+ }
+ if (wPtr->mainRB->size[1] < wPtr->hdrSize[1]) {
+ visibleHdr[1] = wPtr->mainRB->size[1];
+ } else {
+ visibleHdr[1] = wPtr->hdrSize[1];
+ }
+
+ /* Compute selection on the stationary part of the margin
+ */
+ if (visibleHdr[0] > 0 && visibleHdr[1] > 0) {
+ rect[0][0] = 0;
+ rect[0][1] = visibleHdr[0] - 1;
+ rect[1][0] = 0;
+ rect[1][1] = visibleHdr[1] - 1;
+ offs[0] = 0;
+ offs[1] = 0;
+
+ Tix_GrComputeSubSelection(wPtr, rect, offs);
+ }
+
+ /* Compute selection on the horizontal margin
+ */
+ if (wPtr->hdrSize[1] > 0 && mainSize[0] > 0) {
+ rect[0][0] = wPtr->scrollInfo[0].offset + wPtr->hdrSize[0];
+ rect[0][1] = rect[0][0] + mainSize[0] - 1;
+ rect[1][0] = 0;
+ rect[1][1] = visibleHdr[1] - 1;
+ offs[0] = wPtr->scrollInfo[0].offset;;
+ offs[1] = 0;
+
+ Tix_GrComputeSubSelection(wPtr, rect, offs);
+ }
+
+ /* Compute selection on the vertical margin
+ */
+ if (wPtr->hdrSize[0] > 0 && mainSize[1] > 0) {
+ rect[0][0] = 0;
+ rect[0][1] = visibleHdr[0] - 1;
+ rect[1][0] = wPtr->scrollInfo[1].offset + wPtr->hdrSize[1];
+ rect[1][1] = rect[1][0] + mainSize[1] - 1;
+ offs[0] = 0;
+ offs[1] = wPtr->scrollInfo[1].offset;;
+
+ Tix_GrComputeSubSelection(wPtr, rect, offs);
+ }
+
+ /* Compute selection on the main area
+ */
+ if (mainSize[0] > 0 && mainSize[1] > 0) {
+ rect[0][0] = wPtr->scrollInfo[0].offset + wPtr->hdrSize[0];
+ rect[0][1] = rect[0][0] + mainSize[0] - 1;
+ rect[1][0] = wPtr->scrollInfo[1].offset + wPtr->hdrSize[1];
+ rect[1][1] = rect[1][0] + mainSize[1] - 1;
+ offs[0] = wPtr->scrollInfo[0].offset;;
+ offs[1] = wPtr->scrollInfo[1].offset;;
+
+ Tix_GrComputeSubSelection(wPtr, rect, offs);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * UpdateScrollBars
+ *----------------------------------------------------------------------
+ */
+static void
+GetScrollFractions(wPtr, siPtr, first_ret, last_ret)
+ WidgetPtr wPtr;
+ Tix_GridScrollInfo *siPtr;
+ double * first_ret;
+ double * last_ret;
+{
+ double first, last;
+ double usuable;
+
+ usuable = 1.0 - siPtr->window;
+
+ if (siPtr->max > 0) {
+ first = usuable * (double)(siPtr->offset) / (double)(siPtr->max);
+ last = first + siPtr->window;
+ } else {
+ first = 0.0;
+ last = 1.0;
+ }
+
+ *first_ret = first;
+ *last_ret = last;
+}
+
+static void UpdateScrollBars(wPtr, sizeChanged)
+ WidgetPtr wPtr;
+ int sizeChanged;
+{
+ int i;
+ Tix_GridScrollInfo *siPtr;
+ Tcl_Interp * interp = wPtr->dispData.interp;
+
+ for (i=0; i<2; i++) {
+ double first, last;
+ double usuable;
+
+ siPtr = &wPtr->scrollInfo[i];
+
+ usuable = 1.0 - siPtr->window;
+
+ if (siPtr->max > 0) {
+ first = usuable * (double)(siPtr->offset) / (double)(siPtr->max);
+ last = first + siPtr->window;
+ } else {
+ first = 0.0;
+ last = 1.0;
+ }
+
+ if (siPtr->command) {
+ char buff[60];
+
+ sprintf(buff, " %f %f", first, last);
+ if (Tcl_VarEval(interp, siPtr->command, buff,
+ (char *) NULL) != TCL_OK) {
+ Tcl_AddErrorInfo(interp,
+ "\n (scrolling command executed by tixGrid)");
+ Tk_BackgroundError(interp);
+ }
+ }
+ }
+
+ if (wPtr->sizeCmd && sizeChanged) {
+ if (Tcl_GlobalEval(wPtr->dispData.interp, wPtr->sizeCmd) != TCL_OK) {
+ Tcl_AddErrorInfo(wPtr->dispData.interp,
+ "\n (size command executed by tixGrid)");
+ Tk_BackgroundError(wPtr->dispData.interp);
+ }
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrFindCreateElem --
+ *
+ * Returns the element. If it doesn't exist, create a new one
+ * and return it.
+ *----------------------------------------------------------------------
+ */
+
+static TixGrEntry *
+Tix_GrFindCreateElem(interp, wPtr, x, y)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ int x;
+ int y;
+{
+ static TixGrEntry * defaultEntry = NULL;
+ TixGrEntry * chPtr;
+
+ if (defaultEntry == NULL) {
+ defaultEntry = (TixGrEntry*)ckalloc(sizeof(TixGrEntry));
+ defaultEntry->iPtr = NULL;
+ }
+
+ chPtr = (TixGrEntry*)TixGridDataCreateEntry(wPtr->dataSet, x, y,
+ (char*)defaultEntry);
+
+ if (chPtr == defaultEntry) {
+ defaultEntry = NULL;
+ }
+
+ return chPtr;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrFindElem --
+ *
+ * Return the element if it exists. Otherwise returns 0.
+ *----------------------------------------------------------------------
+ */
+static TixGrEntry *
+Tix_GrFindElem(interp, wPtr, x, y)
+ Tcl_Interp * interp; /* Used for error reporting */
+ WidgetPtr wPtr; /* The grid widget */
+ int x; /* X coord of the entry */
+ int y; /* Y coord of the entry */
+{
+ return (TixGrEntry*)TixGridDataFindEntry(wPtr->dataSet, x, y);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrFreeElem --
+ *
+ * Frees the element.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+Tix_GrFreeElem(chPtr)
+ TixGrEntry * chPtr; /* The element fo free */
+{
+ if (chPtr->iPtr) {
+ Tix_DItemFree(chPtr->iPtr);
+ }
+ ckfree((char*)chPtr);
+}
+
+static void
+Tix_GrPropagateSize(wPtr, chPtr)
+ WidgetPtr wPtr;
+ TixGrEntry * chPtr;
+{
+#if 0
+ int i;
+
+ for (i=0; i<2; i++) {
+ TreeListRoot * rPtr;
+ GridHeader * hdr;
+
+ rPtr = chPtr->nodes[i].root;
+ hdr = (GridHeader*) rPtr->data;
+
+ if (hdr->size < chPtr->size[i]) {
+ hdr->size = chPtr->size[i];
+ hdr->recalSize = 0;
+ }
+ }
+#endif
+}
+
+static RenderBlock * Tix_GrAllocateRenderBlock(wPtr, winW, winH, exactW,exactH)
+ WidgetPtr wPtr;
+ int winW;
+ int winH;
+ int * exactW;
+ int * exactH;
+{
+ RenderBlock * rbPtr;
+ int i, j, k;
+ int offset[2]; /* how much the entries were scrolled */
+ int winSize[2];
+ int exactSize[2]; /* BOOL: are all the visible coloums and rows
+ * displayed in whole */
+ int pad0, pad1;
+
+ offset[0] = wPtr->scrollInfo[0].offset + wPtr->hdrSize[0];
+ offset[1] = wPtr->scrollInfo[1].offset + wPtr->hdrSize[1];
+
+ winSize[0] = winW;
+ winSize[1] = winH;
+
+ rbPtr = (RenderBlock*)ckalloc(sizeof(RenderBlock));
+
+ rbPtr->size[0]=0;
+ rbPtr->size[1]=0;
+ rbPtr->visArea[0] = winW;
+ rbPtr->visArea[1] = winH;
+
+ /* (1) find out the size requirement of each row and column.
+ * The results are stored in rbPtr->size[i] and
+ * rbPtr->dispSize[i][0 .. (rbPtr->size[i]-1)]
+ */
+ for (i=0; i<2; i++) {
+ /* i=0 : handle the column sizes;
+ * i=1 : handle the row sizes;
+ */
+ int index;
+ int pixelSize = 0;
+
+ /* The margins */
+ for (index=0; index<wPtr->hdrSize[i] && pixelSize<winSize[i]; index++){
+ pixelSize += TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ index, &wPtr->defSize[i], &pad0, &pad1);
+ pixelSize += pad0 + pad1;
+ rbPtr->size[i] ++;
+ }
+
+ for (index=offset[i]; pixelSize<winSize[i]; index++) {
+ pixelSize += TixGridDataGetRowColSize(wPtr, wPtr->dataSet, i,
+ index, &wPtr->defSize[i], &pad0, &pad1);
+ pixelSize += pad0 + pad1;
+ rbPtr->size[i] ++;
+ }
+ if (pixelSize == winSize[i]) {
+ exactSize[i] = 1;
+ } else {
+ exactSize[i] = 0;
+ }
+ }
+
+ /* return values */
+
+ *exactW = exactSize[0];
+ *exactH = exactSize[1];
+
+ rbPtr->dispSize[0] = (ElmDispSize*)
+ ckalloc(sizeof(ElmDispSize)*rbPtr->size[0]);
+ rbPtr->dispSize[1] = (ElmDispSize*)
+ ckalloc(sizeof(ElmDispSize)*rbPtr->size[1]);
+
+ /*
+ * (2) fill the size info of all the visible rows and cols into
+ * the dispSize arrays;
+ */
+
+ for (i=0; i<2; i++) {
+ /*
+ * i=0 : handle the column sizes;
+ * i=1 : handle the row sizes;
+ */
+ int index;
+
+ for (k=0; k<rbPtr->size[i]; k++) {
+ if (k < wPtr->hdrSize[i]) { /* The margins */
+ index = k;
+ } else {
+ index = k + offset[i] - wPtr->hdrSize[i];
+ }
+
+ rbPtr->dispSize[i][k].size = TixGridDataGetRowColSize(wPtr,
+ wPtr->dataSet, i, index, &wPtr->defSize[i], &pad0, &pad1);
+ rbPtr->dispSize[i][k].preBorder = pad0;
+ rbPtr->dispSize[i][k].postBorder = pad1;
+ }
+ }
+
+ /*
+ * (3) Put the visible elements into the render block array,
+ * rbPtr->elms[*][*].
+ */
+ rbPtr->elms = (RenderBlockElem**)
+ ckalloc(sizeof(RenderBlockElem*)*rbPtr->size[0]);
+
+ for (i=0; i<rbPtr->size[0]; i++) {
+ rbPtr->elms[i] = (RenderBlockElem*)
+ ckalloc(sizeof(RenderBlockElem) * rbPtr->size[1]);
+ for (j=0; j<rbPtr->size[1]; j++) {
+ rbPtr->elms[i][j].chPtr = NULL;
+ rbPtr->elms[i][j].selected = 0;
+ }
+ }
+
+ for (i=0; i<rbPtr->size[0]; i++) {
+ for (j=0; j<rbPtr->size[1]; j++) {
+ int x, y;
+
+ if (i<wPtr->hdrSize[0]) {
+ x = i;
+ } else {
+ x = i+offset[0]-wPtr->hdrSize[0];
+ }
+
+ if (j<wPtr->hdrSize[1]) {
+ y = j;
+ } else {
+ y = j+offset[1]-wPtr->hdrSize[1];
+ }
+
+ rbPtr->elms[i][j].chPtr = (TixGrEntry*) TixGridDataFindEntry(
+ wPtr->dataSet, x, y);
+ rbPtr->elms[i][j].index[0] = x;
+ rbPtr->elms[i][j].index[1] = y;
+ }
+ }
+
+ for (k=0; k<2; k++) {
+ for (i=0; i<rbPtr->size[k]; i++) {
+ rbPtr->dispSize[k][i].total =
+ rbPtr->dispSize[k][i].preBorder
+ + rbPtr->dispSize[k][i].size
+ + rbPtr->dispSize[k][i].postBorder;
+ }
+ }
+
+ return rbPtr;
+}
+
+static void
+Tix_GrFreeRenderBlock(wPtr, rbPtr)
+ WidgetPtr wPtr;
+ RenderBlock * rbPtr;
+{
+ int i;
+
+ for (i=0; i<rbPtr->size[0]; i++) {
+ ckfree((char*)rbPtr->elms[i]);
+ }
+ ckfree((char*)rbPtr->elms);
+ ckfree((char*)rbPtr->dispSize[0]);
+ ckfree((char*)rbPtr->dispSize[1]);
+ ckfree((char*)rbPtr);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GrBBox --
+ *
+ * Returns the visible bounding box of a entry.
+ *
+ * Return value:
+ * See user documenetation.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+static int Tix_GrBBox(interp, wPtr, x, y)
+ Tcl_Interp * interp; /* Interpreter to report the bbox. */
+ WidgetPtr wPtr; /* HList widget. */
+ int x; /* X coordinate of the entry.*/
+ int y; /* Y coordinate of the entry.*/
+{
+ int rect[2][2];
+ int visible;
+ char buff[100];
+
+ if (!Tk_IsMapped(wPtr->dispData.tkwin)) {
+ return TCL_OK;
+ }
+
+ visible = Tix_GrGetElementPosn(wPtr, wPtr->anchor[0], wPtr->anchor[1],
+ rect, 0, 0, 1, 0);
+ if (!visible) {
+ return TCL_OK;
+ }
+
+ sprintf(buff, "%d %d %d %d", rect[0][0], rect[1][0],
+ rect[0][1] - rect[0][0] + 1,
+ rect[1][1] - rect[1][0] + 1);
+
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TranslateFromTo --
+ *
+ * Translate the "option from ?to?" arguments from string to integer.
+ *
+ * Results:
+ * Standard Tcl results.
+ *
+ * Side effects:
+ * On success, *from and *to contains the from and to values.
+ *----------------------------------------------------------------------
+ */
+
+static int
+TranslateFromTo(interp, wPtr, argc, argv, from, to, which)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ int argc;
+ CONST84 char **argv;
+ int *from;
+ int *to;
+ int * which;
+{
+ int dummy;
+ size_t len = strlen(argv[0]);
+
+ if (strncmp(argv[0], "row", len) == 0) {
+ *which = 1;
+
+ if (TixGridDataGetIndex(interp, wPtr, "0", argv[1], &dummy, from)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (argc == 3) {
+ if (TixGridDataGetIndex(interp, wPtr, "0", argv[2], &dummy, to)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ *to = *from;
+ }
+ } else if (strncmp(argv[0], "column", len) == 0) {
+ *which = 0;
+ if (TixGridDataGetIndex(interp, wPtr, argv[1], "0", from, &dummy)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (argc == 3) {
+ if (TixGridDataGetIndex(interp, wPtr, argv[2], "0", to, &dummy)
+ !=TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ *to = *from;
+ }
+ }
+
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixGrid.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixGrid.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,417 @@
+/*
+ * tixGrid.h --
+ *
+ * Defines main data structures for tixGrid
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixGrid.h,v 1.3 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#ifndef _TIX_GRID_H_
+#define _TIX_GRID_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 {
+ char * 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 {
+ char * 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.
+ */
+ char *command; /* The command when user double-clicks */
+ char *browseCmd; /* The command to call when the selection
+ * changes. */
+ char *editNotifyCmd; /* The command to call to determine whether
+ * a cell is editable. */
+ char *editDoneCmd; /* The command to call when an entry has
+ * been edited by the user.*/
+ char *formatCmd; /* The command to call when the Grid widget
+ * needs to be reformatted (e.g, Exposure
+ * events or when contents have been
+ * changed). */
+ char *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;
+
+/*
+ * 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, CONST84 char **argv,
+ TixGridSize *sizePtr, CONST84 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, CONST84 char ** argv, CONST84 char * argcErrorMsg,
+ int *changed_ret));
+EXTERN CONST84 char * TixGridDataCreateEntry _ANSI_ARGS_((
+ TixGridDataSet * dataSet, int x, int y,
+ CONST84 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,
+ CONST84 char * xStr, CONST84 char * 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_*/
Added: external/tix-8.4.2.x/generic/tixHLCol.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixHLCol.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,407 @@
+
+/* $Id: tixHLCol.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixHLCol.c ---
+ *
+ *
+ * Implements columns inside tixHList 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixHList.h>
+
+static TIX_DECLARE_SUBCMD(Tix_HLItemCreate);
+static TIX_DECLARE_SUBCMD(Tix_HLItemConfig);
+static TIX_DECLARE_SUBCMD(Tix_HLItemCGet);
+static TIX_DECLARE_SUBCMD(Tix_HLItemDelete);
+static TIX_DECLARE_SUBCMD(Tix_HLItemExists);
+
+static TIX_DECLARE_SUBCMD(Tix_HLColWidth);
+
+static HListElement * Tix_HLGetColumn(Tcl_Interp *interp, WidgetPtr wPtr,
+ CONST84 char ** argv, int * column_ret, int mustExist);
+
+HListColumn *
+Tix_HLAllocColumn(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ HListColumn * column;
+ int i;
+
+ column =
+ (HListColumn*)ckalloc(sizeof(HListColumn)*wPtr->numColumns);
+ for (i=0; i<wPtr->numColumns; i++) {
+ column[i].type = HLTYPE_COLUMN;
+ column[i].self = (char*)&column[i];
+ column[i].chPtr = chPtr;
+ column[i].iPtr = NULL;
+ column[i].iPtr = NULL;
+ column[i].width = UNINITIALIZED;
+ }
+ return column;
+}
+
+static HListElement *
+Tix_HLGetColumn(interp, wPtr, argv, column_ret, mustExist)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+ CONST84 char ** argv;
+ int * column_ret;
+ int mustExist;
+{
+ HListElement * chPtr;
+ int column;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return NULL;
+ }
+ if (Tcl_GetInt(interp, argv[1], &column) != TCL_OK) {
+ return NULL;
+ }
+ if (column >= wPtr->numColumns || column < 0) {
+ Tcl_AppendResult(interp, "Column \"", argv[1],
+ "\" does not exist", (char*)NULL);
+ return NULL;
+ }
+ if (mustExist && chPtr->col[column].iPtr == NULL) {
+ Tcl_AppendResult(interp, "entry \"", argv[0],
+ "\" does not have an item at column ", argv[1], NULL);
+ return NULL;
+ }
+
+ * column_ret = column;
+ return chPtr;
+}
+
+/*----------------------------------------------------------------------
+ * "item" sub command
+ *----------------------------------------------------------------------
+ */
+int
+Tix_HLItem(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "cget", 3, 3, Tix_HLItemCGet,
+ "entryPath column option"},
+ {TIX_DEFAULT_LEN, "configure", 2, TIX_VAR_ARGS, Tix_HLItemConfig,
+ "entryPath column ?option? ?value ...?"},
+ {TIX_DEFAULT_LEN, "create", 2, TIX_VAR_ARGS, Tix_HLItemCreate,
+ "entryPath column ?option value ...?"},
+ {TIX_DEFAULT_LEN, "delete", 2, 2, Tix_HLItemDelete,
+ "entryPath column"},
+ {TIX_DEFAULT_LEN, "exists", 2, 2, Tix_HLItemExists,
+ "entryPath column"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+/*----------------------------------------------------------------------
+ * "item cget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLItemCGet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int column;
+
+ if ((chPtr=Tix_HLGetColumn(interp, wPtr, argv, &column, 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ return Tk_ConfigureValue(interp, wPtr->dispData.tkwin,
+ chPtr->col[column].iPtr->base.diTypePtr->itemConfigSpecs,
+ (char *)chPtr->col[column].iPtr, argv[2], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "item configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLItemConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int column;
+
+ if ((chPtr=Tix_HLGetColumn(interp, wPtr, argv, &column, 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc == 2) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin,
+ chPtr->col[column].iPtr->base.diTypePtr->itemConfigSpecs,
+ (char *)chPtr->col[column].iPtr, NULL, 0);
+ } else if (argc == 3) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin,
+ chPtr->col[column].iPtr->base.diTypePtr->itemConfigSpecs,
+ (char *)chPtr->col[column].iPtr, argv[2], 0);
+ } else {
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return Tix_DItemConfigure(chPtr->col[column].iPtr,
+ argc-2, argv+2, TK_CONFIG_ARGV_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "item create" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLItemCreate(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int column, i;
+ size_t len;
+ Tix_DItem * iPtr;
+ CONST84 char * ditemType = NULL;
+
+ if ((chPtr=Tix_HLGetColumn(interp, wPtr, argv, &column, 0)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc %2) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ return TCL_ERROR;
+ }
+ for (i=2; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-itemtype", len) == 0) {
+ ditemType = argv[i+1];
+ }
+ }
+ if (ditemType == NULL) {
+ ditemType = wPtr->diTypePtr->name;
+ }
+
+ iPtr = Tix_DItemCreate(&wPtr->dispData, ditemType);
+ if (iPtr == NULL) {
+ return TCL_ERROR;
+ }
+
+ iPtr->base.clientData = (ClientData)&chPtr->col[column];
+ if (Tix_DItemConfigure(iPtr, argc-2, argv+2, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (chPtr->col[column].iPtr != NULL) {
+ if (Tix_DItemType(chPtr->col[column].iPtr) == TIX_DITEM_WINDOW) {
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->col[column].iPtr);
+ }
+ Tix_DItemFree(chPtr->col[column].iPtr);
+ }
+ chPtr->col[column].iPtr = iPtr;
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * "item delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLItemDelete(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int column;
+
+ if ((chPtr=Tix_HLGetColumn(interp, wPtr, argv, &column, 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (column == 0) {
+ Tcl_AppendResult(interp,"Cannot delete item at column 0",(char*)NULL);
+ return TCL_ERROR;
+ }
+
+ if (Tix_DItemType(chPtr->col[column].iPtr) == TIX_DITEM_WINDOW) {
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->col[column].iPtr);
+ }
+
+ /* Free the item and leave a blank */
+ Tix_DItemFree(chPtr->col[column].iPtr);
+ chPtr->col[column].iPtr = NULL;
+
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "item exists" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLItemExists(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int column;
+
+ if ((chPtr=Tix_HLGetColumn(interp, wPtr, argv, &column, 0)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (chPtr->col[column].iPtr == NULL) {
+ Tcl_AppendResult(interp, "0", NULL);
+ } else {
+ Tcl_AppendResult(interp, "1", NULL);
+ }
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * "column" sub command
+ *----------------------------------------------------------------------
+ */
+int
+Tix_HLColumn(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "width", 1, 3, Tix_HLColWidth,
+ "column ?-char? ?size?"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+/*----------------------------------------------------------------------
+ * "column width" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLColWidth(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int column;
+ char buff[128];
+ int newWidth;
+
+ if (Tcl_GetInt(interp, argv[0], &column) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (column >= wPtr->numColumns || column < 0) {
+ Tcl_AppendResult(interp, "Column \"", argv[0],
+ "\" does not exist", (char*)NULL);
+ return TCL_ERROR;
+ }
+ if (argc == 1) { /* Query */
+ if (wPtr->root->dirty || wPtr->allDirty) {
+ /* We must update the geometry NOW otherwise we will get a wrong
+ * width
+ */
+ Tix_HLCancelResizeWhenIdle(wPtr);
+ Tix_HLComputeGeometry((ClientData)wPtr);
+ }
+ sprintf(buff, "%d", wPtr->actualSize[column].width);
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+ }
+ else if (argc == 2) {
+ if (argv[1][0] == '\0') {
+ newWidth = UNINITIALIZED;
+ goto setwidth;
+ }
+ if (Tk_GetPixels(interp, wPtr->dispData.tkwin, argv[1],
+ &newWidth) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (newWidth < 0) {
+ newWidth = 0;
+ }
+ }
+ else if (argc == 3 && strcmp(argv[1], "-char")==0) {
+ if (argv[2][0] == '\0') {
+ newWidth = UNINITIALIZED;
+ goto setwidth;
+ }
+ if (Tcl_GetInt(interp, argv[2], &newWidth) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (newWidth < 0) {
+ newWidth = 0;
+ }
+ newWidth *= wPtr->scrollUnit[0];
+ }
+ else {
+ return Tix_ArgcError(interp, argc+3, argv-3, 3,
+ "column ?-char? ?size?");
+ }
+
+ setwidth:
+
+ if (wPtr->reqSize[column].width == newWidth) {
+ return TCL_OK;
+ } else {
+ wPtr->reqSize[column].width = newWidth;
+ }
+
+ if (wPtr->actualSize[column].width == newWidth) {
+ return TCL_OK;
+ } else {
+ wPtr->allDirty = 1;
+ Tix_HLResizeWhenIdle(wPtr);
+ return TCL_OK;
+ }
+}
Added: external/tix-8.4.2.x/generic/tixHLHdr.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixHLHdr.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,580 @@
+
+/* $Id: tixHLHdr.c,v 1.3 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixHLHdr.c ---
+ *
+ *
+ * Implements headers for tixHList 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixHList.h>
+#include <tixDef.h>
+
+static TIX_DECLARE_SUBCMD(Tix_HLHdrCreate);
+static TIX_DECLARE_SUBCMD(Tix_HLHdrConfig);
+static TIX_DECLARE_SUBCMD(Tix_HLHdrCGet);
+static TIX_DECLARE_SUBCMD(Tix_HLHdrDelete);
+static TIX_DECLARE_SUBCMD(Tix_HLHdrExist);
+static TIX_DECLARE_SUBCMD(Tix_HLHdrSize);
+
+static void FreeWindowItem _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, HListHeader *hPtr));
+static void FreeHeader _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, HListHeader *hPtr));
+static HListHeader* AllocHeader _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr));
+static HListHeader* Tix_HLGetHeader _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, CONST84 char * string,
+ int requireIPtr));
+
+static Tk_ConfigSpec headerConfigSpecs[] = {
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-borderwidth", "headerBorderWidth", "BorderWidth",
+ DEF_HLISTHEADER_BORDER_WIDTH, Tk_Offset(HListHeader, borderWidth), 0},
+
+ {TK_CONFIG_BORDER, "-headerbackground", "headerBackground", "Background",
+ DEF_HLISTHEADER_BG_COLOR, Tk_Offset(HListHeader, background),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-headerbackground", "headerBackground", "Background",
+ DEF_HLISTHEADER_BG_MONO, Tk_Offset(HListHeader, background),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_RELIEF, "-relief", "headerRelief", "Relief",
+ DEF_HLISTHEADER_RELIEF, Tk_Offset(HListHeader, relief), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ *
+ * Local functions
+ *
+ *----------------------------------------------------------------------
+ */
+
+static HListHeader*
+AllocHeader(interp, wPtr)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+{
+ HListHeader * hPtr = (HListHeader*)ckalloc(sizeof(HListHeader));
+ hPtr->type = HLTYPE_HEADER;
+ hPtr->self = (char*)hPtr;
+ hPtr->wPtr = wPtr;
+ hPtr->iPtr = NULL;
+ hPtr->width = 0;
+ hPtr->background = NULL;
+ hPtr->relief = TK_RELIEF_RAISED;
+ hPtr->borderWidth = 2;
+
+ if (Tk_ConfigureWidget(interp, wPtr->dispData.tkwin, headerConfigSpecs,
+ 0, 0, (char *)hPtr, 0) != TCL_OK) {
+ /* some unrecoverable errors */
+ return NULL;
+ }
+ return hPtr;
+}
+
+static void
+FreeWindowItem(interp, wPtr, hPtr)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+ HListHeader *hPtr;
+{
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ hPtr->iPtr);
+}
+
+static void
+FreeHeader(interp, wPtr, hPtr)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+ HListHeader *hPtr;
+{
+ if (hPtr->iPtr) {
+ if (Tix_DItemType(hPtr->iPtr) == TIX_DITEM_WINDOW) {
+ FreeWindowItem(interp, wPtr, hPtr);
+ }
+ Tix_DItemFree(hPtr->iPtr);
+ }
+
+ Tk_FreeOptions(headerConfigSpecs, (char *)hPtr, wPtr->dispData.display, 0);
+ ckfree((char*) hPtr);
+}
+
+static HListHeader*
+Tix_HLGetHeader(interp, wPtr, string, requireIPtr)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ CONST84 char * string;
+ int requireIPtr;
+{
+ int column;
+
+ if (Tcl_GetInt(interp, string, &column) != TCL_OK) {
+ return NULL;
+ }
+ if (column >= wPtr->numColumns || column < 0) {
+ Tcl_AppendResult(interp, "Column \"", string,
+ "\" does not exist", (char*)NULL);
+ return NULL;
+ }
+ if (requireIPtr && wPtr->headers[column]->iPtr == NULL) {
+ Tcl_AppendResult(interp, "Column \"", string,
+ "\" does not have a header", (char*)NULL);
+ return NULL;
+ }
+
+ return wPtr->headers[column];
+}
+
+int
+Tix_HLCreateHeaders(interp, wPtr)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+{
+ int i;
+
+ wPtr->headers = (HListHeader**)
+ ckalloc(sizeof(HListHeader*) * wPtr->numColumns);
+
+ for (i=0; i<wPtr->numColumns; i++) {
+ wPtr->headers[i] = NULL;
+ }
+
+ for (i=0; i<wPtr->numColumns; i++) {
+ if ((wPtr->headers[i] = AllocHeader(interp, wPtr)) == NULL) {
+ return TCL_ERROR;
+ }
+ }
+
+ wPtr->headerDirty = 1;
+ return TCL_OK;
+}
+
+void Tix_HLFreeHeaders(interp, wPtr)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+{
+ int i;
+
+ if (wPtr->headers == NULL) {
+ return;
+ }
+
+ for (i=0; i<wPtr->numColumns; i++) {
+ if (wPtr->headers[i] != NULL) {
+ FreeHeader(interp, wPtr, wPtr->headers[i]);
+ }
+ }
+
+ ckfree((char*)wPtr->headers);
+}
+
+void
+Tix_HLDrawHeader(wPtr, pixmap, gc, hdrX, hdrY, hdrW, hdrH, xOffset)
+ WidgetPtr wPtr;
+ Pixmap pixmap;
+ GC gc;
+ int hdrX;
+ int hdrY;
+ int hdrW;
+ int hdrH;
+ int xOffset;
+{
+ int i, x, y;
+ int drawnWidth; /* how much of the header have I drawn? */
+ int width; /* width of the current header item */
+ int winItemExtra; /* window items need a bit extra offset
+ * because they must be places relative to
+ * the main window, not the header subwindow
+ */
+ x = hdrX - xOffset;
+ y = hdrY;
+ drawnWidth = 0;
+
+ winItemExtra = wPtr->borderWidth + wPtr->highlightWidth;
+
+ if (wPtr->needToRaise) {
+ /* the needToRaise flag is set every time a new window item is
+ * created inside the header of the HList.
+ *
+ * We need to make sure that the windows items in the list
+ * body are clipped by the header subwindow. However, the window
+ * items inside the header should be over the header subwindow.
+ *
+ * The two XRaiseWindow calls in this function make sure that
+ * the stacking relationship as described above always hold
+ */
+ XRaiseWindow(Tk_Display(wPtr->headerWin),
+ Tk_WindowId(wPtr->headerWin));
+ }
+
+ for (i=0; i<wPtr->numColumns; i++) {
+ HListHeader * hPtr = wPtr->headers[i];
+ width = wPtr->actualSize[i].width;
+
+ if (i == wPtr->numColumns-1) {
+ /* If the widget is wider than required,
+ * We need to extend the last item to the end of the list,
+ * or otherwise we'll see a curtailed header
+ */
+ if (drawnWidth + width <hdrW) {
+ width = hdrW - drawnWidth;
+ }
+ }
+
+ Tk_Fill3DRectangle(wPtr->dispData.tkwin, pixmap, hPtr->background,
+ x, y, width, wPtr->headerHeight, hPtr->borderWidth,
+ hPtr->relief);
+
+ /* Note when we draw the item, we use the
+ * wPtr->actualSize[i].width instead of the (possibly extended) width
+ * so that the header is well-aligned with the element columns.
+ */
+ if (hPtr->iPtr) {
+ int itemX, itemY;
+ itemX = x+hPtr->borderWidth;
+ itemY = y+hPtr->borderWidth;
+
+ if (Tix_DItemType(hPtr->iPtr) == TIX_DITEM_WINDOW) {
+ itemX += winItemExtra;
+ itemY += winItemExtra;
+ }
+
+ Tix_DItemDisplay(pixmap, hPtr->iPtr,
+ itemX, itemY,
+ wPtr->actualSize[i].width - 2*hPtr->borderWidth,
+ wPtr->headerHeight - 2*hPtr->borderWidth,
+ 0, 0,
+ TIX_DITEM_NORMAL_FG);
+
+ if (wPtr->needToRaise &&
+ Tix_DItemType(hPtr->iPtr) == TIX_DITEM_WINDOW) {
+ TixWindowItem * wiPtr;
+
+ wiPtr = (TixWindowItem *)hPtr->iPtr;
+ if (Tk_WindowId(wiPtr->tkwin) == None) {
+ Tk_MakeWindowExist(wiPtr->tkwin);
+ }
+
+ XRaiseWindow(Tk_Display(wiPtr->tkwin),
+ Tk_WindowId(wiPtr->tkwin));
+ }
+ }
+
+ x += width;
+ drawnWidth += width;
+
+#if 0
+ /* %% funny, doesn't work */
+ if (drawnWidth >= hdrW) {
+ /* The rest is invisible. Don't bother to draw */
+ break;
+ }
+#endif
+ }
+
+ wPtr->needToRaise = 0;
+}
+
+void Tix_HLComputeHeaderGeometry(wPtr)
+ WidgetPtr wPtr;
+{
+ int i;
+
+ wPtr->headerHeight = 0;
+
+ for (i=0; i<wPtr->numColumns; i++) {
+ int height;
+ int width;
+
+ if (wPtr->headers[i]->iPtr) {
+ width = Tix_DItemWidth (wPtr->headers[i]->iPtr);
+ height = Tix_DItemHeight(wPtr->headers[i]->iPtr);
+ } else {
+ width = 0;
+ height = 0;
+ }
+
+ width += wPtr->headers[i]->borderWidth * 2;
+ height += wPtr->headers[i]->borderWidth * 2;
+
+ wPtr->headers[i]->width = width;
+
+ if (height > wPtr->headerHeight) {
+ wPtr->headerHeight = height;
+ }
+ }
+
+ wPtr->headerDirty = 0;
+}
+
+/*----------------------------------------------------------------------
+ * "header" sub command
+ *----------------------------------------------------------------------
+ */
+int
+Tix_HLHeader(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "cget", 2, 2, Tix_HLHdrCGet,
+ "column option"},
+ {TIX_DEFAULT_LEN, "configure", 1, TIX_VAR_ARGS, Tix_HLHdrConfig,
+ "column ?option? ?value ...?"},
+ {TIX_DEFAULT_LEN, "create", 1, TIX_VAR_ARGS, Tix_HLHdrCreate,
+ "column ?option value ...?"},
+ {TIX_DEFAULT_LEN, "delete", 1, 1, Tix_HLHdrDelete,
+ "column"},
+ {TIX_DEFAULT_LEN, "exist", 1, 1, Tix_HLHdrExist,
+ "column"},
+ {TIX_DEFAULT_LEN, "size", 1, 1, Tix_HLHdrSize,
+ "column"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+/*----------------------------------------------------------------------
+ * "header cget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLHdrCGet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListHeader * hPtr;
+
+ if ((hPtr=Tix_HLGetHeader(interp, wPtr, argv[0], 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ return Tix_ConfigureValue2(interp, wPtr->dispData.tkwin,
+ (char*)hPtr, headerConfigSpecs, hPtr->iPtr, argv[1], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "header configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLHdrConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListHeader * hPtr;
+
+ if ((hPtr=Tix_HLGetHeader(interp, wPtr, argv[0], 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc == 1) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)hPtr, headerConfigSpecs, hPtr->iPtr,
+ (char *) NULL, 0);
+ } else if (argc == 2) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)hPtr, headerConfigSpecs, hPtr->iPtr,
+ (char *) argv[1], 0);
+ } else {
+ int sizeChanged = 0;
+
+ if (Tix_WidgetConfigure2(interp, wPtr->dispData.tkwin,
+ (char*)hPtr, headerConfigSpecs, hPtr->iPtr,
+ argc-1, argv+1, TK_CONFIG_ARGV_ONLY, 0, &sizeChanged) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (sizeChanged) {
+ wPtr->headerDirty = 1;
+ Tix_HLResizeWhenIdle(wPtr);
+ }
+ return TCL_OK;
+ }
+}
+
+
+/*----------------------------------------------------------------------
+ * "header create" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLHdrCreate(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListHeader * hPtr;
+ int i;
+ Tix_DItem * iPtr;
+ CONST84 char * ditemType = NULL;
+
+ if ((hPtr=Tix_HLGetHeader(interp, wPtr, argv[0], 0)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if ((argc %2) == 0) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ return TCL_ERROR;
+ }
+ for (i=1; i<argc; i+=2) {
+ if (strncmp(argv[i], "-itemtype", strlen(argv[i])) == 0) {
+ ditemType = argv[i+1];
+ }
+ }
+ if (ditemType == NULL) {
+ ditemType = wPtr->diTypePtr->name;
+ }
+
+ iPtr = Tix_DItemCreate(&wPtr->dispData, ditemType);
+ if (iPtr == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tix_DItemType(iPtr) == TIX_DITEM_WINDOW) {
+ wPtr->needToRaise = 1;
+ }
+
+ /*
+ * mark clientData to NULL. This will tell DItemSizeChanged()
+ * that ths item belongs to the header
+ */
+ iPtr->base.clientData = (ClientData)hPtr;
+
+ if (hPtr->iPtr != NULL) {
+ if (Tix_DItemType(hPtr->iPtr) == TIX_DITEM_WINDOW) {
+ FreeWindowItem(interp, wPtr, hPtr);
+ }
+ Tix_DItemFree(hPtr->iPtr);
+ }
+ hPtr->iPtr = iPtr;
+
+ if (Tix_WidgetConfigure2(wPtr->dispData.interp, wPtr->dispData.tkwin,
+ (char*)hPtr, headerConfigSpecs, hPtr->iPtr, argc-1, argv+1, 0,
+ 1, NULL) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+
+ wPtr->headerDirty = 1;
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * "header delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLHdrDelete(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListHeader * hPtr;
+
+ if ((hPtr=Tix_HLGetHeader(interp, wPtr, argv[0], 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (Tix_DItemType(hPtr->iPtr) == TIX_DITEM_WINDOW) {
+ FreeWindowItem(interp, wPtr, hPtr);
+ }
+
+ /* Free the item and leave a blank! */
+ Tix_DItemFree(hPtr->iPtr);
+ hPtr->iPtr = NULL;
+
+ wPtr->headerDirty = 1;
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * "header exist" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLHdrExist(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListHeader * hPtr;
+
+ if ((hPtr=Tix_HLGetHeader(interp, wPtr, argv[0], 0)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (hPtr->iPtr == NULL) {
+ Tcl_AppendResult(interp, "0", NULL);
+ } else {
+ Tcl_AppendResult(interp, "1", NULL);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "header size" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLHdrSize(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListHeader * hPtr;
+ char buff[128];
+
+ if ((hPtr=Tix_HLGetHeader(interp, wPtr, argv[0], 1)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (hPtr->iPtr == NULL) {
+ Tcl_AppendResult(interp, "entry \"", argv[0],
+ "\" does not have a header", (char*)NULL);
+ return TCL_ERROR;
+ }
+ sprintf(buff, "%d %d",
+ Tix_DItemWidth(hPtr->iPtr),
+ Tix_DItemHeight(hPtr->iPtr));
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixHLInd.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixHLInd.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,281 @@
+
+/* $Id: tixHLInd.c,v 1.2 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixHLInd.c ---
+ *
+ * Implements indicators inside tixHList widgets
+ *
+ * Copyright (c) 1994-1995 Ioi Kim Lam. All rights reserved.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixHList.h>
+
+static TIX_DECLARE_SUBCMD(Tix_HLIndCreate);
+static TIX_DECLARE_SUBCMD(Tix_HLIndConfig);
+static TIX_DECLARE_SUBCMD(Tix_HLIndCGet);
+static TIX_DECLARE_SUBCMD(Tix_HLIndDelete);
+static TIX_DECLARE_SUBCMD(Tix_HLIndExists);
+static TIX_DECLARE_SUBCMD(Tix_HLIndSize);
+
+
+/*----------------------------------------------------------------------
+ * "indicator" sub command
+ *----------------------------------------------------------------------
+ */
+int
+Tix_HLIndicator(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "cget", 2, 2, Tix_HLIndCGet,
+ "entryPath option"},
+ {TIX_DEFAULT_LEN, "configure", 1, TIX_VAR_ARGS, Tix_HLIndConfig,
+ "entryPath ?option? ?value ...?"},
+ {TIX_DEFAULT_LEN, "create", 1, TIX_VAR_ARGS, Tix_HLIndCreate,
+ "entryPath ?option value ...?"},
+ {TIX_DEFAULT_LEN, "delete", 1, 1, Tix_HLIndDelete,
+ "entryPath"},
+ {TIX_DEFAULT_LEN, "exists", 1, 1, Tix_HLIndExists,
+ "entryPath"},
+ {TIX_DEFAULT_LEN, "size", 1, 1, Tix_HLIndSize,
+ "entryPath"},
+ };
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? ?arg ...?",
+ };
+
+ return Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc+1, argv-1);
+}
+
+/*----------------------------------------------------------------------
+ * "indicator cget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLIndCGet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->indicator == NULL) {
+ Tcl_AppendResult(interp, "entry \"", argv[0],
+ "\" does not have an indicator", (char*)NULL);
+ return TCL_ERROR;
+ }
+ return Tk_ConfigureValue(interp, wPtr->dispData.tkwin,
+ chPtr->indicator->base.diTypePtr->itemConfigSpecs,
+ (char *)chPtr->indicator, argv[1], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "indicator configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLIndConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->indicator == NULL) {
+ Tcl_AppendResult(interp, "entry \"", argv[0],
+ "\" does not have an indicator", (char*)NULL);
+ return TCL_ERROR;
+ }
+ if (argc == 1) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin,
+ chPtr->indicator->base.diTypePtr->itemConfigSpecs,
+ (char *)chPtr->indicator, NULL, 0);
+ } else if (argc == 2) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin,
+ chPtr->indicator->base.diTypePtr->itemConfigSpecs,
+ (char *)chPtr->indicator, argv[1], 0);
+ } else {
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return Tix_DItemConfigure(chPtr->indicator,
+ argc-1, argv+1, TK_CONFIG_ARGV_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "indicator create" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLIndCreate(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int i;
+ size_t len;
+ Tix_DItem * iPtr;
+ CONST84 char * ditemType = NULL;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if ((argc %2) == 0) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ return TCL_ERROR;
+ }
+ for (i=1; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-itemtype", len) == 0) {
+ ditemType = argv[i+1];
+ }
+ }
+ if (ditemType == NULL) {
+ ditemType = wPtr->diTypePtr->name;
+ }
+
+ iPtr = Tix_DItemCreate(&wPtr->dispData, ditemType);
+ if (iPtr == NULL) {
+ return TCL_ERROR;
+ }
+ if (Tix_DItemType(iPtr) == TIX_DITEM_WINDOW) {
+ wPtr->needToRaise = 1;
+ }
+
+ iPtr->base.clientData = (ClientData)chPtr;
+ if (Tix_DItemConfigure(iPtr, argc-1, argv+1, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (chPtr->indicator != NULL) {
+ if (Tix_DItemType(chPtr->indicator) == TIX_DITEM_WINDOW) {
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->indicator);
+ }
+ Tix_DItemFree(chPtr->indicator);
+ }
+ chPtr->indicator = iPtr;
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * "indicator delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLIndDelete(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->indicator == NULL) {
+ Tcl_AppendResult(interp, "entry \"", argv[0],
+ "\" does not have an indicator", (char*)NULL);
+ return TCL_ERROR;
+ }
+
+ if (Tix_DItemType(chPtr->indicator) == TIX_DITEM_WINDOW) {
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->indicator);
+ }
+
+ /* Free the item and leave a blank! */
+
+ Tix_DItemFree(chPtr->indicator);
+ chPtr->indicator = NULL;
+
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ * "indicator exists" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLIndExists(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->indicator == NULL) {
+ Tcl_AppendResult(interp, "0", NULL);
+ } else {
+ Tcl_AppendResult(interp, "1", NULL);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "indicator size" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLIndSize(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ char buff[100];
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->indicator == NULL) {
+ Tcl_AppendResult(interp, "entry \"", argv[0],
+ "\" does not have an indicator", (char*)NULL);
+ return TCL_ERROR;
+ }
+ sprintf(buff, "%d %d",
+ Tix_DItemWidth(chPtr->indicator),
+ Tix_DItemHeight(chPtr->indicator));
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixHList.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixHList.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,4452 @@
+/*
+ * tixHList.c --
+ *
+ * This module implements "HList" widgets.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixHList.c,v 1.9 2004/03/28 02:44:56 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixHList.h>
+#include <tixDef.h>
+
+/*
+ * Information used for argv parsing.
+ */
+
+static Tk_ConfigSpec configSpecs[] = {
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ DEF_HLIST_BG_COLOR, Tk_Offset(WidgetRecord, normalBg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ DEF_HLIST_BG_MONO, Tk_Offset(WidgetRecord, normalBg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
+ DEF_HLIST_BORDER_WIDTH, Tk_Offset(WidgetRecord, borderWidth), 0},
+
+ {TK_CONFIG_STRING, "-browsecmd", "browseCmd", "BrowseCmd",
+ DEF_HLIST_BROWSE_COMMAND, Tk_Offset(WidgetRecord, browseCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_INT, "-columns", "columns", "Columns",
+ DEF_HLIST_COLUMNS, Tk_Offset(WidgetRecord, numColumns),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-command", "command", "Command",
+ DEF_HLIST_COMMAND, Tk_Offset(WidgetRecord, command),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
+ DEF_HLIST_CURSOR, Tk_Offset(WidgetRecord, cursor),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-dragcmd", "dragCmd", "DragCmd",
+ DEF_HLIST_DRAG_COMMAND, Tk_Offset(WidgetRecord, dragCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_BOOLEAN, "-drawbranch", "drawBranch", "DrawBranch",
+ DEF_HLIST_DRAW_BRANCH, Tk_Offset(WidgetRecord, drawBranch), 0},
+
+ {TK_CONFIG_STRING, "-dropcmd", "dropCmd", "DropCmd",
+ DEF_HLIST_DROP_COMMAND, Tk_Offset(WidgetRecord, dropCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_HLIST_FONT, Tk_Offset(WidgetRecord, font), 0},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_HLIST_FG_COLOR, Tk_Offset(WidgetRecord, normalFg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_HLIST_FG_MONO, Tk_Offset(WidgetRecord, normalFg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-gap", "gap", "Gap",
+ DEF_HLIST_GAP, Tk_Offset(WidgetRecord, gap), 0},
+
+ {TK_CONFIG_BOOLEAN, "-header", "header", "Header",
+ DEF_HLIST_HEADER, Tk_Offset(WidgetRecord, useHeader), 0},
+
+ {TK_CONFIG_INT, "-height", "height", "Height",
+ DEF_HLIST_HEIGHT, Tk_Offset(WidgetRecord, height), 0},
+
+ {TK_CONFIG_BORDER, "-highlightbackground", "highlightBackground",
+ "HighlightBackground",
+ DEF_HLIST_BG_COLOR, Tk_Offset(WidgetRecord, border),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-highlightbackground", "highlightBackground",
+ "HighlightBackground",
+ DEF_HLIST_BG_MONO, Tk_Offset(WidgetRecord, border),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
+ DEF_HLIST_HIGHLIGHT_COLOR, Tk_Offset(WidgetRecord, highlightColorPtr),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
+ DEF_HLIST_HIGHLIGHT_MONO, Tk_Offset(WidgetRecord, highlightColorPtr),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
+ "HighlightThickness",
+ DEF_HLIST_HIGHLIGHT_WIDTH, Tk_Offset(WidgetRecord, highlightWidth), 0},
+
+ {TK_CONFIG_PIXELS, "-indent", "indent", "Indent",
+ DEF_HLIST_INDENT, Tk_Offset(WidgetRecord, indent), 0},
+
+ {TK_CONFIG_BOOLEAN, "-indicator", "indicator", "Indicator",
+ DEF_HLIST_INDICATOR, Tk_Offset(WidgetRecord, useIndicator), 0},
+
+ {TK_CONFIG_STRING, "-indicatorcmd", "indicatorCmd", "IndicatorCmd",
+ DEF_HLIST_INDICATOR_CMD, Tk_Offset(WidgetRecord, indicatorCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_HLIST_ITEM_TYPE, Tk_Offset(WidgetRecord, diTypePtr),
+ 0, &tixConfigItemType},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_HLIST_PADX, Tk_Offset(WidgetRecord, padX), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_HLIST_PADY, Tk_Offset(WidgetRecord, padY), 0},
+
+ {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
+ DEF_HLIST_RELIEF, Tk_Offset(WidgetRecord, relief), 0},
+
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_HLIST_SELECT_BG_COLOR, Tk_Offset(WidgetRecord, selectBorder),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_HLIST_SELECT_BG_MONO, Tk_Offset(WidgetRecord, selectBorder),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth","BorderWidth",
+ DEF_HLIST_SELECT_BORDERWIDTH,Tk_Offset(WidgetRecord, selBorderWidth),0},
+
+ {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
+ DEF_HLIST_SELECT_FG_COLOR, Tk_Offset(WidgetRecord, selectFg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
+ DEF_HLIST_SELECT_FG_MONO, Tk_Offset(WidgetRecord, selectFg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_UID, "-selectmode", "selectMode", "SelectMode",
+ DEF_HLIST_SELECT_MODE, Tk_Offset(WidgetRecord, selectMode), 0},
+
+ {TK_CONFIG_STRING, "-separator", "separator", "Separator",
+ DEF_HLIST_SEPARATOR, Tk_Offset(WidgetRecord, separator), 0},
+
+ {TK_CONFIG_STRING, "-sizecmd", "sizeCmd", "SizeCmd",
+ DEF_HLIST_SIZE_COMMAND, Tk_Offset(WidgetRecord, sizeCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
+ DEF_HLIST_TAKE_FOCUS, Tk_Offset(WidgetRecord, takeFocus),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_BOOLEAN, "-wideselection", "wideSelection", "WideSelection",
+ DEF_HLIST_WIDE_SELECT, Tk_Offset(WidgetRecord, wideSelect), 0},
+
+ {TK_CONFIG_INT, "-width", "width", "Width",
+ DEF_HLIST_WIDTH, Tk_Offset(WidgetRecord, width), 0},
+
+ {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
+ DEF_HLIST_X_SCROLL_COMMAND, Tk_Offset(WidgetRecord, xScrollCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
+ DEF_HLIST_Y_SCROLL_COMMAND, Tk_Offset(WidgetRecord, yScrollCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec entryConfigSpecs[] = {
+ {TK_CONFIG_STRING, "-data", (char *) NULL, (char *) NULL,
+ DEF_HLISTENTRY_DATA, Tk_Offset(HListElement, data), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_UID, "-state", (char*)NULL, (char*)NULL,
+ DEF_HLISTENTRY_STATE, Tk_Offset(HListElement, state), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+ /* These are standard procedures for TK widgets
+ * implemeted in C
+ */
+
+static void WidgetCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static int WidgetConfigure _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, CONST84 char **argv,
+ int flags));
+static void WidgetDestroy _ANSI_ARGS_((ClientData clientData));
+static void WidgetEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static int WidgetCommand _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *, int argc, CONST84 char **argv));
+static void WidgetDisplay _ANSI_ARGS_((ClientData clientData));
+
+ /* Extra procedures for this widget
+ */
+static HListElement * AllocElement _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * parent, CONST84 char * pathName,
+ CONST84 char * name, CONST84 char * ditemType));
+static void AppendList _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement *parent, HListElement *chPtr, int at,
+ HListElement *afterPtr,
+ HListElement *beforePtr));
+static void CancelRedrawWhenIdle _ANSI_ARGS_((
+ WidgetPtr wPtr));
+static void CheckScrollBar _ANSI_ARGS_((WidgetPtr wPtr,
+ int which));
+static void ComputeBranchPosition _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement *chPtr));
+static void ComputeElementGeometry _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement *chPtr, int indent));
+static void ComputeOneElementGeometry _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement *chPtr, int indent));
+static int ConfigElement _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement *chPtr, int argc, CONST84 char ** argv,
+ int flags, int forced));
+static int CurSelection _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, HListElement * chPtr));
+static void DeleteNode _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static void DeleteOffsprings _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static void DeleteSiblings _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static void DrawElements _ANSI_ARGS_((WidgetPtr wPtr,
+ Drawable drawable, HListElement * chPtr,
+ int x, int y, int xOffset));
+static void DrawOneElement _ANSI_ARGS_((WidgetPtr wPtr,
+ Drawable drawable, HListElement * chPtr,
+ int x, int y, int xOffset));
+static HListElement * FindElementAtPosition _ANSI_ARGS_((WidgetPtr wPtr,
+ int y));
+static HListElement * FindNextEntry _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static HListElement * FindPrevEntry _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static void FreeElement _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static HListElement * NewElement _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, CONST84 char ** argv,
+ CONST84 char * pathName, CONST84 char * defParentName,
+ int * newArgc));
+static void RedrawWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+static int XScrollByPages _ANSI_ARGS_((WidgetPtr wPtr,
+ int count));
+static int XScrollByUnits _ANSI_ARGS_((WidgetPtr wPtr,
+ int count));
+static int YScrollByPages _ANSI_ARGS_((WidgetPtr wPtr,
+ int count));
+static int YScrollByUnits _ANSI_ARGS_((WidgetPtr wPtr,
+ int count));
+static int SelectionModifyRange _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * from, HListElement * to,
+ int select));
+static void SelectionAdd _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static void HL_SelectionClear _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr));
+static void HL_SelectionClearAll _ANSI_ARGS_((WidgetPtr wPtr,
+ HListElement * chPtr, int *changed_ret));
+static void HL_SelectionClearNotifyAncestors _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement * chPtr));
+static void SelectionNotifyAncestors _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement * chPtr));
+static void UpdateOneScrollBar _ANSI_ARGS_((WidgetPtr wPtr,
+ CONST84 char * command, int total, int window, int first));
+static void UpdateScrollBars _ANSI_ARGS_((WidgetPtr wPtr,
+ int sizeChanged));
+static void DItemSizeChangedProc _ANSI_ARGS_((
+ Tix_DItem *iPtr));
+static void SubWindowEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static void GetScrollFractions _ANSI_ARGS_((int total,
+ int window, int first, double * first_ret,
+ double * last_ret));
+static int Tix_HLSeeElement _ANSI_ARGS_((
+ WidgetPtr wPtr, HListElement * chPtr,
+ int callRedraw));
+static int Tix_HLBBox _ANSI_ARGS_((Tcl_Interp * interp,
+ WidgetPtr wPtr, HListElement * chPtr));
+
+static TIX_DECLARE_SUBCMD(Tix_HLAdd);
+static TIX_DECLARE_SUBCMD(Tix_HLAddChild);
+static TIX_DECLARE_SUBCMD(Tix_HLCGet);
+static TIX_DECLARE_SUBCMD(Tix_HLConfig);
+static TIX_DECLARE_SUBCMD(Tix_HLDelete);
+static TIX_DECLARE_SUBCMD(Tix_HLEntryCget);
+static TIX_DECLARE_SUBCMD(Tix_HLEntryConfig);
+static TIX_DECLARE_SUBCMD(Tix_HLGeometryInfo);
+static TIX_DECLARE_SUBCMD(Tix_HLHide);
+static TIX_DECLARE_SUBCMD(Tix_HLInfo);
+static TIX_DECLARE_SUBCMD(Tix_HLNearest);
+static TIX_DECLARE_SUBCMD(Tix_HLSee);
+static TIX_DECLARE_SUBCMD(Tix_HLSelection);
+static TIX_DECLARE_SUBCMD(Tix_HLSetSite);
+static TIX_DECLARE_SUBCMD(Tix_HLShow);
+static TIX_DECLARE_SUBCMD(Tix_HLXView);
+static TIX_DECLARE_SUBCMD(Tix_HLYView);
+
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_HListCmd --
+ *
+ * This procedure is invoked to process the "HList" Tcl
+ * command. It creates a new "HList" widget.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * A new widget is created and configured.
+ *
+ *--------------------------------------------------------------
+ */
+int
+Tix_HListCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window mainwin = (Tk_Window) clientData;
+ WidgetPtr wPtr;
+ Tk_Window tkwin, subwin;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " pathName ?options?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ /*
+ * Allocate the main window for this window. Then allocate a subwindow
+ * to act as the header. The subwidget will always be raised to the top
+ * so that it won't be obscured by any window items
+ */
+ tkwin = Tk_CreateWindowFromPath(interp, mainwin, argv[1], (char *) NULL);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+ subwin = Tix_CreateSubWindow(interp, tkwin, "header");
+ if (subwin == NULL) {
+ Tk_DestroyWindow(tkwin);
+ return TCL_ERROR;
+ }
+
+ Tk_SetClass(tkwin, "TixHList");
+ Tk_SetClass(subwin, "TixHListHeader");
+
+ /*
+ * Allocate and initialize the widget record.
+ */
+ wPtr = (WidgetPtr) ckalloc(sizeof(WidgetRecord));
+
+ /* Init the hash table first (needed before calling AllocElement) */
+ Tcl_InitHashTable(&wPtr->childTable, TCL_STRING_KEYS);
+
+ wPtr->dispData.tkwin = tkwin;
+ wPtr->dispData.display = Tk_Display(tkwin);
+ wPtr->dispData.interp = interp;
+ wPtr->dispData.sizeChangedProc = DItemSizeChangedProc;
+ wPtr->font = NULL;
+ wPtr->normalBg = NULL;
+ wPtr->normalFg = NULL;
+ wPtr->border = NULL;
+ wPtr->borderWidth = 0;
+ wPtr->selectBorder = NULL;
+ wPtr->selBorderWidth = 0;
+ wPtr->selectFg = NULL;
+ wPtr->backgroundGC = None;
+ wPtr->normalGC = None;
+ wPtr->selectGC = None;
+ wPtr->anchorGC = None;
+ wPtr->dropSiteGC = None;
+ wPtr->highlightWidth = 0;
+ wPtr->highlightColorPtr = NULL;
+ wPtr->highlightGC = None;
+ wPtr->relief = TK_RELIEF_FLAT;
+ wPtr->cursor = None;
+ wPtr->indent = 0;
+ wPtr->resizing = 0;
+ wPtr->redrawing = 0;
+ wPtr->hasFocus = 0;
+ wPtr->topPixel = 0;
+ wPtr->leftPixel = 0;
+ wPtr->separator = NULL;
+ wPtr->selectMode = NULL;
+ wPtr->anchor = NULL;
+ wPtr->dragSite = NULL;
+ wPtr->dropSite = NULL;
+ wPtr->command = NULL;
+ wPtr->browseCmd = NULL;
+ wPtr->sizeCmd = NULL;
+ wPtr->dragCmd = NULL;
+ wPtr->dropCmd = NULL;
+ wPtr->takeFocus = NULL;
+ wPtr->xScrollCmd = NULL;
+ wPtr->yScrollCmd = NULL;
+ wPtr->scrollUnit[0] = 1;
+ wPtr->scrollUnit[1] = 1;
+ wPtr->serial = 0;
+ wPtr->numColumns = 1;
+ wPtr->initialized = 0;
+ wPtr->allDirty = 0;
+ wPtr->headerDirty = 0;
+ wPtr->needToRaise = 0;
+ wPtr->drawBranch = 1;
+ wPtr->wideSelect = 0;
+ wPtr->diTypePtr = NULL;
+ wPtr->reqSize = NULL;
+ wPtr->actualSize = NULL;
+ wPtr->root = NULL;
+ wPtr->totalSize[0] = 1;
+ wPtr->totalSize[1] = 1;
+ wPtr->useIndicator = 0;
+ wPtr->indicatorCmd = NULL;
+ wPtr->headers = NULL;
+ wPtr->useHeader = 0;
+ wPtr->headerHeight = 0;
+ wPtr->headerWin = subwin;
+ wPtr->elmToSee = 0;
+
+ Tix_LinkListInit(&wPtr->mappedWindows);
+
+ Tk_CreateEventHandler(wPtr->dispData.tkwin,
+ ExposureMask|StructureNotifyMask|FocusChangeMask,
+ WidgetEventProc, (ClientData) wPtr);
+ Tk_CreateEventHandler(wPtr->headerWin,
+ ExposureMask|StructureNotifyMask,
+ SubWindowEventProc, (ClientData) wPtr);
+
+ wPtr->widgetCmd = Tcl_CreateCommand(interp,
+ Tk_PathName(wPtr->dispData.tkwin), WidgetCommand, (ClientData) wPtr,
+ WidgetCmdDeletedProc);
+ if (WidgetConfigure(interp, wPtr, argc-2, argv+2, 0) != TCL_OK) {
+ Tk_DestroyWindow(wPtr->dispData.tkwin);
+ return TCL_ERROR;
+ }
+ if (Tix_HLCreateHeaders(interp, wPtr) != TCL_OK) {
+ Tk_DestroyWindow(wPtr->dispData.tkwin);
+ return TCL_ERROR;
+ }
+
+ /* Must call this **after** wPtr->numColumns is set */
+ wPtr->reqSize = Tix_HLAllocColumn(wPtr, NULL);
+ wPtr->actualSize = Tix_HLAllocColumn(wPtr, NULL);
+ wPtr->root = AllocElement(wPtr, 0, 0, 0, 0);
+
+ wPtr->initialized = 1;
+
+ interp->result = Tk_PathName(wPtr->dispData.tkwin);
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetCommand --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+
+static int
+WidgetCommand(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about the widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int code;
+
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "add", 1, TIX_VAR_ARGS, Tix_HLAdd,
+ "entryPath"},
+ {TIX_DEFAULT_LEN, "addchild", 1, TIX_VAR_ARGS, Tix_HLAddChild,
+ "parentEntryPath"},
+ {TIX_DEFAULT_LEN, "anchor", 1, 2, Tix_HLSetSite,
+ "option ?entryPath?"},
+ {TIX_DEFAULT_LEN, "cget", 1, 1, Tix_HLCGet,
+ "option"},
+ {TIX_DEFAULT_LEN, "column", 0, TIX_VAR_ARGS, Tix_HLColumn,
+ "?option? ?args ...?"},
+ {TIX_DEFAULT_LEN, "configure", 0, TIX_VAR_ARGS, Tix_HLConfig,
+ "?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "delete", 1, 2, Tix_HLDelete,
+ "option ?entryPath?"},
+ {TIX_DEFAULT_LEN, "dragsite", 1, 2, Tix_HLSetSite,
+ "option ?entryPath?"},
+ {TIX_DEFAULT_LEN, "dropsite", 1, 2, Tix_HLSetSite,
+ "option ?entryPath?"},
+ {TIX_DEFAULT_LEN, "entrycget", 2, 2, Tix_HLEntryCget,
+ "entryPath option"},
+ {TIX_DEFAULT_LEN, "entryconfigure", 1, TIX_VAR_ARGS, Tix_HLEntryConfig,
+ "entryPath ?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "geometryinfo", 0, 2, Tix_HLGeometryInfo,
+ "?width height?"},
+ {TIX_DEFAULT_LEN, "header", 1, TIX_VAR_ARGS, Tix_HLHeader,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "hide", 2, 2, Tix_HLHide,
+ "option entryPath"},
+ {TIX_DEFAULT_LEN, "item", 0, TIX_VAR_ARGS, Tix_HLItem,
+ "?option? ?args ...?"},
+ {TIX_DEFAULT_LEN, "indicator", 1, TIX_VAR_ARGS, Tix_HLIndicator,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "info", 1, TIX_VAR_ARGS, Tix_HLInfo,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "nearest", 1, 1, Tix_HLNearest,
+ "y"},
+ {TIX_DEFAULT_LEN, "see", 1, 1, Tix_HLSee,
+ "entryPath"},
+ {TIX_DEFAULT_LEN, "selection", 1, 3, Tix_HLSelection,
+ "option arg ?arg ...?"},
+ {TIX_DEFAULT_LEN, "show", 2, 2, Tix_HLShow,
+ "option entryPath"},
+ {TIX_DEFAULT_LEN, "xview", 0, 3, Tix_HLXView,
+ "args"},
+ {TIX_DEFAULT_LEN, "yview", 0, 3, Tix_HLYView,
+ "args"},
+ };
+
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? arg ?arg ...?",
+ };
+
+ Tk_Preserve(clientData);
+ code = Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc, argv);
+ Tk_Release(clientData);
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * "add" sub command --
+ *
+ * Add a new item into the list
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLAdd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ CONST84 char * pathName = argv[0];
+
+ argc --;
+ argv ++;
+
+ if ((chPtr = NewElement(interp, wPtr, argc, argv, pathName,
+ NULL, &argc)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc > 0) {
+ if (ConfigElement(wPtr, chPtr, argc, argv, 0, 1) != TCL_OK) {
+ DeleteNode(wPtr, chPtr);
+ return TCL_ERROR;
+ }
+ } else {
+ if (Tix_DItemConfigure(chPtr->col[0].iPtr, 0, 0, 0) != TCL_OK) {
+ DeleteNode(wPtr, chPtr);
+ return TCL_ERROR;
+ }
+ }
+
+ Tcl_AppendResult(interp, chPtr->pathName, NULL);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "addchild" sub command --
+ *
+ * Replacement for "add" sub command: it is more flexible and
+ * you can have default names for entries.
+ *
+ * Add a new item into the list
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLAddChild(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ CONST84 char * parentName;
+
+ parentName = argv[0];
+ if (argv[0] && strcmp(argv[0], "") == 0) {
+ parentName = NULL;
+ }
+
+ argc --;
+ argv ++;
+ if ((chPtr = NewElement(interp, wPtr, argc, argv, NULL,
+ parentName, &argc)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc > 0) {
+ if (ConfigElement(wPtr, chPtr, argc, argv, 0, 1) != TCL_OK) {
+ DeleteNode(wPtr, chPtr);
+ return TCL_ERROR;
+ }
+ } else {
+ if (Tix_DItemConfigure(chPtr->col[0].iPtr, 0, 0, 0) != TCL_OK) {
+ DeleteNode(wPtr, chPtr);
+ return TCL_ERROR;
+ }
+ }
+
+ Tcl_AppendResult(interp, chPtr->pathName, NULL);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "anchor", "dragsite" and "dropsire" sub commands --
+ *
+ * Set/remove the anchor element
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLSetSite(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int changed = 0;
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ HListElement ** changePtr;
+ size_t len ;
+
+ /*
+ * Determine which site should be changed.
+ */
+ len = strlen(argv[-1]);
+ if (strncmp(argv[-1], "anchor", len)==0) {
+ changePtr = &wPtr->anchor;
+ }
+ else if (strncmp(argv[-1], "dragsite", len)==0) {
+ changePtr = &wPtr->dragSite;
+ }
+ else {
+ changePtr = &wPtr->dropSite;
+ }
+
+ len = strlen(argv[0]);
+ if (strncmp(argv[0], "set", len)==0) {
+ if (argc == 2) {
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (*changePtr != chPtr) {
+ *changePtr = chPtr;
+ changed = 1;
+ }
+ } else {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ Tk_PathName(wPtr->dispData.tkwin), " ", argv[-1],
+ " set entryPath", NULL);
+ return TCL_ERROR;
+ }
+ }
+ else if (strncmp(argv[0], "clear", len)==0) {
+ if (*changePtr != NULL) {
+ *changePtr = NULL;
+ changed = 1;
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "wrong option \"", argv[0], "\", ",
+ "must be clear or set", NULL);
+ return TCL_ERROR;
+ }
+
+ if (changed) {
+ RedrawWhenIdle(wPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "cget" sub command --
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLCGet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ return Tk_ConfigureValue(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *)wPtr, argv[0], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (argc == 0) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *) wPtr, (char *) NULL, 0);
+ } else if (argc == 1) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *) wPtr, argv[0], 0);
+ } else {
+ return WidgetConfigure(interp, wPtr, argc, argv,
+ TK_CONFIG_ARGV_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLDelete(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ size_t len;
+
+ if (strcmp(argv[0], "all") == 0) {
+ Tix_HLMarkElementDirty(wPtr, wPtr->root);
+ DeleteOffsprings(wPtr, wPtr->root);
+
+ Tix_HLResizeWhenIdle(wPtr);
+ return TCL_OK;
+ }
+ len = strlen(argv[0]);
+
+ if (argc != 2) {
+ if ((strncmp(argv[0], "entry", len) == 0) ||
+ (strncmp(argv[0], "offsprings", len) == 0) ||
+ (strncmp(argv[0], "siblings", len) == 0)) {
+
+ goto wrong_arg;
+ }
+ else {
+ goto wrong_option;
+ }
+ }
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (strncmp(argv[0], "entry", len) == 0) {
+ Tix_HLMarkElementDirty(wPtr, chPtr->parent);
+ DeleteNode(wPtr, chPtr);
+ }
+ else if (strncmp(argv[0], "offsprings", len) == 0) {
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ DeleteOffsprings(wPtr, chPtr);
+ }
+ else if (strncmp(argv[0], "siblings", len) == 0) {
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ DeleteSiblings(wPtr, chPtr);
+ }
+ else {
+ goto wrong_arg;
+ }
+
+ Tix_HLResizeWhenIdle(wPtr);
+ return TCL_OK;
+
+wrong_arg:
+
+ Tcl_AppendResult(interp,
+ "wrong # of arguments, should be pathName delete ", argv[0],
+ " entryPath", NULL);
+ return TCL_ERROR;
+
+wrong_option:
+
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\" must be all, entry, offsprings or siblings", NULL);
+ return TCL_ERROR;
+
+}
+
+/*----------------------------------------------------------------------
+ * "entrycget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLEntryCget(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->col[0].iPtr == NULL) {
+ Tcl_AppendResult(interp, "Item \"", argv[0],
+ "\" does not exist", (char*)NULL);
+ return TCL_ERROR;
+ }
+ return Tix_ConfigureValue2(interp, wPtr->dispData.tkwin, (char *)chPtr,
+ entryConfigSpecs, chPtr->col[0].iPtr, argv[1], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "entryconfigure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLEntryConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (argc == 1) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->col[0].iPtr,
+ (char *) NULL, 0);
+ } else if (argc == 2) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->col[0].iPtr,
+ (char *) argv[1], 0);
+ } else {
+ return ConfigElement(wPtr, chPtr, argc-1, argv+1,
+ TK_CONFIG_ARGV_ONLY, 0);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "geometryinfo" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLGeometryInfo(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int qSize[2];
+ double first[2], last[2];
+ char string[80];
+
+ if (argc == 2) {
+ if (Tcl_GetInt(interp, argv[0], &qSize[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &qSize[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ qSize[0] = Tk_Width (wPtr->dispData.tkwin);
+ qSize[1] = Tk_Height(wPtr->dispData.tkwin);
+ }
+ qSize[0] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ qSize[1] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+
+ if (wPtr->useHeader) {
+ qSize[1] -= wPtr->headerHeight;
+ }
+
+ GetScrollFractions(wPtr->totalSize[0], qSize[0], wPtr->leftPixel,
+ &first[0], &last[0]);
+ GetScrollFractions(wPtr->totalSize[1], qSize[1], wPtr->topPixel,
+ &first[1], &last[1]);
+
+ sprintf(string, "{%f %f} {%f %f}", first[0], last[0], first[1], last[1]);
+ Tcl_AppendResult(interp, string, NULL);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "hide" sub command
+ *----------------------------------------------------------------------
+ */
+
+/* %% ToDo: implement the siblings ... etc options, to match those of "delete"
+ */
+static int
+Tix_HLHide(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tix_HLMarkElementDirty(wPtr, chPtr->parent);
+ chPtr->hidden = 1;
+
+ Tix_HLResizeWhenIdle(wPtr);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "show" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLShow(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tix_HLMarkElementDirty(wPtr, chPtr->parent);
+ chPtr->hidden = 0;
+
+ Tix_HLResizeWhenIdle(wPtr);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "info" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLInfo(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ size_t len = strlen(argv[0]);
+
+ if (strncmp(argv[0], "anchor", len)==0) {
+ if (wPtr->anchor) {
+ Tcl_AppendResult(interp, wPtr->anchor->pathName, NULL);
+ }
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "bbox", len)==0) {
+ HListElement * chPtr;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ return Tix_HLBBox(interp, wPtr, chPtr);
+ }
+ else if (strncmp(argv[0], "children", len)==0) {
+ HListElement * ptr;
+
+ if (argc != 1 && argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "?entryPath?");
+ }
+ if (argc == 1 || (argc == 2 && *argv[1]==0)) {
+ chPtr = wPtr->root;
+ } else {
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+ }
+
+ for (ptr=chPtr->childHead; ptr; ptr=ptr->next) {
+ Tcl_AppendElement(interp, ptr->pathName);
+ }
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "data", len)==0) {
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tcl_AppendResult(interp, chPtr->data, NULL);
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "dragsite", len)==0) {
+ if (wPtr->dragSite) {
+ Tcl_AppendResult(interp, wPtr->dragSite->pathName, NULL);
+ }
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "dropsite", len)==0) {
+ if (wPtr->dropSite) {
+ Tcl_AppendResult(interp, wPtr->dropSite->pathName, NULL);
+ }
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "exists", len)==0) {
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+ chPtr = Tix_HLFindElement(interp, wPtr, argv[1]);
+
+ if (chPtr) {
+ Tcl_AppendResult(interp, "1", NULL);
+ } else {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "0", NULL);
+ }
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "hidden", len)==0) {
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (chPtr->hidden) {
+ Tcl_AppendElement(interp, "1");
+ } else {
+ Tcl_AppendElement(interp, "0");
+ }
+
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "item", len)==0) {
+ return Tix_HLItemInfo(interp, wPtr, argc-1, argv+1);
+ }
+ else if (strncmp(argv[0], "next", len)==0) {
+ HListElement * nextPtr;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ nextPtr=FindNextEntry(wPtr, chPtr);
+
+ if (nextPtr) {
+ Tcl_AppendResult(interp, nextPtr->pathName, NULL);
+ }
+
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "parent", len)==0) {
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tcl_AppendResult(interp, chPtr->parent->pathName, NULL);
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "prev", len)==0) {
+ HListElement * prevPtr;
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+2, argv-2, 3, "entryPath");
+ }
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ return TCL_ERROR;
+ }
+ prevPtr = FindPrevEntry(wPtr, chPtr);
+ if (prevPtr) {
+ Tcl_AppendResult(interp, prevPtr->pathName, NULL);
+ }
+
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "selection", len)==0) {
+ return CurSelection(interp, wPtr, wPtr->root);
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\": must be anchor, bbox, children, data, dragsite, dropsite, ",
+ "exists, hidden, item, next, parent, prev or selection",
+ NULL);
+ return TCL_ERROR;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "info item" sub-sub command
+ * argv[0] = x
+ * argv[1] = y
+ *
+ * returns {entryPath (indicator|column#) type component}
+ *----------------------------------------------------------------------
+ */
+int
+Tix_HLItemInfo(interp, wPtr, argc, argv)
+ Tcl_Interp *interp; /* Current interpreter. */
+ WidgetPtr wPtr; /* HList widget */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ HListElement * chPtr;
+ int itemX, itemY;
+ int listX, listY;
+ int widX, widY;
+ int i, m, n;
+ char column[20];
+
+ if (argc != 2) {
+ return Tix_ArgcError(interp, argc+3, argv-3, 3, "x y");
+ }
+ if (Tcl_GetInt(interp, argv[0], &widX) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &widY) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (wPtr->root->dirty || wPtr->allDirty) {
+ /*
+ * We must update the geometry NOW otherwise we will get a wrong entry
+ */
+ Tix_HLCancelResizeWhenIdle(wPtr);
+ Tix_HLComputeGeometry((ClientData)wPtr);
+ }
+ if ((chPtr = FindElementAtPosition(wPtr, widY)) == NULL) {
+ goto none;
+ }
+
+ listX = widX - wPtr->borderWidth - wPtr->highlightWidth + wPtr->leftPixel;
+ listY = widY - wPtr->borderWidth - wPtr->highlightWidth + wPtr->topPixel;
+
+ if (wPtr->useHeader) {
+ listY -= wPtr->headerHeight;
+ }
+
+ itemX = listX - Tix_HLElementLeftOffset(wPtr, chPtr);
+ itemY = listY - Tix_HLElementTopOffset (wPtr, chPtr);
+
+ if (itemY < 0 || itemY >= chPtr->height) {
+ goto none;
+ }
+ if (itemX < 0) {
+ goto none;
+ }
+
+ if (wPtr->useIndicator && itemX < wPtr->indent) {
+ if (chPtr->indicator) {
+ int indCenterX;
+ int indOffX, indOffY;
+ int indX, indY;
+
+ /* This "if" is a BIG HACK */
+ if (chPtr->parent == wPtr->root) {
+ indCenterX = wPtr->indent/2;
+ }
+ else if (chPtr->parent->parent == wPtr->root) {
+ indCenterX = chPtr->parent->branchX - wPtr->indent;
+ } else {
+ indCenterX = chPtr->parent->branchX;
+ }
+
+ indOffX = indCenterX - Tix_DItemWidth (chPtr->indicator)/2;
+ indOffY = chPtr->iconY - Tix_DItemHeight(chPtr->indicator)/2;
+
+ indX = itemX - indOffX;
+ indY = itemY - indOffY;
+
+ /* Is it outside of the indicator? */
+ if (indX < 0 || indX >= Tix_DItemWidth (chPtr->indicator)) {
+ goto none;
+ }
+ if (indY < 0 || indY >= Tix_DItemHeight(chPtr->indicator)) {
+ goto none;
+ }
+ Tcl_AppendElement(interp, chPtr->pathName);
+ Tcl_AppendElement(interp, "indicator");
+ Tcl_AppendElement(interp, Tix_DItemTypeName(chPtr->indicator));
+ Tcl_AppendElement(interp,
+ Tix_DItemComponent(chPtr->indicator, indX, indY));
+ return TCL_OK;
+ } else {
+ goto none;
+ }
+ }
+
+ /* skip the indent part */
+
+ if (!wPtr->useIndicator && chPtr->parent == wPtr->root) {
+ /* indent not used only in this case */
+ } else {
+ itemX -= wPtr->indent;
+ }
+
+ for (m=n=0,i=0; i<wPtr->numColumns; i++) {
+ n += wPtr->actualSize[i].width;
+ if (listX < n) {
+ if (n > 1) {
+ itemX = listX - m;
+ }
+ goto _column;
+ }
+ m += wPtr->actualSize[i].width;
+ }
+ goto none;
+
+_column:
+ sprintf(column, "%d", i);
+ Tcl_AppendElement(interp, chPtr->pathName);
+ Tcl_AppendElement(interp, column);
+
+ if (chPtr->col[i].iPtr != NULL) {
+ Tcl_AppendElement(interp, Tix_DItemTypeName(chPtr->col[i].iPtr));
+ Tcl_AppendElement(interp,
+ Tix_DItemComponent(chPtr->col[i].iPtr, itemX, itemY));
+ }
+ return TCL_OK;
+
+none:
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "nearest" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLNearest(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int y;
+
+ if (Tcl_GetInt(interp, argv[0], &y) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (wPtr->root->dirty || wPtr->allDirty) {
+ /*
+ * We must update the geometry NOW otherwise we will get a
+ * wrong entry.
+ */
+ Tix_HLCancelResizeWhenIdle(wPtr);
+ Tix_HLComputeGeometry((ClientData)wPtr);
+ }
+
+ if ((chPtr = FindElementAtPosition(wPtr, y)) != NULL) {
+ Tcl_AppendResult(interp, chPtr->pathName, NULL);
+ }
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "see" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLSee(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) == NULL) {
+ return TCL_ERROR;
+ }
+ if (wPtr->resizing || wPtr->redrawing) {
+ if (wPtr->elmToSee) {
+ ckfree(wPtr->elmToSee);
+ }
+ wPtr->elmToSee = tixStrDup(argv[0]);
+ return TCL_OK;
+ } else {
+ Tix_HLSeeElement(wPtr, chPtr, 1);
+
+ return TCL_OK;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_HLBBox --
+ *
+ * Returns the visible bounding box of an HList element (x1, y1,
+ * x2, y2). Currently only y1 and y2 matters. x1 and x2 are
+ * always the left and right edges of the window.
+ *
+ * Return value:
+ * See user documenetation.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int Tix_HLBBox(interp, wPtr, chPtr)
+ Tcl_Interp * interp; /* Interpreter to report the bbox. */
+ WidgetPtr wPtr; /* HList widget. */
+ HListElement * chPtr; /* Get the BBox for this element.*/
+{
+ int y, height;
+ int wXSize, wYSize; /* size of the listbox window area */
+ int pad;
+
+ if (!Tk_IsMapped(wPtr->dispData.tkwin)) {
+ return TCL_OK;
+ }
+
+ if (wPtr->root->dirty || wPtr->allDirty) {
+ /*
+ * We must update the geometry NOW otherwise we will wrong geometry
+ * info
+ */
+ Tix_HLCancelResizeWhenIdle(wPtr);
+ Tix_HLComputeGeometry((ClientData)wPtr);
+ }
+
+ y = Tix_HLElementTopOffset(wPtr, chPtr) - wPtr->topPixel;
+ pad = wPtr->borderWidth + wPtr->highlightWidth;
+ wXSize = Tk_Width(wPtr->dispData.tkwin ) - 2*pad;
+ wYSize = Tk_Height(wPtr->dispData.tkwin) - 2*pad;
+
+ if (wXSize <= 0) {
+ wXSize = 1;
+ }
+ if (wYSize <= 0) {
+ wYSize = 1;
+ }
+
+ height = chPtr->height;
+ if (height <= 0) {
+ height = 1;
+ }
+
+ if (y >= wYSize || (y+height) <= 0) {
+ /*
+ * The element is not visible
+ */
+ return TCL_OK;
+ } else {
+ int x1;
+ int y1, y2;
+ char buff[100];
+
+ /*
+ * The bounding box is clipped with the visible area of the widget.
+ */
+
+ x1 = pad;
+ y1 = y + wPtr->borderWidth + wPtr->highlightWidth;
+ y2 = y1 + height-1;
+
+ if (y1 < pad) {
+ y1 = pad;
+ }
+ if (y2 >= pad+wYSize) {
+ y2 = pad+wYSize -1;
+ }
+
+ if (y2 >= y1) {
+ sprintf(buff, "%d %d %d %d", x1, y1, x1+wXSize-1, y2);
+ Tcl_SetResult(interp, buff, TCL_VOLATILE);
+ }
+ return TCL_OK;
+ }
+}
+
+static int Tix_HLSeeElement(wPtr, chPtr, callRedraw)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+ int callRedraw;
+{
+ int x, y;
+ int cXSize, cYSize; /* element size */
+ int wXSize, wYSize; /* size of the listbox window area */
+ int top, left; /* new top and left offset of the HLIst */
+ int oldTop, oldLeft;
+
+ oldLeft = wPtr->leftPixel;
+ oldTop = wPtr->topPixel;
+
+ x = Tix_HLElementLeftOffset(wPtr, chPtr);
+ y = Tix_HLElementTopOffset(wPtr, chPtr);
+ if (chPtr->col[0].iPtr) {
+ cXSize = Tix_DItemWidth(chPtr->col[0].iPtr);
+ } else {
+ cXSize = chPtr->col[0].width;
+ }
+ cYSize = chPtr->height;
+ wXSize = Tk_Width(wPtr->dispData.tkwin) -
+ (2*wPtr->borderWidth + 2*wPtr->highlightWidth);
+ wYSize = Tk_Height(wPtr->dispData.tkwin) -
+ (2*wPtr->borderWidth + 2*wPtr->highlightWidth);
+
+ if (wPtr->useHeader) {
+ wYSize -= wPtr->headerHeight;
+ }
+
+ if (wXSize < 0 || wYSize < 0) {
+ /* The window is probably not visible */
+ return TCL_OK;
+ }
+
+ if (cXSize < wXSize && wPtr->numColumns == 1) {
+ /* Align on the X direction */
+ left = wPtr->leftPixel;
+ if ((x < wPtr->leftPixel) || (x+cXSize > wPtr->leftPixel+wXSize)) {
+ if (wXSize > cXSize) {
+ left = x - (wXSize-cXSize)/2;
+ } else {
+ left = x;
+ }
+ }
+ } else {
+ left = wPtr->leftPixel;
+ }
+
+ /* Align on the Y direction */
+ top = wPtr->topPixel;
+
+ if (cYSize < wYSize) {
+ if ((wPtr->topPixel-y)>wYSize || (y-wPtr->topPixel-wYSize) > wYSize) {
+ /* far away, make it middle */
+ top = y - (wYSize-cYSize)/2;
+ }
+ else if (y < wPtr->topPixel) {
+ top = y;
+ }
+ else if (y+cYSize > wPtr->topPixel+wYSize){
+ top = y+cYSize - wYSize ;
+ }
+ }
+
+ if (oldLeft != left || oldTop != top) {
+ wPtr->leftPixel = left;
+ wPtr->topPixel = top;
+
+ if (callRedraw) {
+ UpdateScrollBars(wPtr, 0);
+ RedrawWhenIdle(wPtr);
+ }
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "selection" sub command
+ * Modify the selection in this HList box
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLSelection(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ size_t len = strlen(argv[0]);
+ int code = TCL_OK;
+ int changed = 0;
+
+ if (strncmp(argv[0], "clear", len)==0) {
+ if (argc == 1) {
+ HL_SelectionClearAll(wPtr, wPtr->root, &changed);
+ }
+ else {
+ HListElement * from, * to;
+
+ from = Tix_HLFindElement(interp, wPtr, argv[1]);
+ if (from == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (argc == 3) {
+ to = Tix_HLFindElement(interp, wPtr, argv[2]);
+ if (to == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ changed = SelectionModifyRange(wPtr, from, to, 0);
+ }
+ else {
+ if (from->selected == 1) {
+ HL_SelectionClear(wPtr, from);
+ changed = 1;
+ }
+ }
+ }
+ }
+ else if (strncmp(argv[0], "includes", len)==0) {
+ if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[1])) == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (chPtr->selected) {
+ Tcl_AppendResult(interp, "1", NULL);
+ } else {
+ Tcl_AppendResult(interp, "0", NULL);
+ }
+ }
+ else if (strncmp(argv[0], "get", len)==0) {
+ if (argc != 1) {
+ Tix_ArgcError(interp, argc+2, argv-2, 3, "");
+ code = TCL_ERROR;
+ } else {
+ code = CurSelection(interp, wPtr, wPtr->root);
+ }
+ }
+ else if (strncmp(argv[0], "set", len)==0) {
+ HListElement * from, * to;
+
+ if (argc < 2 || argc > 3) {
+ Tix_ArgcError(interp, argc+2, argv-2, 3, "from ?to?");
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ from = Tix_HLFindElement(interp, wPtr, argv[1]);
+ if (from == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (argc == 3) {
+ to = Tix_HLFindElement(interp, wPtr, argv[2]);
+ if (to == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ changed = SelectionModifyRange(wPtr, from, to, 1);
+ } else {
+ if (!from->selected && !from->hidden) {
+ SelectionAdd(wPtr, from);
+ changed = 1;
+ }
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\": must be anchor, clear, get, includes or set", NULL);
+ code = TCL_ERROR;
+ }
+
+ done:
+ if (changed) {
+ RedrawWhenIdle(wPtr);
+ }
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * "xview" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLXView(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int leftPixel;
+ int oldLeft = wPtr->leftPixel;
+ if (argc == 0) {
+ char string[20];
+
+ sprintf(string, "%d", wPtr->leftPixel);
+ Tcl_AppendResult(interp, string, NULL);
+ return TCL_OK;
+ }
+ else if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) != NULL) {
+ leftPixel = Tix_HLElementLeftOffset(wPtr, chPtr);
+ }
+ else if (Tcl_GetInt(interp, argv[0], &leftPixel) == TCL_OK) {
+ /* %% todo backward-compatible mode */
+
+ }
+ else {
+ int type, count;
+ double fraction;
+
+ Tcl_ResetResult(interp);
+
+ /* Tk_GetScrollInfo () wants strange argc,argv combinations .. */
+ type = Tk_GetScrollInfo(interp, argc+2, argv-2, &fraction, &count);
+ switch (type) {
+ case TK_SCROLL_ERROR:
+ return TCL_ERROR;
+
+ case TK_SCROLL_MOVETO:
+ leftPixel = (int)(fraction * (double)wPtr->totalSize[0]);
+ break;
+
+ case TK_SCROLL_PAGES:
+ leftPixel = XScrollByPages(wPtr, count);
+ break;
+
+ case TK_SCROLL_UNITS:
+ leftPixel = XScrollByUnits(wPtr, count);
+ break;
+ }
+ }
+
+ if (oldLeft != leftPixel) {
+ wPtr->leftPixel = leftPixel;
+ UpdateScrollBars(wPtr, 0);
+
+ RedrawWhenIdle(wPtr);
+ }
+
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "yview" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_HLYView(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ HListElement * chPtr;
+ int topPixel;
+ int oldTop = wPtr->topPixel;
+
+ if (argc == 0) {
+ char string[20];
+
+ sprintf(string, "%d", wPtr->topPixel);
+ Tcl_AppendResult(interp, string, NULL);
+ return TCL_OK;
+ }
+ else if ((chPtr = Tix_HLFindElement(interp, wPtr, argv[0])) != NULL) {
+ topPixel = Tix_HLElementTopOffset(wPtr, chPtr);
+ }
+ else if (Tcl_GetInt(interp, argv[0], &topPixel) == TCL_OK) {
+ /* %% todo backward-compatible mode */
+ }
+ else {
+ int type, count;
+ double fraction;
+
+ Tcl_ResetResult(interp);
+
+ /* Tk_GetScrollInfo () wants strange argc,argv combinations .. */
+ type = Tk_GetScrollInfo(interp, argc+2, argv-2, &fraction, &count);
+ switch (type) {
+ case TK_SCROLL_ERROR:
+ return TCL_ERROR;
+
+ case TK_SCROLL_MOVETO:
+ topPixel = (int)(fraction * (double)wPtr->totalSize[1]);
+ break;
+
+ case TK_SCROLL_PAGES:
+ topPixel = YScrollByPages(wPtr, count);
+ break;
+
+ case TK_SCROLL_UNITS:
+ topPixel = YScrollByUnits(wPtr, count);
+ break;
+ }
+ }
+
+ if (oldTop != topPixel) {
+ wPtr->topPixel = topPixel;
+ UpdateScrollBars(wPtr, 0);
+
+ RedrawWhenIdle(wPtr);
+ }
+
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetConfigure --
+ *
+ * This procedure is called to process an argv/argc list in
+ * conjunction with the Tk option database to configure (or
+ * reconfigure) a HList widget.
+ *
+ * Results:
+ * The return value is a standard Tcl result. If TCL_ERROR is
+ * returned, then interp->result contains an error message.
+ *
+ * Side effects:
+ * Configuration information, such as colors, border width,
+ * etc. get set for wPtr; old resources get freed,
+ * if there were any.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+WidgetConfigure(interp, wPtr, argc, argv, flags)
+ Tcl_Interp *interp; /* Used for error reporting. */
+ WidgetPtr wPtr; /* Information about widget. */
+ int argc; /* Number of valid entries in argv. */
+ CONST84 char **argv; /* Arguments. */
+ int flags; /* Flags to pass to
+ * Tk_ConfigureWidget. */
+{
+ XGCValues gcValues;
+ GC newGC;
+ TixFont oldfont;
+ int oldColumns;
+ Tix_StyleTemplate stTmpl;
+
+ oldfont = wPtr->font;
+ oldColumns = wPtr->numColumns;
+ if (Tk_ConfigureWidget(interp, wPtr->dispData.tkwin, configSpecs,
+ argc, argv, (char *) wPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (wPtr->initialized && oldColumns != wPtr->numColumns) {
+ Tcl_AppendResult(interp, "Cannot change the number of columns ",
+ (char *) NULL);
+ wPtr->numColumns = oldColumns;
+ return TCL_ERROR;
+ }
+ if (wPtr->numColumns < 1) {
+ wPtr->numColumns = 1;
+ }
+
+ if (wPtr->separator == 0 || wPtr->separator[0] == 0) {
+ if (wPtr->separator != 0) {
+ ckfree(wPtr->separator);
+ }
+ wPtr->separator = tixStrDup(".");
+ }
+
+ if (oldfont != wPtr->font) {
+ /*
+ * Font has been changed (initialized)
+ */
+ TixComputeTextGeometry(wPtr->font, "0", 1,
+ 0, &wPtr->scrollUnit[0], &wPtr->scrollUnit[1]);
+ }
+
+ /*
+ * A few options need special processing, such as setting the
+ * background from a 3-D border, or filling in complicated
+ * defaults that couldn't be specified to Tk_ConfigureWidget.
+ */
+
+ Tk_SetBackgroundFromBorder(wPtr->dispData.tkwin, wPtr->border);
+
+ /*
+ * Note: GraphicsExpose events are disabled in normalGC because it's
+ * used to copy stuff from an off-screen pixmap onto the screen (we know
+ * that there's no problem with obscured areas).
+ */
+
+ /* The background GC */
+ gcValues.foreground = wPtr->normalBg->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCGraphicsExposures, &gcValues);
+ if (wPtr->backgroundGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->backgroundGC);
+ }
+ wPtr->backgroundGC = newGC;
+
+ /* The normal text GC */
+ gcValues.font = TixFontId(wPtr->font);
+ gcValues.foreground = wPtr->normalFg->pixel;
+ gcValues.background = wPtr->normalBg->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCFont|GCGraphicsExposures, &gcValues);
+ if (wPtr->normalGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->normalGC);
+ }
+ wPtr->normalGC = newGC;
+
+ /* The selected text GC [TODO: why need the BG??]*/
+ gcValues.font = TixFontId(wPtr->font);
+ gcValues.foreground = wPtr->selectFg->pixel;
+ gcValues.background = Tk_3DBorderColor(wPtr->selectBorder)->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCFont|GCGraphicsExposures, &gcValues);
+ if (wPtr->selectGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->selectGC);
+ }
+ wPtr->selectGC = newGC;
+
+ /* The dotted anchor lines */
+ newGC = Tix_GetAnchorGC(wPtr->dispData.tkwin,
+ Tk_3DBorderColor(wPtr->selectBorder));
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC);
+ }
+ wPtr->anchorGC = newGC;
+
+ /* The sloid dropsite lines */
+ gcValues.foreground = wPtr->normalFg->pixel;
+ gcValues.background = wPtr->normalBg->pixel;
+ gcValues.graphics_exposures = False;
+ gcValues.subwindow_mode = IncludeInferiors;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCGraphicsExposures|GCSubwindowMode,
+ &gcValues);
+ if (wPtr->dropSiteGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->dropSiteGC);
+ }
+ wPtr->dropSiteGC = newGC;
+
+ /* The highlight border */
+ gcValues.background = wPtr->selectFg->pixel;
+ gcValues.foreground = wPtr->highlightColorPtr->pixel;
+ gcValues.subwindow_mode = IncludeInferiors;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCGraphicsExposures, &gcValues);
+ if (wPtr->highlightGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->highlightGC);
+ }
+ wPtr->highlightGC = newGC;
+
+ /* We must set the options of the default styles so that
+ * -- the default styles will change according to what is in
+ * stTmpl
+ */
+
+ stTmpl.font = wPtr->font;
+ stTmpl.pad[0] = wPtr->padX;
+ stTmpl.pad[1] = wPtr->padY;
+ stTmpl.colors[TIX_DITEM_NORMAL].fg = wPtr->normalFg;
+ stTmpl.colors[TIX_DITEM_NORMAL].bg = wPtr->normalBg;
+ stTmpl.colors[TIX_DITEM_SELECTED].fg= wPtr->selectFg;
+ stTmpl.colors[TIX_DITEM_SELECTED].bg= Tk_3DBorderColor(wPtr->selectBorder);
+ stTmpl.flags = TIX_DITEM_FONT|TIX_DITEM_NORMAL_BG|
+ TIX_DITEM_SELECTED_BG|TIX_DITEM_NORMAL_FG|TIX_DITEM_SELECTED_FG |
+ TIX_DITEM_PADX|TIX_DITEM_PADY;
+ Tix_SetDefaultStyleTemplate(wPtr->dispData.tkwin, &stTmpl);
+
+ /* Probably the size of the elements in this has changed */
+ Tix_HLResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on HLists.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * When the window gets deleted, internal structures get
+ * cleaned up. When it gets exposed, it is redisplayed.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+WidgetEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ switch (eventPtr->type) {
+ case DestroyNotify:
+ if (wPtr->dispData.tkwin != NULL) {
+ wPtr->dispData.tkwin = NULL;
+ Tcl_DeleteCommand(wPtr->dispData.interp,
+ Tcl_GetCommandName(wPtr->dispData.interp, wPtr->widgetCmd));
+ }
+ Tix_HLCancelResizeWhenIdle(wPtr);
+ CancelRedrawWhenIdle(wPtr);
+ Tk_EventuallyFree((ClientData)wPtr, (Tix_FreeProc*)WidgetDestroy);
+ break;
+
+ case ConfigureNotify:
+ RedrawWhenIdle(wPtr);
+ UpdateScrollBars(wPtr, 1);
+ break;
+
+ case Expose:
+ RedrawWhenIdle(wPtr);
+ break;
+
+ case FocusIn:
+ wPtr->hasFocus = 1;
+ RedrawWhenIdle(wPtr);
+ break;
+
+ case FocusOut:
+ wPtr->hasFocus = 0;
+ RedrawWhenIdle(wPtr);
+ break;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * SubWindowEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on the header subwindow.
+ *--------------------------------------------------------------
+ */
+static void
+SubWindowEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+#ifdef TK_PARENT_DESTROYED
+ Tk_FakeWin * fw;
+#endif
+
+ switch (eventPtr->type) {
+ case DestroyNotify:
+
+#ifdef TK_PARENT_DESTROYED
+ /*
+ * The TK_PARENT_DESTROYED symbol is no longer defined in Tk 8.0
+ *
+ * TODO: do we still have to handle this??
+ */
+ fw = (Tk_FakeWin *) (wPtr->headerWin);
+ if (fw->flags & TK_PARENT_DESTROYED) {
+ break;
+ }
+ if (wPtr->headerWin != NULL) {
+ panic("HList: header subwindow deleted illegally\n");
+ }
+#endif
+ break;
+
+ case Expose:
+ if (wPtr->headerWin != NULL) {
+ RedrawWhenIdle(wPtr);
+ }
+ break;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDestroy --
+ *
+ * This procedure is invoked by Tk_EventuallyFree or Tk_Release
+ * to clean up the internal structure of a HList at a safe time
+ * (when no-one is using it anymore).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Everything associated with the HList is freed up.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetDestroy(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (wPtr->root != NULL) {
+ DeleteOffsprings(wPtr, wPtr->root);
+ FreeElement(wPtr, wPtr->root);
+ }
+
+ if (wPtr->backgroundGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->backgroundGC);
+ }
+ if (wPtr->normalGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->normalGC);
+ }
+ if (wPtr->selectGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->selectGC);
+ }
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC);
+ }
+ if (wPtr->dropSiteGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->dropSiteGC);
+ }
+ if (wPtr->highlightGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->highlightGC);
+ }
+
+ /* the following two members will be NULL if the widget was destroyed
+ * during its creation (e.g., wrong arguments during creation
+ */
+ if (wPtr->reqSize != NULL) {
+ ckfree((char*)wPtr->reqSize);
+ }
+ if (wPtr->actualSize != NULL) {
+ ckfree((char*)wPtr->actualSize);
+ }
+ if (wPtr->elmToSee != NULL) {
+ ckfree(wPtr->elmToSee);
+ wPtr->elmToSee = NULL;
+ }
+
+ Tix_HLFreeHeaders(wPtr->dispData.interp, wPtr);
+
+ if (!Tix_IsLinkListEmpty(wPtr->mappedWindows)) {
+ /*
+ * All mapped windows should have been unmapped when the
+ * the entries were deleted
+ */
+ panic("tixHList: mappedWindows not NULL");
+ }
+ if (wPtr->headerWin) {
+ wPtr->headerWin = NULL;
+ }
+ Tcl_DeleteHashTable(&wPtr->childTable);
+
+ Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->dispData.display, 0);
+ ckfree((char *) wPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetCmdDeletedProc --
+ *
+ * This procedure is invoked when a widget command is deleted. If
+ * the widget isn't already in the process of being destroyed,
+ * this command destroys it.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The widget is destroyed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetCmdDeletedProc(clientData)
+ ClientData clientData; /* Pointer to widget record for widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ /*
+ * This procedure could be invoked either because the window was
+ * destroyed and the command was then deleted (in which case tkwin
+ * is NULL) or because the command was deleted, and then this procedure
+ * destroys the widget.
+ */
+ if (wPtr->dispData.tkwin != NULL) {
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ wPtr->dispData.tkwin = NULL;
+ Tk_DestroyWindow(tkwin);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_HLComputeGeometry --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * none
+ *
+ *--------------------------------------------------------------
+ */
+void
+Tix_HLComputeGeometry(clientData)
+ ClientData clientData;
+{
+ WidgetPtr wPtr = (WidgetPtr)clientData;
+ int i, reqW, reqH;
+ int sizeChanged = 0;
+ int width;
+ wPtr->resizing = 0;
+
+ /* Update geometry request */
+ if (wPtr->useHeader && wPtr->headerDirty) {
+ Tix_HLComputeHeaderGeometry(wPtr);
+ }
+
+ if (wPtr->root->dirty || wPtr->allDirty) {
+ if (wPtr->useIndicator) {
+ /*
+ * If we use indicator, then the toplevel elements are indented
+ * by wPtr->indent. Otherwise they are indented by 0 pixels
+ */
+ ComputeElementGeometry(wPtr, wPtr->root, wPtr->indent);
+ } else {
+ ComputeElementGeometry(wPtr, wPtr->root, 0);
+ }
+ }
+ width = 0;
+ for (i=0; i<wPtr->numColumns; i++) {
+ if (wPtr->reqSize[i].width != UNINITIALIZED) {
+ wPtr->actualSize[i].width = wPtr->reqSize[i].width;
+ }
+ else {
+ /* This is the req size of the entry columns */
+ int entReq = wPtr->root->col[i].width;
+
+ /* This is the req size of the header columns */
+ int hdrReq = wPtr->headers[i]->width;
+
+ if (wPtr->useHeader && hdrReq > entReq) {
+ wPtr->actualSize[i].width = hdrReq;
+ } else {
+ wPtr->actualSize[i].width = entReq;
+ }
+ }
+ width += wPtr->actualSize[i].width;
+ }
+ sizeChanged = 1;
+ wPtr->allDirty = 0;
+
+ wPtr->totalSize[0] = width;
+ wPtr->totalSize[1] = wPtr->root->allHeight;
+
+ if (wPtr->width > 0) {
+ reqW = wPtr->width * wPtr->scrollUnit[0];
+ } else {
+ reqW = width;
+ }
+ if (wPtr->height > 0) {
+ reqH = wPtr->height * wPtr->scrollUnit[1];
+ } else {
+ reqH = wPtr->root->allHeight;
+ }
+
+ wPtr->totalSize[0] += 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ wPtr->totalSize[1] += 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ reqW += 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ reqH += 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+
+ if (wPtr->useHeader) {
+ reqH += wPtr->headerHeight;
+ }
+
+ /* Now we need to handle the multiple columns mode */
+
+ Tk_GeometryRequest(wPtr->dispData.tkwin, reqW, reqH);
+
+ /* Update scrollbars */
+ UpdateScrollBars(wPtr, sizeChanged);
+
+ RedrawWhenIdle(wPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_HLResizeWhenIdle --
+ *----------------------------------------------------------------------
+ */
+void
+Tix_HLResizeWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (!wPtr->resizing) {
+ wPtr->resizing = 1;
+ Tk_DoWhenIdle(Tix_HLComputeGeometry, (ClientData)wPtr);
+ }
+ if (wPtr->redrawing) {
+ CancelRedrawWhenIdle(wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_HLResizeNow --
+ *----------------------------------------------------------------------
+ */
+void
+Tix_HLResizeNow(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->resizing) {
+ wPtr->resizing = 0;
+ Tk_CancelIdleCall(Tix_HLComputeGeometry, (ClientData)wPtr);
+ Tix_HLComputeGeometry((ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_HLCancelResizeWhenIdle --
+ *----------------------------------------------------------------------
+ */
+void
+Tix_HLCancelResizeWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->resizing) {
+ wPtr->resizing = 0;
+ Tk_CancelIdleCall(Tix_HLComputeGeometry, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * RedrawWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+RedrawWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (!wPtr->redrawing && Tk_IsMapped(wPtr->dispData.tkwin)) {
+ wPtr->redrawing = 1;
+ Tk_DoWhenIdle(WidgetDisplay, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * CancelRedrawWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+CancelRedrawWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->redrawing) {
+ wPtr->redrawing = 0;
+ Tk_CancelIdleCall(WidgetDisplay, (ClientData)wPtr);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * DItemSizeChangedProc --
+ *
+ * This is called whenever the size of one of the HList's items
+ * changes its size.
+ *----------------------------------------------------------------------
+ */
+static void DItemSizeChangedProc(iPtr)
+ Tix_DItem *iPtr;
+{
+ HLItemTypeInfo * info = (HLItemTypeInfo *)iPtr->base.clientData;
+ HListColumn * colPtr;
+ HListElement * chPtr;
+ HListHeader * hPtr;
+ WidgetPtr wPtr;
+
+ if (info == NULL) {
+ /* Perhaps we haven't set the clientData yet! */
+ return;
+ }
+
+ switch (info->type) {
+ case HLTYPE_COLUMN:
+ colPtr = (HListColumn*) info;
+ chPtr = colPtr->chPtr;
+
+ if (chPtr) { /* Sanity check */
+ Tix_HLMarkElementDirty(chPtr->wPtr, chPtr);
+ Tix_HLResizeWhenIdle(chPtr->wPtr);
+ }
+ break;
+ case HLTYPE_HEADER:
+ hPtr = (HListHeader*)info;
+ wPtr = hPtr->wPtr;
+ wPtr->headerDirty = 1;
+ if (wPtr->useHeader) {
+ Tix_HLResizeWhenIdle(wPtr);
+ }
+ break;
+ case HLTYPE_ENTRY:
+ chPtr = (HListElement*)info;
+
+ if (chPtr) { /* Sanity check */
+ Tix_HLMarkElementDirty(chPtr->wPtr, chPtr);
+ Tix_HLResizeWhenIdle(chPtr->wPtr);
+ }
+ break;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * AllocElement --
+ *
+ * Allocates a new structure for the new element and record it
+ * in the hash table
+ *
+ * Results:
+ * a pointer to the new element's structure
+ *
+ * Side effects:
+ * Has table is changed
+ *--------------------------------------------------------------
+ */
+static HListElement *
+AllocElement(wPtr, parent, pathName, name, ditemType)
+ WidgetPtr wPtr;
+ HListElement * parent;
+ CONST84 char * pathName;
+ CONST84 char * name;
+ CONST84 char * ditemType;
+{
+ HListElement * chPtr;
+ Tcl_HashEntry * hashPtr;
+ int dummy;
+ Tix_DItem * iPtr;
+
+ if (ditemType == NULL) {
+ iPtr = NULL;
+ } else {
+ if ((iPtr = Tix_DItemCreate(&wPtr->dispData, ditemType)) == NULL) {
+ return NULL;
+ }
+ }
+
+ chPtr = (HListElement*)ckalloc(sizeof(HListElement));
+
+ if (pathName) {
+ /* pathName == 0 is the root element */
+ hashPtr = Tcl_CreateHashEntry(&wPtr->childTable, pathName, &dummy);
+ Tcl_SetHashValue(hashPtr, (char*)chPtr);
+ }
+
+ if (parent) {
+ ++ parent->numCreatedChild;
+ }
+
+ if (wPtr->numColumns > 1) {
+ chPtr->col = Tix_HLAllocColumn(wPtr, chPtr);
+ } else {
+ chPtr->col = &chPtr->_oneCol;
+ chPtr->_oneCol.type = HLTYPE_COLUMN;
+ chPtr->_oneCol.self = (char*) &chPtr->_oneCol;
+ chPtr->_oneCol.chPtr = chPtr;
+ chPtr->_oneCol.iPtr = NULL;
+ chPtr->_oneCol.width = 0;
+ }
+ if (pathName) {
+ chPtr->pathName = tixStrDup(pathName);
+ } else {
+ chPtr->pathName = NULL;
+ }
+
+ if (name) {
+ chPtr->name = tixStrDup(name);
+ } else {
+ chPtr->name = NULL;
+ }
+
+ chPtr->type = HLTYPE_ENTRY;
+ chPtr->self = (char*)chPtr;
+ chPtr->wPtr = wPtr;
+ chPtr->parent = parent;
+ chPtr->prev = NULL;
+ chPtr->next = NULL;
+ chPtr->childHead = NULL;
+ chPtr->childTail = NULL;
+ chPtr->numSelectedChild = 0;
+ chPtr->numCreatedChild = 0;
+ chPtr->col[0].iPtr = iPtr;
+ chPtr->indicator = NULL;
+
+ chPtr->height = 0;
+ chPtr->allHeight = 0;
+ chPtr->selected = 0;
+ chPtr->dirty = 0;
+ chPtr->hidden = 0;
+ chPtr->state = tixNormalUid;
+ chPtr->data = NULL;
+ chPtr->branchX = 0;
+ chPtr->branchY = 0;
+
+ if (iPtr) {
+ /* The clientdata is usedful for the DItemSizeChangedProc() */
+ iPtr->base.clientData = (ClientData)&chPtr->col[0];
+ }
+
+ return chPtr;
+}
+
+static void
+FreeElement(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ Tcl_HashEntry * hashPtr;
+ int i;
+
+ if (chPtr->selected) {
+ HL_SelectionClear(wPtr, chPtr);
+ }
+ if (wPtr->anchor == chPtr) {
+ wPtr->anchor = NULL;
+ }
+ if (wPtr->dragSite == chPtr) {
+ wPtr->dragSite = NULL;
+ }
+ if (wPtr->dropSite == chPtr) {
+ wPtr->dropSite = NULL;
+ }
+
+ /*
+ * Free all the display items
+ */
+ for (i=0; i<wPtr->numColumns; i++) {
+ if (chPtr->col[i].iPtr) {
+ if (Tix_DItemType(chPtr->col[i].iPtr) == TIX_DITEM_WINDOW) {
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->col[i].iPtr);
+ }
+ Tix_DItemFree(chPtr->col[i].iPtr);
+ }
+ }
+ if (chPtr->indicator != NULL) {
+ if (Tix_DItemType(chPtr->indicator) == TIX_DITEM_WINDOW) {
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->indicator);
+ }
+ Tix_DItemFree(chPtr->indicator);
+ }
+
+ if (chPtr->col != &chPtr->_oneCol) {
+ /*
+ * This space was allocated dynamically
+ */
+ ckfree((char*)chPtr->col);
+ }
+
+ if (chPtr->pathName) {
+ /*
+ * Root does not have an entry in the hash table
+ */
+ if ((hashPtr = Tcl_FindHashEntry(&wPtr->childTable, chPtr->pathName))){
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ }
+ if (chPtr->name != NULL) {
+ ckfree(chPtr->name);
+ }
+ if (chPtr->pathName != NULL) {
+ ckfree(chPtr->pathName);
+ }
+ if (chPtr->data != NULL) {
+ ckfree(chPtr->data);
+ }
+
+ ckfree((char*)chPtr);
+}
+
+static void
+AppendList(wPtr, parent, chPtr, at, afterPtr, beforePtr)
+ WidgetPtr wPtr;
+ HListElement *parent;
+ HListElement *chPtr;
+ int at; /* At what position should this entry be added
+ * default is "-1": add at the end */
+ HListElement *afterPtr; /* after which entry should this entry be
+ * added. Default is NULL : ignore */
+ HListElement *beforePtr; /* before which entry should this entry be
+ * added. Default is NULL : ignore */
+{
+ if (parent->childHead == NULL) {
+ parent->childHead = chPtr;
+ parent->childTail = chPtr;
+ chPtr->prev = NULL;
+ chPtr->next = NULL;
+ }
+ else {
+ if (at >= 0) {
+ /*
+ * Find the current element at the "at" position
+ */
+ HListElement *ptr;
+ for (ptr=parent->childHead;
+ ptr!=NULL && at > 0;
+ ptr=ptr->next, --at) {
+ ; /* do nothing, just keep counting */
+ }
+ if (ptr != NULL) {
+ /*
+ * We need to insert the new element *before* ptr.E.g,
+ * if at == 0, then the new element should be the first
+ * of the list
+ */
+ beforePtr = ptr;
+ } else {
+ /* Seems like we walked past the end of the list. Well, do
+ * nothing here. By default, the new element will be
+ * append to the end of the list
+ */
+ }
+ }
+ if (afterPtr != NULL) {
+ if (afterPtr == parent->childTail) {
+ parent->childTail = chPtr;
+ } else {
+ afterPtr->next->prev = chPtr;
+ }
+ chPtr->prev = afterPtr;
+ chPtr->next = afterPtr->next;
+ afterPtr->next = chPtr;
+ return;
+ }
+ if (beforePtr !=NULL) {
+ if (beforePtr == parent->childHead) {
+ parent->childHead = chPtr;
+ } else {
+ beforePtr->prev->next = chPtr;
+ }
+ chPtr->prev = beforePtr->prev;
+ chPtr->next = beforePtr;
+ beforePtr->prev = chPtr;
+ return;
+ }
+
+ /*
+ * By default, append it at the end of the list
+ */
+ parent->childTail->next = chPtr;
+ chPtr->prev = parent->childTail;
+ chPtr->next = NULL;
+ parent->childTail = chPtr;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * NewElement --
+ *
+ * This procedure is creates a new element and record it both
+ * the hash table and in the tree.
+ *
+ * Results:
+ * pointer to new element
+ *
+ * Side effects:
+ * Hash table and tree changed if successful
+ *--------------------------------------------------------------
+ */
+static HListElement *
+NewElement(interp, wPtr, argc, argv, pathName, defParentName, newArgc)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+ int argc;
+ CONST84 char ** argv;
+ CONST84 char * pathName; /* Default pathname, if -pathname is not
+ * specified in the options */
+ CONST84 char * defParentName;/* Default parent name (will NULL if pathName
+ * is not NULL */
+ int * newArgc;
+{
+#define FIXED_SPACE 20
+ char fixedSpace[FIXED_SPACE+1];
+ CONST84 char *p;
+ CONST84 char *name; /* Last part of the name */
+ char *parentName = NULL;
+ int i, n, numChars;
+ HListElement *parent;
+ HListElement *chPtr;
+ char sep = wPtr->separator[0];
+ int allocated = 0;
+ CONST84 char * ditemType = NULL;
+ HListElement *afterPtr = NULL;
+ HListElement *beforePtr = NULL;
+ int at = -1;
+ int numSwitches = 0; /* counter on how many of the
+ * -after, -before and -at switches
+ * have been used. No more than one
+ * of then can be used */
+
+ /*
+ * (1) We need to determine the options:
+ * -itemtype, -after, -before and/or -at.
+ *
+ */
+ if (argc > 0) {
+ size_t len;
+ if (argc %2 != 0) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ chPtr = NULL;
+ goto done;
+ }
+ for (n=i=0; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-itemtype", len) == 0) {
+ ditemType = argv[i+1];
+ goto copy;
+ }
+ else if (strncmp(argv[i], "-after", len) == 0) {
+ afterPtr = Tix_HLFindElement(interp, wPtr, argv[i+1]);
+ if (afterPtr == NULL) {
+ chPtr = NULL;
+ goto done;
+ }
+ ++ numSwitches;
+ continue;
+ }
+ else if (strncmp(argv[i], "-before", len) == 0) {
+ beforePtr = Tix_HLFindElement(interp, wPtr, argv[i+1]);
+ if (beforePtr == NULL) {
+ chPtr = NULL;
+ goto done;
+ }
+ ++ numSwitches;
+ continue;
+ }
+ else if (strncmp(argv[i], "-at", len) == 0) {
+ if (Tcl_GetInt(interp, argv[i+1], &at) != TCL_OK) {
+ chPtr = NULL;
+ goto done;
+ }
+ ++ numSwitches;
+ continue;
+ }
+
+ copy:
+ if (n!=i) {
+ argv[n] = argv[i];
+ argv[n+1] = argv[i+1];
+ }
+ n+=2;
+ }
+ * newArgc = n;
+ } else {
+ * newArgc = 0;
+ }
+ if (numSwitches > 1) {
+ Tcl_AppendResult(interp, "No more than one of the -after, -before ",
+ "and -at options can be used", NULL);
+ chPtr = NULL;
+ goto done;
+ }
+ if (ditemType == NULL) {
+ ditemType = wPtr->diTypePtr->name;
+ }
+ if (Tix_GetDItemType(interp, ditemType) == NULL) {
+ chPtr = NULL;
+ goto done;
+ }
+
+ /*------------------------------------------------------------
+ * (2) Create the new entry. The method depends on whether
+ * the "add" or "addchild" command has been called
+ *------------------------------------------------------------
+ */
+ if (pathName == NULL) {
+ /* (2.a) Called by the "addchild" command. We need to generate
+ * a default name for the child
+ *
+ */
+ char buff[40];
+
+ parentName = (char *) defParentName;
+ if (parentName == NULL) {
+ parent = wPtr->root;
+ } else {
+ if ((parent=Tix_HLFindElement(interp, wPtr, parentName))== NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "parent element \"", parentName,
+ "\" does not exist", (char *) NULL);
+ chPtr = NULL;
+ goto done;
+ }
+ }
+
+ /*
+ * Generate a default name for this entry
+ *
+ * TODO: make sure this name is unique!
+ */
+ sprintf(buff, "%d", parent->numCreatedChild);
+ name = buff;
+
+ if (parentName == NULL) {
+ pathName = tixStrDup(name);
+ allocated = 1;
+ }
+ else {
+ pathName = ckalloc(strlen(parentName)+1+ strlen(name)+1);
+ allocated = 1;
+ sprintf((char *) pathName, "%s%c%s", parentName, sep, name);
+ }
+ }
+ else {
+ /* (2.b) Called by the "add" command.
+ *
+ * Strip the parent's name out of pathName (it's everything up
+ * to the last dot). There are two tricky parts: (a) must
+ * copy the parent's name somewhere else to avoid modifying
+ * the pathName string (for large names, space for the copy
+ * will have to be malloc'ed); (b) must special-case the
+ * situation where the parent is ".".
+ */
+
+ if ((p = strrchr(pathName, (int)sep)) == NULL) {
+ /* This is a toplevel element (no "." in it) */
+ name = pathName;
+ parentName = NULL;
+ }
+ else {
+ name = p+1;
+ numChars = p-pathName;
+ if (numChars > FIXED_SPACE) {
+ parentName = (char *) ckalloc((unsigned)(numChars+1));
+ } else {
+ parentName = fixedSpace;
+ }
+ if (numChars == 0) {
+ if ((pathName[0] == sep) && (pathName[1] == '\0')) {
+ /*
+ * The separator by itself is also a toplevel entry
+ */
+ parentName = 0;
+ } else {
+ parentName[0] = sep;
+ parentName[1] = '\0';
+ }
+ }
+ else {
+ strncpy(parentName, pathName, (size_t) numChars);
+ parentName[numChars] = '\0';
+ }
+ }
+
+ if (parentName == NULL) {
+ parent = wPtr->root;
+ } else {
+ if ((parent = Tix_HLFindElement(interp, wPtr, parentName))==NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "parent element \"", parentName,
+ "\" does not exist", (char *) NULL);
+ chPtr = NULL;
+ goto done;
+ }
+ }
+
+ }
+ if (Tix_HLFindElement(interp, wPtr, pathName) != NULL) {
+ Tcl_AppendResult(interp, "element \"", pathName,
+ "\" already exists", (char *) NULL);
+ chPtr = NULL;
+ goto done;
+ }
+ else {
+ if (afterPtr != NULL && afterPtr->parent != parent) {
+ Tcl_AppendResult(interp, "cannot add entry after \"",
+ afterPtr->pathName, "\"", NULL);
+ chPtr = NULL;
+ goto done;
+ }
+ if (beforePtr != NULL && beforePtr->parent != parent) {
+ Tcl_AppendResult(interp, "cannot add entry before \"",
+ beforePtr->pathName, "\"", NULL);
+ chPtr = NULL;
+ goto done;
+ }
+
+ Tcl_ResetResult(interp);
+ if ((chPtr = AllocElement(wPtr, parent, pathName, name, ditemType))
+ == NULL) {
+ /* Some error, now chPtr == NULL */
+ goto done;
+ }
+ AppendList(wPtr, parent, chPtr, at, afterPtr, beforePtr);
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+ goto done; /* success */
+ }
+
+ done:
+ if (allocated) {
+ ckfree((char*)pathName);
+ }
+ if (parentName && parentName != fixedSpace && parentName !=defParentName) {
+ ckfree((char*)parentName);
+ }
+ return chPtr;
+}
+
+/*--------------------------------------------------------------
+ * ConfigElement --
+ *
+ * This procedure configures the element according to the
+ * options.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Hash table and tree changed if successful
+ *--------------------------------------------------------------
+ */
+
+static int
+ConfigElement(wPtr, chPtr, argc, argv, flags, forced)
+ WidgetPtr wPtr;
+ HListElement *chPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+ int forced; /* We need a "forced" configure to ensure that
+ * the DItem is initialized properly */
+{
+ int sizeChanged;
+
+ if (Tix_WidgetConfigure2(wPtr->dispData.interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->col[0].iPtr, argc, argv, flags,
+ forced, &sizeChanged) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (sizeChanged) {
+ Tix_HLMarkElementDirty(wPtr, chPtr);
+ Tix_HLResizeWhenIdle(wPtr);
+ } else {
+ RedrawWhenIdle(wPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * FindElementAtPosition --
+ *
+ * Finds a visible element nearest to a Y position
+ *
+ * Results:
+ * Pointer to the element.
+ *
+ * Side effects:
+ * None
+ *--------------------------------------------------------------
+ */
+static HListElement * FindElementAtPosition(wPtr, y)
+ WidgetPtr wPtr;
+ int y;
+{
+ HListElement * chPtr = wPtr->root;
+ int top = 0;
+
+ y -= wPtr->borderWidth + wPtr->highlightWidth;
+ y += wPtr->topPixel;
+
+ if (wPtr->useHeader) {
+ y -= wPtr->headerHeight;
+ }
+
+ if (y < 0) {
+ /*
+ * Position is above the top of the list, return the first element in
+ * the list of toplevel entries.
+ */
+ if (wPtr->root != NULL) {
+ for (chPtr=wPtr->root->childHead; chPtr!=NULL; chPtr=chPtr->next) {
+ if (!chPtr->hidden) {
+ return chPtr;
+ }
+ }
+ }
+ return NULL;
+ }
+ if (y >= chPtr->allHeight) {
+ /*
+ * Position is past the end of the list, return the last element.
+ */
+ HListElement * vis;
+
+ chPtr=wPtr->root;
+ while (1) {
+ if (chPtr->childTail == NULL) {
+ break;
+ }
+ for (vis = chPtr->childTail; vis && vis->hidden; vis=vis->prev) {
+ ;
+ }
+ if (vis == NULL) {
+ break;
+ } else {
+ chPtr = vis;
+ continue;
+ }
+ }
+ if (chPtr == wPtr->root) {
+ /*
+ * There is either no element, or all elements are not visible
+ */
+ return NULL;
+ } else {
+ return chPtr;
+ }
+ }
+
+ /*
+ * The following is a tail-recursive function flatten out in a while
+ * loop.
+ */
+
+ while (1) {
+ again:
+ for (chPtr=chPtr->childHead; chPtr!=NULL; chPtr=chPtr->next) {
+ if (!chPtr->hidden) {
+ if (top <= y && y < top + chPtr->allHeight) {
+ if (y < top + chPtr->height) {
+ return chPtr;
+ } else {
+ top += chPtr->height;
+ goto again;
+ }
+ } else {
+ top += chPtr->allHeight;
+ }
+ }
+ }
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_HLFindElement --
+ *
+ * Finds an element according to its pathname.
+ *
+ * Results:
+ * Pointer to the element if found. Otherwise NULL.
+ *
+ * Side effects:
+ * None
+ *--------------------------------------------------------------
+ */
+HListElement * Tix_HLFindElement(interp, wPtr, pathName)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ CONST84 char * pathName;
+{
+ Tcl_HashEntry * hashPtr;
+
+ if (pathName) {
+ hashPtr = Tcl_FindHashEntry(&wPtr->childTable, pathName);
+
+ if (hashPtr) {
+ return (HListElement*) Tcl_GetHashValue(hashPtr);
+ } else {
+ Tcl_AppendResult(interp, "Entry \"", pathName,
+ "\" not found", NULL);
+ return NULL;
+ }
+ }
+ else {
+ /* pathName == 0 is the root element */
+ return wPtr->root;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * SelectionModifyRange --
+ *
+ * Select or de-select all the elements between from and to
+ * (inclusive), according to the "select" argument.
+ *
+ * select == 1 : select
+ * select == 0 : de-select
+ *
+ * Return value:
+ * Whether the selection was actually changed
+ *--------------------------------------------------------------
+ */
+static int SelectionModifyRange(wPtr, from, to, select)
+ WidgetPtr wPtr;
+ HListElement * from;
+ HListElement * to;
+ int select;
+{
+ int changed = 0;
+
+ if (Tix_HLElementTopOffset(wPtr, from) > Tix_HLElementTopOffset(wPtr, to)){
+ HListElement * tmp;
+ tmp = to;
+ to = from;
+ from = tmp;
+ }
+
+ while (1) {
+ if (!from->hidden && (int)from->selected != select) {
+ if (select) {
+ SelectionAdd(wPtr, from);
+ } else {
+ HL_SelectionClear(wPtr, from);
+ changed = 1;
+ }
+ }
+
+ if (from == to) {
+ /*
+ * Iterated to the end of the region
+ */
+ break;
+ }
+
+ /*
+ * Go to the next list entry
+ */
+ if (from->childHead) {
+ from = from->childHead;
+ }
+ else if (from->next) {
+ from = from->next;
+ }
+ else {
+ /*
+ * go to a different branch
+ */
+ while (from->parent->next == NULL && from != wPtr->root) {
+ from = from->parent;
+ }
+ if (from == wPtr->root) {
+ /*
+ * Iterated over all list entries
+ */
+ break;
+ } else {
+ from = from->parent->next;
+ }
+ }
+ }
+
+ return changed;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_HLElementTopOffset --
+ *
+ *--------------------------------------------------------------
+ */
+int Tix_HLElementTopOffset(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ int top;
+ HListElement * ptr;
+
+ if (chPtr == wPtr->root) {
+ return 0;
+ }
+ top = Tix_HLElementTopOffset(wPtr, chPtr->parent);
+ top += chPtr->parent->height;
+
+ for (ptr=chPtr->parent->childHead; ptr!=NULL; ptr=ptr->next) {
+ if (ptr == chPtr) {
+ break;
+ }
+ if (ptr->hidden) {
+ continue;
+ }
+ top += ptr->allHeight;
+ }
+ return top;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_HLElementLeftOffset --
+ *
+ *--------------------------------------------------------------
+ */
+int Tix_HLElementLeftOffset(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ int left;
+
+ if (chPtr == wPtr->root || chPtr->parent == wPtr->root) {
+ return 0;
+ }
+
+ left = Tix_HLElementLeftOffset(wPtr, chPtr->parent);
+ left += wPtr->indent;
+
+ return left;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * CurSelection --
+ *
+ * returns the current selection in the result of interp;
+ *
+ *--------------------------------------------------------------
+ */
+static int CurSelection(interp, wPtr, chPtr)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ HListElement * ptr;
+
+ /* Since this recursion starts with wPtr->root, we determine
+ * whether a node is selected when its *parent* is called. This
+ * will save one level of recursion (otherwise all leave nodes will
+ * be recursed once and will be slow ...
+ */
+ for (ptr=chPtr->childHead; ptr; ptr=ptr->next) {
+ if (ptr->selected && !(ptr->hidden)) {
+ Tcl_AppendElement(interp, ptr->pathName);
+ }
+ if (ptr->childHead) {
+ CurSelection(interp, wPtr, ptr);
+ }
+ }
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_HLMarkElementDirty --
+ *
+ * Marks a element "dirty", i.e., its geometry needs to be
+ * recalculated.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The element and all its ancestores are marked dirty
+ *--------------------------------------------------------------
+ */
+void Tix_HLMarkElementDirty(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement *chPtr;
+{
+ HListElement *ptr;
+
+ for (ptr=chPtr; ptr!= NULL && ptr->dirty == 0; ptr=ptr->parent) {
+ ptr->dirty = 1;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * ComputeElementGeometry --
+ *
+ * Compute the geometry of this element (if its dirty) and the
+ * geometry of all its dirty child elements
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The element and all its decendants are marked non-dirty
+ *--------------------------------------------------------------
+ */
+
+static void ComputeElementGeometry(wPtr, chPtr, indent)
+ WidgetPtr wPtr;
+ HListElement *chPtr;
+ int indent;
+{
+ HListElement *ptr;
+ int i;
+
+ if (!chPtr->dirty && !wPtr->allDirty) {
+ return;
+ } else {
+ chPtr->dirty = 0;
+ }
+
+ if (chPtr == wPtr->root) {
+ int i;
+ chPtr->height = 0;
+ chPtr->indent = 0;
+ for (i=0; i<wPtr->numColumns; i++) {
+ chPtr->col[i].width = 0;
+ }
+ } else {
+ ComputeOneElementGeometry(wPtr, chPtr, indent);
+ indent += wPtr->indent;
+ }
+
+ chPtr->allHeight = chPtr->height;
+
+ for (ptr=chPtr->childHead; ptr!=NULL; ptr=ptr->next) {
+ if (ptr->hidden) {
+ continue;
+ }
+ if (ptr->dirty || wPtr->allDirty) {
+ ComputeElementGeometry(wPtr, ptr, indent);
+ }
+
+ /* Propagate the child's size to the parent
+ *
+ */
+ for (i=0; i<wPtr->numColumns; i++) {
+ if (chPtr->col[i].width < ptr->col[i].width) {
+ chPtr->col[i].width = ptr->col[i].width;
+ }
+ }
+ chPtr->allHeight += ptr->allHeight;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * ComputeOneElementGeometry --
+ *
+ * Compute the geometry of the element itself, not including
+ * its children, according to its current display type.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The chPtr->height fields are updated.
+ *--------------------------------------------------------------
+ */
+static void ComputeOneElementGeometry(wPtr, chPtr, indent)
+ WidgetPtr wPtr;
+ HListElement *chPtr;
+ int indent;
+{
+ int i;
+
+ chPtr->indent = indent;
+ chPtr->height = 0;
+
+ ComputeBranchPosition(wPtr, chPtr);
+
+ for (i=0; i<wPtr->numColumns; i++) {
+ Tix_DItem * iPtr = chPtr->col[i].iPtr;
+ int width = 2*wPtr->selBorderWidth;
+ int height = 2*wPtr->selBorderWidth;
+
+ if (iPtr != NULL) {
+ Tix_DItemCalculateSize(iPtr);
+ /*
+ * Tix_DItemWidth() and Tix_DItemHeight() already include padding
+ */
+ width += Tix_DItemWidth (iPtr);
+ height += Tix_DItemHeight(iPtr);
+ }
+ if (chPtr->height < height) {
+ chPtr->height = height;
+ }
+ chPtr->col[i].width = width;
+ }
+ chPtr->col[0].width += indent;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * ComputeBranchPosition --
+ *
+ * Compute the position of the branches
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The chPtr->branchX and chPtr->branchY fields are updated.
+ *--------------------------------------------------------------
+ */
+static void ComputeBranchPosition(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement *chPtr;
+{
+ Tix_DItem * iPtr = chPtr->col[0].iPtr;
+ int branchX, branchY;
+ int iconX;
+ int iconY;
+ int diff;
+
+ if (iPtr) {
+ if (Tix_DItemType(iPtr) == TIX_DITEM_IMAGETEXT) {
+ /*
+ * Calculate the bottom-middle position of the bitmap/image branch
+ */
+ if (iPtr->imagetext.image != NULL) {
+ branchX = iPtr->imagetext.imageW / 2;
+ branchY = iPtr->imagetext.imageH;
+ if (Tix_DItemHeight(iPtr) > iPtr->imagetext.imageH) {
+ int diff = Tix_DItemHeight(iPtr) - iPtr->imagetext.imageH;
+ branchY += diff /2;
+ if (diff % 2) {
+ branchY += 1;
+ }
+ }
+ }
+ else if (iPtr->imagetext.bitmap != None) {
+ branchX = iPtr->imagetext.bitmapW / 2;
+ branchY = iPtr->imagetext.bitmapH;
+ if (Tix_DItemHeight(iPtr) >iPtr->imagetext.bitmapH) {
+ int diff = Tix_DItemHeight(iPtr) - iPtr->imagetext.bitmapH;
+ branchY += diff /2;
+ if (diff % 2) {
+ branchY += 1;
+ }
+ }
+ }
+ else {
+ branchX = wPtr->indent/2;
+ branchY = Tix_DItemHeight(iPtr);
+ }
+ } else {
+ branchX = wPtr->indent/2;
+ branchY = Tix_DItemHeight(iPtr);
+ }
+
+
+ /* X adjustment
+ */
+ iconX = Tix_DItemPadX(iPtr);
+ branchX += Tix_DItemPadX(iPtr);
+
+ /* Y adjustment
+ */
+ iconY = Tix_DItemHeight(iPtr) / 2;
+ diff = chPtr->height - Tix_DItemHeight(iPtr);
+ if (diff > 0) {
+ switch (iPtr->base.stylePtr->anchor) {
+ case TK_ANCHOR_NW: case TK_ANCHOR_N: case TK_ANCHOR_NE:
+ diff = 0;
+ break;
+ case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E:
+ diff /= 2;
+ break;
+ default:
+ /* Do nothing */
+ ;
+ }
+ branchY += diff;
+ iconY += diff;
+ }
+ }
+ else {
+ branchX = wPtr->indent/2;
+ branchY = chPtr->height;
+ iconX = 0;
+ iconY = chPtr->height/2;
+ }
+
+ if (wPtr->useIndicator && chPtr->parent == wPtr->root) {
+ branchX += wPtr->indent;
+ }
+
+ chPtr->branchX = branchX - 1;
+ chPtr->branchY = branchY - 1;
+ chPtr->iconX = iconX - 1;
+ chPtr->iconY = iconY - 1;
+
+ if (chPtr->branchX < 0) {
+ chPtr->branchX = 0;
+ }
+ if (chPtr->branchY < 0) {
+ chPtr->branchY = 0;
+ }
+ if (chPtr->iconX < 0) {
+ chPtr->iconX = 0;
+ }
+ if (chPtr->iconY < 0) {
+ chPtr->iconY = 0;
+ }
+
+ chPtr->branchX += wPtr->selBorderWidth;
+ chPtr->branchY += wPtr->selBorderWidth;
+ chPtr->iconX += wPtr->selBorderWidth;
+ chPtr->iconY += wPtr->selBorderWidth;
+}
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDisplay --
+ *
+ * Draw the widget to the screen.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetDisplay(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Drawable buffer;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ int elmX, elmY;
+ Tcl_Interp *interp = wPtr->dispData.interp;
+
+ wPtr->redrawing = 0; /* clear the redraw flag */
+ wPtr->serial ++;
+
+ if (wPtr->elmToSee != NULL) {
+ HListElement *chPtr;
+
+ if ((chPtr = Tix_HLFindElement(interp, wPtr,
+ wPtr->elmToSee)) == NULL) {
+ Tcl_ResetResult(interp);
+ } else {
+ Tix_HLSeeElement(wPtr, chPtr, 0);
+ UpdateScrollBars(wPtr, 0);
+ }
+
+ ckfree(wPtr->elmToSee);
+ wPtr->elmToSee = NULL;
+ }
+
+
+ /*
+ * STEP (1)
+ * Calculate the drawing parameters
+ */
+ if (wPtr->wideSelect) {
+ wPtr->selectWidth = Tk_Width(wPtr->dispData.tkwin) -
+ (2*wPtr->borderWidth + 2*wPtr->highlightWidth);
+ if (wPtr->selectWidth < wPtr->totalSize[0]) {
+ wPtr->selectWidth = wPtr->totalSize[0];
+ }
+ }
+
+ /* Used to clip off elements that are too low to see */
+ wPtr->bottomPixel = Tk_Height(wPtr->dispData.tkwin) - 2*wPtr->borderWidth
+ - 2*wPtr->highlightWidth;
+
+ elmX = wPtr->borderWidth + wPtr->highlightWidth - wPtr->leftPixel;
+ elmY = wPtr->borderWidth + wPtr->highlightWidth - wPtr->topPixel;
+
+ if (wPtr->useHeader) {
+ elmY += wPtr->headerHeight;
+ }
+
+ /*
+ * STEP (2)
+ * Draw the list body
+ */
+ buffer = Tix_GetRenderBuffer(wPtr->dispData.display, Tk_WindowId(tkwin),
+ Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
+
+ /* Fill the background */
+ XFillRectangle(wPtr->dispData.display, buffer, wPtr->backgroundGC,
+ 0, 0, (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin));
+
+ DrawElements(wPtr, buffer, wPtr->root, elmX, elmY,
+ wPtr->borderWidth + wPtr->highlightWidth - wPtr->leftPixel);
+
+ if (wPtr->borderWidth > 0) {
+ /* Draw the border */
+ Tk_Draw3DRectangle(wPtr->dispData.tkwin, buffer, wPtr->border,
+ wPtr->highlightWidth, wPtr->highlightWidth,
+ Tk_Width(tkwin) - 2*wPtr->highlightWidth,
+ Tk_Height(tkwin) - 2*wPtr->highlightWidth, wPtr->borderWidth,
+ wPtr->relief);
+ }
+
+ if (wPtr->highlightWidth > 0) {
+ /* Draw the highlight */
+ GC gc;
+
+ if (wPtr->hasFocus) {
+ gc = wPtr->highlightGC;
+ } else {
+ gc = Tk_3DBorderGC(wPtr->dispData.tkwin, wPtr->border,
+ TK_3D_FLAT_GC);
+ }
+ Tk_DrawFocusHighlight(tkwin, gc, wPtr->highlightWidth, buffer);
+ }
+
+ if (buffer != Tk_WindowId(tkwin)) {
+ /*
+ * Copy the information from the off-screen pixmap onto the screen,
+ * then delete the pixmap.
+ */
+
+ XCopyArea(wPtr->dispData.display, buffer, Tk_WindowId(tkwin),
+ wPtr->normalGC, 0, 0,
+ (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0);
+ Tk_FreePixmap(wPtr->dispData.display, buffer);
+ }
+
+ /*
+ * STEP (3)
+ * Draw the header
+ */
+ if (wPtr->useHeader) {
+ /* We need to draw the header after the elements, because some
+ * half-scrolled elements may overwrite the space for the header
+ */
+ int hdrX, hdrY, hdrW, hdrH, pad, xOffset;
+ Drawable buffer;
+
+ pad = wPtr->borderWidth + wPtr->highlightWidth;
+ hdrX = pad;
+ hdrY = pad;
+ hdrW = Tk_Width(tkwin) - 2*pad;
+ hdrH = wPtr->headerHeight;
+ xOffset = wPtr->leftPixel;
+
+ Tk_MoveResizeWindow(wPtr->headerWin, hdrX, hdrY, hdrW, hdrH);
+ Tk_MapWindow(wPtr->headerWin);
+
+ buffer = Tix_GetRenderBuffer(wPtr->dispData.display,
+ Tk_WindowId(wPtr->headerWin), hdrW, hdrH,
+ Tk_Depth(wPtr->headerWin));
+
+ XFillRectangle(wPtr->dispData.display, buffer,
+ wPtr->backgroundGC, 0, 0, (unsigned) hdrW, (unsigned) hdrH);
+
+ Tix_HLDrawHeader(wPtr, buffer, wPtr->normalGC,
+ 0, 0, hdrW, hdrH, xOffset);
+
+ if (buffer != Tk_WindowId(wPtr->headerWin)) {
+ XCopyArea(wPtr->dispData.display, buffer,
+ Tk_WindowId(wPtr->headerWin), wPtr->normalGC,
+ 0, 0, (unsigned) hdrW, (unsigned) hdrH, 0, 0);
+
+ Tk_FreePixmap(wPtr->dispData.display, buffer);
+ }
+
+ /* If we map the header window, that may change the size requirement
+ * of the HList
+ * %% Call only when geometry is *really* changed
+ */
+ if (wPtr->sizeCmd) {
+ if (Tcl_GlobalEval(wPtr->dispData.interp, wPtr->sizeCmd)
+ != TCL_OK) {
+ Tcl_AddErrorInfo(wPtr->dispData.interp,
+ "\n (size command executed by tixHList)");
+ Tk_BackgroundError(wPtr->dispData.interp);
+ }
+ }
+ } else {
+ Tk_UnmapWindow(wPtr->headerWin);
+ }
+
+ /* unmap those windows we mapped the last time */
+ Tix_UnmapInvisibleWindowItems(&wPtr->mappedWindows, wPtr->serial);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DrawElements() --
+ *
+ * Draws an element and all of its visible descendants.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+DrawElements(wPtr, drawable, chPtr, x, y, xOffset)
+ WidgetPtr wPtr; /* Widget to render */
+ Drawable drawable; /* Drawable to draw into */
+ HListElement * chPtr; /* Draw this element and its visible
+ * descendants */
+ int x; /* x position of the element's
+ * top-left corner */
+ int y; /* y position of the element's
+ * top-left corner */
+ int xOffset; /* x-offset due to horizontal
+ * scrolling */
+{
+ HListElement * ptr, * lastVisible;
+ GC gc = wPtr->normalGC;
+ int myIconX = 0, myIconY = 0; /* center of my icon */
+ int childIconX, childIconY; /* center of child's icon */
+ int childY, childX;
+ int oldY;
+ int top = wPtr->useHeader ? wPtr->headerHeight : 0;
+ int left = 0;
+ int bottom = Tk_Height(wPtr->dispData.tkwin);
+ int right = Tk_Width(wPtr->dispData.tkwin);
+
+ if (chPtr != wPtr->root) {
+ if (bottom > y && (y + chPtr->height) >= top) {
+ /*
+ * This element is (at least partialy) visible
+ */
+
+ DrawOneElement(wPtr, drawable, chPtr, x, y, xOffset);
+ }
+ myIconX = x + chPtr->branchX;
+ myIconY = y + chPtr->branchY;
+
+ if (wPtr->useIndicator && chPtr->parent == wPtr->root) {
+ childX = x + 2 * wPtr->indent;
+ } else {
+ childX = x + wPtr->indent;
+ }
+ childY = y + chPtr->height;
+ if (myIconX > childX) {
+ /* Can't shift the vertical branch too much to the right */
+ myIconX = childX;
+ }
+ } else {
+ childX = x;
+ childY = y;
+ }
+
+ oldY = childY; /* saved for 2nd iteration */
+
+ /* find the last non-hidden element,
+ * to determine when to draw the vertical line
+ */
+ lastVisible = NULL;
+ for (ptr = chPtr->childTail; ptr!=NULL; ptr=ptr->prev) {
+ if (! ptr->hidden) {
+ lastVisible = ptr;
+ break;
+ }
+ }
+
+ if (lastVisible == NULL) {
+ /* No child is visible */
+ return;
+ }
+
+ /* First iteration : draw the entries and branches */
+ for (ptr = chPtr->childHead; ptr!=NULL; ptr=ptr->next) {
+ if (ptr->hidden) {
+ continue;
+ }
+
+ childIconX = childX + ptr->iconX;
+ childIconY = childY + ptr->iconY;
+
+ if (bottom > childY && (childY + ptr->allHeight) >= top) {
+ DrawElements(wPtr, drawable, ptr, childX, childY, xOffset);
+
+ if (wPtr->drawBranch && chPtr != wPtr->root
+ && top <= childIconY && childIconY <= bottom) {
+ /*
+ * Draw a horizontal branch to the child. We draw the line
+ * after drawing the element, because DrawElement may
+ * clear out some area around the element.
+ */
+ XDrawLine(wPtr->dispData.display, drawable, gc, myIconX,
+ childIconY, childIconX, childIconY);
+ }
+ }
+
+ /*
+ * -- no branches for toplevel elements
+ * -- for last element, draw a vertical branch, even if element
+ * is not seen
+ */
+ if (ptr == lastVisible && wPtr->drawBranch
+ && chPtr != wPtr->root && childIconY >= top
+ && left <= myIconX && myIconX <= right) {
+ /*
+ * clip vertical lines to avoid wrap-around
+ */
+ int y0 = myIconY < 0 ? 0 : myIconY;
+ int y1 = childIconY > bottom ? bottom : childIconY;
+
+ XDrawLine(wPtr->dispData.display, drawable, gc, myIconX, y0,
+ myIconX, y1);
+ }
+ childY += ptr->allHeight;
+ }
+
+ if (!wPtr->useIndicator) {
+ return;
+ }
+ childY = oldY;
+
+ /* Second iteration : draw the indicators */
+ for (ptr = chPtr->childHead; ptr!=NULL; ptr=ptr->next) {
+ int cY = childY;
+
+ if (ptr->hidden) {
+ continue;
+ }
+ childY += ptr->allHeight;
+ childIconY = cY + ptr->iconY;
+
+ if (bottom > cY && (cY + ptr->allHeight) >= top
+ && ptr->indicator != NULL
+ ) {
+ /* Otherwise all descendants of ptr are not seen at all
+ */
+ int justMapped,
+ indW = Tix_DItemWidth (ptr->indicator),
+ indH = Tix_DItemHeight(ptr->indicator),
+ indY = childIconY - indH/2,
+ indX = (chPtr == wPtr->root
+ ? (wPtr->indent / 2 + wPtr->borderWidth
+ + wPtr->highlightWidth - wPtr->leftPixel)
+ : myIconX) - indW/2;
+ if ( indX > right || (indX + indW) < left
+ || indY > bottom ||(indY + indH) < top
+ ) {
+ continue; /* indicator not visible */
+ }
+
+ justMapped = 0;
+ if (Tix_DItemType(ptr->indicator) == TIX_DITEM_WINDOW) {
+ Tix_SetWindowItemSerial(&wPtr->mappedWindows,
+ ptr->indicator, wPtr->serial);
+ if (!Tk_IsMapped(ptr->indicator->window.tkwin)) {
+ justMapped = 1;
+ }
+ }
+
+ /* Put down the indicator */
+ Tix_DItemDisplay(drawable, ptr->indicator,
+ indX, indY, indW, indH, 0, 0,
+ TIX_DITEM_NORMAL_FG|TIX_DITEM_NORMAL_BG);
+
+ if (justMapped) {
+ Tk_RestackWindow(ptr->indicator->window.tkwin, Below, NULL);
+ }
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DrawOneElement --
+ *--------------------------------------------------------------
+ */
+
+static void
+DrawOneElement(wPtr, drawable, chPtr, x, y, xOffset)
+ WidgetPtr wPtr; /* Widget to render */
+ Drawable drawable; /* Drawable to draw into */
+ HListElement * chPtr; /* Draw this element and its visible
+ * descendants */
+ int x; /* x position of the element's
+ * top-left corner */
+ int y; /* y position of the element's
+ * top-left corner */
+ int xOffset; /* x-offset due to horizontal
+ * scrolling */
+{
+ int flags0 = TIX_DITEM_NORMAL_FG; /* DItem flags for column 0 */
+ int flags1 = TIX_DITEM_NORMAL_FG; /* DItem flags for column 1 and above*/
+ int i;
+ int selectWidth, selectX;
+ int hasDrawnBackground = 0;
+
+ x = xOffset + chPtr->indent;
+
+ if (wPtr->wideSelect) {
+ selectWidth = wPtr->selectWidth;
+ selectX = xOffset;
+ } else {
+ selectWidth = Tix_DItemWidth(chPtr->col[0].iPtr)
+ + 2*wPtr->selBorderWidth;
+ selectX = x;
+ }
+
+ if (chPtr->selected && wPtr->wideSelect) {
+ Tk_Fill3DRectangle(wPtr->dispData.tkwin, drawable, wPtr->selectBorder,
+ selectX, y, selectWidth, chPtr->height, wPtr->selBorderWidth,
+ TK_RELIEF_RAISED);
+ hasDrawnBackground = 1;
+ }
+
+ if (chPtr->selected) {
+ flags0 |= TIX_DITEM_SELECTED_FG;
+
+ if (hasDrawnBackground) {
+ flags1 |= TIX_DITEM_SELECTED_FG;
+ } else {
+ flags0 |= TIX_DITEM_SELECTED_BG;
+ flags0 |= TIX_DITEM_NORMAL_BG;
+ }
+ } else {
+ flags0 |= TIX_DITEM_NORMAL_BG;
+ }
+
+ if (!hasDrawnBackground) {
+ flags1 |= TIX_DITEM_NORMAL_BG;
+ }
+
+ if (chPtr == wPtr->anchor) {
+ flags0 |= TIX_DITEM_ACTIVE_FG;
+
+ if (hasDrawnBackground) {
+ flags1 |= TIX_DITEM_ACTIVE_FG;
+ } else {
+ flags0 |= TIX_DITEM_ACTIVE_BG;
+ if (wPtr->hasFocus && !(wPtr->wideSelect)) {
+ flags0 |= TIX_DITEM_ANCHOR;
+ }
+ }
+ }
+
+ if (chPtr == wPtr->dropSite) {
+ /*
+ * Draw a rectangle to indicate that this is a drop site.
+ *
+ * TOD: what about wide-select??
+ */
+
+ XDrawRectangle(Tk_Display(wPtr->dispData.tkwin), drawable,
+ wPtr->dropSiteGC, selectX, y,
+ (unsigned) selectWidth-1, (unsigned) chPtr->height-1);
+ }
+
+ /*
+ * Now Draw the display items in each column
+ *
+ * %% ToDo: clip off the non-visible items
+ */
+
+ for (x=xOffset, i=0; i<wPtr->numColumns; i++) {
+ Tix_DItem * iPtr = chPtr->col[i].iPtr;
+ int drawX, drawY, drawW, drawH;
+ int drawOffX, drawOffY;
+ int flags;
+
+ if (iPtr != NULL) {
+ int justMapped = 0;
+
+
+ if (Tix_DItemType(iPtr) == TIX_DITEM_WINDOW) {
+ Tix_SetWindowItemSerial(&wPtr->mappedWindows,iPtr,
+ wPtr->serial);
+ if (!Tk_IsMapped(iPtr->window.tkwin)) {
+ justMapped = 1;
+ }
+ }
+
+ drawX = x;
+ drawY = y;
+ drawW = wPtr->actualSize[i].width;
+ drawH = chPtr->height;
+
+ drawOffX = wPtr->selBorderWidth;
+ drawOffY = wPtr->selBorderWidth;
+
+ if (i == 0) {
+ flags = flags0;
+ drawOffX += chPtr->indent;
+ } else {
+ flags = flags1;
+ }
+
+ Tix_DItemDisplay(drawable, iPtr, drawX, drawY, drawW, drawH,
+ drawOffX, drawOffY, flags);
+
+ if (justMapped) {
+ /*
+ * We need to lower it so that it doesn't
+ * overlap the header subwindow
+ */
+
+ Tk_RestackWindow(iPtr->window.tkwin, Below, NULL);
+ }
+ }
+
+ x += wPtr->actualSize[i].width;
+ }
+
+ if (chPtr == wPtr->anchor && wPtr->hasFocus && wPtr->wideSelect) {
+ int ancX, ancY, ancW, ancH;
+ ancX = selectX + wPtr->selBorderWidth;
+ ancY = y + wPtr->selBorderWidth;
+ ancW = selectWidth - 2*wPtr->selBorderWidth;
+ ancH = chPtr->height - 2*wPtr->selBorderWidth;
+
+ /*
+ * TODO: use a different anchorGC on normal background
+ */
+ Tix_DrawAnchorLines(Tk_Display(wPtr->dispData.tkwin), drawable,
+ wPtr->anchorGC, ancX, ancY, ancW, ancH);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * SelectionAdd --
+ *--------------------------------------------------------------
+ */
+static void SelectionAdd(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ if (chPtr->selected) { /* sanity check */
+ return;
+ }
+
+ chPtr->selected = 1;
+ SelectionNotifyAncestors(wPtr, chPtr->parent);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * HL_SelectionClear --
+ *--------------------------------------------------------------
+ */
+static void HL_SelectionClear(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ if (! chPtr->selected) { /* sanity check */
+ return;
+ }
+
+ chPtr->selected = 0;
+ HL_SelectionClearNotifyAncestors(wPtr, chPtr->parent);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * HL_SelectionClearAll --
+ *--------------------------------------------------------------
+ */
+static void HL_SelectionClearAll(wPtr, chPtr, changed_ret)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+ int * changed_ret;
+{
+ HListElement * ptr;
+
+ if (chPtr->selected) {
+ *changed_ret = 1;
+ chPtr->selected = 0;
+ }
+
+ if (chPtr->numSelectedChild == 0) {
+ return;
+ } else {
+ chPtr->numSelectedChild = 0;
+
+ for (ptr=chPtr->childHead; ptr; ptr=ptr->next) {
+ HL_SelectionClearAll(wPtr, ptr, changed_ret);
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * SelectionNotifyAncestors --
+ *
+ * !!This has nothing to do with SelectionNotify in X!!
+ *
+ * HList keeps a counter in every entry on how many of its
+ * child entries has been selected. This will make the
+ * "selection clear" very efficient. To keep this counter
+ * up-to-date, we must call SelectionNotifyAncestors() or
+ * HL_SelectionClearNotifyAncestors every time the selection
+ * has changed.
+ *--------------------------------------------------------------
+ */
+static void SelectionNotifyAncestors(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ chPtr->numSelectedChild ++;
+
+ if (chPtr->selected || (chPtr->numSelectedChild > 1)) {
+ /* My ancestors already know that I have selections */
+ return;
+ } else {
+ if (chPtr != wPtr->root) {
+ SelectionNotifyAncestors(wPtr, chPtr->parent);
+ }
+ }
+}
+
+static void HL_SelectionClearNotifyAncestors(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ chPtr->numSelectedChild --;
+
+ if (chPtr->selected || (chPtr->numSelectedChild > 0)) {
+ /* I still have selections, don't need to notify parent */
+ return;
+ } else {
+ if (chPtr != wPtr->root) {
+ SelectionNotifyAncestors(wPtr, chPtr->parent);
+ }
+ }
+}
+/*
+ *--------------------------------------------------------------
+ * DeleteOffsprings --
+ *--------------------------------------------------------------
+ */
+static void DeleteOffsprings(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ HListElement * ptr;
+ HListElement * toFree;
+
+ ptr=chPtr->childHead;
+ while (ptr) {
+ DeleteOffsprings(wPtr, ptr);
+ toFree = ptr;
+ ptr=ptr->next;
+ FreeElement(wPtr, toFree);
+ }
+
+ chPtr->childHead = 0;
+ chPtr->childTail = 0;
+}
+
+/*
+ *--------------------------------------------------------------
+ * DeleteSiblings --
+ *--------------------------------------------------------------
+ */
+static void DeleteSiblings(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ HListElement * ptr;
+
+ for (ptr=chPtr->parent->childHead; ptr; ptr=ptr->next) {
+ if (ptr != chPtr) {
+ DeleteNode(wPtr, ptr);
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * DeleteNode --
+ *--------------------------------------------------------------
+ */
+static void DeleteNode(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ if (chPtr->parent == NULL) {
+ /*
+ * This is root node : can't delete
+ */
+ return;
+ }
+
+ DeleteOffsprings(wPtr, chPtr);
+
+ /*
+ * Check for deleting parent's first child
+ */
+ if (chPtr == chPtr->parent->childHead) {
+ chPtr->parent->childHead = chPtr->next;
+ }
+ else {
+ chPtr->prev->next = chPtr->next;
+ }
+
+ /*
+ * Check for 'last' child (could be both first AND last)
+ */
+ if (chPtr == chPtr->parent->childTail) {
+ chPtr->parent->childTail = chPtr->prev;
+ }
+ else {
+ chPtr->next->prev = chPtr->prev;
+ }
+
+ FreeElement(wPtr, chPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * UpdateOneScrollBar --
+ *--------------------------------------------------------------
+ */
+static void UpdateOneScrollBar(wPtr, command, total, window, first)
+ WidgetPtr wPtr;
+ CONST84 char * command;
+ int total;
+ int window;
+ int first;
+{
+ char string[100];
+ double d_first, d_last;
+
+ GetScrollFractions(total, window, first, &d_first, &d_last);
+
+ sprintf(string, " %g %g", d_first, d_last);
+ if (Tix_GlobalVarEval(wPtr->dispData.interp, command, string,
+ (char *) NULL) != TCL_OK) {
+ Tcl_AddErrorInfo(wPtr->dispData.interp,
+ "\n (scrolling command executed by tixHList)");
+ Tk_BackgroundError(wPtr->dispData.interp);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * UpdateScrollBars
+ *----------------------------------------------------------------------
+ */
+static void UpdateScrollBars(wPtr, sizeChanged)
+ WidgetPtr wPtr;
+ int sizeChanged;
+{
+ int total, window, first;
+
+ CheckScrollBar(wPtr, TIX_X);
+ CheckScrollBar(wPtr, TIX_Y);
+
+ if (wPtr->xScrollCmd) {
+ total = wPtr->totalSize[0];
+ window = Tk_Width(wPtr->dispData.tkwin)
+ - 2*wPtr->borderWidth - 2*wPtr->highlightWidth;
+ first = wPtr->leftPixel;
+ UpdateOneScrollBar(wPtr, wPtr->xScrollCmd, total, window, first);
+ }
+
+ if (wPtr->yScrollCmd) {
+ total = wPtr->totalSize[1];
+ window = Tk_Height(wPtr->dispData.tkwin)
+ - 2*wPtr->borderWidth - 2*wPtr->highlightWidth;
+ first = wPtr->topPixel;
+
+ if (wPtr->useHeader) {
+ window -= wPtr->headerHeight;
+ }
+ UpdateOneScrollBar(wPtr, wPtr->yScrollCmd, total, window, first);
+ }
+
+ if (wPtr->sizeCmd && sizeChanged) {
+ if (Tcl_GlobalEval(wPtr->dispData.interp, wPtr->sizeCmd) != TCL_OK) {
+ Tcl_AddErrorInfo(wPtr->dispData.interp,
+ "\n (size command executed by tixHList)");
+ Tk_BackgroundError(wPtr->dispData.interp);
+ }
+ }
+}
+
+/*----------------------------------------------------------------------
+ * XScrollByUnits
+ *----------------------------------------------------------------------
+ */
+static int XScrollByUnits(wPtr, count)
+ WidgetPtr wPtr;
+ int count;
+{
+ return wPtr->leftPixel + count*wPtr->scrollUnit[0];
+}
+
+/*----------------------------------------------------------------------
+ * XScrollByPages
+ *----------------------------------------------------------------------
+ */
+static int XScrollByPages(wPtr, count)
+ WidgetPtr wPtr;
+ int count;
+{
+ return wPtr->leftPixel + count*Tk_Width(wPtr->dispData.tkwin);
+}
+
+/*----------------------------------------------------------------------
+ * YScrollByUnits
+ *----------------------------------------------------------------------
+ */
+static int YScrollByUnits(wPtr, count)
+ WidgetPtr wPtr;
+ int count;
+{
+ HListElement * chPtr;
+ int height;
+
+ if ((chPtr = FindElementAtPosition(wPtr, 0))) {
+ height = chPtr->height;
+ } else if (wPtr->root->childHead) {
+ height = wPtr->root->childHead->height;
+ } else {
+ height = 0;
+ }
+
+ return wPtr->topPixel + count*height;
+}
+
+/*----------------------------------------------------------------------
+ * YScrollByPages
+ *----------------------------------------------------------------------
+ */
+static int YScrollByPages(wPtr, count)
+ WidgetPtr wPtr;
+ int count;
+{
+ int window = Tk_Height(wPtr->dispData.tkwin)
+ - 2*wPtr->borderWidth - 2*wPtr->highlightWidth;
+
+ if (wPtr->useHeader) {
+ window -= wPtr->headerHeight;
+ }
+
+ return wPtr->topPixel + count*window;
+}
+
+/*----------------------------------------------------------------------
+ * CheckScrollBar
+ *
+ * Make sures that the seeting of the scrollbars are correct: i.e.
+ * the bottom element will never be scrolled up by too much.
+ *----------------------------------------------------------------------
+ */
+static void CheckScrollBar(wPtr, which)
+ WidgetPtr wPtr;
+ int which;
+{
+ int window;
+ int total;
+ int first;
+
+ if (which == TIX_Y) {
+ window = Tk_Height(wPtr->dispData.tkwin)
+ - 2*wPtr->borderWidth - 2*wPtr->highlightWidth;
+ if (wPtr->useHeader) {
+ window -= wPtr->headerHeight;
+ }
+ total = wPtr->totalSize[1];
+ first = wPtr->topPixel;
+ } else {
+ window = Tk_Width(wPtr->dispData.tkwin)
+ - 2*wPtr->borderWidth - 2*wPtr->highlightWidth;
+ total = wPtr->totalSize[0];
+ first = wPtr->leftPixel;
+ }
+
+ /* Check whether the topPixel is out of bound */
+ if (first < 0) {
+ first = 0;
+ } else {
+ if (window > total) {
+ first = 0;
+ } else if ((first + window) > total) {
+ first = total - window;
+ }
+ }
+
+ if (which == TIX_Y) {
+ wPtr->topPixel = first;
+ } else {
+ wPtr->leftPixel = first;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * GetScrollFractions --
+ *
+ * Compute the fractions of a scroll-able widget.
+ *
+ */
+static void GetScrollFractions(total, window, first, first_ret, last_ret)
+ int total;
+ int window;
+ int first;
+ double * first_ret;
+ double * last_ret;
+{
+ if (total == 0 || total < window) {
+ *first_ret = 0.0;
+ *last_ret = 1.0;
+ } else {
+ *first_ret = (double)(first) / (double)(total);
+ *last_ret = (double)(first+window) / (double)(total);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Find the element that's immediately below this element.
+ *
+ *----------------------------------------------------------------------
+ */
+static HListElement *
+FindNextEntry(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ if (chPtr->childHead != NULL) {
+ return chPtr->childHead;
+ }
+ if (chPtr->next) {
+ return chPtr->next;
+ }
+
+ /* go to a different branch */
+ while (1) {
+ if (chPtr == wPtr->root) {
+ return (HListElement *)NULL;
+ }
+ chPtr = chPtr->parent;
+ if (chPtr->next) {
+ return chPtr->next;
+ }
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Find the element that's immediately above this element.
+ *
+ *----------------------------------------------------------------------
+ */
+static HListElement *
+FindPrevEntry(wPtr, chPtr)
+ WidgetPtr wPtr;
+ HListElement * chPtr;
+{
+ if (chPtr->prev) {
+ /* Find the bottom of this sub-tree
+ */
+ for (chPtr=chPtr->prev; chPtr->childTail; chPtr = chPtr->childTail)
+ ;
+
+ return chPtr;
+ } else {
+ if (chPtr->parent == wPtr->root) {
+ return 0;
+ } else {
+ return chPtr->parent;
+ }
+ }
+}
+
Added: external/tix-8.4.2.x/generic/tixHList.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixHList.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,319 @@
+
+/* $Id: tixHList.h,v 1.2 2004/03/28 02:44:56 hobbs 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
+
+#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. */
+ char * 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:
+ */
+ char *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 */
+ /* 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 */
+
+ char *yScrollCmd; /* Command prefix for communicating with
+ * vertical scrollbar. NULL means no command
+ * to issue. Malloc'ed. */
+ char *xScrollCmd; /* Command prefix for communicating with
+ * horizontal scrollbar. NULL means no command
+ * to issue. Malloc'ed. */
+ char *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 */
+ char *browseCmd; /* The command to call when the selection
+ * changes. */
+ char *indicatorCmd; /* The command to call when the user touches
+ * the indicator. */
+ char *dragCmd; /* The command to call when info about a
+ * drag source is needed */
+ char *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 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, CONST84 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, CONST84 char** argv));
+EXTERN int Tix_HLHeader _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char **argv));
+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_ */
+
Added: external/tix-8.4.2.x/generic/tixImgCmp.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixImgCmp.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1514 @@
+
+/* $Id: tixImgCmp.c,v 1.6 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tkImgCmp.c --
+ *
+ * This procedure implements images of type "compound" for Tix.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+
+/*
+ * ToDo:
+ * - lineconfig and itemconfig command
+ */
+
+/*
+ * The following data structure represents the master for a bitmap
+ * image:
+ */
+typedef struct CmpMaster {
+ 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. */
+ Display * display; /* Display of the the window associated with
+ * this image. We need to keep it
+ * because Tk_Display(CmpMaster.tkwin) may
+ * be invalid. */
+ Tk_Window tkwin; /* default options are taken from this window.
+ * If undefined, will use the main window
+ * of this application */
+ int width, height; /* Dimensions of image. */
+ int padX, padY;
+ struct CmpLine * lineHead;
+ struct CmpLine * lineTail;
+
+ /* Thde default options, etc */
+ int borderWidth; /* Width of 3-D borders. */
+ Tk_3DBorder background; /* Used for drawing background. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+
+ TixFont font; /* Information about text font.*/
+ XColor *foreground; /* Color for drawing text and bitmaps */
+ GC gc; /* default GC for drawing text. */
+
+ int showBackground; /* whether the background should be drawn */
+ unsigned int changing; /* is this image going to call Tk_ImageChanged
+ * in an idle event? */
+ unsigned int isDeleted;
+} CmpMaster;
+
+#define TYPE_TEXT 0
+#define TYPE_SPACE 1
+#define TYPE_IMAGE 2
+#define TYPE_BITMAP 3
+#define TYPE_WIDGET 4
+
+typedef struct CmpLine {
+ struct CmpMaster *masterPtr;
+ struct CmpLine * next;
+ struct CmpItem * itemHead;
+ struct CmpItem * itemTail;
+ int padX, padY;
+ Tk_Anchor anchor;
+ int width, height; /* Dimensions of this line. */
+
+} CmpLine;
+
+/* abstract type */
+
+#define COMMON_MEMBERS \
+ struct CmpLine * line; \
+ struct CmpItem * next; \
+ Tk_Anchor anchor; \
+ char type; \
+ int width; \
+ int height; \
+ int padX, padY
+
+typedef struct CmpItem {
+ COMMON_MEMBERS;
+} CmpItem;
+
+typedef struct CmpBitmapItem {
+ COMMON_MEMBERS;
+
+ Pixmap bitmap;
+ XColor *foreground;
+ XColor *background;
+ GC gc; /* GC for drawing the bitmap. */
+} CmpBitmapItem;
+
+typedef struct CmpImageItem {
+ COMMON_MEMBERS;
+
+ Tk_Image image;
+ char * imageString;
+} CmpImageItem;
+
+typedef struct CmpSpaceItem {
+ COMMON_MEMBERS;
+
+} CmpSpaceItem;
+
+typedef struct CmpTextItem {
+ COMMON_MEMBERS;
+
+ char * text;
+ int numChars;
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ int wrapLength;
+ int underline; /* Index of character to underline. < 0 means
+ * don't underline anything. */
+ XColor *foreground;
+ TixFont font; /* Information about text font, or NULL. */
+ GC gc; /* GC for drawing the bitmap. */
+} CmpTextItem;
+
+typedef union CmpItemPtr {
+ CmpItem * item;
+ CmpBitmapItem * bitmap;
+ CmpImageItem * image;
+ CmpSpaceItem * space;
+ CmpTextItem * text;
+} CmpItemPtr;
+
+/*
+ * The type record for bitmap images:
+ */
+static int ImgCmpCreate _ANSI_ARGS_((Tcl_Interp *interp,
+ char *name, int argc, Tcl_Obj *CONST objv[],
+ Tk_ImageType *typePtr, Tk_ImageMaster master,
+ ClientData *clientDataPtr));
+static ClientData ImgCmpGet _ANSI_ARGS_((Tk_Window tkwin,
+ ClientData clientData));
+static void ImgCmpDisplay _ANSI_ARGS_((ClientData clientData,
+ Display *display, Drawable drawable,
+ int imageX, int imageY, int width, int height,
+ int drawableX, int drawableY));
+static void ImgCmpFree _ANSI_ARGS_((ClientData clientData,
+ Display *display));
+static void ImgCmpDelete _ANSI_ARGS_((ClientData clientData));
+static void ImgCmpFreeResources _ANSI_ARGS_((ClientData clientData));
+
+Tk_ImageType tixCompoundImageType = {
+ "compound", /* name */
+ ImgCmpCreate, /* createProc */
+ ImgCmpGet, /* getProc */
+ ImgCmpDisplay, /* displayProc */
+ ImgCmpFree, /* freeProc */
+ ImgCmpDelete, /* deleteProc */
+ NULL, /* postscriptProc (tk8.3 or later)*/
+ NULL, /* nextPtr */
+ NULL, /* reserved */
+};
+
+static Tk_ConfigSpec configSpecs[] = {
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_CMPIMAGE_BG_COLOR, Tk_Offset(CmpMaster, background),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_CMPIMAGE_BG_MONO, Tk_Offset(CmpMaster, background),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", (char *) NULL,
+ "0", Tk_Offset(CmpMaster, borderWidth), 0},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_CMPIMAGE_FONT, Tk_Offset(CmpMaster, font), 0},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_CMPIMAGE_FG_COLOR, Tk_Offset(CmpMaster, foreground),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_CMPIMAGE_FG_MONO, Tk_Offset(CmpMaster, foreground),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-padx", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpMaster, padX), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpMaster, padY), 0},
+
+ {TK_CONFIG_RELIEF, "-relief", (char *) NULL, (char *) NULL,
+ "flat", Tk_Offset(CmpMaster, relief), 0},
+
+ {TK_CONFIG_BOOLEAN, "-showbackground", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpMaster, showBackground), 0},
+
+ {TK_CONFIG_WINDOW, "-window", (char *) NULL, (char *) NULL,
+ (char *) NULL, Tk_Offset(CmpMaster, tkwin), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec lineConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", (char *) NULL, (char *) NULL,
+ "c", Tk_Offset(CmpLine, anchor), 0},
+ {TK_CONFIG_PIXELS, "-padx", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpLine, padX), 0},
+ {TK_CONFIG_PIXELS, "-pady", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpLine, padY), 0},
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec bitmapConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", (char *) NULL, (char *) NULL,
+ "c", Tk_Offset(CmpBitmapItem, anchor), 0},
+
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ "", Tk_Offset(CmpBitmapItem, background),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_BITMAP, "-bitmap", (char *) NULL, (char *) NULL,
+ "", Tk_Offset(CmpBitmapItem, bitmap), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ "", Tk_Offset(CmpBitmapItem, foreground),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_PIXELS, "-padx", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpBitmapItem, padX), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpBitmapItem, padY), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec imageConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", (char *) NULL, (char *) NULL,
+ "c", Tk_Offset(CmpImageItem, anchor), 0},
+ {TK_CONFIG_STRING, "-image", (char *) NULL, (char *) NULL,
+ (char *) NULL, Tk_Offset(CmpImageItem, imageString), TK_CONFIG_NULL_OK},
+ {TK_CONFIG_PIXELS, "-padx", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpImageItem, padX), 0},
+ {TK_CONFIG_PIXELS, "-pady", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpImageItem, padY), 0},
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec spaceConfigSpecs[] = {
+ {TK_CONFIG_PIXELS, "-height", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpSpaceItem, height), 0},
+ {TK_CONFIG_PIXELS, "-width", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpSpaceItem, width), 0},
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tk_ConfigSpec textConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", (char *) NULL, (char *) NULL,
+ "c", Tk_Offset(CmpTextItem, anchor), 0},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_FONT, "-font", (char *) NULL, (char *) NULL,
+ "", Tk_Offset(CmpTextItem, font), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ "", Tk_Offset(CmpTextItem, foreground),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_JUSTIFY, "-justify", (char *) NULL, (char *) NULL,
+ "left", Tk_Offset(CmpTextItem, justify), 0},
+
+ {TK_CONFIG_PIXELS, "-padx", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpTextItem, padX), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpTextItem, padY), 0},
+
+ {TK_CONFIG_STRING, "-text", (char *) NULL, (char *) NULL,
+ "", Tk_Offset(CmpTextItem, text), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_INT, "-underline", (char *) NULL, (char *) NULL,
+ "-1", Tk_Offset(CmpTextItem, underline), 0},
+
+ {TK_CONFIG_PIXELS, "-wraplength", (char *) NULL, (char *) NULL,
+ "0", Tk_Offset(CmpTextItem, wrapLength), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*
+ * Prototypes for procedures used only locally in this file:
+ */
+
+static int ImgCmpCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char **argv));
+static void ImgCmpCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static int ImgCmpConfigureMaster _ANSI_ARGS_((
+ CmpMaster *masterPtr, int argc, CONST84 char **argv,
+ int flags));
+CmpBitmapItem * AddNewBitmap _ANSI_ARGS_((CmpMaster *masterPtr,
+ CmpLine *line,
+ int argc, CONST84 char **argv));
+CmpImageItem * AddNewImage _ANSI_ARGS_((CmpMaster *masterPtr,
+ CmpLine *line,
+ int argc, CONST84 char **argv));
+CmpSpaceItem * AddNewSpace _ANSI_ARGS_((CmpMaster *masterPtr,
+ CmpLine *line,
+ int argc, CONST84 char **argv));
+CmpTextItem * AddNewText _ANSI_ARGS_((CmpMaster *masterPtr,
+ CmpLine *line,
+ int argc, CONST84 char **argv));
+CmpLine* AddNewLine _ANSI_ARGS_((CmpMaster *masterPtr,
+ int argc, CONST84 char **argv));
+static void CalculateMasterSize _ANSI_ARGS_((
+ ClientData clientData));
+static void ChangeImageWhenIdle _ANSI_ARGS_((
+ CmpMaster *masterPtr));
+static void ImageProc _ANSI_ARGS_((ClientData clientData,
+ int x, int y, int width, int height,
+ int imgWidth, int imgHeight));
+static void FreeLine _ANSI_ARGS_((CmpLine * lPtr));
+static void FreeItem _ANSI_ARGS_((CmpItemPtr p));
+static void CmpEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpCreate --
+ *
+ * This procedure is called by the Tk image code to create "test"
+ * images.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * The data structure for a new image is allocated.
+ *
+ *----------------------------------------------------------------------
+ */
+
+ /* ARGSUSED */
+static int
+ImgCmpCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
+ Tcl_Interp *interp; /* Interpreter for application containing
+ * image. */
+ char *name; /* Name to use for image. */
+ int argc; /* Number of arguments. */
+ Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
+ * include image name or type). */
+ Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
+ Tk_ImageMaster master; /* Token for image, to be used by us in
+ * later callbacks. */
+ ClientData *clientDataPtr; /* Store manager's token for image here;
+ * it will be returned in later callbacks. */
+{
+ CmpMaster *masterPtr;
+ int i;
+ CONST84 char *argvbuf[10];
+ CONST84 char **argv = argvbuf;
+
+ /*
+ * Convert the objv arguments into string equivalent.
+ */
+ if (argc > 10) {
+ argv = (CONST84 char **) ckalloc(argc * sizeof(char *));
+ }
+ for (i = 0; i < argc; i++) {
+ /*
+ * no need to free the value returned by Tcl_GetString. It's
+ * managed by Tcl's object system.
+ */
+
+ argv[i] = Tcl_GetString(objv[i]);
+ }
+
+ masterPtr = (CmpMaster *) ckalloc(sizeof(CmpMaster));
+ masterPtr->tkMaster = master;
+ masterPtr->interp = interp;
+ masterPtr->imageCmd = Tcl_CreateCommand(interp, name, ImgCmpCmd,
+ (ClientData)masterPtr, ImgCmpCmdDeletedProc);
+ masterPtr->tkwin = NULL;
+ masterPtr->display = NULL;
+ masterPtr->width = 0;
+ masterPtr->height = 0;
+ masterPtr->padX = 0;
+ masterPtr->padY = 0;
+ masterPtr->lineHead = NULL;
+ masterPtr->lineTail = NULL;
+ masterPtr->borderWidth = 0;
+ masterPtr->background = NULL;
+ masterPtr->relief = 0;
+ masterPtr->font = NULL;
+ masterPtr->foreground = NULL;
+ masterPtr->gc = None;
+ masterPtr->showBackground = 0;
+ masterPtr->changing = 0;
+ masterPtr->isDeleted = 0;
+
+ if (ImgCmpConfigureMaster(masterPtr, argc, argv, 0) != TCL_OK) {
+ ImgCmpDelete((ClientData) masterPtr);
+ if (argv != argvbuf) {
+ ckfree((char *) argv);
+ }
+ return TCL_ERROR;
+ }
+ *clientDataPtr = (ClientData) masterPtr;
+ if (argv != argvbuf) {
+ ckfree((char *) argv);
+ }
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpConfigureMaster --
+ *
+ * This procedure is called when a bitmap image is created or
+ * reconfigured. It process configuration options and resets
+ * any instances of the image.
+ *
+ * Results:
+ * A standard Tcl return value. If TCL_ERROR is returned then
+ * an error message is left in masterPtr->interp->result.
+ *
+ * Side effects:
+ * Existing instances of the image will be redisplayed to match
+ * the new configuration options.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ImgCmpConfigureMaster(masterPtr, argc, argv, flags)
+ CmpMaster *masterPtr; /* Pointer to data structure describing
+ * overall bitmap image to (reconfigure). */
+ int argc; /* Number of entries in argv. */
+ CONST84 char **argv; /* Pairs of configuration options for image. */
+ int flags; /* Flags to pass to Tk_ConfigureWidget,
+ * such as TK_CONFIG_ARGV_ONLY. */
+{
+ XGCValues gcValues;
+ GC newGC;
+ int i;
+
+ if (argc %2) {
+ Tcl_AppendResult(masterPtr->interp, "value missing for option \"",
+ argv[argc-1], "\"", NULL);
+ return TCL_ERROR;
+ }
+ for (i=0; i<argc; i+=2) {
+ size_t length = strlen(argv[i]);
+ if (strncmp(argv[i], "-window", length) == 0) {
+ masterPtr->tkwin = Tk_NameToWindow(masterPtr->interp, argv[i+1],
+ Tk_MainWindow(masterPtr->interp));
+ if (masterPtr->tkwin == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ }
+ if (masterPtr->tkwin == NULL) {
+ Tcl_AppendResult(masterPtr->interp,
+ "no value given for -window option.", NULL);
+ return TCL_ERROR;
+ }
+ masterPtr->display = Tk_Display(masterPtr->tkwin);
+
+ if (Tk_ConfigureWidget(masterPtr->interp, masterPtr->tkwin,
+ configSpecs, argc, argv, (char *) masterPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ Tk_CreateEventHandler(masterPtr->tkwin,
+ StructureNotifyMask, CmpEventProc, (ClientData)masterPtr);
+
+ /*
+ * Get the default GC for text and bitmaps
+ */
+ gcValues.foreground = masterPtr->foreground->pixel;
+ gcValues.background = Tk_3DBorderColor(masterPtr->background)->pixel;
+ gcValues.font = TixFontId(masterPtr->font);
+ gcValues.graphics_exposures = False;
+ newGC = Tk_GetGC(masterPtr->tkwin,
+ GCBackground|GCForeground|GCFont|GCGraphicsExposures,
+ &gcValues);
+ if (masterPtr->gc != None) {
+ Tk_FreeGC(Tk_Display(masterPtr->tkwin), masterPtr->gc);
+ }
+ masterPtr->gc = newGC;
+
+ ChangeImageWhenIdle(masterPtr);
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * ImgCmpCmd --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to an image managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+static int
+ImgCmpCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about button widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ CmpMaster *masterPtr = (CmpMaster *) clientData;
+ int c, code;
+ size_t length;
+
+ if (argc < 2) {
+ sprintf(interp->result,
+ "wrong # args: should be \"%.50s option ?arg arg ...?\"",
+ argv[0]);
+ return TCL_ERROR;
+ }
+ c = argv[1][0];
+ length = strlen(argv[1]);
+ if ((c == 'a') && (strncmp(argv[1], "add", length) == 0)) {
+ if (argc < 3) {
+ return Tix_ArgcError(interp, argc, argv, 2,
+ "type ?option value? ...");
+ }
+ c = argv[2][0];
+ length = strlen(argv[2]);
+
+ if ((c == 'l') && (strncmp(argv[2], "line", length) == 0)) {
+ CmpLine * newLine;
+
+ newLine = AddNewLine(masterPtr, argc-3, argv+3);
+ if (newLine == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ else {
+ CmpItemPtr p;
+
+ if (masterPtr->lineTail == 0) {
+ if (AddNewLine(masterPtr, 0, 0) == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ if ((c == 'b') && (strncmp(argv[2], "bitmap", length) == 0)) {
+ p.bitmap = AddNewBitmap(masterPtr, masterPtr->lineTail,
+ argc-3, argv+3);
+ if (p.bitmap == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ else if ((c == 'i') && (strncmp(argv[2], "image", length) == 0)) {
+ p.image = AddNewImage(masterPtr, masterPtr->lineTail,
+ argc-3, argv+3);
+ if (p.image == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ else if ((c == 's') && (strncmp(argv[2], "space", length) == 0)) {
+ p.space = AddNewSpace(masterPtr, masterPtr->lineTail,
+ argc-3, argv+3);
+ if (p.space == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ else if ((c == 't') && (strncmp(argv[2], "text", length) == 0)) {
+ p.text = AddNewText(masterPtr, masterPtr->lineTail,
+ argc-3, argv+3);
+ if (p.text == NULL) {
+ return TCL_ERROR;
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"",
+ argv[2], "\", must be bitmap, image, line, ",
+ "space, text or widget", NULL);
+ return TCL_ERROR;
+ }
+
+ /* append to the end of the line */
+ if (masterPtr->lineTail->itemHead == NULL) {
+ masterPtr->lineTail->itemHead = p.item;
+ masterPtr->lineTail->itemTail = p.item;
+ } else {
+ masterPtr->lineTail->itemTail->next = p.item;
+ masterPtr->lineTail->itemTail = p.item;
+ }
+ }
+ ChangeImageWhenIdle(masterPtr);
+ return TCL_OK;
+ } else if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)
+ && (length >= 2)) {
+ if (argc != 3) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " cget option\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ return Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs,
+ (char *) masterPtr, argv[2], 0);
+ } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)
+ && (length >= 2)) {
+ if (argc == 2) {
+ code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),
+ configSpecs, (char *) masterPtr, (char *) NULL, 0);
+ } else if (argc == 3) {
+ code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),
+ configSpecs, (char *) masterPtr, argv[2], 0);
+ } else {
+ int i;
+ for (i=2; i<argc-2; i++) {
+ length = strlen(argv[i]);
+ if (strncmp(argv[i], "-window", length) == 0) {
+ Tcl_AppendResult(interp, "The -window option cannot ",
+ "be changed.", (char *) NULL);
+ return TCL_ERROR;
+ }
+ }
+ code = ImgCmpConfigureMaster(masterPtr, argc-2, argv+2,
+ TK_CONFIG_ARGV_ONLY);
+ }
+ return code;
+ } else if ((c == 'i') && (strncmp(argv[1], "itemconfigure", length)== 0)) {
+ Tcl_AppendResult(interp, "unimplemented", NULL);
+ return TCL_ERROR;
+ } else if ((c == 'l') && (strncmp(argv[1], "lineconfigure", length)== 0)) {
+ Tcl_AppendResult(interp, "unimplemented", NULL);
+ return TCL_ERROR;
+ } else {
+ Tcl_AppendResult(interp, "bad option \"", argv[1],
+ "\": must be cget or configure", (char *) NULL);
+ return TCL_ERROR;
+ }
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+CmpLine *
+AddNewLine(masterPtr, argc, argv)
+ CmpMaster *masterPtr;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ CmpLine * lPtr = (CmpLine *)ckalloc(sizeof(CmpLine));
+
+ lPtr->masterPtr = masterPtr;
+ lPtr->next = NULL;
+ lPtr->itemHead = NULL;
+ lPtr->itemTail = NULL;
+ lPtr->padX = 0;
+ lPtr->padY = 0;
+ lPtr->width = 1;
+ lPtr->height = 1;
+
+ lPtr->anchor = TK_ANCHOR_CENTER;
+
+ if (Tk_ConfigureWidget(masterPtr->interp, masterPtr->tkwin,
+ lineConfigSpecs, argc, argv, (char *) lPtr,
+ TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+ FreeLine(lPtr);
+ return NULL;
+ }
+
+ /*
+ * Append to the end of the master's lines
+ */
+ if (masterPtr->lineHead == NULL) {
+ masterPtr->lineHead = masterPtr->lineTail = lPtr;
+ } else {
+ masterPtr->lineTail->next = lPtr;
+ masterPtr->lineTail = lPtr;
+ }
+
+ return lPtr;
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+CmpBitmapItem *
+AddNewBitmap(masterPtr, line, argc, argv)
+ CmpMaster *masterPtr;
+ CmpLine *line;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ CmpItemPtr p;
+ XGCValues gcValues;
+
+ p.bitmap = (CmpBitmapItem*) ckalloc(sizeof(CmpBitmapItem));
+ p.bitmap->line = line;
+ p.bitmap->next = NULL;
+ p.bitmap->anchor = TK_ANCHOR_CENTER;
+ p.bitmap->type = TYPE_BITMAP;
+ p.bitmap->padX = 0;
+ p.bitmap->padY = 0;
+ p.bitmap->width = 0;
+ p.bitmap->height = 0;
+
+ p.bitmap->bitmap = None;
+ p.bitmap->foreground = NULL;
+ p.bitmap->background = NULL;
+ p.bitmap->gc = None;
+
+ if (Tk_ConfigureWidget(masterPtr->interp, masterPtr->tkwin,
+ bitmapConfigSpecs, argc, argv, (char *) p.bitmap,
+ TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+ goto error;
+ }
+
+ /* Get the GC for the bitmap */
+ if (p.bitmap->background) {
+ gcValues.background = p.bitmap->background->pixel;
+ } else {
+ gcValues.background = Tk_3DBorderColor(masterPtr->background)->pixel;
+ }
+ if (p.bitmap->foreground) {
+ gcValues.foreground = p.bitmap->foreground->pixel;
+ } else {
+ gcValues.foreground = masterPtr->foreground->pixel;
+ }
+ gcValues.graphics_exposures = False;
+ p.bitmap->gc = Tk_GetGC(masterPtr->tkwin,
+ GCBackground|GCForeground|GCGraphicsExposures,
+ &gcValues);
+
+ return p.bitmap;
+
+ error:
+
+ FreeItem(p);
+ return NULL;
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+CmpImageItem *
+AddNewImage(masterPtr, line, argc, argv)
+ CmpMaster *masterPtr;
+ CmpLine *line;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ CmpItemPtr p;
+
+
+ p.image = (CmpImageItem*) ckalloc(sizeof(CmpImageItem));
+ p.image->line = line;
+ p.image->next = NULL;
+ p.image->anchor = TK_ANCHOR_CENTER;
+ p.image->type = TYPE_IMAGE;
+ p.image->padX = 0;
+ p.image->padY = 0;
+ p.image->width = 0;
+ p.image->height = 0;
+
+ p.image->imageString = NULL;
+ p.image->image = NULL;
+
+ if (Tk_ConfigureWidget(masterPtr->interp, masterPtr->tkwin,
+ imageConfigSpecs, argc, argv, (char *) p.image,
+ TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+ goto error;
+ }
+
+ /* Get the image */
+ if (p.image->imageString != NULL) {
+ p.image->image = Tk_GetImage(masterPtr->interp, masterPtr->tkwin,
+ p.image->imageString, ImageProc, (ClientData)p.image);
+ if (p.image->image == NULL) {
+ goto error;
+ }
+ }
+
+ return p.image;
+
+ error:
+
+ FreeItem(p);
+ return NULL;
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+CmpSpaceItem *
+AddNewSpace(masterPtr, line, argc, argv)
+ CmpMaster *masterPtr;
+ CmpLine *line;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ CmpItemPtr p;
+
+ p.space = (CmpSpaceItem*) ckalloc(sizeof(CmpSpaceItem));
+ p.space->line = line;
+ p.space->next = NULL;
+ p.space->anchor = TK_ANCHOR_CENTER;
+ p.space->type = TYPE_SPACE;
+ p.space->padX = 0;
+ p.space->padY = 0;
+ p.space->width = 0;
+ p.space->height = 0;
+
+ if (Tk_ConfigureWidget(masterPtr->interp, masterPtr->tkwin,
+ spaceConfigSpecs, argc, argv, (char *)p.space,
+ TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+ goto error;
+ }
+
+ return p.space;
+
+ error:
+
+ FreeItem(p);
+ return NULL;
+}
+
+/*----------------------------------------------------------------------
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+CmpTextItem *
+AddNewText(masterPtr, line, argc, argv)
+ CmpMaster *masterPtr;
+ CmpLine *line;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ CmpItemPtr p;
+ XGCValues gcValues;
+
+ p.text = (CmpTextItem*) ckalloc(sizeof(CmpTextItem));
+ p.text->line = line;
+ p.text->next = NULL;
+ p.text->anchor = TK_ANCHOR_CENTER;
+ p.text->type = TYPE_TEXT;
+ p.text->padX = 0;
+ p.text->padY = 0;
+ p.text->width = 0;
+ p.text->height = 0;
+
+ p.text->text = NULL;
+ p.text->numChars = 0;
+ p.text->justify = TK_JUSTIFY_CENTER;
+ p.text->underline = -1;
+ p.text->wrapLength = 0;
+
+ p.text->foreground = NULL;
+ p.text->font = NULL;
+ p.text->gc = None;
+
+ if (Tk_ConfigureWidget(masterPtr->interp, masterPtr->tkwin,
+ textConfigSpecs, argc, argv, (char *) p.text,
+ TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+
+ goto error;
+ }
+
+ /* Get the GC for the text */
+ if (p.text->foreground) {
+ gcValues.foreground = p.text->foreground->pixel;
+ } else {
+ gcValues.foreground = masterPtr->foreground->pixel;
+ }
+ if (p.text->font) {
+ gcValues.font = TixFontId(p.text->font);
+ } else {
+ gcValues.font = TixFontId(masterPtr->font);
+ }
+ gcValues.graphics_exposures = False;
+ p.text->gc = Tk_GetGC(masterPtr->tkwin,
+ GCFont|GCForeground|GCGraphicsExposures,
+ &gcValues);
+
+ return p.text;
+
+ error:
+
+ FreeItem(p);
+ return NULL;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpGet --
+ *
+ * This procedure is called for each use of a bitmap image in a
+ * widget.
+ *
+ * Results:
+ * The return value is a token for the instance, which is passed
+ * back to us in calls to ImgCmpDisplay and ImgCmpFree.
+ *
+ * Side effects:
+ * A data structure is set up for the instance (or, an existing
+ * instance is re-used for the new one).
+ *
+ *----------------------------------------------------------------------
+ */
+static ClientData
+ImgCmpGet(tkwin, masterData)
+ Tk_Window tkwin; /* Window in which the instance will be
+ * used. */
+ ClientData masterData; /* Pointer to our master structure for the
+ * image. */
+{
+ CmpMaster *masterPtr = (CmpMaster *)masterData;
+
+ if (tkwin == masterPtr->tkwin) {
+ return masterData;
+ }
+
+ Tcl_AppendResult(masterPtr->interp,
+ "Image \"",
+ Tk_NameOfImage(masterPtr->tkMaster),
+ "\" can only be assigned to window \"",
+ Tk_PathName(masterPtr->tkwin), "\"", NULL);
+ Tcl_AddErrorInfo(masterPtr->interp, "\n (while configuring image \"");
+ Tcl_AddErrorInfo(masterPtr->interp, Tk_NameOfImage(masterPtr->tkMaster));
+ Tcl_AddErrorInfo(masterPtr->interp, "\")");
+ Tk_BackgroundError(masterPtr->interp);
+
+ return NULL;
+}
+
+static void
+CalculateMasterSize(clientData)
+ ClientData clientData;
+{
+ CmpMaster *masterPtr = (CmpMaster *)clientData;
+ CmpLine *lPtr;
+ CmpItemPtr p;
+
+ masterPtr->width = 0;
+ masterPtr->height = 0;
+
+ for (lPtr = masterPtr->lineHead; lPtr; lPtr=lPtr->next) {
+ lPtr->width = 0;
+ lPtr->height = 0;
+ for (p.item = lPtr->itemHead; p.item; p.item=p.item->next) {
+
+ switch (p.item->type) {
+ case TYPE_IMAGE:
+ Tk_SizeOfImage(p.image->image,
+ &p.image->width, &p.image->height);
+ break;
+
+ case TYPE_SPACE:
+ /* Do nothing */
+ break;
+
+ case TYPE_TEXT:
+ {
+ TixFont font;
+
+ if (p.text->text == NULL) {
+ break;
+ }
+
+ if (p.text->font) {
+ font = p.text->font;
+ } else {
+ font = masterPtr->font;
+ }
+
+ p.text->numChars = -1;
+ TixComputeTextGeometry(font, p.text->text,
+ p.text->numChars,
+ p.text->wrapLength,
+ &p.text->width, &p.text->height);
+ }
+ break;
+
+ case TYPE_BITMAP:
+ Tk_SizeOfBitmap(Tk_Display(masterPtr->tkwin),
+ p.bitmap->bitmap, &p.bitmap->width,
+ &p.bitmap->height);
+ break;
+
+ case TYPE_WIDGET:
+
+
+ break;
+ }
+ p.item->width += 2*p.item->padX;
+ p.item->height += 2*p.item->padY;
+
+ lPtr->width += p.item->width;
+ if (lPtr->height < p.item->height) {
+ lPtr->height = p.item->height;
+ }
+ }
+ lPtr->width += 2*lPtr->padX;
+ lPtr->height += 2*lPtr->padY;
+
+ if (masterPtr->width < lPtr->width) {
+ masterPtr->width = lPtr->width;
+ }
+ masterPtr->height += lPtr->height;
+ }
+ masterPtr->width += 2*masterPtr->padX + 2*masterPtr->borderWidth;
+ masterPtr->height += 2*masterPtr->padY + 2*masterPtr->borderWidth;
+
+ Tk_ImageChanged(masterPtr->tkMaster, 0, 0, masterPtr->width,
+ masterPtr->height, masterPtr->width, masterPtr->height);
+ masterPtr->changing = 0;
+}
+
+static void
+ChangeImageWhenIdle(masterPtr)
+ CmpMaster *masterPtr;
+{
+ if (!masterPtr->changing) {
+ masterPtr->changing = 1;
+ Tk_DoWhenIdle(CalculateMasterSize, (ClientData)masterPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpDisplay --
+ *
+ * This procedure is invoked to draw a bitmap image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A portion of the image gets rendered in a pixmap or window.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImgCmpDisplay(clientData, display, drawable, imageX, imageY, width,
+ height, drawableX, drawableY)
+ ClientData clientData; /* Pointer to CmpInstance structure for
+ * for instance to be displayed. */
+ Display *display; /* Display on which to draw image. */
+ Drawable drawable; /* Pixmap or window in which to draw image. */
+ int imageX, imageY; /* Upper-left corner of region within image
+ * to draw. */
+ int width, height; /* Dimensions of region within image to draw.*/
+ int drawableX, drawableY; /* Coordinates within drawable that
+ * correspond to imageX and imageY. */
+{
+ CmpMaster * masterPtr = (CmpMaster*)clientData;
+ CmpLine *lPtr;
+ CmpItemPtr p;
+ int dx, dy, extraX;
+
+ if (masterPtr == NULL) {
+ /* attempting to draw into a invalid window (can only be drawn into
+ * the original window set by the -window option */
+ return;
+ }
+
+ if (masterPtr->showBackground) {
+ Tk_Fill3DRectangle(masterPtr->tkwin, drawable,
+ masterPtr->background,
+ drawableX + masterPtr->padX - imageX,
+ drawableY + masterPtr->padY - imageY,
+ masterPtr->width - 2*masterPtr->padX,
+ masterPtr->height - 2*masterPtr->padY,
+ masterPtr->borderWidth, masterPtr->relief);
+ }
+
+ /* ToDo: Set the clipping region according to the imageX,Y, and
+ * width, height */
+ dy = drawableY + masterPtr->padY + masterPtr->borderWidth - imageY;
+
+ for (lPtr = masterPtr->lineHead; lPtr; lPtr=lPtr->next) {
+ dx = drawableX + masterPtr->padX - imageX;
+ dx += lPtr->padX;
+ dy += lPtr->padY;
+
+ extraX = masterPtr->width - 2*masterPtr->padX - lPtr->width;
+ switch (lPtr->anchor) {
+ case TK_ANCHOR_SW: case TK_ANCHOR_W: case TK_ANCHOR_NW:
+ extraX = 0;
+ break;
+ case TK_ANCHOR_N: case TK_ANCHOR_CENTER: case TK_ANCHOR_S:
+ extraX /= 2;
+ break;
+ case TK_ANCHOR_SE: case TK_ANCHOR_E: case TK_ANCHOR_NE:
+ break;
+ }
+ dx += extraX;
+
+ for (p.item = lPtr->itemHead; p.item; p.item=p.item->next) {
+ int extraY;
+ dx += p.item->padX;
+
+ extraY = lPtr->height - 2*lPtr->padY - p.item->height;
+ switch (p.item->anchor) {
+ case TK_ANCHOR_SW: case TK_ANCHOR_S: case TK_ANCHOR_SE:
+ break;
+ case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E:
+ extraY /= 2;
+ break;
+ case TK_ANCHOR_NW: case TK_ANCHOR_N: case TK_ANCHOR_NE:
+ extraY = 0;
+ break;
+ }
+
+ switch (p.item->type) {
+ case TYPE_IMAGE:
+ Tk_RedrawImage(p.image->image, 0, 0,
+ p.image->width - 2*p.item->padX,
+ p.image->height - 2*p.item->padY,
+ drawable, dx, dy+extraY);
+ break;
+
+ case TYPE_SPACE:
+ /* Do nothing */
+ break;
+
+ case TYPE_TEXT:
+ {
+ TixFont font;
+
+ if (p.text->text == NULL) {
+ break;
+ }
+
+ if (p.text->font) {
+ font = p.text->font;
+ } else {
+ font = masterPtr->font;
+ }
+
+ TixDisplayText(Tk_Display(masterPtr->tkwin), drawable,
+ font, p.text->text, p.text->numChars,
+ dx, dy+extraY,
+ p.text->width - 2*p.item->padX,
+ p.text->justify,
+ p.text->underline,
+ p.text->gc);
+ }
+ break;
+
+ case TYPE_BITMAP:
+ XCopyPlane(Tk_Display(masterPtr->tkwin), p.bitmap->bitmap,
+ drawable, p.bitmap->gc, 0, 0,
+ (unsigned) p.bitmap->width - 2*p.item->padX,
+ (unsigned) p.bitmap->height - 2*p.item->padY,
+ dx, dy+extraY, 1);
+
+ break;
+
+ case TYPE_WIDGET:
+
+
+ break;
+ }
+ dx += p.item->width - p.item->padX;
+ }
+ dy += lPtr->height - lPtr->padY;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpFree --
+ *
+ * This procedure is called when a widget ceases to use a
+ * particular instance of an image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Internal data structures get cleaned up.
+ *
+ * Arguments:
+ * clientData -- Pointer to CmpInstance for instance to be displayed
+ * display -- Display containing image window
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+ImgCmpFree(clientData, display)
+ ClientData clientData;
+ Display *display;
+{
+ /*
+ * Since one compound image can only be used in one window, when
+ * that window is deleted, this image is now useless and should be
+ * deleted as well
+ */
+}
+
+static void FreeLine(lPtr)
+ CmpLine * lPtr;
+{
+ Tk_FreeOptions(lineConfigSpecs, (char *)lPtr,
+ Tk_Display(lPtr->masterPtr->tkwin), 0);
+ ckfree((char *) lPtr);
+}
+
+static void FreeItem(p)
+ CmpItemPtr p;
+{
+ switch (p.item->type) {
+ case TYPE_IMAGE:
+ if (p.image->image) {
+ Tk_FreeImage(p.image->image);
+ }
+ Tk_FreeOptions(imageConfigSpecs, (char *)p.image,
+ Tk_Display(p.item->line->masterPtr->tkwin), 0);
+ break;
+
+ case TYPE_SPACE:
+ Tk_FreeOptions(spaceConfigSpecs, (char *)p.space,
+ Tk_Display(p.item->line->masterPtr->tkwin), 0);
+ break;
+
+ case TYPE_TEXT:
+ if (p.text->gc != None) {
+ Tk_FreeGC(Tk_Display(p.text->line->masterPtr->tkwin),
+ p.text->gc);
+ }
+ Tk_FreeOptions(textConfigSpecs, (char *)p.text,
+ Tk_Display(p.item->line->masterPtr->tkwin), 0);
+ break;
+
+ case TYPE_BITMAP:
+ if (p.bitmap->gc != None) {
+ Tk_FreeGC(Tk_Display(p.bitmap->line->masterPtr->tkwin),
+ p.bitmap->gc);
+ }
+ Tk_FreeOptions(bitmapConfigSpecs, (char *)p.bitmap,
+ Tk_Display(p.item->line->masterPtr->tkwin), 0);
+ break;
+
+ case TYPE_WIDGET:
+ break;
+ }
+ ckfree((char *) p.item);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpFreeResources --
+ *
+ * This procedure frees resources associated with the window
+ * specified with the -window arg to "image create compound ..."
+ *
+ * This procedure must be called from both ImgCmpDelete and from
+ * the destroy notifier CmpEventProc() (for the -window window)
+ * in order to ensure resources are freed under all circumstances.
+ *
+ * The way Tk shuts down windows (in tkWindow.c) does not allow
+ * the destroy notifier CmpEventProc() to just delete the TCL
+ * command associated with the image. The destroy notifier for
+ * the TCL command calls Tk_DeleteImage(). This command has no
+ * effect when Tk is shutting down (see tkImage.c) since the main
+ * window has already been removed from the main window list. As
+ * a result, ImgCmpDelete() doesn't get called when we want it to.
+ *
+ * Later, tkWindow.c will call tkDeleteAllImages() to delete all
+ * images, but by then the window referred to by masterPtr->tkwin
+ * is gone. ImgCmdDelete cannot free the resources.
+ *
+ * By allowing CmpEventProc() to do most of the cleanup, we avoid
+ * this situation.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Resources associated with the image get freed, new image command
+ * is removed from interpreter.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImgCmpFreeResources(masterData)
+ ClientData masterData; /* Pointer to CmpMaster structure for
+ * image. Must not have any more instances. */
+{
+ CmpMaster *masterPtr = (CmpMaster *) masterData;
+ CmpLine * lPtr;
+ CmpItemPtr p;
+
+ if (masterPtr->tkwin == NULL) {
+ return ;
+ }
+
+ Tk_Preserve((ClientData) masterPtr);
+
+ if (masterPtr->isDeleted == 0) {
+ masterPtr->isDeleted = 1;
+
+ Tk_DeleteEventHandler(masterPtr->tkwin,
+ StructureNotifyMask,
+ CmpEventProc, (ClientData)masterPtr);
+ for (lPtr=masterPtr->lineHead; lPtr;) {
+ CmpLine * toDelete = lPtr;
+ lPtr = lPtr->next;
+
+ for (p.item=toDelete->itemHead; p.item;) {
+ CmpItemPtr toDelete;
+
+ toDelete.item = p.item;
+ p.item=p.item->next;
+
+ FreeItem(toDelete);
+ }
+ FreeLine(toDelete);
+ }
+
+ if (masterPtr->changing) {
+ Tk_CancelIdleCall(CalculateMasterSize, (ClientData)masterPtr);
+ }
+ masterPtr->tkMaster = NULL;
+
+ if (masterPtr->imageCmd != NULL) {
+ CONST84 char * cmd = Tcl_GetCommandName(masterPtr->interp,
+ masterPtr->imageCmd);
+ masterPtr->imageCmd = NULL;
+ Tcl_DeleteCommand(masterPtr->interp, cmd);
+ }
+
+ if (masterPtr->gc != None) {
+ Tk_FreeGC(masterPtr->display, masterPtr->gc);
+ }
+
+ Tk_FreeOptions(configSpecs, (char *) masterPtr, masterPtr->display, 0);
+ }
+
+ Tk_Release((ClientData) masterPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpDelete --
+ *
+ * This procedure is called by the image code to delete the
+ * master structure for an image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Resources associated with the image get freed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImgCmpDelete(masterData)
+ ClientData masterData; /* Pointer to CmpMaster structure for
+ * image. Must not have any more instances. */
+{
+ CmpMaster *masterPtr = (CmpMaster *) masterData;
+
+ ImgCmpFreeResources(masterData);
+ ckfree((char *) masterPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgCmpCmdDeletedProc --
+ *
+ * This procedure is invoked when the image command for an image
+ * is deleted. It deletes the image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The image is deleted.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImgCmpCmdDeletedProc(clientData)
+ ClientData clientData; /* Pointer to CmpMaster structure for
+ * image. */
+{
+ CmpMaster *masterPtr = (CmpMaster *) clientData;
+
+ masterPtr->imageCmd = NULL;
+
+ if (masterPtr->tkMaster != NULL) {
+ Tk_DeleteImage(masterPtr->interp,
+ Tk_NameOfImage(masterPtr->tkMaster));
+ }
+}
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImageProc --
+ *
+ * This procedure is invoked by the image code whenever the manager
+ * for an image does something that affects the size or contents
+ * of an image displayed in a button.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Arranges for the HList to get redisplayed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImageProc(clientData, x, y, width, height, imgWidth, imgHeight)
+ ClientData clientData; /* Pointer to widget record. */
+ int x, y; /* Upper left pixel (within image)
+ * that must be redisplayed. */
+ int width, height; /* Dimensions of area to redisplay
+ * (may be <= 0). */
+ int imgWidth, imgHeight; /* New dimensions of image. */
+{
+ CmpItemPtr p;
+
+ p.image = (CmpImageItem *)clientData;
+
+ ChangeImageWhenIdle(p.item->line->masterPtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * CmpEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on the window that employs this compound image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * When the window gets deleted, internal structures get
+ * cleaned up.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+CmpEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ /* CmpMaster *masterPtr = (CmpMaster *)clientData; */
+
+ if (eventPtr->type == DestroyNotify) {
+ ImgCmpFreeResources(clientData);
+ }
+}
Added: external/tix-8.4.2.x/generic/tixImgXpm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixImgXpm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1305 @@
+
+/* $Id: tixImgXpm.c,v 1.4 2004/03/28 02:44:56 hobbs Exp $ */
+
+/*
+ * tixImgXpm.c --
+ *
+ * This file implements images of type "pixmap" for Tix.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixImgXpm.h>
+
+/*
+ * Prototypes for procedures used only locally in this file:
+ */
+
+static int ImgXpmCreate _ANSI_ARGS_((Tcl_Interp *interp,
+ char *name, int argc, Tcl_Obj *CONST objv[],
+ Tk_ImageType *typePtr, Tk_ImageMaster master,
+ ClientData *clientDataPtr));
+static ClientData ImgXpmGet _ANSI_ARGS_((Tk_Window tkwin,
+ ClientData clientData));
+static void ImgXpmDisplay _ANSI_ARGS_((ClientData clientData,
+ Display *display, Drawable drawable,
+ int imageX, int imageY, int width, int height,
+ int drawableX, int drawableY));
+static void ImgXpmFree _ANSI_ARGS_((ClientData clientData,
+ Display *display));
+static void ImgXpmDelete _ANSI_ARGS_((ClientData clientData));
+static int ImgXpmCmd _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *interp, int argc, CONST84 char **argv));
+static void ImgXpmCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static void ImgXpmConfigureInstance _ANSI_ARGS_((
+ PixmapInstance *instancePtr));
+static int ImgXpmConfigureMaster _ANSI_ARGS_((
+ PixmapMaster *masterPtr, int argc, CONST84 char **argv,
+ int flags));
+static int ImgXpmGetData _ANSI_ARGS_((Tcl_Interp *interp,
+ PixmapMaster *masterPtr));
+static char ** ImgXpmGetDataFromFile _ANSI_ARGS_((Tcl_Interp * interp,
+ char * string, int * numLines_return));
+static char ** ImgXpmGetDataFromId _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * id));
+static char ** ImgXpmGetDataFromString _ANSI_ARGS_((Tcl_Interp*interp,
+ char * string, int * numLines_return));
+static void ImgXpmGetPixmapFromData _ANSI_ARGS_((
+ Tcl_Interp * interp,
+ PixmapMaster *masterPtr,
+ PixmapInstance *instancePtr));
+static char * GetType _ANSI_ARGS_((char * colorDefn,
+ int * type_ret));
+static char * GetColor _ANSI_ARGS_((char * colorDefn,
+ char * colorName, int * type_ret));
+
+/*
+ * Information used for parsing configuration specs:
+ */
+
+static Tk_ConfigSpec configSpecs[] = {
+ {TK_CONFIG_STRING, "-data", (char *) NULL, (char *) NULL,
+ (char *) NULL, Tk_Offset(PixmapMaster, dataString), TK_CONFIG_NULL_OK},
+ {TK_CONFIG_STRING, "-file", (char *) NULL, (char *) NULL,
+ (char *) NULL, Tk_Offset(PixmapMaster, fileString), TK_CONFIG_NULL_OK},
+ {TK_CONFIG_UID, "-id", (char *) NULL, (char *) NULL,
+ (char *) NULL, Tk_Offset(PixmapMaster, id), TK_CONFIG_NULL_OK},
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+Tk_ImageType tixPixmapImageType = {
+ "pixmap", /* name */
+ ImgXpmCreate, /* createProc */
+ ImgXpmGet, /* getProc */
+ ImgXpmDisplay, /* displayProc */
+ ImgXpmFree, /* freeProc */
+ ImgXpmDelete, /* deleteProc */
+ NULL, /* postscriptProc (tk8.3 or later)*/
+ NULL, /* nextPtr */
+ NULL, /* reserved */
+};
+
+/*
+ * Local data, used only in this file
+ */
+
+static Tcl_HashTable xpmTable;
+static int xpmTableInited = 0;
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmCreate --
+ *
+ * This procedure is called by the Tk image code to create "pixmap"
+ * images.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * The data structure for a new image is allocated.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ImgXpmCreate(interp, name, argc, objv, typePtr, master, clientDataPtr)
+ Tcl_Interp *interp; /* Interpreter for application containing
+ * image. */
+ char *name; /* Name to use for image. */
+ int argc; /* Number of arguments. */
+ Tcl_Obj *CONST objv[]; /* Argument strings for options (doesn't
+ * include image name or type). */
+ Tk_ImageType *typePtr; /* Pointer to our type record (not used). */
+ Tk_ImageMaster master; /* Token for image, to be used by us in
+ * later callbacks. */
+ ClientData *clientDataPtr; /* Store manager's token for image here;
+ * it will be returned in later callbacks. */
+{
+ PixmapMaster *masterPtr;
+ int i;
+ CONST84 char *argvbuf[10];
+ CONST84 char **argv = argvbuf;
+
+ /*
+ * Convert the objv arguments into string equivalent.
+ */
+ if (argc > 10) {
+ argv = (CONST84 char **) ckalloc(argc * sizeof(char *));
+ }
+ for (i = 0; i < argc; i++) {
+ /*
+ * no need to free the value returned by Tcl_GetString. It's
+ * managed by Tcl's object system.
+ */
+
+ argv[i] = Tcl_GetString(objv[i]);
+ }
+
+ masterPtr = (PixmapMaster *) ckalloc(sizeof(PixmapMaster));
+ masterPtr->tkMaster = master;
+ masterPtr->interp = interp;
+ masterPtr->imageCmd = Tcl_CreateCommand(interp, name, ImgXpmCmd,
+ (ClientData) masterPtr, ImgXpmCmdDeletedProc);
+
+ masterPtr->fileString = NULL;
+ masterPtr->dataString = NULL;
+ masterPtr->id = NULL;
+ masterPtr->data = NULL;
+ masterPtr->isDataAlloced = 0;
+ masterPtr->instancePtr = NULL;
+
+ if (ImgXpmConfigureMaster(masterPtr, argc, argv, 0) != TCL_OK) {
+ ImgXpmDelete((ClientData) masterPtr);
+ if (argv != argvbuf) {
+ ckfree((char *) argv);
+ }
+ return TCL_ERROR;
+ }
+ if (argv != argvbuf) {
+ ckfree((char *) argv);
+ }
+ *clientDataPtr = (ClientData) masterPtr;
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmConfigureMaster --
+ *
+ * This procedure is called when a pixmap image is created or
+ * reconfigured. It process configuration options and resets
+ * any instances of the image.
+ *
+ * Results:
+ * A standard Tcl return value. If TCL_ERROR is returned then
+ * an error message is left in masterPtr->interp->result.
+ *
+ * Side effects:
+ * Existing instances of the image will be redisplayed to match
+ * the new configuration options.
+ *
+ * If any error occurs, the state of *masterPtr is restored to
+ * previous state.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ImgXpmConfigureMaster(masterPtr, argc, argv, flags)
+ PixmapMaster *masterPtr; /* Pointer to data structure describing
+ * overall pixmap image to (reconfigure). */
+ int argc; /* Number of entries in argv. */
+ CONST84 char **argv; /* Pairs of configuration options for image. */
+ int flags; /* Flags to pass to Tk_ConfigureWidget,
+ * such as TK_CONFIG_ARGV_ONLY. */
+{
+ PixmapInstance *instancePtr;
+ char * oldData, * oldFile;
+ Tk_Uid oldId;
+
+ oldData = masterPtr->dataString;
+ oldFile = masterPtr->fileString;
+ oldId = masterPtr->id;
+
+ if (Tk_ConfigureWidget(masterPtr->interp, Tk_MainWindow(masterPtr->interp),
+ configSpecs, argc, argv, (char *) masterPtr, flags)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (masterPtr->id != NULL ||
+ masterPtr->dataString != NULL ||
+ masterPtr->fileString != NULL) {
+ if (ImgXpmGetData(masterPtr->interp, masterPtr) != TCL_OK) {
+ goto error;
+ }
+ } else {
+ Tcl_AppendResult(masterPtr->interp,
+ "must specify one of -data, -file or -id", NULL);
+ goto error;
+ }
+
+ /*
+ * Cycle through all of the instances of this image, regenerating
+ * the information for each instance. Then force the image to be
+ * redisplayed everywhere that it is used.
+ */
+ for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
+ instancePtr = instancePtr->nextPtr) {
+ ImgXpmConfigureInstance(instancePtr);
+ }
+
+ if (masterPtr->data) {
+ Tk_ImageChanged(masterPtr->tkMaster, 0, 0,
+ masterPtr->size[0], masterPtr->size[1],
+ masterPtr->size[0], masterPtr->size[1]);
+ } else {
+ Tk_ImageChanged(masterPtr->tkMaster, 0, 0, 0, 0, 0, 0);
+ }
+
+ return TCL_OK;
+
+ error:
+ /* Restore it to the original (possible valid) mode */
+ if (masterPtr->dataString && masterPtr->dataString != oldData) {
+ ckfree(masterPtr->dataString);
+ }
+ if (masterPtr->fileString && masterPtr->fileString != oldFile) {
+ ckfree(masterPtr->fileString);
+ }
+ masterPtr->dataString = oldData;
+ masterPtr->fileString = oldFile;
+ masterPtr->id = oldId;
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmGetData --
+ *
+ * Given a file name or ASCII string, this procedure parses the
+ * file or string contents to produce binary data for a pixmap.
+ *
+ * Results:
+ * If the pixmap description was parsed successfully then the data
+ * is read into an array of strings. This array will later be used
+ * to create X Pixmaps for each instance.
+ *
+ * Side effects:
+ * The masterPtr->data array is allocated when successful. Contents of
+ * *masterPtr is changed only when successful.
+ *----------------------------------------------------------------------
+ */
+static int
+ImgXpmGetData(interp, masterPtr)
+ Tcl_Interp *interp; /* For reporting errors. */
+ PixmapMaster *masterPtr;
+{
+ char ** data = NULL;
+ int isAllocated = 0; /* do we need to free "data"? */
+ int listArgc;
+ CONST84 char ** listArgv = NULL;
+ int numLines;
+ int size[2];
+ int cpp;
+ int ncolors;
+ int code = TCL_OK;
+
+ if (masterPtr->id != NULL) {
+ data = ImgXpmGetDataFromId(interp, masterPtr->id);
+ } else if (masterPtr->fileString != NULL) {
+ data = ImgXpmGetDataFromFile(interp, masterPtr->fileString, &numLines);
+ isAllocated = 1;
+ } else if (masterPtr->dataString != NULL) {
+ data = ImgXpmGetDataFromString(interp,masterPtr->dataString,&numLines);
+ isAllocated = 1;
+ } else {
+ /* Should have been enforced by ImgXpmConfigureMaster() */
+ Tcl_Panic("ImgXpmGetData(): -data, -file and -id are all NULL");
+ }
+
+ if (data == NULL) {
+ /* nothing has been allocated yet. Don't need to goto done */
+ return TCL_ERROR;
+ }
+
+ /* Parse the first line of the data and get info about this pixmap */
+ if (Tcl_SplitList(interp, data[0], &listArgc, &listArgv) != TCL_OK) {
+ code = TCL_ERROR; goto done;
+ }
+
+ if ((listArgc < 4) /* file format error */
+ || (Tcl_GetInt(interp, listArgv[0], &size[0]) != TCL_OK)
+ || (Tcl_GetInt(interp, listArgv[1], &size[1]) != TCL_OK)
+ || (Tcl_GetInt(interp, listArgv[2], &ncolors) != TCL_OK)
+ || (Tcl_GetInt(interp, listArgv[3], &cpp) != TCL_OK)) {
+ code = TCL_ERROR; goto done;
+ }
+
+ if (isAllocated) {
+ if (numLines != size[1] + ncolors + 1) {
+ /* the number of lines read from the file/data
+ * is not the same as specified in the data
+ */
+ code = TCL_ERROR; goto done;
+ }
+ }
+
+ done:
+ if (code == TCL_OK) {
+ if (masterPtr->isDataAlloced && masterPtr->data) {
+ ckfree((char*)masterPtr->data);
+ }
+ masterPtr->isDataAlloced = isAllocated;
+ masterPtr->data = data;
+ masterPtr->size[0] = size[0];
+ masterPtr->size[1] = size[1];
+ masterPtr->cpp = cpp;
+ masterPtr->ncolors = ncolors;
+ } else {
+ if (isAllocated && data) {
+ ckfree((char*)data);
+ }
+
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "File format error", NULL);
+ }
+
+ if (listArgv) {
+ ckfree((char*)listArgv);
+ }
+
+ return code;
+}
+
+static char ** ImgXpmGetDataFromId(interp, id)
+ Tcl_Interp * interp;
+ CONST84 char * id;
+{
+ Tcl_HashEntry * hashPtr;
+
+ if (xpmTableInited == 0) {
+ hashPtr = NULL;
+ } else {
+ hashPtr = Tcl_FindHashEntry(&xpmTable, id);
+ }
+
+ if (hashPtr == NULL) {
+ Tcl_AppendResult(interp, "unknown pixmap ID \"", id,
+ "\"", NULL);
+ return (char**)NULL;
+ } else {
+ return (char**)Tcl_GetHashValue(hashPtr);
+ }
+}
+
+static char ** ImgXpmGetDataFromString(interp, string, numLines_return)
+ Tcl_Interp * interp;
+ char * string;
+ int * numLines_return;
+{
+ int quoted;
+ char * p, * list;
+ int numLines;
+ char ** data;
+
+ /* skip the leading blanks (leading blanks are not defined in the
+ * the XPM definition, but skipping them shouldn't hurt. Also, the ability
+ * to skip the leading blanks is good for using in-line XPM data in TCL
+ * scripts
+ */
+ while (isspace(*string)) {
+ ++ string;
+ }
+
+ /* parse the header */
+ if (strncmp("/* XPM", string, 6) != 0) {
+ goto error;
+ }
+
+ /* strip the comments */
+ for (quoted = 0, p=string; *p;) {
+ if (!quoted) {
+ if (*p == '"') {
+ quoted = 1;
+ ++ p;
+ continue;
+ }
+
+ if (*p == '/' && *(p+1) == '*') {
+ *p++ = ' ';
+ *p++ = ' ';
+ while (1) {
+ if (*p == 0) {
+ break;
+ }
+ if (*p == '*' && *(p+1) == '/') {
+ *p++ = ' ';
+ *p++ = ' ';
+ break;
+ }
+ *p++ = ' ';
+ }
+ continue;
+ }
+ ++ p;
+ } else {
+ if (*p == '"') {
+ quoted = 0;
+ }
+ ++ p;
+ }
+ }
+
+ /* Search for the opening brace */
+ for (p=string; *p;) {
+ if (*p != '{') {
+ ++ p;
+ } else {
+ ++p;
+ break;
+ }
+ }
+
+ /* Change the buffer in to a proper TCL list */
+ quoted = 0;
+ list = p;
+
+ while (*p) {
+ if (!quoted) {
+ if (*p == '"') {
+ quoted = 1;
+ ++ p;
+ continue;
+ }
+
+ if (isspace(*p)) {
+ *p = ' ';
+ }
+ else if (*p == ',') {
+ *p = ' ';
+ }
+ else if (*p == '}') {
+ *p = 0;
+ break;
+ }
+ ++p;
+ }
+ else {
+ if (*p == '"') {
+ quoted = 0;
+ }
+ ++ p;
+ }
+ }
+
+ /* The following code depends on the fact that Tcl_SplitList
+ * strips away double quoates inside a list: ie:
+ * if string == "\"1\" \"2\"" then
+ * list[0] = "1"
+ * list[1] = "2"
+ * and NOT
+ *
+ * list[0] = "\"1\""
+ * list[1] = "\"2\""
+ */
+ if (Tcl_SplitList(interp, list, &numLines, &data) != TCL_OK) {
+ goto error;
+ } else {
+ if (numLines == 0) {
+ /* error: empty data? */
+ if (data != NULL) {
+ ckfree((char*)data);
+ goto error;
+ }
+ }
+ * numLines_return = numLines;
+ return data;
+ }
+
+ error:
+ Tcl_AppendResult(interp, "File format error", NULL);
+ return (char**) NULL;
+}
+
+static char ** ImgXpmGetDataFromFile(interp, fileName, numLines_return)
+ Tcl_Interp * interp;
+ char * fileName;
+ int * numLines_return;
+{
+ FILE * fd = NULL;
+ int size, n;
+ char ** data;
+ char *cmdBuffer = NULL;
+ Tcl_DString buffer; /* initialized by Tcl_TildeSubst */
+
+ fileName = Tcl_TranslateFileName(interp, fileName, &buffer);
+ if (fileName == NULL) {
+ goto error;
+ }
+
+ /*
+ * Open the file and find its size
+ */
+
+ fd = fopen(fileName, "r");
+ if (fd == NULL) {
+ Tcl_AppendResult(interp, "couldn't read file \"", fileName,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ goto error;
+ }
+ if (fseek(fd, 0, SEEK_END) < 0) {
+ Tcl_AppendResult(interp, "couldn't fseek file \"", fileName,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ goto error;
+ }
+ size = ftell(fd);
+ if (size < 0) {
+ Tcl_AppendResult(interp, "couldn't ftell file \"", fileName,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ goto error;
+ }
+ if (fseek(fd, 0, SEEK_SET) < 0) {
+ Tcl_AppendResult(interp, "couldn't fseek file \"", fileName,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ goto error;
+ }
+
+ /*
+ * Read the entire file
+ */
+
+ cmdBuffer = (char *) ckalloc((unsigned) size + 1);
+ n = fread(cmdBuffer, 1, (size_t) size, fd);
+ if (size != n) {
+ Tcl_AppendResult(interp, "error in reading file \"", fileName,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ goto error;
+ }
+ if (fclose(fd) != 0) {
+ Tcl_AppendResult(interp, "error closing file \"", fileName,
+ "\": ", Tcl_PosixError(interp), (char *) NULL);
+ fd = NULL;
+ goto error;
+ }
+ cmdBuffer[size] = 0;
+
+ data = ImgXpmGetDataFromString(interp, cmdBuffer, numLines_return);
+ ckfree(cmdBuffer);
+ Tcl_DStringFree(&buffer);
+ return data;
+
+ error:
+ if (fd != NULL) {
+ fclose(fd);
+ }
+ if (cmdBuffer != NULL) {
+ ckfree(cmdBuffer);
+ }
+ Tcl_DStringFree(&buffer);
+ return (char**)NULL;
+}
+
+
+static char *
+GetType(colorDefn, type_ret)
+ char * colorDefn;
+ int * type_ret;
+{
+ char * p = colorDefn;
+
+ /* skip white spaces */
+ while (*p && isspace(*p)) {
+ p ++;
+ }
+
+ /* parse the type */
+ if (p[0] != '\0' && p[0] == 'm' &&
+ p[1] != '\0' && isspace(p[1])) {
+ *type_ret = XPM_MONO;
+ p += 2;
+ }
+ else if (p[0] != '\0' && p[0] == 'g' &&
+ p[1] != '\0' && p[1] == '4' &&
+ p[2] != '\0' && isspace(p[2])) {
+ *type_ret = XPM_GRAY_4;
+ p += 3;
+ }
+ else if (p[0] != '\0' && p[0] == 'g' &&
+ p[1] != '\0' && isspace(p[1])) {
+ *type_ret = XPM_GRAY;
+ p += 2;
+ }
+ else if (p[0] != '\0' && p[0] == 'c' &&
+ p[1] != '\0' && isspace(p[1])) {
+ *type_ret = XPM_COLOR;
+ p += 2;
+ }
+ else if (p[0] != '\0' && p[0] == 's' &&
+ p[1] != '\0' && isspace(p[1])) {
+ *type_ret = XPM_SYMBOLIC;
+ p += 2;
+ }
+ else {
+ *type_ret = XPM_UNKNOWN;
+ return NULL;
+ }
+
+ return p;
+}
+
+/*
+ * colorName is guaranteed to be big enough
+ */
+static char *
+GetColor(colorDefn, colorName, type_ret)
+ char * colorDefn;
+ char * colorName; /* if found, name is copied to this array */
+ int * type_ret;
+{
+ int type;
+ char * p;
+
+ if (!colorDefn) {
+ return NULL;
+ }
+
+ if ((colorDefn = GetType(colorDefn, &type)) == NULL) {
+ /* unknown type */
+ return NULL;
+ }
+ else {
+ *type_ret = type;
+ }
+
+ /* skip white spaces */
+ while (*colorDefn && isspace(*colorDefn)) {
+ colorDefn ++;
+ }
+
+ p = colorName;
+
+ while (1) {
+ int dummy;
+
+ while (*colorDefn && !isspace(*colorDefn)) {
+ *p++ = *colorDefn++;
+ }
+
+ if (!*colorDefn) {
+ break;
+ }
+
+ if (GetType(colorDefn, &dummy) == NULL) {
+ /* the next string should also be considered as a part of a color
+ * name */
+
+ while (*colorDefn && isspace(*colorDefn)) {
+ *p++ = *colorDefn++;
+ }
+ } else {
+ break;
+ }
+ if (!*colorDefn) {
+ break;
+ }
+ }
+
+ /* Mark the end of the colorName */
+ *p = '\0';
+
+ return colorDefn;
+}
+
+/*----------------------------------------------------------------------
+ * ImgXpmGetPixmapFromData --
+ *
+ * Creates a pixmap for an image instance.
+ *----------------------------------------------------------------------
+ */
+static void
+ImgXpmGetPixmapFromData(interp, masterPtr, instancePtr)
+ Tcl_Interp * interp;
+ PixmapMaster *masterPtr;
+ PixmapInstance *instancePtr;
+{
+ XImage * image = NULL, * mask = NULL;
+ int depth, i, j, k, lOffset, isTransp = 0, isMono;
+ ColorStruct * colors;
+
+ depth = Tk_Depth(instancePtr->tkwin);
+
+ switch ((Tk_Visual(instancePtr->tkwin))->class) {
+ case StaticGray:
+ case GrayScale:
+ isMono = 1;
+ break;
+ default:
+ isMono = 0;
+ }
+
+ TixpXpmAllocTmpBuffer(masterPtr, instancePtr, &image, &mask);
+
+ /*
+ * Parse the colors
+ */
+ lOffset = 1;
+ colors = (ColorStruct*)ckalloc(sizeof(ColorStruct)*masterPtr->ncolors);
+
+ /*
+ * Initialize the color structures
+ */
+ for (i=0; i<masterPtr->ncolors; i++) {
+ colors[i].colorPtr = NULL;
+ if (masterPtr->cpp == 1) {
+ colors[i].c = 0;
+ } else {
+ colors[i].cstring = (char*)ckalloc((unsigned) masterPtr->cpp);
+ colors[i].cstring[0] = 0;
+ }
+ }
+
+ for (i=0; i<masterPtr->ncolors; i++) {
+ char * colorDefn; /* the color definition line */
+ char * colorName; /* temp place to hold the color name
+ * defined for one type of visual */
+ char * useName; /* the color name used for this
+ * color. If there are many names
+ * defined, choose the name that is
+ * "best" for the target visual
+ */
+ int found;
+
+ colorDefn = masterPtr->data[i+lOffset]+masterPtr->cpp;
+ colorName = (char*)ckalloc(strlen(colorDefn));
+ useName = (char*)ckalloc(strlen(colorDefn));
+ found = 0;
+
+ while (colorDefn && *colorDefn) {
+ int type;
+
+ if ((colorDefn=GetColor(colorDefn, colorName, &type)) == NULL) {
+ break;
+ }
+ if (colorName[0] == '\0') {
+ continue;
+ }
+
+ switch (type) {
+ case XPM_MONO:
+ if (isMono && depth == 1) {
+ strcpy(useName, colorName);
+ found = 1; goto gotcolor;
+ }
+ break;
+ case XPM_GRAY_4:
+ if (isMono && depth == 4) {
+ strcpy(useName, colorName);
+ found = 1; goto gotcolor;
+ }
+ break;
+ case XPM_GRAY:
+ if (isMono && depth > 4) {
+ strcpy(useName, colorName);
+ found = 1; goto gotcolor;
+ }
+ break;
+ case XPM_COLOR:
+ if (!isMono) {
+ strcpy(useName, colorName);
+ found = 1; goto gotcolor;
+ }
+ break;
+ }
+ if (type != XPM_SYMBOLIC && type != XPM_UNKNOWN) {
+ if (!found) { /* use this color as default */
+ strcpy(useName, colorName);
+ found = 1;
+ }
+ }
+ }
+
+ gotcolor:
+ if (masterPtr->cpp == 1) {
+ colors[i].c = masterPtr->data[i+lOffset][0];
+ } else {
+ strncpy(colors[i].cstring, masterPtr->data[i+lOffset],
+ (size_t)masterPtr->cpp);
+ }
+
+ if (found) {
+ if (strcasecmp(useName, "none") != 0) {
+ colors[i].colorPtr = Tk_GetColor(interp,
+ instancePtr->tkwin, Tk_GetUid(useName));
+ if (colors[i].colorPtr == NULL) {
+ colors[i].colorPtr = Tk_GetColor(interp,
+ instancePtr->tkwin, Tk_GetUid("black"));
+ }
+ }
+ } else {
+ colors[i].colorPtr = Tk_GetColor(interp,
+ instancePtr->tkwin, Tk_GetUid("black"));
+ }
+
+ ckfree(colorName);
+ ckfree(useName);
+ }
+
+ lOffset += masterPtr->ncolors;
+
+ /*
+ * Parse the main body of the image
+ */
+ for (i=0; i<masterPtr->size[1]; i++) {
+ char * p = masterPtr->data[i+lOffset];
+
+ for (j=0; j<masterPtr->size[0]; j++) {
+ if (masterPtr->cpp == 1) {
+ for (k=0; k<masterPtr->ncolors; k++) {
+ if (*p == colors[k].c) {
+ TixpXpmSetPixel(instancePtr, image, mask, j, i,
+ colors[k].colorPtr, &isTransp);
+ break;
+ }
+ }
+ if (*p) {
+ p++;
+ }
+ } else {
+ for (k=0; k<masterPtr->ncolors; k++) {
+ if (strncmp(p, colors[k].cstring,
+ (size_t)masterPtr->cpp) == 0) {
+ TixpXpmSetPixel(instancePtr, image, mask, j, i,
+ colors[k].colorPtr, &isTransp);
+ break;
+ }
+ }
+ for (k=0; *p && k<masterPtr->cpp; k++) {
+ p++;
+ }
+ }
+ }
+ }
+
+ instancePtr->colors = colors;
+
+ TixpXpmRealizePixmap(masterPtr, instancePtr, image, mask, isTransp);
+ TixpXpmFreeTmpBuffer(masterPtr, instancePtr, image, mask);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmConfigureInstance --
+ *
+ * This procedure is called to create displaying information for
+ * a pixmap image instance based on the configuration information
+ * in the master. It is invoked both when new instances are
+ * created and when the master is reconfigured.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Generates errors via Tk_BackgroundError if there are problems
+ * in setting up the instance.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImgXpmConfigureInstance(instancePtr)
+ PixmapInstance *instancePtr; /* Instance to reconfigure. */
+{
+ PixmapMaster *masterPtr = instancePtr->masterPtr;
+
+ if (instancePtr->pixmap != None) {
+ Tk_FreePixmap(Tk_Display(instancePtr->tkwin), instancePtr->pixmap);
+ }
+ TixpXpmFreeInstanceData(instancePtr, 0, Tk_Display(instancePtr->tkwin));
+
+ if (instancePtr->colors != NULL) {
+ int i;
+ for (i=0; i<masterPtr->ncolors; i++) {
+ if (instancePtr->colors[i].colorPtr != NULL) {
+ Tk_FreeColor(instancePtr->colors[i].colorPtr);
+ }
+ if (masterPtr->cpp != 1) {
+ ckfree(instancePtr->colors[i].cstring);
+ }
+ }
+ ckfree((char*)instancePtr->colors);
+ }
+
+ if (Tk_WindowId(instancePtr->tkwin) == None) {
+ Tk_MakeWindowExist(instancePtr->tkwin);
+ }
+
+ /*
+ * Assumption: masterPtr->data is always non NULL (enfored by
+ * ImgXpmConfigureMaster()). Also, the data must be in a valid
+ * format (partially enforced by ImgXpmConfigureMaster(), see comments
+ * inside that function).
+ */
+ ImgXpmGetPixmapFromData(masterPtr->interp, masterPtr, instancePtr);
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * ImgXpmCmd --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to an image managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+
+static int
+ImgXpmCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about button widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ PixmapMaster *masterPtr = (PixmapMaster *) clientData;
+ int c, code;
+ size_t length;
+
+ if (argc < 2) {
+ sprintf(interp->result,
+ "wrong # args: should be \"%.50s option ?arg arg ...?\"",
+ argv[0]);
+ return TCL_ERROR;
+ }
+ c = argv[1][0];
+ length = strlen(argv[1]);
+
+ if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)
+ && (length >= 2)) {
+ if (argc != 3) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " cget option\"",
+ (char *) NULL);
+ return TCL_ERROR;
+ }
+ return Tk_ConfigureValue(interp, Tk_MainWindow(interp), configSpecs,
+ (char *) masterPtr, argv[2], 0);
+ } else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)
+ && (length >= 2)) {
+ if (argc == 2) {
+ code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),
+ configSpecs, (char *) masterPtr, (char *) NULL, 0);
+ } else if (argc == 3) {
+ code = Tk_ConfigureInfo(interp, Tk_MainWindow(interp),
+ configSpecs, (char *) masterPtr, argv[2], 0);
+ } else {
+ code = ImgXpmConfigureMaster(masterPtr, argc-2, argv+2,
+ TK_CONFIG_ARGV_ONLY);
+ }
+ return code;
+ } else if ((c == 'r') && (strncmp(argv[1], "refcount", length) == 0)) {
+ /*
+ * The "refcount" command is for debugging only
+ */
+ PixmapInstance *instancePtr;
+ int count = 0;
+ char buff[30];
+
+ for (instancePtr=masterPtr->instancePtr; instancePtr;
+ instancePtr = instancePtr->nextPtr) {
+ count += instancePtr->refCount;
+ }
+ sprintf(buff, "%d", count);
+ Tcl_SetResult(interp, buff, TCL_VOLATILE);
+ return TCL_OK;
+ } else {
+ Tcl_AppendResult(interp, "bad option \"", argv[1],
+ "\": must be cget, configure or refcount", (char *) NULL);
+ return TCL_ERROR;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmGet --
+ *
+ * This procedure is called for each use of a pixmap image in a
+ * widget.
+ *
+ * Results:
+ * The return value is a token for the instance, which is passed
+ * back to us in calls to ImgXpmDisplay and ImgXpmFre.
+ *
+ * Side effects:
+ * A data structure is set up for the instance (or, an existing
+ * instance is re-used for the new one).
+ *
+ *----------------------------------------------------------------------
+ */
+
+static ClientData
+ImgXpmGet(tkwin, masterData)
+ Tk_Window tkwin; /* Window in which the instance will be
+ * used. */
+ ClientData masterData; /* Pointer to our master structure for the
+ * image. */
+{
+ PixmapMaster *masterPtr = (PixmapMaster *) masterData;
+ PixmapInstance *instancePtr;
+
+ /*
+ * See if there is already an instance for this window. If so
+ * then just re-use it.
+ */
+
+ for (instancePtr = masterPtr->instancePtr; instancePtr != NULL;
+ instancePtr = instancePtr->nextPtr) {
+ if (instancePtr->tkwin == tkwin) {
+ instancePtr->refCount++;
+ return (ClientData) instancePtr;
+ }
+ }
+
+ /*
+ * The image isn't already in use in this window. Make a new
+ * instance of the image.
+ */
+ instancePtr = (PixmapInstance *) ckalloc(sizeof(PixmapInstance));
+ instancePtr->refCount = 1;
+ instancePtr->masterPtr = masterPtr;
+ instancePtr->tkwin = tkwin;
+ instancePtr->pixmap = None;
+ instancePtr->nextPtr = masterPtr->instancePtr;
+ instancePtr->colors = NULL;
+ masterPtr->instancePtr = instancePtr;
+
+ TixpInitPixmapInstance(masterPtr, instancePtr);
+ ImgXpmConfigureInstance(instancePtr);
+
+ /*
+ * If this is the first instance, must set the size of the image.
+ */
+ if (instancePtr->nextPtr == NULL) {
+ if (masterPtr->data) {
+ Tk_ImageChanged(masterPtr->tkMaster, 0, 0,
+ masterPtr->size[0], masterPtr->size[1],
+ masterPtr->size[0], masterPtr->size[1]);
+ } else {
+ Tk_ImageChanged(masterPtr->tkMaster, 0, 0, 0, 0, 0, 0);
+ }
+ }
+
+ return (ClientData) instancePtr;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmDisplay --
+ *
+ * This procedure is invoked to draw a pixmap image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A portion of the image gets rendered in a pixmap or window.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+ImgXpmDisplay(clientData, display, drawable, imageX, imageY, width,
+ height, drawableX, drawableY)
+ ClientData clientData; /* Pointer to PixmapInstance structure for
+ * for instance to be displayed. */
+ Display *display; /* Display on which to draw image. */
+ Drawable drawable; /* Pixmap or window in which to draw image. */
+ int imageX, imageY; /* Upper-left corner of region within image
+ * to draw. */
+ int width, height; /* Dimensions of region within image to draw.*/
+ int drawableX, drawableY; /* Coordinates within drawable that
+ * correspond to imageX and imageY. */
+{
+ TixpXpmDisplay(clientData, display, drawable, imageX, imageY, width,
+ height, drawableX, drawableY);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmFree --
+ *
+ * This procedure is called when a widget ceases to use a
+ * particular instance of an image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Internal data structures get cleaned up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+ImgXpmFree(clientData, display)
+ ClientData clientData; /* Pointer to PixmapInstance structure for
+ * for instance to be displayed. */
+ Display *display; /* Display containing window that used image.*/
+{
+ PixmapInstance *instancePtr = (PixmapInstance *) clientData;
+ PixmapInstance *prevPtr;
+
+ instancePtr->refCount--;
+ if (instancePtr->refCount > 0) {
+ return;
+ }
+
+ /*
+ * There are no more uses of the image within this widget. Free
+ * the instance structure.
+ */
+ if (instancePtr->pixmap != None) {
+ Tk_FreePixmap(display, instancePtr->pixmap);
+ }
+ TixpXpmFreeInstanceData(instancePtr, 1, display);
+
+ if (instancePtr->colors != NULL) {
+ int i;
+ for (i=0; i<instancePtr->masterPtr->ncolors; i++) {
+ if (instancePtr->colors[i].colorPtr != NULL) {
+ Tk_FreeColor(instancePtr->colors[i].colorPtr);
+ }
+ if (instancePtr->masterPtr->cpp != 1) {
+ ckfree(instancePtr->colors[i].cstring);
+ }
+ }
+ ckfree((char*)instancePtr->colors);
+ }
+
+ if (instancePtr->masterPtr->instancePtr == instancePtr) {
+ instancePtr->masterPtr->instancePtr = instancePtr->nextPtr;
+ } else {
+ for (prevPtr = instancePtr->masterPtr->instancePtr;
+ prevPtr->nextPtr != instancePtr; prevPtr = prevPtr->nextPtr) {
+ /* Empty loop body */
+ }
+ prevPtr->nextPtr = instancePtr->nextPtr;
+ }
+ ckfree((char *) instancePtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmDelete --
+ *
+ * This procedure is called by the image code to delete the
+ * master structure for an image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Resources associated with the image get freed.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+ImgXpmDelete(masterData)
+ ClientData masterData; /* Pointer to PixmapMaster structure for
+ * image. Must not have any more instances. */
+{
+ PixmapMaster *masterPtr = (PixmapMaster *) masterData;
+
+ if (masterPtr->instancePtr != NULL) {
+ panic("tried to delete pixmap image when instances still exist");
+ }
+ masterPtr->tkMaster = NULL;
+ if (masterPtr->imageCmd != NULL) {
+ Tcl_DeleteCommand(masterPtr->interp,
+ Tcl_GetCommandName(masterPtr->interp, masterPtr->imageCmd));
+ }
+ if (masterPtr->isDataAlloced && masterPtr->data != NULL) {
+ ckfree((char*)masterPtr->data);
+ masterPtr->data = NULL;
+ }
+
+ Tk_FreeOptions(configSpecs, (char *) masterPtr, (Display *) NULL, 0);
+ ckfree((char *) masterPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImgXpmCmdDeletedProc --
+ *
+ * This procedure is invoked when the image command for an image
+ * is deleted. It deletes the image.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The image is deleted.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImgXpmCmdDeletedProc(clientData)
+ ClientData clientData; /* Pointer to PixmapMaster structure for
+ * image. */
+{
+ PixmapMaster *masterPtr = (PixmapMaster *) clientData;
+
+ masterPtr->imageCmd = NULL;
+ if (masterPtr->tkMaster != NULL) {
+ if (Tk_MainWindow(masterPtr->interp) != NULL) {
+ Tk_DeleteImage(masterPtr->interp,
+ Tk_NameOfImage(masterPtr->tkMaster));
+ }
+ }
+}
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_DefinePixmap
+ *
+ * Define an XPM data structure with an unique name, so that you can
+ * later refer to this pixmap using the -id switch in [image create
+ * pixmap].
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The data is stored in a HashTable.
+ *----------------------------------------------------------------------
+ */
+int
+Tix_DefinePixmap(interp, name, data)
+ Tcl_Interp * interp;
+ Tk_Uid name; /* Name to use for bitmap. Must not already
+ * be defined as a bitmap. */
+ char **data;
+{
+ int new;
+ Tcl_HashEntry *hshPtr;
+
+ if (!xpmTableInited) {
+ xpmTableInited = 1;
+ Tcl_InitHashTable(&xpmTable, TCL_ONE_WORD_KEYS);
+ }
+
+ hshPtr = Tcl_CreateHashEntry(&xpmTable, name, &new);
+ if (!new) {
+ Tcl_AppendResult(interp, "pixmap \"", name,
+ "\" is already defined", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tcl_SetHashValue(hshPtr, (char*)data);
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixImgXpm.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixImgXpm.h Tue Mar 18 19:38:59 2008
@@ -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_
+
+/*
+ * 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
+ */
+ /* First in list of all instances associated
+ * with this master. */
+ 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 */
+ 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
Added: external/tix-8.4.2.x/generic/tixInit.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixInit.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,367 @@
+/* $Id: tixInit.c,v 1.19 2006/11/16 22:34:11 hobbs Exp $ */
+
+/*
+ * tixInit.c --
+ *
+ * Initialze the Tix native code as well as the script library.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ * Copyright 2004 ActiveState
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixInit.c,v 1.19 2006/11/16 22:34:11 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+/*
+ * Minimum required version of Tcl and Tk. These are used when we access
+ * Tcl/Tk using the stubs API.
+ */
+
+#define MIN_TCL_VERSION "8.4"
+#define MIN_TK_VERSION "8.4"
+
+/*
+ * All the Tix commands implemented in C code.
+ */
+
+static Tix_TclCmd commands[] = {
+ /*
+ * Commands that are part of the intrinsics:
+ */
+ {"tixCallMethod", Tix_CallMethodCmd},
+ {"tixChainMethod", Tix_ChainMethodCmd},
+ {"tixClass", Tix_ClassCmd},
+ {"tixDisplayStyle", Tix_ItemStyleCmd},
+ {"tixDoWhenIdle", Tix_DoWhenIdleCmd},
+ {"tixDoWhenMapped", Tix_DoWhenMappedCmd},
+ {"tixFlushX", Tix_FlushXCmd},
+ {"tixForm", Tix_FormCmd},
+ {"tixGeometryRequest", Tix_GeometryRequestCmd},
+ {"tixGet3DBorder", Tix_Get3DBorderCmd},
+ {"tixGetDefault", Tix_GetDefaultCmd},
+ {"tixGetMethod", Tix_GetMethodCmd},
+ {"tixGrid", Tix_GridCmd},
+ {"tixHandleOptions", Tix_HandleOptionsCmd},
+ {"tixHList", Tix_HListCmd},
+#if !defined(__WIN32__) && !defined(MAC_OSX_TK)
+ {"tixInputOnly", Tix_InputOnlyCmd},
+#endif
+ {"tixManageGeometry", Tix_ManageGeometryCmd},
+ {"tixMapWindow", Tix_MapWindowCmd},
+ {"tixMoveResizeWindow", Tix_MoveResizeWindowCmd},
+#if !defined(__WIN32__) && !defined(MAC_OSX_TK)
+ {"tixMwm", Tix_MwmCmd},
+#endif
+ {"tixNoteBookFrame", Tix_NoteBookFrameCmd},
+ {"tixTList", Tix_TListCmd},
+ {"tixTmpLine", Tix_TmpLineCmd},
+ {"tixUnmapWindow", Tix_UnmapWindowCmd},
+ {"tixWidgetClass", Tix_ClassCmd},
+ {"tixWidgetDoWhenIdle", Tix_DoWhenIdleCmd},
+
+ {(char *) NULL, (Tix_CmdProc)NULL}
+};
+
+typedef struct {
+ char * binding;
+ int isDebug;
+ char * fontSet;
+ char * scheme;
+ char * schemePriority;
+} OptionStruct;
+
+static OptionStruct tixOption;
+
+/*
+ * TIX_DEF_FONTSET and TIX_DEF_SCHEME should have been defined in the
+ * Makefile by the configure script. We define them here just in case
+ * the configure script failed to determine the proper values.
+ */
+
+#ifndef TIX_DEF_FONTSET
+#define TIX_DEF_FONTSET "WmDefault"
+#endif
+
+#ifndef TIX_DEF_SCHEME
+#define TIX_DEF_SCHEME "WmDefault"
+#endif
+
+#define DEF_TIX_TOOLKIT_OPTION_BINDING "TK"
+#define DEF_TIX_TOOLKIT_OPTION_DEBUG "0"
+#define DEF_TIX_TOOLKIT_OPTION_FONTSET TIX_DEF_FONTSET
+#define DEF_TIX_TOOLKIT_OPTION_SCHEME TIX_DEF_SCHEME
+#define DEF_TIX_TOOLKIT_OPTION_SCHEME_PRIORITY "20" /* widgetDefault */
+
+static Tk_ConfigSpec configSpecs[] = {
+ {TK_CONFIG_STRING, "-binding", "binding", "TixBinding",
+ DEF_TIX_TOOLKIT_OPTION_BINDING, Tk_Offset(OptionStruct, binding),
+ 0},
+ {TK_CONFIG_BOOLEAN, "-debug", "tixDebug", "TixDebug",
+ DEF_TIX_TOOLKIT_OPTION_DEBUG, Tk_Offset(OptionStruct, isDebug),
+ 0},
+ {TK_CONFIG_STRING, "-fontset", "tixFontSet", "TixFontSet",
+ DEF_TIX_TOOLKIT_OPTION_FONTSET, Tk_Offset(OptionStruct, fontSet),
+ 0},
+ {TK_CONFIG_STRING, "-scheme", "tixScheme", "TixScheme",
+ DEF_TIX_TOOLKIT_OPTION_SCHEME, Tk_Offset(OptionStruct, scheme),
+ 0},
+ {TK_CONFIG_STRING, "-scheme", "tixSchemePriority", "TixSchemePriority",
+ DEF_TIX_TOOLKIT_OPTION_SCHEME_PRIORITY,
+ Tk_Offset(OptionStruct, schemePriority),
+ 0},
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*----------------------------------------------------------------------
+ *
+ * Some global variables
+ *
+ *----------------------------------------------------------------------
+ */
+Tk_Uid tixNormalUid = (Tk_Uid)NULL;
+Tk_Uid tixCellUid = (Tk_Uid)NULL;
+Tk_Uid tixRowUid = (Tk_Uid)NULL;
+Tk_Uid tixColumnUid = (Tk_Uid)NULL;
+Tk_Uid tixDisabledUid = (Tk_Uid)NULL;
+
+static int ParseToolkitOptions _ANSI_ARGS_((Tcl_Interp * interp));
+
+/*
+ *----------------------------------------------------------------------
+ * ParseToolkitOptions() --
+ *
+ * Before the Tix initialized, we need to determine the toolkit
+ * options which are set by the options database.
+ *
+ * Results:
+ * A standard Tcl completion code (TCL_OK or TCL_ERROR). Also
+ * leaves information in the interp's result.
+ *
+ * Side effects:
+ * Sets several variables in the global Tcl array "tixPriv".
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+ParseToolkitOptions(interp)
+ Tcl_Interp * interp;
+{
+ char buff[10];
+ int flag;
+
+ tixOption.binding = NULL;
+ tixOption.isDebug = 0;
+ tixOption.fontSet = NULL;
+ tixOption.scheme = NULL;
+ tixOption.schemePriority = NULL;
+
+ /*
+ * The toolkit options may be set in the resources of the main
+ * window, probably by using your .Xdefaults file.
+ */
+
+ if (Tk_ConfigureWidget(interp, Tk_MainWindow(interp), configSpecs,
+ 0, 0, (char *) &tixOption, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * Now lets set the Tix toolkit variables so that the Toolkit can
+ * initialize according to user options.
+ */
+
+ flag = TCL_GLOBAL_ONLY;
+
+ Tcl_SetVar2(interp, "tix_priv", "-binding",
+ tixOption.binding, flag);
+ sprintf(buff, "%d", tixOption.isDebug);
+ Tcl_SetVar2(interp, "tix_priv", "-debug",
+ buff, flag);
+ Tcl_SetVar2(interp, "tix_priv", "-fontset",
+ tixOption.fontSet, flag);
+ Tcl_SetVar2(interp, "tix_priv", "-scheme",
+ tixOption.scheme, flag);
+ Tcl_SetVar2(interp, "tix_priv", "-schemepriority",
+ tixOption.schemePriority, flag);
+
+ Tk_FreeOptions(configSpecs, (char *)&tixOption,
+ Tk_Display(Tk_MainWindow(interp)), 0);
+
+ return TCL_OK;
+}
+
+
+/*
+ *------------------------------------------------------------------------
+ * Package initialization.
+ * tcl_findLibrary basename version patch initScript enVarName varName
+ * We use patchLevel instead of version as we use the full patchlevel
+ * in the directory naming on install.
+ *------------------------------------------------------------------------
+ */
+
+static char initScript[] = "if {[info proc tixInit]==\"\"} {\n\
+ proc tixInit {} {\n\
+ global tix_library tix_version tix_patchLevel\n\
+ rename tixInit {}\n\
+ tcl_findLibrary Tix $tix_patchLevel $tix_patchLevel Init.tcl TIX_LIBRARY tix_library\n\
+ }\n\
+}\n\
+tixInit";
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_Init() --
+ *
+ * Initialize the Tix library.
+ *
+ * Results:
+ * A standard Tcl completion code (TCL_OK or TCL_ERROR). Also
+ * leaves information in the interp's result.
+ *
+ * Side effects:
+ * Sets "tix_library" Tcl variable, runs "Init.tcl" script from
+ * the Tix script library directory.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tix_Init(interp)
+ Tcl_Interp * interp;
+{
+ Tk_Window topLevel;
+
+ /*
+ * This procedure may be called several times for several
+ * interpreters. Since some global variables are shared by
+ * all of the interpreters, we initialize these variables only
+ * once. The variable "globalInitialized" keeps track of this
+ */
+ static int globalInitialized = 0;
+
+#ifdef USE_TCL_STUBS
+ if ((Tcl_InitStubs(interp, MIN_TK_VERSION, 0) == NULL)
+ || (Tk_InitStubs(interp, MIN_TK_VERSION, 0) == NULL)) {
+ return TCL_ERROR;
+ }
+#else
+ if ((Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL)
+ || (Tcl_PkgRequire(interp, "Tk", TK_VERSION, 1) == NULL)) {
+ return TCL_ERROR;
+ }
+#endif /* USE_TCL_STUBS */
+
+ if (Tcl_PkgProvide(interp, "Tix", TIX_PATCH_LEVEL) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (!globalInitialized) {
+ globalInitialized = 1;
+
+ /*
+ * Initialize the global variables shared by all interpreters
+ */
+ tixNormalUid = Tk_GetUid("normal");
+ tixCellUid = Tk_GetUid("cell");
+ tixRowUid = Tk_GetUid("row");
+ tixColumnUid = Tk_GetUid("column");
+ tixDisabledUid = Tk_GetUid("disabled");
+
+#if !defined(__WIN32__) && !defined(MAC_OSX_TK)
+ /* This is for tixMwm command */
+ Tk_CreateGenericHandler(TixMwmProtocolHandler, NULL);
+#endif
+
+ /*
+ * Initialize the image readers
+ */
+
+ Tk_CreateImageType(&tixPixmapImageType);
+ Tk_CreateImageType(&tixCompoundImageType);
+
+ /*
+ * Initialize the display item subsystem.
+ */
+
+ TixInitializeDisplayItems();
+ }
+
+ /*
+ * Initialize the per-interpreter variables
+ */
+
+ /* Set the "tix_version" variable */
+ Tcl_SetVar(interp, "tix_version", TIX_VERSION, TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "tix_patchLevel", TIX_PATCH_LEVEL,TCL_GLOBAL_ONLY);
+ Tcl_SetVar(interp, "tix_release", TIX_RELEASE, TCL_GLOBAL_ONLY);
+
+ /*
+ * Initialize the Tix commands
+ */
+
+ topLevel = Tk_MainWindow(interp);
+ Tix_CreateCommands(interp, commands, (ClientData) topLevel,
+ (void (*)_ANSI_ARGS_((ClientData))) NULL);
+
+ /*
+ * Parse options database for fontSets, schemes, etc
+ */
+
+ if (ParseToolkitOptions(interp) == TCL_ERROR) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * In normal operation mode, we use the command defined in
+ * tixInitScript to load the Tix library scripts off the file
+ * system
+ */
+
+ return Tcl_EvalEx(interp, initScript, -1, TCL_GLOBAL_ONLY);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_SafeInit --
+ *
+ * Initializes Tix for a safe interpreter.
+ *
+ * TODO: the week security check in Tix is probably not complete
+ * and may lead to security holes. This function is temporarily
+ * disabled.
+ *
+ * Results:
+ * A standard Tcl completion code (TCL_OK or TCL_ERROR). Also
+ * leaves information in the interp's result.
+ *
+ * Side effects:
+ * Sets "tix_library" Tcl variable, runs "Init.tcl" script from
+ * the Tix script library directory.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tix_SafeInit(interp)
+ Tcl_Interp * interp;
+{
+#if 0
+ Tcl_SetVar2(interp, "tix_priv", "isSafe", "1", TCL_GLOBAL_ONLY);
+ return Tix_Init(interp);
+#else
+ Tcl_AppendResult(interp, "Tix has not been tested for use in a safe ",
+ "interppreter. Modify tixInit.c at your own risks", NULL);
+ return TCL_ERROR;
+#endif
+}
+
Added: external/tix-8.4.2.x/generic/tixInputO.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixInputO.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,446 @@
+
+/* $Id: tixInputO.c,v 1.3 2005/03/25 20:15:53 hobbs Exp $ */
+
+/*
+ * tixInputO.c --
+ *
+ * This module implements "InputOnly" 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.
+ *
+ *
+ */
+
+#include <tkInt.h>
+#include <tixPort.h>
+#include <tix.h>
+
+#ifndef MAC_OSX_TK
+/*
+ * A data structure of the following type is kept for each
+ * widget managed by this file:
+ */
+
+typedef struct Tix_InputOnlyStruct {
+ Tk_Window tkwin; /* Window that embodies the widget. NULL
+ * means window has been deleted but
+ * widget record hasn't been cleaned up yet. */
+ Tcl_Command widgetCmd; /* Token for button's widget command. */
+ Display *display; /* X's token for the window's display. */
+ Tcl_Interp *interp; /* Interpreter associated with widget. */
+
+ /*
+ * Information used when displaying widget:
+ */
+ int width;
+ int height;
+
+ /* Cursor */
+ Cursor cursor; /* Current cursor for window, or None. */
+ int changed;
+} Tix_InputOnly;
+
+typedef Tix_InputOnly WidgetRecord;
+typedef Tix_InputOnly * WidgetPtr;
+
+/*
+ * hint:: Place these into a default.f file
+ */
+#define DEF_INPUTONLY_CURSOR ""
+#define DEF_INPUTONLY_WIDTH "0"
+#define DEF_INPUTONLY_HEIGHT "0"
+
+/*
+ * Information used for argv parsing.
+ */
+static Tk_ConfigSpec configSpecs[] = {
+
+ {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
+ DEF_INPUTONLY_CURSOR, Tk_Offset(WidgetRecord, cursor),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_PIXELS, "-height", "height", "Height",
+ DEF_INPUTONLY_HEIGHT, Tk_Offset(WidgetRecord, height), 0},
+
+ {TK_CONFIG_PIXELS, "-width", "width", "Width",
+ DEF_INPUTONLY_WIDTH, Tk_Offset(WidgetRecord, width), 0},
+
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+static void WidgetCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static int WidgetConfigure _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, CONST84 char **argv,
+ int flags));
+static void WidgetDestroy _ANSI_ARGS_((ClientData clientData));
+static void WidgetEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static int WidgetCommand _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *, int argc, CONST84 char **argv));
+static void Tix_MakeInputOnlyWindowExist _ANSI_ARGS_((
+ WidgetPtr wPtr));
+
+
+#define INPUT_ONLY_EVENTS_MASK \
+ KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
+ EnterWindowMask|LeaveWindowMask|PointerMotionMask| \
+ VisibilityChangeMask|SubstructureNotifyMask| \
+ FocusChangeMask|PropertyChangeMask
+
+static XSetWindowAttributes inputOnlyAtts = {
+ None, /* background_pixmap */
+ 0, /* background_pixel */
+ None, /* border_pixmap */
+ 0, /* border_pixel */
+ ForgetGravity, /* bit_gravity */
+ NorthWestGravity, /* win_gravity */
+ NotUseful, /* backing_store */
+ (unsigned) ~0, /* backing_planes */
+ 0, /* backing_pixel */
+ False, /* save_under */
+ INPUT_ONLY_EVENTS_MASK, /* event_mask */
+ 0, /* do_not_propagate_mask */
+ False, /* override_redirect */
+ None, /* colormap */
+ None /* cursor */
+};
+
+
+static
+void Tix_MakeInputOnlyWindowExist(wPtr)
+ WidgetPtr wPtr;
+{
+ TkWindow* winPtr;
+ Tcl_HashEntry *hPtr;
+ int new;
+ Window parent;
+
+ winPtr = (TkWindow*) wPtr->tkwin;
+ inputOnlyAtts.cursor = winPtr->atts.cursor;
+
+
+ if (winPtr->flags & TK_TOP_LEVEL) {
+ parent = XRootWindow(winPtr->display, winPtr->screenNum);
+ } else {
+ if (winPtr->parentPtr->window == None) {
+ Tk_MakeWindowExist((Tk_Window) winPtr->parentPtr);
+ }
+ parent = winPtr->parentPtr->window;
+ }
+
+ winPtr->window = XCreateWindow(winPtr->display,
+ parent,
+ winPtr->changes.x, winPtr->changes.y,
+ (unsigned) winPtr->changes.width,
+ (unsigned) winPtr->changes.height,
+ 0, 0,
+ InputOnly,
+ CopyFromParent,
+ CWEventMask|CWCursor,
+ &inputOnlyAtts);
+
+ hPtr = Tcl_CreateHashEntry(&winPtr->dispPtr->winTable,
+ (char *) winPtr->window, &new);
+ Tcl_SetHashValue(hPtr, winPtr);
+
+ winPtr->dirtyAtts = 0;
+ winPtr->dirtyChanges = 0;
+#ifdef TK_USE_INPUT_METHODS
+ winPtr->inputContext = NULL;
+#endif /* TK_USE_INPUT_METHODS */
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_InputOnlyCmd --
+ *
+ * This procedure is invoked to process the "inputOnly" Tcl
+ * command. It creates a new "InputOnly" widget.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * A new widget is created and configured.
+ *
+ *--------------------------------------------------------------
+ */
+int
+Tix_InputOnlyCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window mainwin = (Tk_Window) clientData;
+ WidgetPtr wPtr;
+ Tk_Window tkwin;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " pathName ?options?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ tkwin = Tk_CreateWindowFromPath(interp, mainwin, argv[1], (char *) NULL);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * Allocate and initialize the widget record.
+ */
+ wPtr = (WidgetPtr) ckalloc(sizeof(WidgetRecord));
+ wPtr->tkwin = tkwin;
+ wPtr->display = Tk_Display(tkwin);
+ wPtr->interp = interp;
+ wPtr->width = 0;
+ wPtr->height = 0;
+ wPtr->cursor = None;
+ wPtr->changed = 0;
+
+ Tk_SetClass(tkwin, "TixInputOnly");
+
+ Tix_MakeInputOnlyWindowExist(wPtr);
+
+ Tk_CreateEventHandler(wPtr->tkwin, StructureNotifyMask,
+ WidgetEventProc, (ClientData) wPtr);
+ wPtr->widgetCmd = Tcl_CreateCommand(interp, Tk_PathName(wPtr->tkwin),
+ WidgetCommand, (ClientData) wPtr, WidgetCmdDeletedProc);
+ if (WidgetConfigure(interp, wPtr, argc-2, argv+2, 0) != TCL_OK) {
+ Tk_DestroyWindow(wPtr->tkwin);
+ return TCL_ERROR;
+ }
+
+ interp->result = Tk_PathName(wPtr->tkwin);
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetCommand --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+static int
+WidgetCommand(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about the widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int result = TCL_OK;
+ size_t length;
+ char c;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " option ?arg arg ...?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ Tk_Preserve((ClientData) wPtr);
+ c = argv[1][0];
+ length = strlen(argv[1]);
+ if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)) {
+ if (argc == 2) {
+ result = Tk_ConfigureInfo(interp, wPtr->tkwin, configSpecs,
+ (char *) wPtr, (char *) NULL, 0);
+ } else if (argc == 3) {
+ result = Tk_ConfigureInfo(interp, wPtr->tkwin, configSpecs,
+ (char *) wPtr, argv[2], 0);
+ } else {
+ result = WidgetConfigure(interp, wPtr, argc-2, argv+2,
+ TK_CONFIG_ARGV_ONLY);
+ }
+ }
+ else if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)) {
+ if (argc == 3) {
+ return Tk_ConfigureValue(interp, wPtr->tkwin, configSpecs,
+ (char *)wPtr, argv[2], 0);
+ } else {
+ return Tix_ArgcError(interp, argc, argv, 2, "option");
+ }
+ } else {
+ Tcl_AppendResult(interp, "bad option \"", argv[1],
+ "\": must be cget or configure", (char *) NULL);
+ goto error;
+ }
+
+ Tk_Release((ClientData) wPtr);
+ return result;
+
+ error:
+ Tk_Release((ClientData) wPtr);
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetConfigure --
+ *
+ * This procedure is called to process an argv/argc list in
+ * conjunction with the Tk option database to configure (or
+ * reconfigure) a InputOnly widget.
+ *
+ * Results:
+ * The return value is a standard Tcl result. If TCL_ERROR is
+ * returned, then interp->result contains an error message.
+ *
+ * Side effects:
+ * Configuration information, such as colors, border width,
+ * etc. get set for wPtr; old resources get freed,
+ * if there were any.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+WidgetConfigure(interp, wPtr, argc, argv, flags)
+ Tcl_Interp *interp; /* Used for error reporting. */
+ WidgetPtr wPtr; /* Information about widget. */
+ int argc; /* Number of valid entries in argv. */
+ CONST84 char **argv; /* Arguments. */
+ int flags; /* Flags to pass to
+ * Tk_ConfigureWidget. */
+{
+ if (Tk_ConfigureWidget(interp, wPtr->tkwin, configSpecs,
+ argc, argv, (char *) wPtr, flags) != TCL_OK) {
+
+ return TCL_ERROR;
+ }
+
+ Tk_GeometryRequest(wPtr->tkwin, wPtr->width, wPtr->height);
+
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on InputOnlys.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * When the window gets deleted, internal structures get
+ * cleaned up. When it gets exposed, it is redisplayed.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+WidgetEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ switch (eventPtr->type) {
+ case DestroyNotify:
+ if (wPtr->tkwin != NULL) {
+ wPtr->tkwin = NULL;
+ Tcl_DeleteCommand(wPtr->interp,
+ Tcl_GetCommandName(wPtr->interp, wPtr->widgetCmd));
+ }
+ Tk_EventuallyFree((ClientData) wPtr, (Tix_FreeProc*)WidgetDestroy);
+ break;
+
+ case MapNotify:
+ case ConfigureNotify:
+ break;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDestroy --
+ *
+ * This procedure is invoked by Tk_EventuallyFree or Tk_Release
+ * to clean up the internal structure of a InputOnly at a safe time
+ * (when no-one is using it anymore).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Everything associated with the InputOnly is freed up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+WidgetDestroy(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->display, 0);
+ ckfree((char *) wPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetCmdDeletedProc --
+ *
+ * This procedure is invoked when a widget command is deleted. If
+ * the widget isn't already in the process of being destroyed,
+ * this command destroys it.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The widget is destroyed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetCmdDeletedProc(clientData)
+ ClientData clientData; /* Pointer to widget record for widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ /*
+ * This procedure could be invoked either because the window was
+ * destroyed and the command was then deleted (in which case tkwin
+ * is NULL) or because the command was deleted, and then this procedure
+ * destroys the widget.
+ */
+ if (wPtr->tkwin != NULL) {
+ Tk_Window tkwin = wPtr->tkwin;
+ wPtr->tkwin = NULL;
+ Tk_DestroyWindow(tkwin);
+ }
+}
+#endif
Added: external/tix-8.4.2.x/generic/tixInt.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixInt.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,862 @@
+/*
+ * tixInt.h --
+ *
+ * Defines internal data types and functions used by the Tix library.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixInt.h,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+ */
+
+#ifndef _TIX_INT_H_
+#define _TIX_INT_H_
+
+#ifndef _TIX_H_
+#include <tix.h>
+#endif
+
+#ifndef _TIX_PORT_H_
+#include <tixPort.h>
+#endif
+
+/*----------------------------------------------------------------------
+ *
+ * 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 following 12 values can be OR'ed to passed as the flags
+ * parameter to Tix_DItemDisplay().
+ */
+
+#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_DITEM_ANCHOR (0x1 << 11)
+
+#define TIX_DITEM_OTHER_BG \
+ (TIX_DITEM_ACTIVE_BG|TIX_DITEM_SELECTED_BG|TIX_DITEM_DISABLED_BG)
+
+#define TIX_DITEM_ALL_BG \
+ (TIX_DITEM_NORMAL_BG|TIX_DITEM_OTHER_BG)
+
+#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(Tix_DItem * iPtr);
+typedef char * Tix_DItemComponentProc(Tix_DItem * iPtr, int x, int y);
+typedef int Tix_DItemConfigureProc(Tix_DItem * iPtr,
+ int argc, CONST84 char **argv, int flags);
+typedef Tix_DItem * Tix_DItemCreateProc(Tix_DispData * ddPtr,
+ Tix_DItemInfo * diTypePtr);
+typedef void Tix_DItemDisplayProc(Drawable drawable,
+ Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flag);
+typedef void Tix_DItemFreeProc(Tix_DItem * diPtr);
+typedef void Tix_DItemSizeChangedProc(Tix_DItem * iPtr);
+
+typedef void Tix_DItemStyleChangedProc(Tix_DItem * iPtr);
+typedef void Tix_DItemLostStyleProc(Tix_DItem * iPtr);
+typedef int Tix_DItemStyleConfigureProc(Tix_DItemStyle* style,
+ int argc, CONST84 char **argv, int flags);
+typedef Tix_DItemStyle* Tix_DItemStyleCreateProc(Tcl_Interp * interp,
+ Tk_Window tkwin,
+ Tix_DItemInfo * diTypePtr, char * name);
+typedef void Tix_DItemStyleFreeProc(Tix_DItemStyle* style);
+typedef void Tix_DItemStyleSetTemplateProc(Tix_DItemStyle* style,
+ Tix_StyleTemplate * tmplPtr);
+
+/*
+ * These are debugging routines
+ */
+
+typedef int Tix_DItemRefCountProc();
+typedef int Tix_DItemStyleRefCountProc();
+
+/*----------------------------------------------------------------------
+ * 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 */ \
+ int selX, selY, selW, selH /* Location of the selection highlight */
+
+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 */ \
+ \
+ struct { \
+ XColor * bg; \
+ XColor * fg; \
+ GC foreGC; \
+ GC backGC; \
+ GC anchorGC; \
+ } colors[4] /* colors and GC's for the four basic modes*/
+
+
+#define STYLE_COLOR_MEMBERS /* Backwards-cimpatibility */
+
+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;
+};
+
+/*----------------------------------------------------------------------
+ * 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 */
+ /*-------------------------*/
+
+ char * 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;
+ int wrapLength;
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ TixFont font;
+ int gap; /* Gap between text and image */
+};
+
+/*----------------------------------------------------------------------
+ * 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;
+};
+/*----------------------------------------------------------------------
+ * TextItem --
+ *
+ * Displays a text string.
+ *----------------------------------------------------------------------
+ */
+struct TixTextItem {
+ ITEM_COMMON_MEMBERS;
+
+ TixTextStyle *stylePtr;
+ /*-------------------------*/
+ /* Text */
+ /*-------------------------*/
+
+ char * text; /* Show descriptive text */
+ int 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;
+ 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
+
+typedef struct _TixpSubRegion TixpSubRegion;
+
+/*----------------------------------------------------------------------
+ * Tix_ArgumentList --
+ *
+ * This data structure is used to split command arguments for
+ * the display item types
+ *----------------------------------------------------------------------
+ */
+#define FIXED_SIZE 4
+typedef struct {
+ int argc;
+ CONST84 char **argv;
+} 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 */
+ char * command;
+} Tix_ScrollInfo;
+
+typedef struct Tix_IntScrollInfo {
+ int type; /* TIX_SCROLL_INT */
+ char * 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 */
+ char * 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;
+ CONST84 char * name;
+ Tix_ExportSpec export;
+} Tix_SubWidgetSpec;
+
+typedef struct _Tix_StringLink {
+ struct _Tix_StringLink *next;
+ CONST84 char * string;
+} Tix_StringLink;
+
+typedef struct _Tix_SubwidgetDef {
+ struct _TixSubwidgetDef * next;
+ CONST84 char * spec;
+ CONST84 char * value;
+} Tix_SubwidgetDef;
+
+typedef struct _TixClassParseStruct {
+ CONST84 char * alias;
+ CONST84 char * ClassName;
+ CONST84 char * configSpec;
+ CONST84 char * def;
+ CONST84 char * flag;
+ CONST84 char * forceCall;
+ CONST84 char * method;
+ CONST84 char * readOnly;
+ CONST84 char * isStatic;
+ CONST84 char * superClass;
+ CONST84 char * subWidget;
+ CONST84 char * isVirtual;
+
+ int optArgc;
+ CONST84 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(
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ CONST84 char * widRec, TixConfigSpec *spec, CONST84 char * value);
+EXTERN int Tix_CallMethod(Tcl_Interp *interp,
+ CONST84 char *context, CONST84 char *widRec, CONST84 char *method,
+ int argc, CONST84 char **argv, int *foundPtr);
+EXTERN int Tix_ChangeOneOption(
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ CONST84 char * widRec, TixConfigSpec *spec, CONST84 char * value,
+ int isDefault, int isInit);
+EXTERN int Tix_ChangeOptions(
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ CONST84 char * widRec, int argc, CONST84 char **argv);
+EXTERN TixConfigSpec * Tix_FindConfigSpecByName(
+ Tcl_Interp * interp,
+ TixClassRecord * cPtr, CONST84 char * name);
+EXTERN CONST84 char * Tix_FindMethod(Tcl_Interp *interp,
+ CONST84 char *context, CONST84 char *method);
+EXTERN char * Tix_FindPublicMethod(
+ Tcl_Interp *interp, TixClassRecord * cPtr,
+ CONST84 char * method);
+EXTERN int Tix_GetChars(Tcl_Interp *interp,
+ CONST84 char *string, double *doublePtr);
+EXTERN CONST84 char * Tix_GetConfigSpecFullName(CONST84 char *clasRec,
+ CONST84 char *flag);
+EXTERN CONST84 char * Tix_GetContext(
+ Tcl_Interp * interp, CONST84 char * widRec);
+EXTERN CONST84 char * Tix_GetMethodFullName(CONST84 char *context,
+ CONST84 char *method);
+EXTERN void Tix_GetPublicMethods(Tcl_Interp *interp,
+ CONST84 char *widRec, int *numMethods,
+ char *** validMethods);
+EXTERN int Tix_GetWidgetOption(
+ Tcl_Interp *interp, Tk_Window tkwin,
+ CONST84 char *argvName, CONST84 char *dbName, CONST84 char *dbClass,
+ CONST84 char *defValue, int argc, CONST84 char **argv,
+ int type, char *ptr);
+EXTERN int Tix_GetVar(
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ CONST84 char * widRec, CONST84 char * flag);
+EXTERN int Tix_QueryAllOptions(
+ Tcl_Interp *interp, TixClassRecord * cPtr,
+ CONST84 char *widRec);
+EXTERN int Tix_QueryOneOption(
+ Tcl_Interp *interp, TixClassRecord *cPtr,
+ CONST84 char *widRec, CONST84 char *flag);
+EXTERN int Tix_SuperClass(Tcl_Interp *interp,
+ CONST84 char *widClass, CONST84 char ** superClass_ret);
+EXTERN int Tix_UnknownPublicMethodError(
+ Tcl_Interp *interp, TixClassRecord * cPtr,
+ CONST84 char * widRec, CONST84 char * method);
+EXTERN int Tix_ValueMissingError(Tcl_Interp *interp,
+ CONST84 char *spec);
+EXTERN void Tix_AddDItemType(
+ Tix_DItemInfo * diTypePtr);
+EXTERN int Tix_ConfigureInfo2(
+ Tcl_Interp *interp, Tk_Window tkwin,
+ CONST84 char *entRec, Tk_ConfigSpec *entConfigSpecs,
+ Tix_DItem * iPtr, CONST84 char *argvName, int flags);
+EXTERN int Tix_ConfigureValue2(Tcl_Interp *interp,
+ Tk_Window tkwin, CONST84 char * entRec,
+ Tk_ConfigSpec *entConfigSpecs, Tix_DItem * iPtr,
+ CONST84 char *argvName, int flags);
+EXTERN void Tix_DItemCalculateSize(
+ Tix_DItem * iPtr);
+EXTERN char * Tix_DItemComponent(Tix_DItem * diPtr,
+ int x, int y);
+EXTERN int Tix_DItemConfigure(
+ Tix_DItem * diPtr, int argc,
+ CONST84 char **argv, int flags);
+EXTERN Tix_DItem * Tix_DItemCreate(Tix_DispData * ddPtr,
+ CONST84 char * type);
+EXTERN void Tix_DItemDrawBackground(Drawable drawable,
+ TixpSubRegion *subRegPtr, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flags);
+EXTERN void Tix_DItemDisplay(
+ Drawable drawable, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flag);
+EXTERN int Tix_DItemFillNormalBG(Drawable drawable,
+ TixpSubRegion *subRegPtr, Tix_DItem * iPtr,
+ int x, int y, int width, int height,
+ int xOffset, int yOffset, int flags);
+EXTERN void Tix_DItemFree(
+ Tix_DItem * iPtr);
+EXTERN void TixDItemStyleChanged(
+ Tix_DItemInfo * diTypePtr,
+ Tix_DItemStyle * stylePtr);
+EXTERN void TixDItemStyleConfigureGCs(
+ Tix_DItemStyle *style);
+EXTERN void TixDItemStyleFree(Tix_DItem *iPtr,
+ Tix_DItemStyle * stylePtr);
+EXTERN void TixDItemGetAnchor(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(
+ Tix_ArgumentList *argListPtr);
+EXTERN void TixGetColorDItemGC(
+ Tix_DItem * iPtr, GC * backGC_ret,
+ GC * foreGC_ret, GC * anchorGC_ret, int flags);
+EXTERN Tix_DItemStyle* TixGetDefaultDItemStyle(
+ Tix_DispData * ddPtr, Tix_DItemInfo * diTypePtr,
+ Tix_DItem *iPtr, Tix_DItemStyle* oldStylePtr);
+EXTERN Tix_DItemInfo * Tix_GetDItemType(
+ Tcl_Interp * interp, CONST84 char *type);
+EXTERN void Tix_GetScrollFractions(
+ Tix_ScrollInfo * siPtr,
+ double * first_ret, double * last_ret);
+EXTERN void Tix_InitScrollInfo(
+ Tix_ScrollInfo * siPtr, int type);
+EXTERN int Tix_MultiConfigureInfo(
+ Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec **specsList,
+ int numLists, CONST84 char **widgRecList, CONST84 char *argvName,
+ int flags, int request);
+EXTERN void Tix_SetDefaultStyleTemplate(
+ Tk_Window tkwin, Tix_StyleTemplate * tmplPtr);
+EXTERN int Tix_SetScrollBarView(
+ Tcl_Interp *interp, Tix_ScrollInfo * siPtr,
+ int argc, CONST84 char **argv, int compat);
+EXTERN void Tix_SetWindowItemSerial(
+ Tix_LinkList * lPtr, Tix_DItem * iPtr,
+ int serial);
+EXTERN int Tix_SplitConfig(Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_ConfigSpec ** specsList,
+ int numLists, int argc, CONST84 char **argv,
+ Tix_ArgumentList * argListPtr);
+EXTERN void Tix_UnmapInvisibleWindowItems(
+ Tix_LinkList * lPtr, int serial);
+EXTERN void Tix_UpdateScrollBar(
+ Tcl_Interp *interp, Tix_ScrollInfo * siPtr);
+EXTERN int Tix_WidgetConfigure2(
+ Tcl_Interp *interp, Tk_Window tkwin, CONST84 char * entRec,
+ Tk_ConfigSpec *entConfigSpecs,
+ Tix_DItem * iPtr, int argc, CONST84 char **argv,
+ int flags, int forced, int * sizeChanged_ret);
+EXTERN void Tix_WindowItemListRemove(
+ Tix_LinkList * lPtr, Tix_DItem * iPtr);
+/*
+ * 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 void TixInitializeDisplayItems(void);
+extern void TixpDrawAnchorLines(Display *display,
+ Drawable drawable, GC gc, int x, int y,
+ int w, int h);
+extern void TixpDrawTmpLine(int x1, int y1,
+ int x2, int y2, Tk_Window tkwin);
+extern void TixpEndSubRegionDraw(Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr);
+extern int TixpSetWindowParent(Tcl_Interp * interp,
+ Tk_Window tkwin, Tk_Window newParent,
+ int parentId);
+extern void TixpStartSubRegionDraw(Display *display,
+ 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(Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr,
+ TixFont font, CONST84 char *string,
+ int numChars, int x, int y, int length,
+ Tk_Justify justify, int underline);
+extern void TixpSubRegDrawBitmap(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(
+ TixpSubRegion * subRegPtr, Tk_Image image,
+ int imageX, int imageY, int width, int height,
+ Drawable drawable, int drawableX, int drawableY);
+extern void TixpSubRegDrawAnchorLines(
+ Display *display, Drawable drawable,
+ GC gc, TixpSubRegion * subRegPtr,
+ int x, int y, int w, int h);
+extern void TixpSubRegFillRectangle(Display *display,
+ Drawable drawable, GC gc,
+ TixpSubRegion * subRegPtr, int x, int y,
+ int width, int height);
+extern void TixpSubRegSetClip(
+ Display *display, TixpSubRegion * subRegPtr,
+ GC gc);
+extern void TixpSubRegUnsetClip(
+ Display *display, TixpSubRegion * subRegPtr,
+ GC gc);
+extern void TixRestoreInterpState(
+ Tcl_Interp * interp, TixInterpState * statePtr);
+extern void TixSaveInterpState(
+ Tcl_Interp * interp, TixInterpState * statePtr);
+extern char * tixStrDup( CONST char * s);
+extern int TixMwmProtocolHandler(
+ ClientData clientData, XEvent *eventPtr);
+
+/*
+ * Image types implemented by Tix.
+ */
+
+extern Tk_ImageType tixPixmapImageType;
+extern Tk_ImageType tixCompoundImageType;
+
+/*
+ * Display Items implemented in the Tix core.
+ */
+
+extern Tix_DItemInfo tix_ImageTextItemType;
+extern Tix_DItemInfo tix_TextItemType;
+extern Tix_DItemInfo tix_WindowItemType;
+extern Tix_DItemInfo tix_ImageItemType;
+
+#endif /* _TIX_INT_H_ */
Added: external/tix-8.4.2.x/generic/tixList.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixList.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,319 @@
+
+/* $Id: tixList.c,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixList.c --
+ *
+ * Implements easy-to-use link lists.
+ *
+ * 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.
+ *
+ */
+#include <tixPort.h>
+#include <tixInt.h>
+
+#define NEXT(info,ptr) (char*)(*(char**)((ptr+(info->nextOffset))))
+#define PREV(info,ptr) (char*)(*(char**)((ptr+(info->prevOffset))))
+
+static void SetNext _ANSI_ARGS_((Tix_ListInfo * info,
+ char * ptr, char * next));
+
+static void SetNext(info, ptr, next)
+ Tix_ListInfo * info;
+ char * ptr;
+ char * next;
+{
+ char ** next_ptr = (char**)((ptr+(info->nextOffset)));
+ * next_ptr = next;
+}
+
+void Tix_LinkListInit(lPtr)
+ Tix_LinkList * lPtr;
+{
+ lPtr->numItems = 0;
+ lPtr->head = (char*)NULL;
+ lPtr->tail = (char*)NULL;
+}
+
+
+void
+Tix_LinkListAppend(infoPtr, lPtr, itemPtr, flags)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ int flags;
+{
+ char * ptr;
+
+ if (flags | TIX_UNIQUE) {
+ /* Check for uniqueness */
+ for (ptr=lPtr->head;
+ ptr!=NULL;
+ ptr=NEXT(infoPtr,ptr)) {
+ if (ptr == itemPtr) {
+ return;
+ }
+ }
+ }
+ if (lPtr->head == NULL) {
+ lPtr->head = lPtr->tail = itemPtr;
+ } else {
+ SetNext(infoPtr, lPtr->tail, itemPtr);
+ lPtr->tail = itemPtr;
+ }
+
+ SetNext(infoPtr, itemPtr, NULL);
+ ++ lPtr->numItems;
+}
+
+void Tix_LinkListIteratorInit(liPtr)
+ Tix_ListIterator * liPtr;
+{
+ liPtr->started = 0;
+}
+
+void Tix_LinkListStart(infoPtr, lPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ Tix_ListIterator * liPtr;
+{
+ if (lPtr->head == NULL) {
+ liPtr->last = NULL;
+ liPtr->curr = NULL;
+ } else {
+ liPtr->last = liPtr->curr = lPtr->head;
+ }
+ liPtr->deleted = 0;
+ liPtr->started = 1;
+}
+
+void Tix_LinkListNext(infoPtr, lPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ Tix_ListIterator * liPtr;
+{
+ if (liPtr->curr == NULL) {
+ return;
+ }
+ if (liPtr->deleted == 1) {
+ /* the curr pointer has already been adjusted */
+ liPtr->deleted = 0;
+ return;
+ }
+
+ liPtr->last = liPtr->curr;
+ liPtr->curr = NEXT(infoPtr, liPtr->curr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_LinkListDelete --
+ *
+ * Deletes an element from the linklist. The proper step of deleting
+ * an element is:
+ *
+ * for (Tix_SimpleListStart(&list, &li); !Tix_SimpleListDone(&li);
+ * Tix_SimpleListNext (&list, &li)) {
+ * MyData * p = (MyData*)li.curr;
+ * if (someCondition) {
+ * Tix_SimpleListDelete(&cPtr->subWDefs, &li);
+ * ckfree((char*)p);
+ * }
+ * }
+ *
+ * i.e., The pointer can be freed only after Tix_SimpleListDelete().
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The pointers in the list are adjusted and the liPtr is advanced
+ * to the next element.
+ *----------------------------------------------------------------------
+ */
+void
+Tix_LinkListDelete(infoPtr, lPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ Tix_ListIterator * liPtr;
+{
+ if (liPtr->curr == NULL) {
+ /* %% probably is a mistake */
+ return;
+ }
+ if (liPtr->deleted == 1) {
+ /* %% probably is a mistake */
+ return;
+ }
+ if (lPtr->head == lPtr->tail) {
+ lPtr->head = lPtr->tail = NULL;
+ liPtr->curr = NULL;
+ }
+ else if (lPtr->head == liPtr->curr) {
+ lPtr->head = NEXT(infoPtr, liPtr->curr);
+ liPtr->curr = lPtr->head;
+ liPtr->last = lPtr->head;
+ }
+ else if (lPtr->tail == liPtr->curr) {
+ lPtr->tail = liPtr->last;
+ SetNext(infoPtr, lPtr->tail, NULL);
+ liPtr->curr = NULL;
+ }
+ else {
+ SetNext(infoPtr, liPtr->last, NEXT(infoPtr, liPtr->curr));
+ liPtr->curr = NEXT(infoPtr, liPtr->last);
+ }
+ -- lPtr->numItems;
+
+ liPtr->deleted = 1;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_LinkListInsert --
+ *
+ * Insert the item at the position indicated by liPtr
+ *----------------------------------------------------------------------
+ */
+void Tix_LinkListInsert(infoPtr, lPtr, itemPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ Tix_ListIterator * liPtr;
+{
+ if (lPtr->numItems == 0) {
+ /* Just do an append
+ */
+ Tix_LinkListAppend(infoPtr, lPtr, itemPtr, 0);
+
+ /* Fix the iterator (%% I am not sure if this is necessary)
+ */
+ liPtr->curr = liPtr->last = lPtr->head;
+ return;
+ }
+
+ if (liPtr->curr == NULL) {
+ /* %% probably is a mistake */
+ return;
+ }
+ if (lPtr->head == lPtr->tail) {
+ lPtr->head = itemPtr;
+ SetNext(infoPtr, lPtr->head, lPtr->tail);
+ liPtr->last = itemPtr;
+ liPtr->curr = itemPtr;
+ }
+ else if (liPtr->curr == lPtr->head) {
+ lPtr->head = itemPtr;
+ SetNext(infoPtr, lPtr->head, liPtr->curr);
+ liPtr->last = itemPtr;
+ liPtr->curr = itemPtr;
+ }
+ else {
+ SetNext(infoPtr, liPtr->last, itemPtr);
+ SetNext(infoPtr, itemPtr, liPtr->curr);
+ liPtr->last = itemPtr;
+ }
+ ++ lPtr->numItems;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_LinkListFindAndDelete --
+ *
+ * Find an element and delete it.
+ *
+ * liPtr:
+ * Can be NULL.
+ * If non-NULL, the search will start from the current entry indexed
+ * by liPtr;
+ *
+ * Return value:
+ * 1 if element is found and deleted
+ * 0 if element is not found
+ *----------------------------------------------------------------------
+ */
+int Tix_LinkListFindAndDelete(infoPtr, lPtr, itemPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ Tix_ListIterator * liPtr;
+{
+ Tix_ListIterator defIterator;
+
+ if (liPtr == NULL) {
+ Tix_LinkListIteratorInit(&defIterator);
+ liPtr = &defIterator;
+ }
+
+ if (!liPtr->started) {
+ Tix_LinkListStart(infoPtr, lPtr, liPtr);
+ }
+
+ if (Tix_LinkListFind(infoPtr, lPtr, itemPtr, liPtr)) {
+ Tix_LinkListDelete(infoPtr, lPtr, liPtr);
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+int Tix_LinkListDeleteRange(infoPtr, lPtr, fromPtr, toPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ char * fromPtr;
+ char * toPtr;
+ Tix_ListIterator * liPtr;
+{
+ Tix_ListIterator defIterator;
+ int start = 0;
+ int deleted = 0;
+
+ if (liPtr == NULL) {
+ Tix_LinkListIteratorInit(&defIterator);
+ liPtr = &defIterator;
+ }
+ if (!liPtr->started) {
+ Tix_LinkListStart(infoPtr, lPtr, liPtr);
+ }
+
+ for (;
+ !Tix_LinkListDone(liPtr);
+ Tix_LinkListNext (infoPtr, lPtr, liPtr)) {
+
+ if (liPtr->curr == fromPtr) {
+ start = 1;
+ }
+ if (start) {
+ Tix_LinkListDelete(infoPtr, lPtr, liPtr);
+ ++ deleted;
+ }
+ if (liPtr->curr == toPtr) {
+ break;
+ }
+ }
+
+ return deleted;
+}
+
+int Tix_LinkListFind(infoPtr, lPtr, itemPtr, liPtr)
+ Tix_ListInfo * infoPtr;
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ Tix_ListIterator * liPtr;
+{
+ if (!liPtr->started) {
+ Tix_LinkListStart(infoPtr, lPtr, liPtr);
+ }
+
+ for (Tix_LinkListStart(infoPtr, lPtr, liPtr);
+ !Tix_LinkListDone(liPtr);
+ Tix_LinkListNext (infoPtr, lPtr, liPtr)) {
+
+ if (liPtr->curr == itemPtr) {
+ return 1; /* found! */
+ }
+ }
+
+ return 0; /* Can't find */
+}
Added: external/tix-8.4.2.x/generic/tixMethod.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixMethod.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,573 @@
+/*
+ * tixMethod.c --
+ *
+ * Handle the calling of class methods.
+ *
+ * Implements the basic OOP class mechanism for the Tix Intrinsics.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixMethod.c,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+ */
+
+#include <tk.h>
+#include <tixPort.h>
+#include <tixInt.h>
+
+#define GetMethodTable(interp) \
+ (TixGetHashTable(interp, "tixMethodTab", MethodTableDeleteProc, \
+ TCL_STRING_KEYS))
+
+static int Tix_CallMethodByContext _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST84 char *context,
+ CONST84 char *widRec, CONST84 char *method,
+ int argc, CONST84 char **argv));
+static void Tix_RestoreContext _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST84 char *widRec,
+ CONST84 char *oldContext));
+static void Tix_SetContext _ANSI_ARGS_((
+ Tcl_Interp *interp, CONST84 char *widRec,
+ CONST84 char *newContext));
+static char * Tix_SaveContext _ANSI_ARGS_((Tcl_Interp *interp,
+ CONST84 char *widRec));
+static void MethodTableDeleteProc _ANSI_ARGS_((
+ ClientData clientData, Tcl_Interp *interp));
+
+/*
+ *
+ * argv[1] = widget record
+ * argv[2] = method
+ * argv[3+] = args
+ *
+ */
+TIX_DEFINE_CMD(Tix_CallMethodCmd)
+{
+ CONST84 char *context;
+ CONST84 char *newContext;
+ CONST84 char *widRec = argv[1];
+ CONST84 char *method = argv[2];
+ int result;
+
+ if (argc<3) {
+ return Tix_ArgcError(interp, argc, argv, 1, "w method ...");
+ }
+
+ if ((context = GET_RECORD(interp, widRec, "className")) == NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "invalid object reference \"", widRec,
+ "\"", (char*)NULL);
+ return TCL_ERROR;
+ }
+
+ newContext = Tix_FindMethod(interp, context, method);
+
+ if (newContext) {
+ result = Tix_CallMethodByContext(interp, newContext, widRec, method,
+ argc-3, argv+3);
+ } else {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "cannot call method \"", method,
+ "\" for context \"", context, "\".", (char*)NULL);
+ Tcl_SetVar(interp, "errorInfo", interp->result, TCL_GLOBAL_ONLY);
+ result = TCL_ERROR;
+ }
+
+ return result;
+}
+
+/*
+ *
+ * argv[1] = widget record
+ * argv[2] = method
+ * argv[3+] = args
+ *
+ */
+TIX_DEFINE_CMD(Tix_ChainMethodCmd)
+{
+ CONST84 char *context;
+ CONST84 char *superClassContext;
+ CONST84 char *newContext;
+ CONST84 char *widRec = argv[1];
+ CONST84 char *method = argv[2];
+ int result;
+
+ if (argc<3) {
+ return Tix_ArgcError(interp, argc, argv, 1, "w method ...");
+ }
+
+ if ((context = Tix_GetContext(interp, widRec)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ if (Tix_SuperClass(interp, context, &superClassContext) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (superClassContext == NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "no superclass exists for context \"",
+ context, "\".", (char*)NULL);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ newContext = Tix_FindMethod(interp, superClassContext, method);
+
+ if (newContext) {
+ result = Tix_CallMethodByContext(interp, newContext, widRec,
+ method, argc-3, argv+3);
+ } else {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "cannot chain method \"", method,
+ "\" for context \"", context, "\".", (char*)NULL);
+ Tcl_SetVar(interp, "errorInfo", interp->result, TCL_GLOBAL_ONLY);
+ result = TCL_ERROR;
+ goto done;
+ }
+
+ done:
+ return result;
+}
+
+/*
+ *
+ * argv[1] = widget record
+ * argv[2] = class (context)
+ * argv[3] = method
+ *
+ */
+TIX_DEFINE_CMD(Tix_GetMethodCmd)
+{
+ CONST84 char *newContext;
+ CONST84 char *context= argv[2];
+ CONST84 char *method = argv[3];
+ CONST84 char *cmdName;
+
+ if (argc!=4) {
+ return Tix_ArgcError(interp, argc, argv, 1, "w class method");
+ }
+
+ newContext = Tix_FindMethod(interp, context, method);
+
+ if (newContext) {
+ cmdName = Tix_GetMethodFullName(newContext, method);
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, cmdName, NULL);
+ ckfree((char *) cmdName);
+ } else {
+ Tcl_SetResult(interp, "", TCL_STATIC);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_FindMethod
+ *
+ * Starting with class "context", find the first class that defines
+ * the method. This class must be the same as the class "context" or
+ * a superclass of the class "context".
+ */
+CONST84 char *
+Tix_FindMethod(interp, context, method)
+ Tcl_Interp *interp;
+ CONST84 char *context;
+ CONST84 char *method;
+{
+ CONST84 char *theContext;
+ int isNew;
+ CONST84 char *key;
+ Tcl_HashEntry *hashPtr;
+
+ key = Tix_GetMethodFullName(context, method);
+ hashPtr = Tcl_CreateHashEntry(GetMethodTable(interp), key, &isNew);
+ ckfree((char *) key);
+
+ if (!isNew) {
+ theContext = (char *) Tcl_GetHashValue(hashPtr);
+ } else {
+ for (theContext = context; theContext;) {
+ if (Tix_ExistMethod(interp, theContext, method)) {
+ break;
+ }
+ /* Go to its superclass and see if it has the method */
+ if (Tix_SuperClass(interp, theContext, &theContext) != TCL_OK) {
+ return NULL;
+ }
+ if (theContext == NULL) {
+ return NULL;
+ }
+ }
+
+ if (theContext != NULL) {
+ /*
+ * theContext may point to the stack. We have to put it
+ * in some more permanent place.
+ */
+ theContext = tixStrDup(theContext);
+ }
+ Tcl_SetHashValue(hashPtr, (char*)theContext);
+ }
+
+ return theContext;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_CallMethod
+ *
+ * Starting with class "context", find the first class that defines
+ * the method. If found, call this method.
+ *
+ * Results:
+ * A standard Tcl completion code (TCL_OK or TCL_ERROR). Also
+ * leaves information in the interp's result.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+Tix_CallMethod(interp, context, widRec, method, argc, argv, foundPtr)
+ Tcl_Interp *interp; /* Tcl interpreter to execute the method in */
+ CONST84 char *context; /* context */
+ CONST84 char *widRec; /* Name of the widget record */
+ CONST84 char *method; /* Name of the method */
+ int argc; /* Number of arguments passed to the method */
+ CONST84 char **argv; /* Arguments */
+ int *foundPtr; /* If non-NULL. returns whether the
+ * method has been found */
+{
+ CONST84 char *targetContext;
+
+ targetContext = Tix_FindMethod(interp, context, method);
+
+ if (foundPtr != NULL) {
+ *foundPtr = (targetContext != NULL);
+ }
+
+ if (targetContext != NULL) {
+ return Tix_CallMethodByContext(interp, targetContext, widRec, method,
+ argc, argv);
+ } else {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "cannot call method \"", method,
+ "\" for context \"", context, "\".", (char*)NULL);
+ Tcl_SetVar(interp, "errorInfo", interp->result, TCL_GLOBAL_ONLY);
+ return TCL_ERROR;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Tix_FindConfigSpec
+ *
+ * Starting with class "classRec", find the first class that defines
+ * the option flag. This class must be the same as the class "classRec" or
+ * a superclass of the class "classRec".
+ */
+
+/* save the old context: calling a method of a superclass will
+ * change the context of a widget.
+ */
+static char *Tix_SaveContext(interp, widRec)
+ Tcl_Interp *interp;
+ CONST84 char *widRec;
+{
+ CONST84 char *context;
+
+ if ((context = GET_RECORD(interp, widRec, "context")) == NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "invalid object reference \"", widRec,
+ "\"", (char*)NULL);
+ return NULL;
+ }
+ else {
+ return tixStrDup(context);
+ }
+}
+
+static void Tix_RestoreContext(interp, widRec, oldContext)
+ Tcl_Interp *interp;
+ CONST84 char *widRec;
+ CONST84 char *oldContext;
+{
+ SET_RECORD(interp, widRec, "context", oldContext);
+ ckfree((char *) oldContext);
+}
+
+static void Tix_SetContext(interp, widRec, newContext)
+ Tcl_Interp *interp;
+ CONST84 char *widRec;
+ CONST84 char *newContext;
+{
+ SET_RECORD(interp, widRec, "context", newContext);
+}
+
+
+CONST84 char *
+Tix_GetContext(interp, widRec)
+ Tcl_Interp *interp;
+ CONST84 char *widRec;
+{
+ CONST84 char *context;
+
+ if ((context = GET_RECORD(interp, widRec, "context")) == NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "invalid object reference \"", widRec,
+ "\"", (char*)NULL);
+ return NULL;
+ } else {
+ return context;
+ }
+}
+
+int
+Tix_SuperClass(interp, class, superClass_ret)
+ Tcl_Interp *interp;
+ CONST84 char *class;
+ CONST84 char **superClass_ret;
+{
+ CONST84 char *superclass;
+
+ if ((superclass = GET_RECORD(interp, class, "superClass")) == NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "invalid class \"", class,
+ "\"; ", (char*)NULL);
+ return TCL_ERROR;
+ }
+
+ if (strlen(superclass) == 0) {
+ *superClass_ret = (char*) NULL;
+ } else {
+ *superClass_ret = superclass;
+ }
+
+ return TCL_OK;
+}
+
+CONST84 char *
+Tix_GetMethodFullName(context, method)
+ CONST84 char *context;
+ CONST84 char *method;
+{
+ char *buff;
+ int max;
+ int conLen;
+
+ conLen = strlen(context);
+ max = conLen + strlen(method) + 3;
+ buff = (char*)ckalloc(max * sizeof(char));
+
+ strcpy(buff, context);
+ strcpy(buff+conLen, ":");
+ strcpy(buff+conLen+1, method);
+
+ return buff;
+}
+
+int Tix_ExistMethod(interp, context, method)
+ Tcl_Interp *interp;
+ CONST84 char *context;
+ CONST84 char *method;
+{
+ CONST84 char *cmdName;
+ Tcl_CmdInfo dummy;
+ int exist;
+
+ /*
+ * TODO: does Tcl_GetCommandInfo check in global namespace??
+ */
+
+ cmdName = Tix_GetMethodFullName(context, method);
+ exist = Tcl_GetCommandInfo(interp, cmdName, &dummy);
+
+ if (!exist) {
+ if (Tix_GlobalVarEval(interp, "auto_load ", cmdName,
+ (char*)NULL)!= TCL_OK) {
+ goto done;
+ }
+ if (strcmp(interp->result, "1") == 0) {
+ exist = 1;
+ }
+ }
+
+ done:
+ ckfree((char *) cmdName);
+ Tcl_SetResult(interp, NULL, TCL_STATIC);
+ return exist;
+}
+
+/* %% There is a dirty version that uses the old argv, without having to
+ * malloc a new argv.
+ */
+static int
+Tix_CallMethodByContext(interp, context, widRec, method, argc, argv)
+ Tcl_Interp *interp;
+ CONST84 char *context;
+ CONST84 char *widRec;
+ CONST84 char *method;
+ int argc;
+ CONST84 char **argv;
+{
+ CONST84 char *cmdName;
+ int i, result;
+ CONST84 char *oldContext;
+ CONST84 char **newArgv;
+
+ if ((oldContext = Tix_SaveContext(interp, widRec)) == NULL) {
+ return TCL_ERROR;
+ }
+ Tix_SetContext(interp, widRec, context);
+
+ cmdName = Tix_GetMethodFullName(context, method);
+
+ /* Create a new argv list */
+ newArgv = (CONST84 char**)ckalloc((argc+2)*sizeof(char*));
+ newArgv[0] = cmdName;
+ newArgv[1] = widRec;
+ for (i=0; i< argc; i++) {
+ newArgv[i+2] = argv[i];
+ }
+ result = Tix_EvalArgv(interp, argc+2, newArgv);
+
+ Tix_RestoreContext(interp, widRec, oldContext);
+ ckfree((char*)newArgv);
+ ckfree((char*)cmdName);
+
+ return result;
+}
+
+/*
+ * Deprecated: use Tcl_EvalObjv instead. Will be removed.
+ */
+
+int Tix_EvalArgv(interp, argc, argv)
+ Tcl_Interp *interp;
+ int argc;
+ CONST84 char **argv;
+{
+ register Tcl_Obj *objPtr;
+ register int i;
+ int result;
+
+#define NUM_ARGS 20
+ Tcl_Obj *(objStorage[NUM_ARGS]);
+ register Tcl_Obj **objv = objStorage;
+
+ /*
+ * TODO: callers to this method should be changed to use Tcl_EvalObjv
+ * directly.
+ */
+
+ /*
+ * Create the object argument array "objv". Make sure objv is large
+ * enough to hold the objc arguments plus 1 extra for the zero
+ * end-of-objv word.
+ */
+
+ if ((argc + 1) > NUM_ARGS) {
+ objv = (Tcl_Obj **)
+ ckalloc((unsigned)(argc + 1) * sizeof(Tcl_Obj *));
+ }
+
+ for (i = 0; i < argc; i++) {
+ objv[i] = Tcl_NewStringObj(argv[i], -1);
+ Tcl_IncrRefCount(objv[i]);
+ }
+ objv[argc] = NULL;
+
+ result = Tcl_EvalObjv(interp, argc, objv, TCL_EVAL_GLOBAL);
+
+ /*
+ * Move the interpreter's object result to the string result,
+ * then reset the object result. We do this because some
+ * of our callers expect to find result inside interp->result.
+ */
+
+ Tcl_SetResult(interp, Tcl_GetString(Tcl_GetObjResult(interp)),
+ TCL_VOLATILE);
+
+ /*
+ * Decrement the ref counts on the objv elements since we are done
+ * with them.
+ */
+
+ for (i = 0; i < argc; i++) {
+ objPtr = objv[i];
+ Tcl_DecrRefCount(objPtr);
+ }
+
+ /*
+ * Free the objv array if malloc'ed storage was used.
+ */
+
+ if (objv != objStorage) {
+ ckfree((char *) objv);
+ }
+ return result;
+#undef NUM_ARGS
+}
+
+char *
+Tix_FindPublicMethod(interp, cPtr, method)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char *method;
+{
+ int i;
+ unsigned int len = strlen(method);
+
+ for (i=0; i<cPtr->nMethods; i++) {
+ if (cPtr->methods[i][0] == method[0] &&
+ strncmp(cPtr->methods[i], method, len)==0) {
+ return cPtr->methods[i];
+ }
+ }
+ return 0;
+}
+
+/*
+ *----------------------------------------------------------------------
+ * MethodTableDeleteProc --
+ *
+ * This procedure is called when the interp is about to
+ * be deleted. It cleans up the hash entries and destroys the hash
+ * table.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * All class method contexts are deleted for this interpreter.
+ *----------------------------------------------------------------------
+ */
+
+static void
+MethodTableDeleteProc(clientData, interp)
+ ClientData clientData;
+ Tcl_Interp *interp;
+{
+ Tcl_HashTable *methodTablePtr = (Tcl_HashTable*)clientData;
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry *hashPtr;
+ CONST84 char *context;
+
+ for (hashPtr = Tcl_FirstHashEntry(methodTablePtr, &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+
+ context = (char*)Tcl_GetHashValue(hashPtr);
+ if (context) {
+ ckfree((char *) context);
+ }
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+ Tcl_DeleteHashTable(methodTablePtr);
+ ckfree((char*)methodTablePtr);
+}
Added: external/tix-8.4.2.x/generic/tixNBFrame.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixNBFrame.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1644 @@
+/*
+ * tixNBFrame.c --
+ *
+ * This module implements "tixNoteBookFrame" widgets.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixNBFrame.c,v 1.7 2004/03/28 02:44:57 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+
+#define NUM_TAB_POINTS 6
+#define ANCHOR_TABPAD 2
+#define MIN_TABPADX 3
+#define MIN_TABPADY 3
+#define ACTIVE_TAB_ELEVATION 2
+#define MAX_BORDER_WIDTH 4
+
+/*
+ * A data structure of the following type is kept for each
+ * widget managed by this file:
+ */
+
+typedef struct NoteBookFrameStruct {
+ Tk_Window tkwin; /* Window that embodies the widget. NULL
+ * means window has been deleted but
+ * widget record hasn't been cleaned up yet. */
+ Display *display; /* X's token for the window's display. */
+ Tcl_Interp *interp; /* Interpreter associated with widget. */
+ Tcl_Command widgetCmd; /* Token for button's widget command. */
+
+ /*
+ * Information used when displaying widget:
+ */
+ int desiredWidth; /* Desired narrow dimension of scrollbar,
+ * in pixels. */
+ int width; /* total width of the widget */
+ int height; /* total width of the widget */
+
+ /*
+ * Information used when displaying widget:
+ */
+
+ /* Border and general drawing */
+
+ int borderWidth; /* Width of 3-D borders. */
+ Tk_3DBorder bgBorder; /* Used for drawing background. */
+ Tk_3DBorder focusBorder; /* background of the "focus" tab. */
+ Tk_3DBorder inactiveBorder; /* background of the "inactive" tab(s) */
+ XColor * backPageColorPtr; /* the color used as the "back page" */
+ GC backPageGC; /* GC for drawing text in normal mode. */
+ int relief; /* Indicates whether window as a whole is
+ * raised, sunken, or flat. */
+ int tabPadx; /* Horiz-paddings around the tab label/image */
+ int tabPady; /* Vert-paddings around the tab label/image */
+
+ int isSlave; /* if is in Slave mode, do not request for
+ * germetry */
+ /* Text drawing */
+ TixFont font; /* Font used by the active (selected)
+ * notebook tab. May be NULL */
+ XColor *textColorPtr; /* Color for drawing text. */
+ XColor *disabledFg; /* Foreground color when disabled. NULL
+ * means use normalFg with a 50% stipple
+ * instead. */
+ GC activeGC; /* GC for drawing text on active tab. */
+ GC disabledGC; /* GC for drawing text on disabled tabs */
+ GC anchorGC; /* GC for drawing dotted anchor highlight. */
+ GC inactiveAnchorGC; /* GC for drawing dotted anchor highlight
+ * inside inactive tabs.*/
+ Pixmap gray; /* Pixmap for displaying disabled text if
+ * disabledFg is NULL. */
+
+ Cursor cursor; /* Current cursor for window, or None. */
+
+ struct _Tab * tabHead;
+ struct _Tab * tabTail;
+ struct _Tab * active;
+ struct _Tab * focus;
+
+ int tabsWidth; /* total width of the tabs */
+ int tabsHeight; /* total height of the tabs */
+
+ char *takeFocus; /* Value of -takefocus option; not used in
+ * the C code, but used by keyboard traversal
+ * scripts. Malloc'ed, but may be NULL. */
+
+ unsigned int redrawing : 1;
+ unsigned int gotFocus : 1;
+
+} NoteBookFrame;
+
+typedef struct _Tab {
+ struct _Tab * next;
+
+ NoteBookFrame * wPtr;
+ char * name;
+
+ Tk_Uid state; /* State of Tab's for display purposes:
+ * normal or disabled. */
+ Tk_Anchor anchor;
+
+ char * text;
+ int width, height;
+ Tk_Justify justify; /* Justification to use for multi-line text. */
+ int wrapLength;
+ int underline; /* Index of character to underline. < 0 means
+ * don't underline anything. */
+
+ Tk_Image image;
+ char * imageString;
+
+ Pixmap bitmap;
+} Tab;
+
+typedef NoteBookFrame WidgetRecord;
+typedef NoteBookFrame * WidgetPtr;
+
+/*
+ * Information used for argv parsing.
+ */
+static Tk_ConfigSpec configSpecs[] = {
+
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_NOTEBOOKFRAME_BG_COLOR, Tk_Offset(WidgetRecord, bgBorder),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-background", "background", "Background",
+ DEF_NOTEBOOKFRAME_BG_MONO, Tk_Offset(WidgetRecord, bgBorder),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_COLOR, "-backpagecolor", "backPageColor", "BackPageColor",
+ DEF_NOTEBOOKFRAME_BACKPAGE_COLOR,
+ Tk_Offset(WidgetRecord, backPageColorPtr),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-backpagecolor", "backPageColor", "BackPageColor",
+ DEF_NOTEBOOKFRAME_BACKPAGE_MONO,
+ Tk_Offset(WidgetRecord, backPageColorPtr),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
+ DEF_NOTEBOOKFRAME_BORDER_WIDTH, Tk_Offset(WidgetRecord, borderWidth),
+ 0},
+
+ {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
+ DEF_NOTEBOOKFRAME_CURSOR, Tk_Offset(WidgetRecord, cursor),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
+ "DisabledForeground", DEF_NOTEBOOKFRAME_DISABLED_FG_COLOR,
+ Tk_Offset(WidgetRecord, disabledFg),
+ TK_CONFIG_COLOR_ONLY|TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_COLOR, "-disabledforeground", "disabledForeground",
+ "DisabledForeground", DEF_NOTEBOOKFRAME_DISABLED_FG_MONO,
+ Tk_Offset(WidgetRecord, disabledFg),
+ TK_CONFIG_MONO_ONLY|TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_BORDER, "-focuscolor", "focusColor", "FocusColor",
+ DEF_NOTEBOOKFRAME_FOCUS_COLOR, Tk_Offset(WidgetRecord, focusBorder),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-focuscolor", "focusColor", "FocusColor",
+ DEF_NOTEBOOKFRAME_FOCUS_MONO, Tk_Offset(WidgetRecord, focusBorder),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_NOTEBOOKFRAME_FONT, Tk_Offset(WidgetRecord, font), 0},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_NOTEBOOKFRAME_FG_COLOR, Tk_Offset(WidgetRecord, textColorPtr),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_NOTEBOOKFRAME_FG_MONO, Tk_Offset(WidgetRecord, textColorPtr),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_BORDER, "-inactivebackground", "inactiveBackground",
+ "Background",
+ DEF_NOTEBOOKFRAME_INACTIVE_BG_COLOR,
+ Tk_Offset(WidgetRecord, inactiveBorder),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-inactivebackground", "inactiveBackground",
+ "Background",
+ DEF_NOTEBOOKFRAME_INACTIVE_BG_MONO,
+ Tk_Offset(WidgetRecord, inactiveBorder),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
+ DEF_NOTEBOOKFRAME_RELIEF, Tk_Offset(WidgetRecord, relief), 0},
+
+ {TK_CONFIG_BOOLEAN, "-slave", "slave", "Slave",
+ DEF_NOTEBOOKFRAME_SLAVE, Tk_Offset(WidgetRecord, isSlave), 0},
+
+ {TK_CONFIG_PIXELS, "-tabpadx", "tabPadX", "Pad",
+ DEF_NOTEBOOKFRAME_TABPADX, Tk_Offset(WidgetRecord, tabPadx), 0},
+
+ {TK_CONFIG_PIXELS, "-tabpady", "tabPadY", "Pad",
+ DEF_NOTEBOOKFRAME_TABPADY, Tk_Offset(WidgetRecord, tabPady), 0},
+
+ {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
+ DEF_NOTEBOOKFRAME_TAKE_FOCUS, Tk_Offset(WidgetRecord, takeFocus),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_PIXELS, "-width", "width", "Width",
+ DEF_NOTEBOOKFRAME_WIDTH, Tk_Offset(WidgetRecord, desiredWidth), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+#define DEF_NBF_TAB_ANCHOR "c"
+#define DEF_NBF_TAB_BITMAP ""
+#define DEF_NBF_TAB_IMAGE ""
+#define DEF_NBF_TAB_JUSTIFY "center"
+#define DEF_NBF_TAB_TEXT ""
+#define DEF_NBF_TAB_STATE "normal"
+#define DEF_NBF_TAB_UNDERLINE "-1"
+#define DEF_NBF_TAB_WRAPLENGTH "0"
+
+static Tk_ConfigSpec tabConfigSpecs[] = {
+ {TK_CONFIG_ANCHOR, "-anchor", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_ANCHOR, Tk_Offset(Tab, anchor), 0},
+
+ {TK_CONFIG_BITMAP, "-bitmap", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_BITMAP, Tk_Offset(Tab, bitmap), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-image", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_IMAGE, Tk_Offset(Tab, imageString),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_JUSTIFY, "-justify", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_JUSTIFY, Tk_Offset(Tab, justify), 0},
+
+ {TK_CONFIG_STRING, "-label", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_TEXT, Tk_Offset(Tab, text), TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_UID, "-state", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_STATE, Tk_Offset(Tab, state), 0},
+
+ {TK_CONFIG_INT, "-underline", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_UNDERLINE, Tk_Offset(Tab, underline), 0},
+
+ {TK_CONFIG_PIXELS, "-wraplength", (char*)NULL, (char*)NULL,
+ DEF_NBF_TAB_WRAPLENGTH, Tk_Offset(Tab, wrapLength), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+/* These are standard procedures for TK widgets implemeted in C
+ */
+static void WidgetCmdDeletedProc(
+ ClientData clientData);
+static int WidgetConfigure(Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, CONST84 char **argv,
+ int flags);
+static int WidgetCommand(ClientData clientData,
+ Tcl_Interp *, int argc, CONST84 char **argv);
+static void WidgetComputeGeometry(WidgetPtr wPtr);
+static void WidgetDestroy(ClientData clientData);
+static void WidgetDisplay(ClientData clientData);
+static void WidgetEventProc(ClientData clientData,
+ XEvent *eventPtr);
+
+ /* Extra procedures for this widget
+ */
+static int AddTab(WidgetPtr wPtr, CONST84 char * name,
+ CONST84 char ** argv, int argc);
+static void DeleteTab(Tab * tPtr);
+static void CancelRedrawWhenIdle(WidgetPtr wPtr);
+static void ComputeGeometry(WidgetPtr wPtr);
+static void DrawTab(WidgetPtr wPtr,
+ Tab * tPtr, int x, int isActive, int isFocused,
+ Drawable drawable);
+static Tab * FindTab(Tcl_Interp *interp,
+ WidgetPtr wPtr, CONST84 char * name);
+static void GetTabPoints(
+ WidgetPtr wPtr, Tab * tPtr,
+ int x, XPoint *points, int isActive);
+static void ImageProc(ClientData clientData,
+ int x, int y, int width, int height,
+ int imgWidth, int imgHeight);
+static void RedrawWhenIdle(WidgetPtr wPtr);
+static int TabConfigure(WidgetPtr wPtr,
+ Tab *tPtr, CONST84 char ** argv, int argc);
+
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_NoteBookFrameCmd --
+ *
+ * This procedure is invoked to process the "tixNoteBookFrame" Tcl
+ * command. It creates a new "TixNoteBookFrame" widget.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * A new widget is created and configured.
+ *
+ *--------------------------------------------------------------
+ */
+int
+Tix_NoteBookFrameCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window mainwin = (Tk_Window) clientData;
+ WidgetPtr wPtr;
+ Tk_Window tkwin;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " pathName ?options?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ tkwin = Tk_CreateWindowFromPath(interp, mainwin, argv[1], (char *) NULL);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tk_SetClass(tkwin, "TixNoteBookFrame");
+
+ /*
+ * Allocate and initialize the widget record.
+ */
+ wPtr = (WidgetPtr) ckalloc(sizeof(WidgetRecord));
+ wPtr->tkwin = tkwin;
+ wPtr->display = Tk_Display(tkwin);
+ wPtr->interp = interp;
+ wPtr->isSlave = 1;
+ wPtr->desiredWidth = 0;
+ wPtr->interp = interp;
+ wPtr->width = 0;
+ wPtr->borderWidth = 0;
+ wPtr->bgBorder = NULL;
+ wPtr->backPageGC = None;
+ wPtr->backPageColorPtr = NULL;
+ wPtr->disabledFg = NULL;
+ wPtr->gray = None;
+ wPtr->disabledGC = None;
+ wPtr->inactiveBorder = NULL;
+ wPtr->focusBorder = NULL;
+ wPtr->font = NULL;
+ wPtr->textColorPtr = NULL;
+ wPtr->activeGC = None;
+ wPtr->anchorGC = None;
+ wPtr->inactiveAnchorGC = None;
+ wPtr->relief = TK_RELIEF_FLAT;
+ wPtr->cursor = None;
+
+ wPtr->tabHead = 0;
+ wPtr->tabTail = 0;
+ wPtr->tabPadx = 0;
+ wPtr->tabPady = 0;
+ wPtr->active = 0;
+ wPtr->focus = 0;
+ wPtr->takeFocus = 0;
+ wPtr->redrawing = 0;
+ wPtr->gotFocus = 0;
+
+ Tk_CreateEventHandler(wPtr->tkwin,
+ ExposureMask|StructureNotifyMask|FocusChangeMask,
+ WidgetEventProc, (ClientData) wPtr);
+ wPtr->widgetCmd = Tcl_CreateCommand(interp, Tk_PathName(wPtr->tkwin),
+ WidgetCommand, (ClientData) wPtr, WidgetCmdDeletedProc);
+ if (WidgetConfigure(interp, wPtr, argc-2, argv+2, 0) != TCL_OK) {
+ Tk_DestroyWindow(wPtr->tkwin);
+ return TCL_ERROR;
+ }
+
+ interp->result = Tk_PathName(wPtr->tkwin);
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetCommand --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+
+static int
+WidgetCommand(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about the widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int result = TCL_OK;
+ unsigned int length;
+ char c;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " option ?arg arg ...?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ Tk_Preserve((ClientData) wPtr);
+ c = argv[1][0];
+ length = strlen(argv[1]);
+
+ if (((c == 'a') && (strncmp(argv[1], "activate", length) == 0))||
+ ((c == 'f') && (strncmp(argv[1], "focus", length) == 0))){
+ if (argc != 3) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " ", argv[1], " name\"", (char *) NULL);
+ goto error;
+ }
+ else {
+ if (strcmp(argv[2], "")==0) {
+ if (c == 'a') {
+ wPtr->active = 0;
+ wPtr->focus = 0;
+ }
+ else {
+ wPtr->focus = 0;
+ }
+ RedrawWhenIdle(wPtr);
+ }
+ else {
+ Tab * tPtr;
+
+ for (tPtr=wPtr->tabHead; tPtr; tPtr=tPtr->next) {
+ if (strcmp(argv[2], tPtr->name) == 0) {
+ if (c == 'a') {
+ wPtr->active = tPtr;
+ wPtr->focus = tPtr;
+ }
+ else {
+ wPtr->focus = tPtr;
+ }
+ RedrawWhenIdle(wPtr);
+ goto done;
+ }
+ }
+
+ Tcl_AppendResult(interp, "unknown tab \"",
+ argv[0], "\"", (char *) NULL);
+ goto error;
+ }
+ }
+ }
+ else if ((c == 'a') && (strncmp(argv[1], "add", length) == 0)) {
+ if (argc < 3) {
+ Tcl_AppendResult(interp, "wrong # args: should be ",
+ argv[0], " add name ?options?", (char *) NULL);
+ goto error;
+ }
+ else {
+ if (AddTab(wPtr, argv[2], argv+3, argc-3)!= TCL_OK) {
+ goto error;
+ } else {
+ WidgetComputeGeometry(wPtr);
+ RedrawWhenIdle(wPtr);
+ }
+ }
+ }
+ else if ((c == 'c') && (strncmp(argv[1], "cget", length) == 0)) {
+ if (argc == 3) {
+ result = Tk_ConfigureValue(interp, wPtr->tkwin, configSpecs,
+ (char *)wPtr, argv[2], 0);
+ } else {
+ result = Tix_ArgcError(interp, argc, argv, 2, "option");
+ }
+ }
+ else if ((c == 'c') && (strncmp(argv[1], "configure", length) == 0)) {
+ if (argc == 2) {
+ result = Tk_ConfigureInfo(interp, wPtr->tkwin, configSpecs,
+ (char *) wPtr, (char *) NULL, 0);
+ } else if (argc == 3) {
+ result = Tk_ConfigureInfo(interp, wPtr->tkwin, configSpecs,
+ (char *) wPtr, argv[2], 0);
+ } else {
+ result = WidgetConfigure(interp, wPtr, argc-2, argv+2,
+ TK_CONFIG_ARGV_ONLY);
+ }
+ }
+ else if ((c == 'd') && (strncmp(argv[1], "delete", length) == 0)) {
+ Tab * tPtr, * prev ;
+
+ if (argc != 3) {
+ Tix_ArgcError(interp, argc, argv, 2, "page");
+ goto error;
+ }
+
+ /* Find the tab from the list */
+ for (prev=tPtr=wPtr->tabHead; tPtr; prev=tPtr,tPtr=tPtr->next) {
+ if (strcmp(tPtr->name, argv[2])==0) {
+ break;
+ }
+ }
+ if (tPtr == NULL) {
+ Tcl_AppendResult(wPtr->interp,
+ "Unknown tab \"", argv[2], "\"", (char*) NULL);
+ goto error;
+ }
+ if (tPtr == prev) {
+ if (wPtr->tabHead == wPtr->tabTail) {
+ wPtr->tabHead = wPtr->tabTail = NULL;
+ } else {
+ wPtr->tabHead = tPtr->next;
+ }
+ } else {
+ if (tPtr == wPtr->tabTail) {
+ wPtr->tabTail = prev;
+ }
+ prev->next = tPtr->next;
+ }
+
+ DeleteTab(tPtr);
+ ComputeGeometry(wPtr);
+ RedrawWhenIdle(wPtr);
+ }
+ else if ((c == 'g') && (strncmp(argv[1], "geometryinfo", length) == 0)) {
+ char buff[20];
+
+ ComputeGeometry(wPtr);
+ sprintf(buff, "%d %d", wPtr->width, wPtr->height);
+
+ Tcl_AppendResult(interp, buff, NULL);
+ }
+ else if ((c == 'i') && (strncmp(argv[1], "identify", length) == 0)) {
+ if (argc != 4) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " identify x y\"", (char *) NULL);
+ goto error;
+ }
+ else {
+ int x, y, left, right;
+ Tab * tPtr;
+
+ if (Tcl_GetInt(interp, argv[2], &x) != TCL_OK) {
+ goto error;
+ }
+ if (Tcl_GetInt(interp, argv[3], &y) != TCL_OK) {
+ goto error;
+ }
+
+ if (y < wPtr->tabsHeight) {
+ left = 0;
+ for (tPtr=wPtr->tabHead; tPtr; tPtr=tPtr->next) {
+ right = left + (wPtr->borderWidth + wPtr->tabPadx) * 2
+ + tPtr->width;
+
+ if (x >= left && x <= right && tPtr->state ==tixNormalUid){
+ Tcl_AppendResult(interp, tPtr->name, NULL);
+ goto done;
+ }
+ left = right;
+ }
+ }
+
+ /*
+ * An empty string is returned to indicate "nothing selected"
+ */
+ Tcl_ResetResult(interp);
+ }
+ }
+ else if ((c == 'i') && (strncmp(argv[1], "info", length) == 0)) {
+ Tcl_ResetResult(interp);
+
+ if (argc == 3 && strcmp(argv[2], "pages")==0 ) {
+ Tab * tPtr;
+
+ for (tPtr=wPtr->tabHead; tPtr; tPtr=tPtr->next) {
+ Tcl_AppendElement(interp, tPtr->name);
+ }
+ }
+ else if (argc == 3 && strcmp(argv[2], "active")==0 ) {
+ if (wPtr->active) {
+ Tcl_AppendResult(interp, wPtr->active->name, NULL);
+ }
+ }
+ else if (argc == 3 && strcmp(argv[2], "focus")==0 ) {
+ if (wPtr->focus) {
+ Tcl_AppendResult(interp, wPtr->focus->name, NULL);
+ }
+ }
+ else if (argc == 3 && strcmp(argv[2], "focusnext")==0 ) {
+ Tab * next;
+ if (wPtr->focus) {
+ if (wPtr->focus->next) {
+ next = wPtr->focus->next;
+ } else {
+ next = wPtr->tabHead;
+ }
+ Tcl_AppendResult(interp, next->name, NULL);
+ }
+ }
+ else if (argc == 3 && strcmp(argv[2], "focusprev")==0 ) {
+ Tab * prev, *tPtr;
+
+ if (wPtr->focus==wPtr->tabHead) {
+ prev = wPtr->tabTail;
+ }
+ else {
+ for (prev=tPtr=wPtr->tabHead;tPtr; prev=tPtr,tPtr=tPtr->next) {
+ if (tPtr == wPtr->focus) {
+ break;
+ }
+ }
+ }
+
+ if (prev) {
+ Tcl_AppendResult(interp, prev->name, NULL);
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "wrong number of arguments or ",
+ "unknown option", NULL);
+ goto error;
+ }
+ }
+ else if ((c == 'm') && (strncmp(argv[1], "move", length) == 0)) {
+
+ }
+ else if ((c == 'p') && (strncmp(argv[1], "pagecget", length) == 0)) {
+ Tab * tPtr;
+
+ if (argc != 4) {
+ Tix_ArgcError(interp, argc, argv, 2, "option");
+ goto error;
+ }
+ if ((tPtr=FindTab(interp, wPtr, argv[2])) == NULL) {
+ goto error;
+ }
+ result = Tk_ConfigureValue(interp, wPtr->tkwin, tabConfigSpecs,
+ (char *)tPtr, argv[3], 0);
+ }
+ else if ((c == 'p') && (strncmp(argv[1], "pageconfigure", length) == 0)) {
+ Tab * tPtr;
+
+ if (argc < 3) {
+ Tix_ArgcError(interp, argc, argv, 2,
+ "page ?option value ...?");
+ goto error;
+ }
+ if ((tPtr=FindTab(interp, wPtr, argv[2])) == NULL) {
+ goto error;
+ }
+ if (argc == 3) {
+ result = Tk_ConfigureInfo(interp, wPtr->tkwin, tabConfigSpecs,
+ (char *)tPtr, (char *) NULL, 0);
+ } else if (argc == 4) {
+ result = Tk_ConfigureInfo(interp, wPtr->tkwin, tabConfigSpecs,
+ (char *)tPtr, argv[3], 0);
+ } else {
+ result = TabConfigure(wPtr, tPtr, argv+3, argc-3);
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "bad option \"", argv[1],
+ "\": must be activate, add, configure, delete, ",
+ "geometryinfo, identify, move, pagecget or ",
+ "pageconfigure", (char *) NULL);
+ goto error;
+ }
+
+ done:
+ Tk_Release((ClientData) wPtr);
+ return result;
+
+ error:
+ Tk_Release((ClientData) wPtr);
+ return TCL_ERROR;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetConfigure --
+ *
+ * This procedure is called to process an argv/argc list in
+ * conjunction with the Tk option database to configure (or
+ * reconfigure) a Notebookframe widget.
+ *
+ * Results:
+ * The return value is a standard Tcl result. If TCL_ERROR is
+ * returned, then interp->result contains an error message.
+ *
+ * Side effects:
+ * Configuration information, such as colors, border width,
+ * etc. get set for wPtr; old resources get freed,
+ * if there were any.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+WidgetConfigure(interp, wPtr, argc, argv, flags)
+ Tcl_Interp *interp; /* Used for error reporting. */
+ WidgetPtr wPtr; /* Information about widget. */
+ int argc; /* Number of valid entries in argv. */
+ CONST84 char **argv; /* Arguments. */
+ int flags; /* Flags to pass to
+ * Tk_ConfigureWidget. */
+{
+ XGCValues gcValues;
+ GC newGC;
+ unsigned int mask;
+
+ if (Tk_ConfigureWidget(interp, wPtr->tkwin, configSpecs,
+ argc, argv, (char *) wPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * Tab paddings cannot be too small, or else we can't draw the
+ * focus highlight nicely.
+ */
+ if (wPtr->tabPadx < MIN_TABPADX) {
+ wPtr->tabPadx = MIN_TABPADX;
+ }
+ if (wPtr->tabPady < MIN_TABPADY) {
+ wPtr->tabPady = MIN_TABPADY;
+ }
+
+ if (wPtr->borderWidth > MAX_BORDER_WIDTH) {
+ wPtr->borderWidth = MAX_BORDER_WIDTH;
+ }
+
+ Tk_SetBackgroundFromBorder(wPtr->tkwin, wPtr->bgBorder);
+
+ /*
+ * Get the back page GC
+ */
+ gcValues.foreground = wPtr->backPageColorPtr->pixel;
+ gcValues.graphics_exposures = False;
+ newGC = Tk_GetGC(wPtr->tkwin, GCForeground|GCGraphicsExposures,
+ &gcValues);
+ if (wPtr->backPageGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->backPageGC);
+ }
+ wPtr->backPageGC = newGC;
+
+ /*
+ * Get the active GC
+ */
+ gcValues.foreground = wPtr->textColorPtr->pixel;
+ gcValues.background = Tk_3DBorderColor(wPtr->bgBorder)->pixel;
+ gcValues.font = TixFontId(wPtr->font);
+ gcValues.graphics_exposures = False;
+ newGC = Tk_GetGC(wPtr->tkwin,
+ GCBackground|GCForeground|GCFont|GCGraphicsExposures,
+ &gcValues);
+ if (wPtr->activeGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->activeGC);
+ }
+ wPtr->activeGC = newGC;
+
+ /*
+ * Get the disabled GC
+ */
+ if (wPtr->disabledFg != NULL) {
+ gcValues.foreground = wPtr->disabledFg->pixel;
+ gcValues.background = Tk_3DBorderColor(wPtr->bgBorder)->pixel;
+ mask = GCForeground|GCBackground|GCFont;
+ } else {
+ gcValues.foreground = Tk_3DBorderColor(wPtr->bgBorder)->pixel;
+ if (wPtr->gray == None) {
+ wPtr->gray = Tk_GetBitmap(interp, wPtr->tkwin,
+ Tk_GetUid("gray50"));
+ if (wPtr->gray == None) {
+ return TCL_ERROR;
+ }
+ }
+ gcValues.fill_style = FillStippled;
+ gcValues.stipple = wPtr->gray;
+ mask = GCForeground|GCFillStyle|GCFont|GCStipple;
+ }
+ gcValues.font = TixFontId(wPtr->font);
+ newGC = Tk_GetGC(wPtr->tkwin, mask, &gcValues);
+ if (wPtr->disabledGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->disabledGC);
+ }
+ wPtr->disabledGC = newGC;
+
+ /*
+ * GC for the dotted anchor lines drawn around the focused tab's
+ * label/image.
+ */
+ newGC = Tix_GetAnchorGC(wPtr->tkwin, Tk_3DBorderColor(wPtr->bgBorder));
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->anchorGC);
+ }
+ wPtr->anchorGC = newGC;
+
+ /*
+ * GC for the dotted anchor lines drawn around the focused tab's
+ * label/image.
+ */
+ newGC = Tix_GetAnchorGC(wPtr->tkwin,
+ Tk_3DBorderColor(wPtr->inactiveBorder));
+ if (wPtr->inactiveAnchorGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->inactiveAnchorGC);
+ }
+ wPtr->inactiveAnchorGC = newGC;
+
+ WidgetComputeGeometry(wPtr);
+ RedrawWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on Notebookframes.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * When the window gets deleted, internal structures get
+ * cleaned up. When it gets exposed, it is redisplayed.
+ *
+ *--------------------------------------------------------------
+ */
+
+static void
+WidgetEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ switch (eventPtr->type ) {
+ case DestroyNotify:
+ if (wPtr->tkwin != NULL) {
+ wPtr->tkwin = NULL;
+ Tcl_DeleteCommand(wPtr->interp,
+ Tcl_GetCommandName(wPtr->interp, wPtr->widgetCmd));
+ }
+ CancelRedrawWhenIdle(wPtr);
+ Tk_EventuallyFree((ClientData) wPtr, (Tix_FreeProc*)WidgetDestroy);
+ break;
+
+ case Expose:
+ case ConfigureNotify:
+ RedrawWhenIdle(wPtr);
+ break;
+
+ case FocusIn:
+ if (eventPtr->xfocus.detail != NotifyVirtual) {
+ wPtr->gotFocus = 1;
+ if (wPtr->focus == NULL) {
+ wPtr->focus = wPtr->active;
+ }
+ RedrawWhenIdle(wPtr);
+ }
+ break;
+
+ case FocusOut:
+ if (eventPtr->xfocus.detail != NotifyVirtual) {
+ wPtr->gotFocus = 0;
+ RedrawWhenIdle(wPtr);
+ }
+ break;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDestroy --
+ *
+ * This procedure is invoked by Tk_EventuallyFree or Tk_Release
+ * to clean up the internal structure of a Notebookframe at a safe time
+ * (when no-one is using it anymore).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Everything associated with the Notebookframe is freed up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+WidgetDestroy(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Tab * tPtr;
+
+ for (tPtr=wPtr->tabHead; tPtr;) {
+ Tab * toDelete;
+
+ toDelete = tPtr;
+ tPtr=tPtr->next;
+
+ DeleteTab(toDelete);
+ }
+
+ if (wPtr->backPageGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->backPageGC);
+ }
+ if (wPtr->activeGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->activeGC);
+ }
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->anchorGC);
+ }
+ if (wPtr->inactiveAnchorGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->inactiveAnchorGC);
+ }
+ if (wPtr->gray != None) {
+ Tk_FreeBitmap(wPtr->display, wPtr->gray);
+ }
+ if (wPtr->disabledGC != None) {
+ Tk_FreeGC(wPtr->display, wPtr->disabledGC);
+ }
+ Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->display, 0);
+ ckfree((char *) wPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetCmdDeletedProc --
+ *
+ * This procedure is invoked when a widget command is deleted. If
+ * the widget isn't already in the process of being destroyed,
+ * this command destroys it.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The widget is destroyed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetCmdDeletedProc(clientData)
+ ClientData clientData; /* Pointer to widget record for widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ /*
+ * This procedure could be invoked either because the window was
+ * destroyed and the command was then deleted (in which case tkwin
+ * is NULL) or because the command was deleted, and then this procedure
+ * destroys the widget.
+ */
+ if (wPtr->tkwin != NULL) {
+ Tk_Window tkwin = wPtr->tkwin;
+ wPtr->tkwin = NULL;
+ Tk_DestroyWindow(tkwin);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * FindTab --
+ *
+ * Seraches for the Tab is the widget's tab list
+ *----------------------------------------------------------------------
+ */
+static Tab * FindTab(interp, wPtr, name)
+ Tcl_Interp * interp;
+ WidgetPtr wPtr;
+ CONST84 char * name;
+{
+ Tab *tPtr;
+
+ for (tPtr=wPtr->tabHead; tPtr; tPtr=tPtr->next) {
+ if (strcmp(tPtr->name, name) == 0) {
+ return tPtr;
+ }
+ }
+
+ Tcl_AppendResult(interp, "Unknown tab \"", name, "\"", (char*) NULL);
+ return NULL;
+}
+
+
+static int TabConfigure(wPtr, tPtr, argv, argc)
+ WidgetPtr wPtr;
+ Tab *tPtr;
+ CONST84 char ** argv;
+ int argc;
+{
+ if (Tk_ConfigureWidget(wPtr->interp, wPtr->tkwin, tabConfigSpecs,
+ argc, argv, (char *)tPtr, TK_CONFIG_ARGV_ONLY) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /*
+ * Free the old images for the widget, if there were any.
+ */
+ if (tPtr->image != NULL) {
+ Tk_FreeImage(tPtr->image);
+ tPtr->image = NULL;
+ }
+
+ if (tPtr->imageString != NULL) {
+ tPtr->image = Tk_GetImage(wPtr->interp, wPtr->tkwin,
+ tPtr->imageString, ImageProc, (ClientData) tPtr);
+ if (tPtr->image == NULL) {
+ return TCL_ERROR;
+ }
+ }
+
+ /*
+ * Recalculate the size of the tab (minus the padding and borders)
+ */
+
+ if (tPtr->text != NULL) {
+ TixComputeTextGeometry(wPtr->font, tPtr->text, -1,
+ tPtr->wrapLength, &tPtr->width, &tPtr->height);
+ }
+ else if (tPtr->image != NULL) {
+ Tk_SizeOfImage(tPtr->image, &tPtr->width, &tPtr->height);
+ }
+ else if (tPtr->bitmap != None) {
+ Tk_SizeOfBitmap(wPtr->display, tPtr->bitmap, &tPtr->width,
+ &tPtr->height);
+ }
+ else {
+ tPtr->width = 0;
+ tPtr->height = 0;
+ }
+
+ WidgetComputeGeometry(wPtr);
+ RedrawWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * AddTab --
+ *
+ * Adds a new tab into the list of tabs.
+ *
+ * Results:
+ * The return value is a standard Tcl result. If TCL_ERROR is
+ * returned, then interp->result contains an error message.
+ *
+ * Side effects:
+ * Configuration information, such as colors, border width,
+ * etc. get set for wPtr; old resources get freed,
+ * if there were any.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+AddTab(wPtr, name, argv, argc)
+ WidgetPtr wPtr; /* Information about widget. */
+ CONST84 char * name; /* Arguments. */
+ CONST84 char ** argv;
+ int argc;
+{
+ Tab * tPtr;
+
+ tPtr = (Tab*)ckalloc(sizeof(Tab));
+
+ tPtr->next = NULL;
+ tPtr->wPtr = wPtr;
+ tPtr->name = tixStrDup(name);
+ tPtr->state = tixNormalUid;
+ tPtr->text = NULL;
+ tPtr->width = 0;
+ tPtr->height = 0;
+ tPtr->justify = TK_JUSTIFY_CENTER;
+ tPtr->wrapLength = 0;
+ tPtr->underline = -1;
+ tPtr->image = NULL;
+ tPtr->imageString = NULL;
+ tPtr->bitmap = None;
+ tPtr->anchor = TK_ANCHOR_CENTER;
+
+ if (TabConfigure(wPtr, tPtr, argv, argc) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ /* Append the tab to the end of the list */
+
+ if (wPtr->tabHead == 0) {
+ wPtr->tabHead = wPtr->tabTail = tPtr;
+ }
+ else {
+ /* Insert right after the tail */
+ wPtr->tabTail->next = tPtr;
+ wPtr->tabTail = tPtr;
+ }
+
+ return TCL_OK;
+}
+
+static void DeleteTab(tPtr)
+ Tab * tPtr;
+{
+ if (tPtr->wPtr->focus == tPtr) {
+ tPtr->wPtr->focus = 0;
+ }
+ if (tPtr->wPtr->active == tPtr) {
+ tPtr->wPtr->active = 0;
+ }
+ if (tPtr->name) {
+ ckfree(tPtr->name);
+ }
+ if (tPtr->image) {
+ Tk_FreeImage(tPtr->image);
+ }
+
+ if (tPtr->wPtr->tkwin) {
+ Tk_FreeOptions(tabConfigSpecs, (char *)tPtr,
+ Tk_Display(tPtr->wPtr->tkwin), 0);
+ }
+ ckfree((char*)tPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * RedrawWhenIdle --
+ *
+ * Redraw this widget when idle
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+RedrawWhenIdle(wPtr)
+ WidgetPtr wPtr; /* Information about widget. */
+{
+ if (! wPtr->redrawing && Tk_IsMapped(wPtr->tkwin)) {
+ wPtr->redrawing = 1;
+ Tk_DoWhenIdle(WidgetDisplay, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CancelRedrawWhenIdle --
+ *
+ * Redraw this widget when idle
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+CancelRedrawWhenIdle(wPtr)
+ WidgetPtr wPtr; /* Information about widget. */
+{
+ if (wPtr->redrawing) {
+ wPtr->redrawing = 0;
+ Tk_CancelIdleCall(WidgetDisplay, (ClientData)wPtr);
+ }
+}
+
+static void
+GetTabPoints(wPtr, tPtr, x, points, isActive)
+ WidgetPtr wPtr;
+ Tab * tPtr;
+ int x;
+ XPoint *points;
+ int isActive;
+{
+ /*
+ * Starting clock-wise from points[0] (the lower-left corner of the tab)
+ */
+
+ points[0].x = x + wPtr->borderWidth;
+ points[0].y = wPtr->tabsHeight;
+ points[1].x = points[0].x;
+ points[1].y = wPtr->borderWidth * 2;
+ points[2].x = x + wPtr->borderWidth * 2;
+ points[2].y = wPtr->borderWidth;
+
+ points[3].x = x + tPtr->width + wPtr->tabPadx*2;
+ points[3].y = points[2].y;
+ points[4].x = points[3].x + wPtr->borderWidth;
+ points[4].y = points[1].y;
+ points[5].x = points[4].x;
+ points[5].y = points[0].y;
+
+ if (!isActive) {
+ points[1].y += ACTIVE_TAB_ELEVATION;
+ points[2].y += ACTIVE_TAB_ELEVATION;
+ points[3].y += ACTIVE_TAB_ELEVATION;
+ points[4].y += ACTIVE_TAB_ELEVATION;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DrawTab --
+ *
+ * Draws one tab according to its position and text
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+DrawTab(wPtr, tPtr, x, isActive, isFocused, drawable)
+ WidgetPtr wPtr; /* The widget to draw */
+ Tab * tPtr; /* The tab to draw. */
+ int x; /* The x coordinate of the left edge
+ * of the tab */
+ int isActive; /* Is this an active tab */
+ int isFocused; /* Should this tab be focused */
+ Drawable drawable; /* The drawable to render the widget
+ * in */
+{
+ Tk_3DBorder border;
+ XPoint points[NUM_TAB_POINTS];
+ int drawX, drawY, extraH;
+ GC gc, anchorGC;
+ int tabHeight = wPtr->tabsHeight - ACTIVE_TAB_ELEVATION;
+
+ /*
+ * (1) Choose the right GC/border for drawing the tab
+ */
+
+ if (tPtr->state == tixNormalUid) {
+ gc = wPtr->activeGC;
+ if (isActive) {
+ anchorGC = wPtr->anchorGC;
+ } else {
+ anchorGC = wPtr->inactiveAnchorGC;
+ }
+ } else {
+ anchorGC = NULL;
+ gc = wPtr->disabledGC;
+ }
+
+ if (isActive) {
+ border = wPtr->bgBorder;
+ } else {
+ border = wPtr->inactiveBorder;
+ tabHeight -= ACTIVE_TAB_ELEVATION;
+ }
+
+ /*
+ * (2) Draw the tab border
+ */
+
+ GetTabPoints(wPtr, tPtr, x, points, isActive);
+ drawX = x + wPtr->borderWidth + wPtr->tabPadx;
+ drawY = wPtr->borderWidth + wPtr->tabPady;
+ extraH = tabHeight - tPtr->height - wPtr->borderWidth - wPtr->tabPady *2;
+
+ if (extraH > 0) {
+ /*
+ * Center the content vertically -- we may have contents
+ * of different height in the tabs of this notebook frame.
+ */
+
+ switch (tPtr->anchor) {
+ case TK_ANCHOR_SW: case TK_ANCHOR_S: case TK_ANCHOR_SE:
+ drawY += extraH;
+ break;
+ case TK_ANCHOR_W: case TK_ANCHOR_CENTER: case TK_ANCHOR_E:
+ drawY += extraH/2;
+ break;
+ case TK_ANCHOR_N: case TK_ANCHOR_NE: case TK_ANCHOR_NW:
+ /*
+ * Do nothing.
+ */
+ break;
+ }
+ }
+
+ if (!isActive) {
+ drawY += ACTIVE_TAB_ELEVATION;
+ }
+
+#ifdef __WIN32__
+ if (wPtr->borderWidth == 2) {
+ /*
+ * If the borderWidth is the standard value of 2, try to make
+ * the 3D page tab look like native Win32 tabs.
+ */
+
+ int x = points[0].x - wPtr->borderWidth;
+ int y = points[2].y - wPtr->borderWidth;
+ int w = points[4].x - points[0].x + wPtr->borderWidth * 2;
+ int h = points[0].y - points[2].y + wPtr->borderWidth * 2;
+
+ if (tPtr != wPtr->tabHead && isActive) {
+ /*
+ * Make this active tab look more prominent
+ */
+
+ x -= 2;
+ w += 2;
+ }
+
+ Tk_Fill3DRectangle(wPtr->tkwin, drawable,
+ border, x, y, w, h,
+ wPtr->borderWidth, TK_RELIEF_RAISED);
+
+ /*
+ * Round the edges of the 3D rect
+ */
+
+ XFillRectangle(wPtr->display, drawable, wPtr->backPageGC,
+ x, y, 2, 1);
+ XFillRectangle(wPtr->display, drawable, wPtr->backPageGC,
+ x, y, 1, 2);
+ XFillRectangle(wPtr->display, drawable, wPtr->backPageGC,
+ x+w-2, y, 2, 1);
+ XFillRectangle(wPtr->display, drawable, wPtr->backPageGC,
+ x+w-1, y, 1, 2);
+
+ /*
+ * Fill in one missing pixel
+ */
+
+ XFillRectangle(wPtr->display, drawable,
+ Tk_3DBorderGC(wPtr->tkwin, border, TK_3D_LIGHT_GC),
+ x+1, y+1, 1, 1);
+ } else {
+ Tk_Fill3DPolygon(wPtr->tkwin, drawable,
+ border, points, NUM_TAB_POINTS,
+ wPtr->borderWidth, TK_RELIEF_SUNKEN);
+ }
+#else
+ Tk_Fill3DPolygon(wPtr->tkwin, drawable,
+ border, points, NUM_TAB_POINTS,
+ wPtr->borderWidth, TK_RELIEF_SUNKEN);
+#endif
+
+ /*
+ * (3) Draw the tab content
+ */
+ if (tPtr->text != NULL) {
+ TixDisplayText(wPtr->display, drawable, wPtr->font,
+ tPtr->text, -1,
+ drawX, drawY,
+ tPtr->wrapLength,
+ tPtr->justify,
+ tPtr->underline,
+ gc);
+ } else if (tPtr->image != NULL) {
+ Tk_RedrawImage(tPtr->image, 0, 0, tPtr->width, tPtr->height,
+ drawable, drawX, drawY);
+ } else if (tPtr->bitmap != None) {
+ XSetClipOrigin(wPtr->display, gc, drawX, drawY);
+ XCopyPlane(wPtr->display, tPtr->bitmap, drawable,
+ gc, 0, 0, (unsigned) tPtr->width, (unsigned) tPtr->height,
+ drawX, drawY, 1);
+ XSetClipOrigin(wPtr->display, gc, 0, 0);
+ }
+
+ if (isFocused) {
+ int ancX = drawX - ANCHOR_TABPAD;
+ int ancY = drawY - ANCHOR_TABPAD;
+ int ancW = tPtr->width + 2*ANCHOR_TABPAD;
+ int ancH = tPtr->height + 2*ANCHOR_TABPAD;
+
+ Tix_DrawAnchorLines(wPtr->display, drawable, anchorGC,
+ ancX, ancY, ancW, ancH);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDisplay --
+ *
+ * Redraw this widget
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetDisplay(clientData)
+ ClientData clientData; /* Information about widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Tab * tPtr;
+ int width, height;
+ Drawable buffer;
+
+ /* Now let's redraw */
+ if (wPtr->tabHead == NULL) {
+ /*
+ * no tabs to redraw: just draw the border
+ */
+ if ((wPtr->bgBorder != NULL) && (wPtr->relief != TK_RELIEF_FLAT)) {
+ Tk_Fill3DRectangle(wPtr->tkwin, Tk_WindowId(wPtr->tkwin),
+ wPtr->bgBorder, 0, 0,
+ Tk_Width(wPtr->tkwin), Tk_Height(wPtr->tkwin),
+ wPtr->borderWidth, wPtr->relief);
+ }
+ }
+ else {
+ int x, y, activex = 0;
+
+ buffer = Tix_GetRenderBuffer(wPtr->display, Tk_WindowId(wPtr->tkwin),
+ Tk_Width(wPtr->tkwin), Tk_Height(wPtr->tkwin),
+ Tk_Depth(wPtr->tkwin));
+ XFillRectangle(wPtr->display, buffer, wPtr->backPageGC, 0, 0,
+ (unsigned) Tk_Width(wPtr->tkwin),
+ (unsigned) Tk_Height(wPtr->tkwin));
+
+ Tk_Fill3DRectangle(wPtr->tkwin, buffer,
+ wPtr->bgBorder, 0, wPtr->tabsHeight,
+ Tk_Width(wPtr->tkwin),
+ Tk_Height(wPtr->tkwin) - wPtr->tabsHeight,
+ wPtr->borderWidth, wPtr->relief);
+
+ /* Draw the tabs */
+ x = 0;
+ for (tPtr=wPtr->tabHead; tPtr; tPtr=tPtr->next) {
+ int isActive = 0, isFocused = 0;
+
+ if (tPtr == wPtr->active) {
+ activex = x;
+ isActive = 1;
+ }
+ if (tPtr == wPtr->focus && wPtr->gotFocus) {
+ isFocused = 1;
+ }
+
+ DrawTab(wPtr, tPtr, x, isActive, isFocused, buffer);
+
+ x += (wPtr->borderWidth + wPtr->tabPadx) * 2;
+ x += tPtr->width;
+ }
+
+ /* Draw the box */
+ Tk_Draw3DRectangle(wPtr->tkwin, buffer,
+ wPtr->bgBorder, 0, wPtr->tabsHeight,
+ Tk_Width(wPtr->tkwin),
+ Tk_Height(wPtr->tkwin) - wPtr->tabsHeight,
+ wPtr->borderWidth, wPtr->relief);
+
+ if (wPtr->active != NULL) {
+ /*
+ * Fill up the gap between the active tab and the box
+ */
+ x = activex + wPtr->borderWidth;
+ y = wPtr->tabsHeight;
+ height = wPtr->borderWidth;
+ width = wPtr->active->width + wPtr->tabPadx*2;
+
+#ifdef __WIN32__
+ if (wPtr->borderWidth == 2) {
+ x -= 1;
+ width += 2;
+ if (wPtr->active != wPtr->tabHead) {
+ x -= 2;
+ width += 2;
+ }
+ }
+#endif
+ XFillRectangle(wPtr->display, buffer,
+ Tk_3DBorderGC(wPtr->tkwin, wPtr->bgBorder, TK_3D_FLAT_GC),
+ x, y, (unsigned) width, (unsigned) height);
+ }
+
+ if (buffer != Tk_WindowId(wPtr->tkwin)) {
+ XCopyArea(wPtr->display, buffer, Tk_WindowId(wPtr->tkwin),
+ wPtr->activeGC, 0, 0, (unsigned) Tk_Width(wPtr->tkwin),
+ (unsigned) Tk_Height(wPtr->tkwin), 0, 0);
+ Tk_FreePixmap(wPtr->display, buffer);
+ }
+ }
+
+ wPtr->redrawing = 0;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * ComputeGeometry --
+ *
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+ComputeGeometry(wPtr)
+ WidgetPtr wPtr;
+{
+ Tab * tPtr;
+
+ /* Calculate the requested size of the widget */
+ if (wPtr->tabHead == NULL) {
+ wPtr->width = wPtr->borderWidth * 2;
+ wPtr->height = wPtr->borderWidth * 2;
+
+ wPtr->tabsWidth = 0;
+ wPtr->tabsHeight = 0;
+ } else {
+ wPtr->tabsWidth = 0;
+ wPtr->tabsHeight = 0;
+ for (tPtr=wPtr->tabHead; tPtr; tPtr=tPtr->next) {
+ wPtr->tabsWidth += (wPtr->borderWidth + wPtr->tabPadx) * 2;
+ wPtr->tabsWidth += tPtr->width;
+
+ if (wPtr->tabsHeight < tPtr->height) {
+ wPtr->tabsHeight = tPtr->height;
+ }
+ }
+ wPtr->tabsHeight += wPtr->tabPady*2 + wPtr->borderWidth;
+ wPtr->tabsHeight += ACTIVE_TAB_ELEVATION;
+
+ wPtr->width = wPtr->tabsWidth;
+ wPtr->height = wPtr->tabsHeight + wPtr->borderWidth*2;
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetComputeGeometry --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+WidgetComputeGeometry(wPtr)
+ WidgetPtr wPtr;
+{
+ int width;
+
+ ComputeGeometry(wPtr);
+
+ if (!wPtr->isSlave) {
+ if (wPtr->desiredWidth > 0) {
+ width = wPtr->desiredWidth;
+ } else {
+ width = wPtr->width;
+ }
+ Tk_GeometryRequest(wPtr->tkwin, width, wPtr->height);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * ImageProc --
+ *
+ * This procedure is invoked by the image code whenever the manager
+ * for an image does something that affects the size of contents
+ * of an image displayed in this widget.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Arranges for the HList to get redisplayed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+ImageProc(clientData, x, y, width, height, imgWidth, imgHeight)
+ ClientData clientData; /* Pointer to widget record. */
+ int x, y; /* Upper left pixel (within image)
+ * that must be redisplayed. */
+ int width, height; /* Dimensions of area to redisplay
+ * (may be <= 0). */
+ int imgWidth, imgHeight; /* New dimensions of image. */
+{
+ Tab * tPtr;
+
+ tPtr = (Tab *)clientData;
+
+ WidgetComputeGeometry(tPtr->wPtr);
+ RedrawWhenIdle(tPtr->wPtr);
+}
Added: external/tix-8.4.2.x/generic/tixOption.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixOption.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,406 @@
+
+/* $Id: tixOption.c,v 1.3 2004/03/28 02:44:57 hobbs Exp $ */
+
+/*
+ * tixOption.c --
+ *
+ * Handle the "$widget config" commands
+ *
+ * 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.
+ *
+ */
+
+/* ToDo:
+ *
+ * 1) ConfigSpec structures shouldn't be shared between parent and child
+ * classes.
+ * 2) Specs array should be compacted (no duplication) and sorted according
+ * to argvName during class declaration.
+ * 3) Merge aliases with specs
+ *
+ */
+#include <tk.h>
+#include <tixPort.h>
+#include <tixInt.h>
+
+static char * FormatConfigInfo(Tcl_Interp *interp,
+ TixClassRecord *cPtr, CONST84 char * widRec, TixConfigSpec * spec);
+/*
+ * This is a lightweight interface for querying the value of a
+ * variable in the object. This is simpler compared to
+ * [lindex [$w config -flag] 4]
+ */
+int Tix_GetVar (interp, cPtr, widRec, flag)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char * widRec;
+ CONST84 char * flag;
+{
+ TixConfigSpec * spec;
+ CONST84 char * value;
+
+ spec = Tix_FindConfigSpecByName(interp, cPtr, flag);
+ if (spec != NULL) {
+ if (spec->isAlias) {
+ flag = spec->realPtr->argvName;
+ } else {
+ /* The user may have specified a shorthand like -backgro */
+ flag = spec->argvName;
+ }
+ value = Tcl_GetVar2(interp, widRec, flag, TCL_GLOBAL_ONLY);
+
+ Tcl_AppendResult(interp, value, (char*)NULL);
+ return TCL_OK;
+ }
+ else {
+ return TCL_ERROR;
+ }
+}
+
+int
+Tix_QueryOneOption(interp, cPtr, widRec, flag)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char *widRec;
+ CONST84 char *flag;
+{
+ TixConfigSpec * spec;
+ char * list;
+
+ spec = Tix_FindConfigSpecByName(interp, cPtr, flag);
+ if (spec != NULL) {
+ list = FormatConfigInfo(interp, cPtr, widRec, spec);
+ Tcl_SetResult(interp, list, TCL_VOLATILE);
+
+ ckfree((char *) list);
+ return TCL_OK;
+ }
+ else {
+ return TCL_ERROR;
+ }
+}
+
+/*
+ * Tix_QueryAllOptions --
+ *
+ * Note: This function does not call Tix_FindConfigSpec() because
+ * it just needs to print out the list of all configSpecs from the
+ * class structure.
+ *
+ */
+int
+Tix_QueryAllOptions (interp, cPtr, widRec)
+ Tcl_Interp *interp;
+ TixClassRecord * cPtr;
+ CONST84 char *widRec;
+{
+ int i, code = TCL_OK;
+ char *list;
+ CONST84 char *lead = "{";
+
+ /* Iterate over all the options of class */
+ for (i=0; i<cPtr->nSpecs; i++) {
+ if (cPtr->specs[i] && cPtr->specs[i]->argvName) {
+ list = FormatConfigInfo(interp, cPtr, widRec, cPtr->specs[i]);
+ Tcl_AppendResult(interp, lead, list, "}", (char *) NULL);
+
+ ckfree((char *) list);
+ lead = " {";
+ }
+ }
+
+ return code;
+}
+
+TixConfigSpec *
+Tix_FindConfigSpecByName(interp, cPtr, flag)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char *flag;
+{
+ CONST84 char *classRec;
+ CONST84 char *key;
+ int nMatch, i;
+ size_t len;
+ Tcl_HashEntry *hashPtr;
+ TixConfigSpec *configSpec;
+
+ classRec = cPtr->className;
+
+ /*
+ * First try to look up the confifspec in a hash table,
+ * it should be faster.
+ */
+
+ key = Tix_GetConfigSpecFullName(classRec, flag);
+ hashPtr = Tcl_FindHashEntry(TixGetHashTable(interp, "tixSpecTab", NULL,
+ TCL_STRING_KEYS), key);
+ ckfree((char *) key);
+
+ if (hashPtr) {
+ return (TixConfigSpec *) Tcl_GetHashValue(hashPtr);
+ }
+
+ /*
+ * The user may specified a partial name. Try to match, but will
+ * return error if we don't get exactly one match.
+ */
+ len = strlen(flag);
+ for (configSpec=NULL,nMatch=0,i=0; i<cPtr->nSpecs; i++) {
+ if (strncmp(flag, cPtr->specs[i]->argvName, len) == 0) {
+ if (nMatch > 0) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "ambiguous option \"", flag, "\"",
+ (char*)NULL);
+ return NULL;
+ } else {
+ nMatch ++;
+ configSpec = cPtr->specs[i];
+ }
+ }
+ }
+
+ if (configSpec == NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "unknown option \"", flag, "\"", (char*)NULL);
+ return NULL;
+ } else {
+ return configSpec;
+ }
+}
+
+CONST84 char *
+Tix_GetConfigSpecFullName(classRec, flag)
+ CONST84 char * classRec;
+ CONST84 char * flag;
+{
+ char * buff;
+ int max;
+ int conLen;
+
+ conLen = strlen(classRec);
+ max = conLen + strlen(flag) + 1;
+ buff = (char*)ckalloc(max * sizeof(char));
+
+ strcpy(buff, classRec);
+ strcpy(buff+conLen, flag);
+
+ return buff;
+}
+
+int Tix_ChangeOptions(interp, cPtr, widRec, argc, argv)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char * widRec;
+ int argc;
+ CONST84 char ** argv;
+{
+ int i, code = TCL_OK;
+ TixConfigSpec * spec;
+
+ if (argc == 0) {
+ goto done;
+ }
+
+ if ((argc %2) != 0) {
+ if (Tix_FindConfigSpecByName(interp, cPtr, argv[argc-1])) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", (char*)NULL);
+ } else {
+ /* The error message is already appended by
+ * Tix_FindConfigSpecByName()
+ */
+ }
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ for (i=0; i<argc; i+=2) {
+ spec = Tix_FindConfigSpecByName(interp, cPtr, argv[i]);
+
+ if (spec == NULL) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (Tix_ChangeOneOption(interp, cPtr, widRec, spec,
+ argv[i+1], 0, 0)!=TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+
+ done:
+ return code;
+}
+
+int Tix_CallConfigMethod(interp, cPtr, widRec, spec, value)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char * widRec;
+ TixConfigSpec *spec;
+ CONST84 char * value;
+{
+#define STATIC_SPACE_SIZE 60
+ CONST84 char * argv[2];
+ char buff[STATIC_SPACE_SIZE];
+ char * method = buff;
+ CONST84 char * context = Tix_GetContext(interp, widRec);
+ CONST84 char * c;
+ unsigned int bufsize = strlen(spec->argvName) + 7;
+ int code;
+
+ if (bufsize > STATIC_SPACE_SIZE) {
+ method = ckalloc(bufsize);
+ }
+
+ sprintf(method, "config%s", spec->argvName);
+
+ c = Tix_FindMethod(interp, context, method);
+ if (c != NULL) {
+ argv[0] = value;
+ code = Tix_CallMethod(interp, c, widRec, method, 1, argv, NULL);
+ goto done;
+ }
+
+ c = Tix_FindMethod(interp, context, "config");
+ if (c != NULL) {
+ argv[0] = spec->argvName;
+ argv[1] = value;
+ code = Tix_CallMethod(interp, c, widRec, "config", 2, argv, NULL);
+ goto done;
+ }
+
+ code = TCL_OK;
+
+done:
+ if (method != buff) {
+ ckfree((char *) method);
+ }
+ return code;
+#undef STATIC_SPACE_SIZE
+}
+
+int Tix_ChangeOneOption(interp, cPtr, widRec, spec, value, isDefault, isInit)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char * widRec;
+ TixConfigSpec *spec;
+ CONST84 char * value;
+ int isDefault; /* Set to be true when Tix tries to set
+ * the options according to their default
+ * values */
+ int isInit; /* Set to true only if the option was
+ * specified at the widget creation command
+ */
+{
+ int code = TCL_OK;
+ CONST84 char * newValue = NULL;
+
+ if (spec->isAlias) {
+ spec = spec->realPtr;
+ }
+
+ /* -- STEP 1 --
+ * Check if these variables are protected.
+ * readonly means the variable can never be assigned to.
+ * static means ths variable can only ne assigned during initialization.
+ */
+
+ if (!isDefault && spec->readOnly) {
+ Tcl_AppendResult(interp, "cannot assigned to readonly variable \"",
+ spec->argvName, "\"", (char*) NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (!(isInit || isDefault) && spec->isStatic) {
+ Tcl_AppendResult(interp, "cannot assigned to static variable \"",
+ spec->argvName, "\"", (char*) NULL);
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /* -- STEP 2 --
+ * Call the verify command to check whether the value is acceptable
+ *
+ */
+ if (spec->verifyCmd != NULL) {
+ CONST84 char * cmdArgv[2];
+ cmdArgv[0] = spec->verifyCmd;
+ cmdArgv[1] = value;
+
+ if (Tix_EvalArgv(interp, 2, cmdArgv) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ } else {
+ newValue = value = tixStrDup(interp->result);
+ }
+ }
+
+ /* -- STEP 3 --
+ * Call the configuration method of the widget. This method may
+ * override the user-supplied value. The configuration method should
+ * not be called during initialization.
+ */
+ if (isInit || isDefault) {
+ /* No need to call the configuration method */
+ Tcl_SetVar2(interp, widRec, spec->argvName, value,TCL_GLOBAL_ONLY);
+ }
+ else {
+ if (Tix_CallConfigMethod(interp, cPtr, widRec, spec, value)!=TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ /* -- STEP 4 --
+ * If the configuration method does not override the value, set
+ * it in the widget record.
+ *
+ * If the configuration method has override the value, it will
+ * return a non-empty string. In this case, it is the configuration
+ * method's responsibility to set the value in the widget record.
+ */
+ if (interp->result && (*interp->result)) {
+ /* value was overrided. Don't do anything */
+ Tcl_ResetResult(interp);
+ } else {
+ Tcl_SetVar2(interp, widRec, spec->argvName, value,TCL_GLOBAL_ONLY);
+ }
+ }
+
+ done:
+ if (newValue) {
+ ckfree((char *) newValue);
+ }
+ return code;
+}
+
+static char *
+FormatConfigInfo(interp, cPtr, widRec, sPtr)
+ Tcl_Interp *interp;
+ TixClassRecord *cPtr;
+ CONST84 char * widRec;
+ TixConfigSpec * sPtr;
+{
+ CONST84 char *argv[6];
+
+ if (sPtr->isAlias) {
+ if (cPtr->isWidget) {
+ argv[0] = sPtr->argvName;
+ argv[1] = sPtr->realPtr->dbName;
+ } else {
+ argv[0] = sPtr->argvName;
+ argv[1] = sPtr->realPtr->argvName;
+ }
+ return Tcl_Merge(2, argv);
+ } else {
+ argv[0] = sPtr->argvName;
+ argv[1] = sPtr->dbName;
+ argv[2] = sPtr->dbClass;
+ argv[3] = sPtr->defValue;
+ argv[4] = Tcl_GetVar2(interp, widRec, argv[0], TCL_GLOBAL_ONLY);
+
+ return Tcl_Merge(5, argv);
+ }
+}
Added: external/tix-8.4.2.x/generic/tixPort.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixPort.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,100 @@
+
+/* $Id: tixPort.h,v 1.6 2005/03/25 20:15:53 hobbs 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 _TCL
+#include "tcl.h"
+#endif
+
+#ifndef _TK
+#include "tk.h"
+#endif
+
+#if (!defined(__WIN32__)) && (!defined(_WIN32)) && (!defined(MAC_TCL))
+ /*
+ * The Tcl/Tk porting stuff is needed only in Unix.
+ */
+#if !defined(_TCLPORT) && !defined(_TKPORT)
+# ifdef _TKINT
+# include "tkPort.h"
+# else
+# include "tclPort.h"
+# endif
+#endif
+#endif
+
+#ifndef _TIX_H_
+#include <tix.h>
+#endif
+
+#if defined(__WIN32__) || defined(_WIN32)
+# include "tixWinPort.h"
+#else
+# if defined(MAC_TCL)
+# include "tixMacPort.h"
+# else
+# if defined(MAC_OSX_TK)
+# include <X11/X.h>
+# define Cursor XCursor
+# define Region XRegion
+# include "../unix/tixUnixPort.h"
+# else
+# include "../unix/tixUnixPort.h"
+# endif
+# endif
+#endif
+
+EXTERN Tcl_HashTable * TixGetHashTable _ANSI_ARGS_((Tcl_Interp * interp,
+ char * name, Tcl_InterpDeleteProc *deleteProc,
+ int keyType));
+
+/*
+ * Some pre-Tk8.0 style font handling. Should be updated to new Tk
+ * font functions soon.
+ */
+
+typedef Tk_Font TixFont;
+#define TixFontId(font) Tk_FontId(font)
+
+EXTERN void TixComputeTextGeometry _ANSI_ARGS_((
+ TixFont fontStructPtr, CONST84 char *string,
+ int numChars, int wrapLength, int *widthPtr,
+ int *heightPtr));
+EXTERN void TixDisplayText _ANSI_ARGS_((Display *display,
+ Drawable drawable, TixFont font,
+ CONST84 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
+
+/*
+ * Tcl 8.4.a2 defines this macro that causes Tix compiled with
+ * Tcl 8.4 to break in Tcl 8.3
+ */
+
+#if defined(Tcl_InitHashTable) && defined(USE_TCL_STUBS)
+#undef Tcl_InitHashTable
+#define Tcl_InitHashTable \
+ (tclStubsPtr->tcl_InitHashTable)
+#endif
+
+#endif /* _TIX_PORT_H_ */
Added: external/tix-8.4.2.x/generic/tixScroll.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixScroll.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,191 @@
+
+/* $Id: tixScroll.c,v 1.2 2004/03/28 02:44:57 hobbs Exp $ */
+
+/*
+ * tixScroll.c -- Handle all the mess of Tk scroll bars
+ *
+ *
+ *
+ */
+
+#include <tixInt.h>
+
+
+void Tix_InitScrollInfo(siPtr, type)
+ Tix_ScrollInfo * siPtr;
+ int type;
+{
+ Tix_IntScrollInfo* isiPtr = (Tix_IntScrollInfo*) siPtr;
+ Tix_DoubleScrollInfo* dsiPtr = (Tix_DoubleScrollInfo*)siPtr;
+
+ siPtr->command = NULL;
+ siPtr->type = type;
+
+ if (type == TIX_SCROLL_INT) {
+ isiPtr->total = 1;
+ isiPtr->window = 1;
+ isiPtr->offset = 0;
+ isiPtr->unit = 1;
+ }
+ else {
+ dsiPtr->total = 1.0;
+ dsiPtr->window = 1.0;
+ dsiPtr->offset = 0.0;
+ dsiPtr->unit = 1.0;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Tix_GetScrollFractions --
+ *
+ * Compute the fractions of a scroll-able widget.
+ *
+ */
+void Tix_GetScrollFractions(siPtr, first_ret, last_ret)
+ Tix_ScrollInfo * siPtr;
+ double * first_ret;
+ double * last_ret;
+{
+ Tix_IntScrollInfo* isiPtr = (Tix_IntScrollInfo*) siPtr;
+ Tix_DoubleScrollInfo* dsiPtr = (Tix_DoubleScrollInfo*)siPtr;
+ double total, window, first;
+
+ if (siPtr->type == TIX_SCROLL_INT) {
+ total = isiPtr->total;
+ window = isiPtr->window;
+ first = isiPtr->offset;
+ } else {
+ total = dsiPtr->total;
+ window = dsiPtr->window;
+ first = dsiPtr->offset;
+ }
+
+ if (total == 0 || total < window) {
+ *first_ret = 0.0;
+ *last_ret = 1.0;
+ } else {
+ *first_ret = first / total;
+ *last_ret = (first+window) / total;
+ }
+}
+
+void Tix_UpdateScrollBar(interp, siPtr)
+ Tcl_Interp *interp;
+ Tix_ScrollInfo * siPtr;
+{
+ Tix_IntScrollInfo* isiPtr = (Tix_IntScrollInfo*) siPtr;
+ Tix_DoubleScrollInfo* dsiPtr = (Tix_DoubleScrollInfo*)siPtr;
+ double d_first, d_last;
+ char string[100];
+
+ if (siPtr->type == TIX_SCROLL_INT) {
+ /* Check whether the topPixel is out of bound */
+ if (isiPtr->offset < 0) {
+ isiPtr->offset = 0;
+ } else {
+ if (isiPtr->window > isiPtr->total) {
+ isiPtr->offset = 0;
+ }
+ else if((isiPtr->offset+isiPtr->window) > isiPtr->total) {
+ isiPtr->offset = isiPtr->total - isiPtr->window;
+ }
+ }
+ } else {
+ /* Check whether the topPixel is out of bound */
+ if (dsiPtr->offset < 0) {
+ dsiPtr->offset = 0;
+ } else {
+ if (dsiPtr->window > dsiPtr->total) {
+ dsiPtr->offset = 0;
+ }
+ else if((dsiPtr->offset+dsiPtr->window) > dsiPtr->total) {
+ dsiPtr->offset = dsiPtr->total - dsiPtr->window;
+ }
+ }
+ }
+
+
+ if (siPtr->command) {
+ Tix_GetScrollFractions(siPtr, &d_first, &d_last);
+
+ sprintf(string, " %f %f", d_first, d_last);
+ if (Tcl_VarEval(interp, siPtr->command, string,
+ (char *) NULL) != TCL_OK) {
+ Tcl_AddErrorInfo(interp,
+ "\n (scrolling command executed by tixTList)");
+ Tk_BackgroundError(interp);
+ }
+ }
+}
+
+int Tix_SetScrollBarView(interp, siPtr, argc, argv, compat)
+ Tcl_Interp *interp; /* Current interpreter. */
+ Tix_ScrollInfo * siPtr;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+ int compat; /* compatibility mode */
+{
+ Tix_IntScrollInfo* isiPtr = (Tix_IntScrollInfo*) siPtr;
+ Tix_DoubleScrollInfo* dsiPtr = (Tix_DoubleScrollInfo*)siPtr;
+ int offset;
+
+ if (compat && Tcl_GetInt(interp, argv[0], &offset) == TCL_OK) {
+ /* backward-compatible mode */
+ if (siPtr->type == TIX_SCROLL_INT) {
+ isiPtr->offset = offset;
+ }
+ else {
+ dsiPtr->offset = (double)offset;
+ }
+
+ return TCL_OK;
+ }
+ else {
+ int type, count;
+ double fraction;
+
+ Tcl_ResetResult(interp);
+
+ /* Tk_GetScrollInfo () wants strange argc,argv combinations .. */
+ type = Tk_GetScrollInfo(interp, argc+2, argv-2, &fraction, &count);
+
+ if (siPtr->type == TIX_SCROLL_INT) {
+ switch (type) {
+ case TK_SCROLL_ERROR:
+ return TCL_ERROR;
+
+ case TK_SCROLL_MOVETO:
+ isiPtr->offset =
+ (int)(fraction * (double)isiPtr->total);
+ break;
+
+ case TK_SCROLL_PAGES:
+ isiPtr->offset += count * isiPtr->window;
+ break;
+
+ case TK_SCROLL_UNITS:
+ isiPtr->offset += count * isiPtr->unit;
+ break;
+ }
+ } else {
+ switch (type) {
+ case TK_SCROLL_ERROR:
+ return TCL_ERROR;
+
+ case TK_SCROLL_MOVETO:
+ dsiPtr->offset =
+ fraction * dsiPtr->total;
+ break;
+
+ case TK_SCROLL_PAGES:
+ dsiPtr->offset += count * dsiPtr->window;
+ break;
+
+ case TK_SCROLL_UNITS:
+ dsiPtr->offset += count * dsiPtr->unit;
+ break;
+ }
+ }
+ }
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/generic/tixSmpLs.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixSmpLs.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,124 @@
+
+/* $Id: tixSmpLs.c,v 1.1.1.1 2000/05/17 11:08:42 idiscovery Exp $ */
+
+/*
+ * tixSmpLs.c --
+ *
+ * To implement simple link lists (next is always the first
+ * member of the list).
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+static Tix_ListInfo simpleListInfo = {
+ 0,
+ TIX_UNDEFINED,
+};
+
+void Tix_SimpleListInit(lPtr)
+ Tix_LinkList * lPtr;
+{
+ Tix_LinkListInit(lPtr);
+}
+
+
+void
+Tix_SimpleListAppend(lPtr, itemPtr, flags)
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ int flags;
+{
+ Tix_LinkListAppend(&simpleListInfo, lPtr, itemPtr, flags);
+}
+
+void Tix_SimpleListIteratorInit(liPtr)
+ Tix_ListIterator * liPtr;
+{
+ Tix_LinkListIteratorInit(liPtr);
+}
+
+void Tix_SimpleListStart(lPtr, liPtr)
+ Tix_LinkList * lPtr;
+ Tix_ListIterator * liPtr;
+{
+ Tix_LinkListStart(&simpleListInfo, lPtr, liPtr);
+}
+
+void Tix_SimpleListNext(lPtr, liPtr)
+ Tix_LinkList * lPtr;
+ Tix_ListIterator * liPtr;
+{
+ Tix_LinkListNext(&simpleListInfo, lPtr, liPtr);
+}
+
+/*
+ * To delete consecutive elements, you must delete, next, delete, next ...
+ */
+void Tix_SimpleListDelete(lPtr, liPtr)
+ Tix_LinkList * lPtr;
+ Tix_ListIterator * liPtr;
+{
+ Tix_LinkListDelete(&simpleListInfo, lPtr, liPtr);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_SimpleListInsert --
+ *
+ * Insert the item at the position indicated by liPtr
+ *----------------------------------------------------------------------
+ */
+void Tix_SimpleListInsert(lPtr, itemPtr, liPtr)
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ Tix_ListIterator * liPtr;
+{
+ Tix_LinkListInsert(&simpleListInfo, lPtr, itemPtr, liPtr);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_SimpleListFindAndDelete --
+ *
+ * Find an element and delete it.
+ *
+ * liPtr:
+ * Can be zero.
+ * If non-zero, the search will start from the current entry indexed
+ * by liPtr;
+ *
+ * Return value:
+ * 1 if element is found and deleted
+ * 0 if element is not found
+ *----------------------------------------------------------------------
+ */
+int Tix_SimpleListFindAndDelete(lPtr, itemPtr, liPtr)
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ Tix_ListIterator * liPtr;
+{
+ return Tix_LinkListFindAndDelete(&simpleListInfo, lPtr, itemPtr, liPtr);
+}
+
+int Tix_SimpleListDeleteRange(lPtr, fromPtr, toPtr, liPtr)
+ Tix_LinkList * lPtr;
+ char * fromPtr;
+ char * toPtr;
+ Tix_ListIterator * liPtr;
+{
+ return Tix_LinkListDeleteRange(&simpleListInfo, lPtr,
+ fromPtr, toPtr, liPtr);
+}
+
+int Tix_SimpleListFind(lPtr, itemPtr, liPtr)
+ Tix_LinkList * lPtr;
+ char * itemPtr;
+ Tix_ListIterator * liPtr;
+{
+ return Tix_LinkListFind(&simpleListInfo, lPtr, itemPtr, liPtr);
+}
Added: external/tix-8.4.2.x/generic/tixTList.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixTList.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,2519 @@
+/*
+ * tixTList.c --
+ *
+ * This module implements "TList" widgets.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixTList.c,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+#include <tixDef.h>
+#include <tixTList.h>
+
+#define TIX_UP 1
+#define TIX_DOWN 2
+#define TIX_LEFT 3
+#define TIX_RIGHT 4
+
+/*
+ * Information used for argv parsing.
+ */
+static Tk_ConfigSpec configSpecs[] = {
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ DEF_TLIST_BG_COLOR, Tk_Offset(WidgetRecord, normalBg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-background", "background", "Background",
+ DEF_TLIST_BG_MONO, Tk_Offset(WidgetRecord, normalBg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_SYNONYM, "-bd", "borderWidth", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_SYNONYM, "-bg", "background", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_BORDER, "-highlightbackground", "highlightBackground",
+ "HighlightBackground",
+ DEF_TLIST_BG_COLOR, Tk_Offset(WidgetRecord, border),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-highlightbackground", "highlightBackground",
+ "HighlightBackground",
+ DEF_TLIST_BG_MONO, Tk_Offset(WidgetRecord, border),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-borderwidth", "borderWidth", "BorderWidth",
+ DEF_TLIST_BORDER_WIDTH, Tk_Offset(WidgetRecord, borderWidth), 0},
+
+ {TK_CONFIG_STRING, "-browsecmd", "browseCmd", "BrowseCmd",
+ DEF_TLIST_BROWSE_COMMAND, Tk_Offset(WidgetRecord, browseCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-command", "command", "Command",
+ DEF_TLIST_COMMAND, Tk_Offset(WidgetRecord, command),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_ACTIVE_CURSOR, "-cursor", "cursor", "Cursor",
+ DEF_TLIST_CURSOR, Tk_Offset(WidgetRecord, cursor),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_SYNONYM, "-fg", "foreground", (char *) NULL,
+ (char *) NULL, 0, 0},
+
+ {TK_CONFIG_FONT, "-font", "font", "Font",
+ DEF_TLIST_FONT, Tk_Offset(WidgetRecord, font), 0},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_TLIST_FG_COLOR, Tk_Offset(WidgetRecord, normalFg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-foreground", "foreground", "Foreground",
+ DEF_TLIST_FG_MONO, Tk_Offset(WidgetRecord, normalFg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_INT, "-height", "height", "Height",
+ DEF_TLIST_HEIGHT, Tk_Offset(WidgetRecord, height), 0},
+
+ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
+ DEF_TLIST_HIGHLIGHT_COLOR, Tk_Offset(WidgetRecord, highlightColorPtr),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-highlightcolor", "highlightColor", "HighlightColor",
+ DEF_TLIST_HIGHLIGHT_MONO, Tk_Offset(WidgetRecord, highlightColorPtr),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-highlightthickness", "highlightThickness",
+ "HighlightThickness",
+ DEF_TLIST_HIGHLIGHT_WIDTH, Tk_Offset(WidgetRecord, highlightWidth), 0},
+
+ {TK_CONFIG_CUSTOM, "-itemtype", "itemType", "ItemType",
+ DEF_TLIST_ITEM_TYPE, Tk_Offset(WidgetRecord, diTypePtr),
+ 0, &tixConfigItemType},
+
+ {TK_CONFIG_UID, "-orient", "orient", "Orient",
+ DEF_TLIST_ORIENT, Tk_Offset(WidgetRecord, orientUid), 0},
+
+ {TK_CONFIG_PIXELS, "-padx", "padX", "Pad",
+ DEF_TLIST_PADX, Tk_Offset(WidgetRecord, padX), 0},
+
+ {TK_CONFIG_PIXELS, "-pady", "padY", "Pad",
+ DEF_TLIST_PADY, Tk_Offset(WidgetRecord, padY), 0},
+
+ {TK_CONFIG_RELIEF, "-relief", "relief", "Relief",
+ DEF_TLIST_RELIEF, Tk_Offset(WidgetRecord, relief), 0},
+
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_TLIST_SELECT_BG_COLOR, Tk_Offset(WidgetRecord, selectBorder),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_BORDER, "-selectbackground", "selectBackground", "Foreground",
+ DEF_TLIST_SELECT_BG_MONO, Tk_Offset(WidgetRecord, selectBorder),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_PIXELS, "-selectborderwidth", "selectBorderWidth","BorderWidth",
+ DEF_TLIST_SELECT_BORDERWIDTH,Tk_Offset(WidgetRecord, selBorderWidth),0},
+
+ {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
+ DEF_TLIST_SELECT_FG_COLOR, Tk_Offset(WidgetRecord, selectFg),
+ TK_CONFIG_COLOR_ONLY},
+
+ {TK_CONFIG_COLOR, "-selectforeground", "selectForeground", "Background",
+ DEF_TLIST_SELECT_FG_MONO, Tk_Offset(WidgetRecord, selectFg),
+ TK_CONFIG_MONO_ONLY},
+
+ {TK_CONFIG_UID, "-selectmode", "selectMode", "SelectMode",
+ DEF_TLIST_SELECT_MODE, Tk_Offset(WidgetRecord, selectMode), 0},
+
+ {TK_CONFIG_UID, "-state", (char*)NULL, (char*)NULL,
+ DEF_TLIST_STATE, Tk_Offset(WidgetRecord, state), 0},
+
+ {TK_CONFIG_STRING, "-sizecmd", "sizeCmd", "SizeCmd",
+ DEF_TLIST_SIZE_COMMAND, Tk_Offset(WidgetRecord, sizeCmd),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-takefocus", "takeFocus", "TakeFocus",
+ DEF_TLIST_TAKE_FOCUS, Tk_Offset(WidgetRecord, takeFocus),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_INT, "-width", "width", "Width",
+ DEF_TLIST_WIDTH, Tk_Offset(WidgetRecord, width), 0},
+
+ {TK_CONFIG_STRING, "-xscrollcommand", "xScrollCommand", "ScrollCommand",
+ DEF_TLIST_X_SCROLL_COMMAND,
+ Tk_Offset(WidgetRecord, scrollInfo[0].command),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_STRING, "-yscrollcommand", "yScrollCommand", "ScrollCommand",
+ DEF_TLIST_Y_SCROLL_COMMAND,
+ Tk_Offset(WidgetRecord, scrollInfo[1].command),
+ TK_CONFIG_NULL_OK},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+#define DEF_TLISTENTRY_STATE "normal"
+
+static Tk_ConfigSpec entryConfigSpecs[] = {
+
+ {TK_CONFIG_UID, "-state", (char*)NULL, (char*)NULL,
+ DEF_TLISTENTRY_STATE, Tk_Offset(ListEntry, state), 0},
+
+ {TK_CONFIG_END, (char *) NULL, (char *) NULL, (char *) NULL,
+ (char *) NULL, 0, 0}
+};
+
+static Tix_ListInfo entListInfo = {
+ Tk_Offset(ListEntry, next),
+ TIX_UNDEFINED,
+};
+
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+ /* These are standard procedures for TK widgets
+ * implemeted in C
+ */
+
+static void WidgetCmdDeletedProc _ANSI_ARGS_((
+ ClientData clientData));
+static int WidgetConfigure _ANSI_ARGS_((Tcl_Interp *interp,
+ WidgetPtr wPtr, int argc, CONST84 char **argv,
+ int flags));
+static void WidgetDestroy _ANSI_ARGS_((ClientData clientData));
+static void WidgetEventProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+static int WidgetCommand _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp *, int argc, CONST84 char **argv));
+static void WidgetDisplay _ANSI_ARGS_((ClientData clientData));
+static void WidgetComputeGeometry _ANSI_ARGS_((
+ ClientData clientData));
+
+ /* Extra procedures for this widget
+ */
+static void CancelRedrawWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+static void CancelResizeWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+static int ConfigElement _ANSI_ARGS_((WidgetPtr wPtr,
+ ListEntry *chPtr, int argc, CONST84 char ** argv,
+ int flags, int forced));
+static void RedrawRows _ANSI_ARGS_((
+ WidgetPtr wPtr, Drawable pixmap));
+static void RedrawWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+static void ResizeRows _ANSI_ARGS_((
+ WidgetPtr wPtr, int winW, int winH));
+static void ResizeWhenIdle _ANSI_ARGS_((WidgetPtr wPtr));
+static void ResizeNow _ANSI_ARGS_((WidgetPtr wPtr));
+static void UpdateScrollBars _ANSI_ARGS_((WidgetPtr wPtr,
+ int sizeChanged));
+static int Tix_TLGetFromTo _ANSI_ARGS_((
+ Tcl_Interp *interp, WidgetPtr wPtr,
+ int argc, CONST84 char **argv,
+ ListEntry ** fromPtr_ret, ListEntry ** toPtr_ret));
+static void Tix_TLDItemSizeChanged _ANSI_ARGS_((
+ Tix_DItem *iPtr));
+static void MakeGeomRequest _ANSI_ARGS_((
+ WidgetPtr wPtr));
+static int Tix_TLGetNearest _ANSI_ARGS_((
+ WidgetPtr wPtr, int posn[2]));
+static int Tix_TLGetAt _ANSI_ARGS_((WidgetPtr wPtr,
+ Tcl_Interp *interp, CONST84 char * spec, int *at));
+static int Tix_TLGetNeighbor _ANSI_ARGS_((
+ WidgetPtr wPtr, Tcl_Interp *interp,
+ int type, int argc, CONST84 char **argv));
+static int Tix_TranslateIndex _ANSI_ARGS_((
+ WidgetPtr wPtr, Tcl_Interp *interp, CONST84 char * string,
+ int * index, int isInsert));
+static int Tix_TLDeleteRange _ANSI_ARGS_((
+ WidgetPtr wPtr, ListEntry * fromPtr,
+ ListEntry *toPtr));
+static ListEntry * AllocEntry _ANSI_ARGS_((WidgetPtr wPtr));
+static int AddElement _ANSI_ARGS_((WidgetPtr wPtr,
+ ListEntry * chPtr, int at));
+static void FreeEntry _ANSI_ARGS_((WidgetPtr wPtr,
+ ListEntry * chPtr));
+static int Tix_TLSpecialEntryInfo _ANSI_ARGS_((
+ WidgetPtr wPtr, Tcl_Interp *interp,
+ ListEntry * chPtr));
+static void Realloc _ANSI_ARGS_((WidgetPtr wPtr,int new_size));
+
+static TIX_DECLARE_SUBCMD(Tix_TLInsert);
+static TIX_DECLARE_SUBCMD(Tix_TLCGet);
+static TIX_DECLARE_SUBCMD(Tix_TLConfig);
+static TIX_DECLARE_SUBCMD(Tix_TLDelete);
+static TIX_DECLARE_SUBCMD(Tix_TLEntryCget);
+static TIX_DECLARE_SUBCMD(Tix_TLEntryConfig);
+static TIX_DECLARE_SUBCMD(Tix_TLGeometryInfo);
+static TIX_DECLARE_SUBCMD(Tix_TLIndex);
+static TIX_DECLARE_SUBCMD(Tix_TLInfo);
+static TIX_DECLARE_SUBCMD(Tix_TLNearest);
+static TIX_DECLARE_SUBCMD(Tix_TLSee);
+static TIX_DECLARE_SUBCMD(Tix_TLSelection);
+static TIX_DECLARE_SUBCMD(Tix_TLSetSite);
+static TIX_DECLARE_SUBCMD(Tix_TLView);
+
+/*
+ *--------------------------------------------------------------
+ *
+ * Tix_TListCmd --
+ *
+ * This procedure is invoked to process the "tixTList" Tcl
+ * command. It creates a new "TixTList" widget.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * A new widget is created and configured.
+ *
+ *--------------------------------------------------------------
+ */
+int
+Tix_TListCmd(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window mainwin = (Tk_Window) clientData;
+ WidgetPtr wPtr;
+ Tk_Window tkwin;
+
+ if (argc < 2) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " pathName ?options?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+
+ tkwin = Tk_CreateWindowFromPath(interp, mainwin, argv[1], (char *) NULL);
+ if (tkwin == NULL) {
+ return TCL_ERROR;
+ }
+
+ Tk_SetClass(tkwin, "TixTList");
+
+ /*
+ * Allocate and initialize the widget record.
+ */
+ wPtr = (WidgetPtr) ckalloc(sizeof(WidgetRecord));
+
+ wPtr->dispData.tkwin = tkwin;
+ wPtr->dispData.display = Tk_Display(tkwin);
+ wPtr->dispData.interp = interp;
+ wPtr->dispData.sizeChangedProc = Tix_TLDItemSizeChanged;
+ wPtr->font = NULL;
+ wPtr->normalBg = NULL;
+ wPtr->normalFg = NULL;
+ wPtr->command = NULL;
+ wPtr->border = NULL;
+ wPtr->borderWidth = 0;
+ wPtr->selectBorder = NULL;
+ wPtr->selBorderWidth = 0;
+ wPtr->selectFg = NULL;
+ wPtr->backgroundGC = None;
+ wPtr->selectGC = None;
+ wPtr->anchorGC = None;
+ wPtr->anchorGC2 = None;
+ wPtr->highlightWidth = 0;
+ wPtr->highlightColorPtr = NULL;
+ wPtr->highlightGC = None;
+ wPtr->relief = TK_RELIEF_FLAT;
+ wPtr->cursor = None;
+ wPtr->redrawing = 0;
+ wPtr->resizing = 0;
+ wPtr->hasFocus = 0;
+ wPtr->selectMode = NULL;
+ wPtr->seeElemPtr = NULL;
+ wPtr->anchor = NULL;
+ wPtr->active = NULL;
+ wPtr->dropSite = NULL;
+ wPtr->dragSite = NULL;
+ wPtr->sizeCmd = NULL;
+ wPtr->browseCmd = NULL;
+ wPtr->takeFocus = NULL;
+ wPtr->orientUid = NULL;
+ wPtr->serial = 0;
+ wPtr->state = tixNormalUid;
+ wPtr->rows = (ListRow*)ckalloc(sizeof(ListRow) *1);
+ wPtr->numRow = 1;
+ wPtr->numRowAllocd = 1;
+ wPtr->width = 0;
+ wPtr->height = 0;
+
+ Tix_LinkListInit(&wPtr->entList);
+ Tix_InitScrollInfo((Tix_ScrollInfo*)&wPtr->scrollInfo[0], TIX_SCROLL_INT);
+ Tix_InitScrollInfo((Tix_ScrollInfo*)&wPtr->scrollInfo[1], TIX_SCROLL_INT);
+
+ Tk_CreateEventHandler(wPtr->dispData.tkwin,
+ ExposureMask|StructureNotifyMask|FocusChangeMask,
+ WidgetEventProc, (ClientData) wPtr);
+ wPtr->widgetCmd = Tcl_CreateCommand(interp,
+ Tk_PathName(wPtr->dispData.tkwin), WidgetCommand, (ClientData) wPtr,
+ WidgetCmdDeletedProc);
+
+ if (WidgetConfigure(interp, wPtr, argc-2, argv+2, 0) != TCL_OK) {
+ Tk_DestroyWindow(wPtr->dispData.tkwin);
+ return TCL_ERROR;
+ }
+
+ interp->result = Tk_PathName(wPtr->dispData.tkwin);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetConfigure --
+ *
+ * This procedure is called to process an argv/argc list in
+ * conjunction with the Tk option database to configure (or
+ * reconfigure) a List widget.
+ *
+ * Results:
+ * The return value is a standard Tcl result. If TCL_ERROR is
+ * returned, then interp->result contains an error message.
+ *
+ * Side effects:
+ * Configuration information, such as colors, border width,
+ * etc. get set for wPtr; old resources get freed,
+ * if there were any.
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+WidgetConfigure(interp, wPtr, argc, argv, flags)
+ Tcl_Interp *interp; /* Used for error reporting. */
+ WidgetPtr wPtr; /* Information about widget. */
+ int argc; /* Number of valid entries in argv. */
+ CONST84 char **argv; /* Arguments. */
+ int flags; /* Flags to pass to
+ * Tk_ConfigureWidget. */
+{
+ XGCValues gcValues;
+ GC newGC;
+ TixFont oldfont;
+ size_t length;
+ Tix_StyleTemplate stTmpl;
+
+ oldfont = wPtr->font;
+
+ if (Tk_ConfigureWidget(interp, wPtr->dispData.tkwin, configSpecs,
+ argc, argv, (char *) wPtr, flags) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ length = strlen(wPtr->orientUid);
+ if (strncmp(wPtr->orientUid, "vertical", length) == 0) {
+ wPtr->isVertical = 1;
+ } else if (strncmp(wPtr->orientUid, "horizontal", length) == 0) {
+ wPtr->isVertical = 0;
+ } else {
+ Tcl_AppendResult(interp, "bad orientation \"", wPtr->orientUid,
+ "\": must be vertical or horizontal", (char *) NULL);
+ wPtr->orientUid = Tk_GetUid("vertical");
+ wPtr->isVertical = 1;
+ return TCL_ERROR;
+ }
+
+ if ((wPtr->state != tixNormalUid) && (wPtr->state != tixDisabledUid)) {
+ Tcl_AppendResult(interp, "bad state value \"", wPtr->state,
+ "\": must be normal or disabled", (char *) NULL);
+ wPtr->state = tixNormalUid;
+ return TCL_ERROR;
+ }
+
+
+ if (oldfont != wPtr->font) {
+ /* Font has been changed (initialized) */
+ TixComputeTextGeometry(wPtr->font, "0", 1,
+ 0, &wPtr->scrollInfo[0].unit, &wPtr->scrollInfo[1].unit);
+ }
+
+ /*
+ * A few options need special processing, such as setting the
+ * background from a 3-D border, or filling in complicated
+ * defaults that couldn't be specified to Tk_ConfigureWidget.
+ */
+
+ Tk_SetBackgroundFromBorder(wPtr->dispData.tkwin, wPtr->border);
+
+ /*
+ * Note: GraphicsExpose events are disabled in normalGC because it's
+ * used to copy stuff from an off-screen pixmap onto the screen (we know
+ * that there's no problem with obscured areas).
+ */
+
+ /* The background GC */
+ gcValues.foreground = wPtr->normalBg->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCGraphicsExposures, &gcValues);
+ if (wPtr->backgroundGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->backgroundGC);
+ }
+ wPtr->backgroundGC = newGC;
+
+ /* The selected text GC */
+ gcValues.font = TixFontId(wPtr->font);
+ gcValues.foreground = wPtr->selectFg->pixel;
+ gcValues.background = Tk_3DBorderColor(wPtr->selectBorder)->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCFont|GCGraphicsExposures, &gcValues);
+ if (wPtr->selectGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->selectGC);
+ }
+ wPtr->selectGC = newGC;
+
+ /* The dotted anchor lines (for selected item) */
+ newGC = Tix_GetAnchorGC(wPtr->dispData.tkwin,
+ Tk_3DBorderColor(wPtr->selectBorder));
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC);
+ }
+ wPtr->anchorGC = newGC;
+
+ /* The dotted anchor lines (for unselected item) */
+ newGC = Tix_GetAnchorGC(wPtr->dispData.tkwin, wPtr->normalBg);
+ if (wPtr->anchorGC2 != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC2);
+ }
+ wPtr->anchorGC2 = newGC;
+
+ /* The highlight border */
+ gcValues.background = wPtr->selectFg->pixel;
+ gcValues.foreground = wPtr->highlightColorPtr->pixel;
+ gcValues.graphics_exposures = False;
+
+ newGC = Tk_GetGC(wPtr->dispData.tkwin,
+ GCForeground|GCBackground|GCGraphicsExposures, &gcValues);
+ if (wPtr->highlightGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->highlightGC);
+ }
+ wPtr->highlightGC = newGC;
+
+ /* We must set the options of the default styles so that
+ * -- the default styles will change according to what is in
+ * stTmpl
+ */
+ stTmpl.font = wPtr->font;
+ stTmpl.pad[0] = wPtr->padX;
+ stTmpl.pad[1] = wPtr->padY;
+ stTmpl.colors[TIX_DITEM_NORMAL].fg = wPtr->normalFg;
+ stTmpl.colors[TIX_DITEM_NORMAL].bg = wPtr->normalBg;
+ stTmpl.colors[TIX_DITEM_SELECTED].fg= wPtr->selectFg;
+ stTmpl.colors[TIX_DITEM_SELECTED].bg= Tk_3DBorderColor(wPtr->selectBorder);
+ stTmpl.flags = TIX_DITEM_FONT|TIX_DITEM_NORMAL_BG|
+ TIX_DITEM_SELECTED_BG|TIX_DITEM_NORMAL_FG|TIX_DITEM_SELECTED_FG |
+ TIX_DITEM_PADX|TIX_DITEM_PADY;
+
+ Tix_SetDefaultStyleTemplate(wPtr->dispData.tkwin, &stTmpl);
+
+ /*
+ * Probably the -font or -width or -height options have changed. Let's
+ * make geometry request
+ */
+ MakeGeomRequest(wPtr);
+
+ ResizeWhenIdle(wPtr);
+
+ return TCL_OK;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetCommand --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *--------------------------------------------------------------
+ */
+
+static int
+WidgetCommand(clientData, interp, argc, argv)
+ ClientData clientData; /* Information about the widget. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int code;
+
+ static Tix_SubCmdInfo subCmdInfo[] = {
+ {TIX_DEFAULT_LEN, "active", 1, 2, Tix_TLSetSite,
+ "option ?index?"},
+ {TIX_DEFAULT_LEN, "anchor", 1, 2, Tix_TLSetSite,
+ "option ?index?"},
+ {TIX_DEFAULT_LEN, "cget", 1, 1, Tix_TLCGet,
+ "option"},
+ {TIX_DEFAULT_LEN, "configure", 0, TIX_VAR_ARGS, Tix_TLConfig,
+ "?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "delete", 1, 2, Tix_TLDelete,
+ "from ?to?"},
+ {TIX_DEFAULT_LEN, "dragsite", 1, 2, Tix_TLSetSite,
+ "option ?entryPath?"},
+ {TIX_DEFAULT_LEN, "dropsite", 1, 2, Tix_TLSetSite,
+ "option ?entryPath?"},
+ {TIX_DEFAULT_LEN, "entrycget", 2, 2, Tix_TLEntryCget,
+ "entryPath option"},
+ {TIX_DEFAULT_LEN, "entryconfigure", 1, TIX_VAR_ARGS, Tix_TLEntryConfig,
+ "index ?option? ?value? ?option value ... ?"},
+ {TIX_DEFAULT_LEN, "geometryinfo", 0, 2, Tix_TLGeometryInfo,
+ "?width height?"},
+ {TIX_DEFAULT_LEN, "index", 1, 1, Tix_TLIndex,
+ "index"},
+ {TIX_DEFAULT_LEN, "info", 1, TIX_VAR_ARGS, Tix_TLInfo,
+ "option ?args ...?"},
+ {TIX_DEFAULT_LEN, "insert", 1, TIX_VAR_ARGS, Tix_TLInsert,
+ "where ?option value ..."},
+ {TIX_DEFAULT_LEN, "nearest", 2, 2, Tix_TLNearest,
+ "x y"},
+ {TIX_DEFAULT_LEN, "see", 1, 1, Tix_TLSee,
+ "entryPath"},
+ {TIX_DEFAULT_LEN, "selection", 1, 3, Tix_TLSelection,
+ "option arg ?arg ...?"},
+ {TIX_DEFAULT_LEN, "xview", 0, 3, Tix_TLView,
+ "args"},
+ {TIX_DEFAULT_LEN, "yview", 0, 3, Tix_TLView,
+ "args"},
+ };
+
+ static Tix_CmdInfo cmdInfo = {
+ Tix_ArraySize(subCmdInfo), 1, TIX_VAR_ARGS, "?option? arg ?arg ...?",
+ };
+
+ Tk_Preserve(clientData);
+ code = Tix_HandleSubCmds(&cmdInfo, subCmdInfo, clientData,
+ interp, argc, argv);
+ Tk_Release(clientData);
+
+ return code;
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetEventProc --
+ *
+ * This procedure is invoked by the Tk dispatcher for various
+ * events on Lists.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * When the window gets deleted, internal structures get
+ * cleaned up. When it gets exposed, it is redisplayed.
+ *
+ *--------------------------------------------------------------
+ */
+static void
+WidgetEventProc(clientData, eventPtr)
+ ClientData clientData; /* Information about window. */
+ XEvent *eventPtr; /* Information about event. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ switch (eventPtr->type) {
+ case DestroyNotify:
+ if (wPtr->dispData.tkwin != NULL) {
+ wPtr->dispData.tkwin = NULL;
+ Tcl_DeleteCommand(wPtr->dispData.interp,
+ Tcl_GetCommandName(wPtr->dispData.interp, wPtr->widgetCmd));
+ }
+ CancelResizeWhenIdle(wPtr);
+ CancelRedrawWhenIdle(wPtr);
+ Tk_EventuallyFree((ClientData) wPtr, (Tix_FreeProc*)WidgetDestroy);
+ break;
+
+ case ConfigureNotify:
+ ResizeWhenIdle(wPtr);
+ break;
+
+ case Expose:
+ RedrawWhenIdle(wPtr);
+ break;
+
+ case FocusIn:
+ wPtr->hasFocus = 1;
+ RedrawWhenIdle(wPtr);
+ break;
+
+ case FocusOut:
+ wPtr->hasFocus = 0;
+ RedrawWhenIdle(wPtr);
+ break;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDestroy --
+ *
+ * This procedure is invoked by Tk_EventuallyFree or Tk_Release
+ * to clean up the internal structure of a List at a safe time
+ * (when no-one is using it anymore).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Everything associated with the List is freed up.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void
+WidgetDestroy(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+
+ if (wPtr->backgroundGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->backgroundGC);
+ }
+ if (wPtr->selectGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->selectGC);
+ }
+ if (wPtr->anchorGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC);
+ }
+ if (wPtr->anchorGC2 != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->anchorGC2);
+ }
+ if (wPtr->highlightGC != None) {
+ Tk_FreeGC(wPtr->dispData.display, wPtr->highlightGC);
+ }
+
+ if (wPtr->entList.numItems > 0) {
+ ListEntry * fromPtr=NULL, *toPtr=NULL;
+ CONST84 char * argv[2];
+ argv[0] = "0";
+ argv[1] = "end";
+
+ Tix_TLGetFromTo(wPtr->dispData.interp, wPtr, 2, argv, &fromPtr,&toPtr);
+ Tcl_ResetResult(wPtr->dispData.interp);
+
+ if (fromPtr && toPtr) {
+ Tix_TLDeleteRange(wPtr, fromPtr, toPtr);
+ }
+ }
+
+ if (wPtr->rows) {
+ ckfree((char*)wPtr->rows);
+ }
+
+ Tk_FreeOptions(configSpecs, (char *) wPtr, wPtr->dispData.display, 0);
+ ckfree((char *) wPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetCmdDeletedProc --
+ *
+ * This procedure is invoked when a widget command is deleted. If
+ * the widget isn't already in the process of being destroyed,
+ * this command destroys it.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The widget is destroyed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetCmdDeletedProc(clientData)
+ ClientData clientData; /* Pointer to widget record for widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ /*
+ * This procedure could be invoked either because the window was
+ * destroyed and the command was then deleted (in which case tkwin
+ * is NULL) or because the command was deleted, and then this procedure
+ * destroys the widget.
+ */
+ if (wPtr->dispData.tkwin != NULL) {
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ wPtr->dispData.tkwin = NULL;
+ Tk_DestroyWindow(tkwin);
+ }
+}
+
+/*
+ *--------------------------------------------------------------
+ *
+ * WidgetComputeGeometry --
+ *
+ * This procedure is invoked to process the Tcl command
+ * that corresponds to a widget managed by this module.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * none
+ *
+ *--------------------------------------------------------------
+ */
+static void
+WidgetComputeGeometry(clientData)
+ ClientData clientData;
+{
+ WidgetPtr wPtr = (WidgetPtr)clientData;
+ int winW, winH;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+
+ wPtr->resizing = 0;
+
+ winW = Tk_Width(tkwin) - 2*wPtr->highlightWidth - 2*wPtr->borderWidth;
+ winH = Tk_Height(tkwin) - 2*wPtr->highlightWidth - 2*wPtr->borderWidth;
+
+ ResizeRows(wPtr, winW, winH);
+ /* Update scrollbars */
+ UpdateScrollBars(wPtr, 1);
+
+ RedrawWhenIdle(wPtr);
+}
+
+static void
+MakeGeomRequest(wPtr)
+ WidgetPtr wPtr;
+{
+ int reqW, reqH;
+
+ reqW = wPtr->width * wPtr->scrollInfo[0].unit;
+ reqH = wPtr->height * wPtr->scrollInfo[1].unit;
+
+ Tk_GeometryRequest(wPtr->dispData.tkwin, reqW, reqH);
+}
+
+
+
+/*----------------------------------------------------------------------
+ * DItemSizeChanged --
+ *
+ * This is called whenever the size of one of the HList's items
+ * changes its size.
+ *----------------------------------------------------------------------
+ */
+static void
+Tix_TLDItemSizeChanged(iPtr)
+ Tix_DItem *iPtr;
+{
+ WidgetPtr wPtr = (WidgetPtr)iPtr->base.clientData;
+
+ if (wPtr) {
+ /* double-check: perhaps we haven't set the clientData yet! */
+ ResizeWhenIdle(wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * ResizeWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+ResizeWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->redrawing) {
+ CancelRedrawWhenIdle(wPtr);
+ }
+ if (!wPtr->resizing) {
+ wPtr->resizing = 1;
+ Tk_DoWhenIdle(WidgetComputeGeometry, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * ResizeWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+ResizeNow(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->resizing) {
+ Tk_CancelIdleCall(WidgetComputeGeometry, (ClientData)wPtr);
+
+ WidgetComputeGeometry((ClientData)wPtr);
+ wPtr->resizing = 0;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * CancelResizeWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+CancelResizeWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->resizing) {
+ wPtr->resizing = 0;
+ Tk_CancelIdleCall(WidgetComputeGeometry, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * RedrawWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+RedrawWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->resizing) {
+ /*
+ * Resize will eventually call redraw.
+ */
+ return;
+ }
+ if (!wPtr->redrawing && Tk_IsMapped(wPtr->dispData.tkwin)) {
+ wPtr->redrawing = 1;
+ Tk_DoWhenIdle(WidgetDisplay, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * CancelRedrawWhenIdle --
+ *----------------------------------------------------------------------
+ */
+static void
+CancelRedrawWhenIdle(wPtr)
+ WidgetPtr wPtr;
+{
+ if (wPtr->redrawing) {
+ wPtr->redrawing = 0;
+ Tk_CancelIdleCall(WidgetDisplay, (ClientData)wPtr);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * WidgetDisplay --
+ *
+ * Draw the widget to the screen.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+WidgetDisplay(clientData)
+ ClientData clientData; /* Info about my widget. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ Pixmap pixmap;
+ Tk_Window tkwin = wPtr->dispData.tkwin;
+ int winH, winW;
+ int hl = wPtr->highlightWidth;
+ int bd = wPtr->borderWidth;
+
+ wPtr->redrawing = 0; /* clear the redraw flag */
+ wPtr->serial ++;
+
+ pixmap = Tk_GetPixmap(wPtr->dispData.display, Tk_WindowId(tkwin),
+ Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));
+
+ /* Fill the background */
+ XFillRectangle(wPtr->dispData.display, pixmap, wPtr->backgroundGC,
+ 0, 0, (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin));
+
+ winW = Tk_Width(tkwin) - 2*hl - 2*bd;
+ winH = Tk_Height(tkwin) - 2*hl - 2*bd;
+
+ if (winW > 0 && winH > 0) {
+ RedrawRows(wPtr, pixmap);
+ }
+
+ /* Draw the border */
+ Tk_Draw3DRectangle(wPtr->dispData.tkwin, pixmap, wPtr->border,
+ hl, hl, Tk_Width(tkwin) - 2*hl, Tk_Height(tkwin) - 2*hl, bd,
+ wPtr->relief);
+
+ /* Draw the highlight */
+ if (hl > 0) {
+ GC gc;
+
+ if (wPtr->hasFocus) {
+ gc = wPtr->highlightGC;
+ } else {
+ gc = Tk_3DBorderGC(wPtr->dispData.tkwin, wPtr->border,
+ TK_3D_FLAT_GC);
+ }
+ Tk_DrawFocusHighlight(tkwin, gc, hl, pixmap);
+ }
+
+ /*
+ * Copy the information from the off-screen pixmap onto the screen,
+ * then delete the pixmap.
+ */
+ XCopyArea(wPtr->dispData.display, pixmap, Tk_WindowId(tkwin),
+ wPtr->backgroundGC, 0, 0,
+ (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0);
+ Tk_FreePixmap(wPtr->dispData.display, pixmap);
+
+}
+
+/*----------------------------------------------------------------------
+ * AddElement --
+ *
+ * Add the element at the position indicated by "at".
+ *----------------------------------------------------------------------
+ */
+static int
+AddElement(wPtr, chPtr, at)
+ WidgetPtr wPtr;
+ ListEntry * chPtr;
+ int at;
+{
+ if (at >= wPtr->entList.numItems) {
+ /* The "end" position */
+ Tix_LinkListAppend(&entListInfo, &wPtr->entList, (char*)chPtr, 0);
+ }
+ else {
+ Tix_ListIterator li;
+ Tix_LinkListIteratorInit(&li);
+
+ for (Tix_LinkListStart(&entListInfo, &wPtr->entList, &li);
+ !Tix_LinkListDone(&li);
+ Tix_LinkListNext (&entListInfo, &wPtr->entList, &li)) {
+
+ if (at == 0) {
+ Tix_LinkListInsert(&entListInfo, &wPtr->entList,
+ (char*)chPtr, &li);
+ break;
+ } else {
+ -- at;
+ }
+ }
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * AllocEntry --
+ *
+ * Allocates memory for a new entry and initializes it to a
+ * proper state.
+ *----------------------------------------------------------------------
+ */
+static ListEntry *
+AllocEntry(wPtr)
+ WidgetPtr wPtr;
+{
+ ListEntry * chPtr;
+
+ chPtr = (ListEntry *)ckalloc(sizeof(ListEntry));
+ chPtr->state = NULL;
+ chPtr->selected = 0;
+ chPtr->iPtr = NULL;
+
+ return chPtr;
+}
+
+/*----------------------------------------------------------------------
+ * FreeEntry --
+ *
+ * Free the entry and all resources allocated to this entry.
+ * This entry must already be deleted from the list.
+ *----------------------------------------------------------------------
+ */
+static void
+FreeEntry(wPtr, chPtr)
+ WidgetPtr wPtr;
+ ListEntry * chPtr;
+{
+
+ if (wPtr->seeElemPtr == chPtr) {
+ /*
+ * This is the element that should be visible the next time
+ * we draw the window. Adjust the "to see element" to an element
+ * that is close to it.
+ */
+ if (chPtr->next != NULL) {
+ wPtr->seeElemPtr = chPtr->next;
+ } else {
+ ListEntry *p;
+
+ wPtr->seeElemPtr = NULL;
+ for (p=(ListEntry*)wPtr->entList.head; p; p=p->next) {
+ if (p->next == chPtr) {
+ wPtr->seeElemPtr = p;
+ break;
+ }
+ }
+ }
+ }
+
+ if (wPtr->anchor == chPtr) {
+ wPtr->anchor = NULL;
+ }
+ if (wPtr->active == chPtr) {
+ wPtr->active = NULL;
+ }
+ if (wPtr->dragSite == chPtr) {
+ wPtr->dragSite = NULL;
+ }
+ if (wPtr->dropSite == chPtr) {
+ wPtr->dropSite = NULL;
+ }
+
+ if (chPtr->iPtr != NULL) {
+ if (Tix_DItemType(chPtr->iPtr) == TIX_DITEM_WINDOW) {
+#if 0
+ Tix_WindowItemListRemove(&wPtr->mappedWindows,
+ chPtr->iPtr);
+#endif
+ }
+ Tix_DItemFree(chPtr->iPtr);
+ }
+
+ Tk_FreeOptions(entryConfigSpecs, (char *)chPtr,wPtr->dispData.display, 0);
+ ckfree((char*)chPtr);
+}
+
+/*----------------------------------------------------------------------
+ * "insert" sub command --
+ *
+ * Insert a new item into the list
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLInsert(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ ListEntry * chPtr = NULL;
+ char buff[40];
+ CONST84 char * ditemType;
+ int at;
+ int added = 0;
+ int code = TCL_OK;
+
+ /*------------------------------------------------------------
+ * (1) We need to determine the options:
+ * -itemtype and -at.
+ *------------------------------------------------------------
+ */
+
+ /* (1.1) Find out where */
+ if (Tix_TranslateIndex(wPtr, interp, argv[0], &at, 1) != TCL_OK) {
+ code = TCL_ERROR; goto done;
+ }
+
+ /* (1.2) Find out the -itemtype, if specified */
+ ditemType = wPtr->diTypePtr->name; /* default value */
+ if (argc > 1) {
+ size_t len;
+ int i;
+ if (argc %2 != 1) {
+ Tcl_AppendResult(interp, "value for \"", argv[argc-1],
+ "\" missing", NULL);
+ code = TCL_ERROR; goto done;
+ }
+ for (i=1; i<argc; i+=2) {
+ len = strlen(argv[i]);
+ if (strncmp(argv[i], "-itemtype", len) == 0) {
+ ditemType = argv[i+1];
+ }
+ }
+ }
+
+ if (Tix_GetDItemType(interp, ditemType) == NULL) {
+ code = TCL_ERROR; goto done;
+ }
+
+ /*
+ * (2) Allocate a new entry
+ */
+ chPtr = AllocEntry(wPtr);
+
+ /* (2.1) The Display item data */
+ if ((chPtr->iPtr = Tix_DItemCreate(&wPtr->dispData, ditemType)) == NULL) {
+ code = TCL_ERROR; goto done;
+ }
+ chPtr->iPtr->base.clientData = (ClientData)wPtr;
+ chPtr->size[0] = chPtr->iPtr->base.size[0];
+ chPtr->size[1] = chPtr->iPtr->base.size[1];
+
+ /*
+ * (3) Add the entry into the list
+ */
+ if (AddElement(wPtr, chPtr, at) != TCL_OK) {
+ code = TCL_ERROR; goto done;
+ } else {
+ added = 1;
+ }
+
+ if (ConfigElement(wPtr, chPtr, argc-1, argv+1, 0, 1) != TCL_OK) {
+ code = TCL_ERROR; goto done;
+ }
+
+ ResizeWhenIdle(wPtr);
+
+ done:
+ if (code == TCL_ERROR) {
+ if (chPtr != NULL) {
+ if (added) {
+ Tix_LinkListFindAndDelete(&entListInfo, &wPtr->entList,
+ (char*)chPtr, NULL);
+ }
+ FreeEntry(wPtr, chPtr);
+ }
+ } else {
+ sprintf(buff, "%d", at);
+ Tcl_AppendResult(interp, buff, NULL);
+ }
+
+ return code;
+}
+
+static int
+Tix_TLSpecialEntryInfo(wPtr, interp, chPtr)
+ WidgetPtr wPtr;
+ Tcl_Interp *interp;
+ ListEntry * chPtr;
+{
+ char buff[100];
+
+ if (chPtr) {
+ int i;
+ Tix_ListIterator li;
+
+ Tix_LinkListIteratorInit(&li);
+
+ for (i=0,Tix_LinkListStart(&entListInfo, &wPtr->entList, &li);
+ !Tix_LinkListDone(&li);
+ Tix_LinkListNext(&entListInfo, &wPtr->entList, &li),i++) {
+ if (li.curr == (char*)chPtr) {
+ break;
+ }
+ }
+ if (li.curr != NULL) {
+ sprintf(buff, "%d", i);
+ Tcl_AppendResult(interp, buff, NULL);
+ } else {
+ panic("TList list entry is invalid");
+ }
+ } else {
+ Tcl_ResetResult(interp);
+ }
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "index" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLIndex(clientData, interp, argc, argv)
+ ClientData clientData; /* TList widget record. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int index;
+ char buff[100];
+
+ if (Tix_TranslateIndex(wPtr, interp, argv[0], &index, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ sprintf(buff, "%d", index);
+ Tcl_AppendResult(interp, buff, NULL);
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "info" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLInfo(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ size_t len = strlen(argv[0]);
+
+ if (strncmp(argv[0], "anchor", len)==0) {
+ return Tix_TLSpecialEntryInfo(wPtr, interp, wPtr->anchor);
+ }
+ else if (strncmp(argv[0], "active", len)==0) {
+ return Tix_TLSpecialEntryInfo(wPtr, interp, wPtr->active);
+ }
+ else if (strncmp(argv[0], "down", len)==0) {
+ return Tix_TLGetNeighbor(wPtr, interp, TIX_DOWN, argc-1, argv+1);
+ }
+ else if (strncmp(argv[0], "left", len)==0) {
+ return Tix_TLGetNeighbor(wPtr, interp, TIX_LEFT, argc-1, argv+1);
+ }
+ else if (strncmp(argv[0], "right", len)==0) {
+ return Tix_TLGetNeighbor(wPtr, interp, TIX_RIGHT, argc-1, argv+1);
+ }
+ else if (strncmp(argv[0], "selection", len)==0) {
+ ListEntry *chPtr;
+ int i;
+ char buffer[32];
+
+ for (chPtr=(ListEntry*)wPtr->entList.head, i=0;
+ chPtr;
+ chPtr=chPtr->next, i++) {
+
+ if (chPtr->selected) {
+ if (i) {
+ Tcl_AppendResult(interp, " ", (char *) NULL);
+ }
+ sprintf(buffer, "%d", i);
+ Tcl_AppendResult(interp, buffer, (char *) NULL);
+ }
+ }
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "size", len)==0) {
+ char buff[100];
+
+ sprintf(buff, "%d", wPtr->entList.numItems);
+ Tcl_AppendResult(interp, buff, NULL);
+
+ return TCL_OK;
+ }
+ else if (strncmp(argv[0], "up", len)==0) {
+ return Tix_TLGetNeighbor(wPtr, interp, TIX_UP, argc-1, argv+1);
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\": must be anchor or selection",
+ NULL);
+ return TCL_ERROR;
+ }
+}
+
+static int
+Tix_TranslateIndex(wPtr, interp, string, index, isInsert)
+ WidgetPtr wPtr; /* TList widget record. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ CONST84 char * string; /* String representation of the index. */
+ int * index; /* Returns the index value(0 = 1st element).*/
+ int isInsert; /* Is this function called by an "insert"
+ * operation? */
+{
+ if (strcmp(string, "end") == 0) {
+ *index = wPtr->entList.numItems;
+ }
+ else if (Tix_TLGetAt(wPtr, interp, string, index) != TCL_OK) {
+ if (Tcl_GetInt(interp, string, index) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ else if (*index < 0) {
+ Tcl_AppendResult(interp,"expected non-negative integer but got \"",
+ string, "\"", NULL);
+ return TCL_ERROR;
+ }
+ }
+
+
+ /*
+ * The meaning of "end" means:
+ * isInsert:wPtr->entList.numItems
+ * !isInsert:wPtr->entList.numItems-1;
+ */
+
+ if (isInsert) {
+ if (*index > wPtr->entList.numItems) {
+ /*
+ * By default add it to the end, just to follow what TK
+ * does for the Listbox widget
+ */
+ *index = wPtr->entList.numItems;
+ }
+ } else {
+ if (*index >= wPtr->entList.numItems) {
+ /*
+ * By default add it to the end, just to follow what TK
+ * does for the Listbox widget
+ */
+ *index = wPtr->entList.numItems - 1;
+ }
+ }
+
+ if (*index < 0) {
+ *index = 0;
+ }
+
+ return TCL_OK;
+}
+
+static int Tix_TLGetNeighbor(wPtr, interp, type, argc, argv)
+ WidgetPtr wPtr;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int type;
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int index;
+ int dst = 0; /* lint */
+ int xStep, yStep;
+ int numPerRow;
+ char buff[100];
+
+ if (argc != 1) {
+ Tix_ArgcError(interp, argc+3, argv-3, 3, "index");
+ }
+
+ if (Tix_TranslateIndex(wPtr, interp, argv[0], &index, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (wPtr->entList.numItems == 0) {
+ Tcl_ResetResult(interp);
+ return TCL_OK;
+ }
+
+ numPerRow = wPtr->rows[0].numEnt;
+
+ if (wPtr->isVertical) {
+ xStep = numPerRow;
+ yStep = 1;
+ } else {
+ xStep = 1;
+ yStep = numPerRow;
+ }
+
+ switch (type) {
+ case TIX_UP:
+ dst = index - yStep;
+ break;
+ case TIX_DOWN:
+ dst = index + yStep;
+ break;
+ case TIX_LEFT:
+ dst = index - xStep;
+ break;
+ case TIX_RIGHT:
+ dst = index + xStep;
+ break;
+ }
+
+ if (dst < 0) {
+ dst = index;
+ } else if (dst >= wPtr->entList.numItems) {
+ dst = index;
+ }
+
+ sprintf(buff, "%d", dst);
+ Tcl_AppendResult(interp, buff, NULL);
+
+ return TCL_OK;
+}
+
+
+
+/*----------------------------------------------------------------------
+ * "cget" sub command --
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLCGet(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ return Tk_ConfigureValue(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *)wPtr, argv[0], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "configure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+
+ if (argc == 0) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *) wPtr, (char *) NULL, 0);
+ } else if (argc == 1) {
+ return Tk_ConfigureInfo(interp, wPtr->dispData.tkwin, configSpecs,
+ (char *) wPtr, argv[0], 0);
+ } else {
+ return WidgetConfigure(interp, wPtr, argc, argv,
+ TK_CONFIG_ARGV_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "geometryinfo" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLGeometryInfo(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int qSize[2];
+ double first[2], last[2];
+ char string[40];
+ int i;
+
+ if (argc == 2) {
+ if (Tcl_GetInt(interp, argv[0], &qSize[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &qSize[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ qSize[0] = Tk_Width (wPtr->dispData.tkwin);
+ qSize[1] = Tk_Height(wPtr->dispData.tkwin);
+ }
+ qSize[0] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ qSize[1] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+
+ for (i=0; i<2; i++) {
+ qSize[i] -= 2*wPtr->borderWidth + 2*wPtr->highlightWidth;
+ Tix_GetScrollFractions((Tix_ScrollInfo*)&wPtr->scrollInfo[i],
+ &first[i], &last[i]);
+ }
+
+ sprintf(string, "{%f %f} {%f %f}", first[0], last[0], first[1], last[1]);
+ Tcl_AppendResult(interp, string, NULL);
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "delete" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLDelete(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ ListEntry * fromPtr, *toPtr;
+ int code = TCL_OK;
+
+ if (argc < 1 || argc > 2) {
+ Tix_ArgcError(interp, argc+2, argv-2, 2, "from ?to?");
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (Tix_TLGetFromTo(interp, wPtr, argc, argv, &fromPtr, &toPtr)!= TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (fromPtr == NULL) {
+ goto done;
+ }
+
+ if (Tix_TLDeleteRange(wPtr, fromPtr, toPtr)) {
+ ResizeWhenIdle(wPtr);
+ }
+
+ done:
+ return code;
+}
+
+/* returns true if some element has been deleted */
+static int Tix_TLDeleteRange(wPtr, fromPtr, toPtr)
+ WidgetPtr wPtr;
+ ListEntry * fromPtr;
+ ListEntry *toPtr;
+{
+ int started;
+ Tix_ListIterator li;
+
+ Tix_LinkListIteratorInit(&li);
+ started = 0;
+ for (Tix_LinkListStart(&entListInfo, &wPtr->entList, &li);
+ !Tix_LinkListDone(&li);
+ Tix_LinkListNext (&entListInfo, &wPtr->entList, &li)) {
+
+ ListEntry * curr = (ListEntry *)li.curr;
+ if (curr == fromPtr) {
+ started = 1;
+ }
+ if (started) {
+ Tix_LinkListDelete(&entListInfo, &wPtr->entList, &li);
+ FreeEntry(wPtr, curr);
+ }
+ if (curr == toPtr) {
+ break;
+ }
+ }
+
+ return started;
+}
+
+
+/*----------------------------------------------------------------------
+ * "entrycget" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLEntryCget(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ ListEntry * chPtr, * dummy;
+
+ if (Tix_TLGetFromTo(interp, wPtr, 1, argv, &chPtr, &dummy)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (chPtr == NULL) {
+ Tcl_AppendResult(interp, "list entry \"", argv[0],
+ "\" does not exist", NULL);
+ return TCL_ERROR;
+ }
+
+ return Tix_ConfigureValue2(interp, wPtr->dispData.tkwin, (char *)chPtr,
+ entryConfigSpecs, chPtr->iPtr, argv[1], 0);
+}
+
+/*----------------------------------------------------------------------
+ * "entryconfigure" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLEntryConfig(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ ListEntry * chPtr, * dummy;
+
+ if (Tix_TLGetFromTo(interp, wPtr, 1, argv, &chPtr, &dummy)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (chPtr == NULL) {
+ Tcl_AppendResult(interp, "list entry \"", argv[0],
+ "\" does not exist", NULL);
+ return TCL_ERROR;
+ }
+
+ if (argc == 1) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->iPtr, (char *) NULL, 0);
+ } else if (argc == 2) {
+ return Tix_ConfigureInfo2(interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->iPtr, (char *) argv[1], 0);
+ } else {
+ return ConfigElement(wPtr, chPtr, argc-1, argv+1,
+ TK_CONFIG_ARGV_ONLY, 0);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * "nearest" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLNearest(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int posn[2];
+ int index;
+ char buff[100];
+
+ if (Tcl_GetInt(interp, argv[0], &posn[0]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (Tcl_GetInt(interp, argv[1], &posn[1]) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ index = Tix_TLGetNearest(wPtr, posn);
+ Tcl_ResetResult(interp);
+
+ if (index != -1) {
+ sprintf(buff, "%d", index);
+ Tcl_AppendResult(interp, buff, NULL);
+ }
+ return TCL_OK;
+}
+
+static int Tix_TLGetAt(wPtr, interp, spec, at)
+ WidgetPtr wPtr;
+ Tcl_Interp *interp;
+ CONST84 char * spec;
+ int *at;
+{
+ int posn[2];
+ char *p, *end;
+
+ if (spec[0] != '@') {
+ return TCL_ERROR;
+ }
+
+ p = (char *) spec+1;
+ posn[0] = strtol(p, &end, 0);
+ if ((end == p) || (*end != ',')) {
+ return TCL_ERROR;
+ }
+ p = end+1;
+ posn[1] = strtol(p, &end, 0);
+ if ((end == p) || (*end != 0)) {
+ return TCL_ERROR;
+ }
+
+ *at = Tix_TLGetNearest(wPtr, posn);
+ return TCL_OK;
+}
+
+static int Tix_TLGetNearest(wPtr, posn)
+ WidgetPtr wPtr;
+ int posn[2];
+{
+ int i, j, index;
+ int maxX, maxY;
+ int r, c;
+
+ if (wPtr->resizing) {
+ ResizeNow(wPtr);
+ }
+
+ if (wPtr->entList.numItems == 0) {
+ return -1;
+ }
+
+ /* clip off the position with the border of the window */
+
+ posn[0] -= wPtr->borderWidth + wPtr->highlightWidth;
+ posn[1] -= wPtr->borderWidth + wPtr->highlightWidth;
+
+ maxX = Tk_Width (wPtr->dispData.tkwin);
+ maxY = Tk_Height(wPtr->dispData.tkwin);
+
+ maxX -= 2*(wPtr->borderWidth + wPtr->highlightWidth);
+ maxY -= 2*(wPtr->borderWidth + wPtr->highlightWidth);
+
+ if (posn[0] >= maxX) {
+ posn[0] = maxX -1;
+ }
+ if (posn[1] >= maxY) {
+ posn[1] = maxY -1;
+ }
+ if (posn[0] < 0) {
+ posn[0] = 0;
+ }
+ if (posn[1] < 0) {
+ posn[1] = 0;
+ }
+
+ i = (wPtr->isVertical == 0);
+ j = (wPtr->isVertical == 1);
+
+ posn[0] += wPtr->scrollInfo[0].offset;
+ posn[1] += wPtr->scrollInfo[1].offset;
+
+ r = posn[i] / wPtr->maxSize[i];
+ c = posn[j] / wPtr->maxSize[j];
+
+ index = (r * wPtr->rows[0].numEnt) + c;
+
+ if (index >= wPtr->entList.numItems) {
+ index = wPtr->entList.numItems - 1;
+ }
+
+ return index;
+}
+
+/*----------------------------------------------------------------------
+ * "selection" sub command
+ * Modify the selection in this HList box
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLGetFromTo(interp, wPtr, argc, argv, fromPtr_ret, toPtr_ret)
+ Tcl_Interp *interp;
+ WidgetPtr wPtr;
+ int argc;
+ CONST84 char **argv;
+ ListEntry ** fromPtr_ret;
+ ListEntry ** toPtr_ret;
+{
+ /*
+ * ToDo: make it more efficient by saving the previous from and to
+ * pointers and make the list of childrens a doubly-linked list
+ */
+ ListEntry * fromPtr;
+ ListEntry * toPtr;
+ int from, to, tmp;
+
+ if (Tix_TranslateIndex(wPtr, interp, argv[0], &from, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (argc == 2) {
+ if (Tix_TranslateIndex(wPtr, interp, argv[1], &to, 0) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ } else {
+ to = from;
+ }
+
+ if (from > to) {
+ /* swap from and to */
+ tmp = to; to = from; from = tmp;
+ }
+
+ fromPtr = NULL;
+ toPtr = NULL;
+
+ if (from >= wPtr->entList.numItems) {
+ fromPtr = (ListEntry *)wPtr->entList.tail;
+ toPtr = (ListEntry *)wPtr->entList.tail;
+ }
+ if (to >= wPtr->entList.numItems) {
+ toPtr = (ListEntry *)wPtr->entList.tail;
+ }
+
+ if (fromPtr == NULL) {
+ for (fromPtr = (ListEntry*)wPtr->entList.head;
+ from > 0;
+ fromPtr=fromPtr->next) {
+
+ -- from;
+ -- to;
+ }
+ }
+ if (toPtr == NULL) {
+ for (toPtr = fromPtr; to > 0; toPtr=toPtr->next) {
+ -- to;
+ }
+ }
+
+ * fromPtr_ret = fromPtr;
+ if (toPtr_ret) {
+ * toPtr_ret = toPtr;
+ }
+ return TCL_OK;
+}
+
+static int
+Tix_TLSelection(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ size_t len = strlen(argv[0]);
+ int code = TCL_OK;
+ int changed = 0;
+ ListEntry * chPtr, * fromPtr, * toPtr;
+
+ if (strncmp(argv[0], "clear", len)==0) {
+ if (argc == 1) {
+ /*
+ * Clear all entries
+ */
+ for (chPtr=(ListEntry*)wPtr->entList.head;
+ chPtr;
+ chPtr=chPtr->next) {
+
+ chPtr->selected = 0;
+ }
+ changed = 1;
+ }
+ else {
+ if (Tix_TLGetFromTo(interp, wPtr, argc-1, argv+1, &fromPtr, &toPtr)
+ != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (fromPtr == NULL) {
+ goto done;
+ }
+ else {
+ while (1) {
+ fromPtr->selected = 0;
+ if (fromPtr == toPtr) {
+ break;
+ } else {
+ fromPtr=fromPtr->next;
+ }
+ }
+ changed = 1;
+ goto done;
+ }
+ }
+ }
+ else if (strncmp(argv[0], "includes", len)==0) {
+ if (argc != 2) {
+ Tix_ArgcError(interp, argc+2, argv-2, 3, "index");
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (Tix_TLGetFromTo(interp, wPtr, argc-1, argv+1, &fromPtr, &toPtr)
+ != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (fromPtr->selected) {
+ Tcl_AppendResult(interp, "1", NULL);
+ } else {
+ Tcl_AppendResult(interp, "0", NULL);
+ }
+ }
+ else if (strncmp(argv[0], "set", len)==0) {
+ if (argc < 2 || argc > 3) {
+ Tix_ArgcError(interp, argc+2, argv-2, 3, "from ?to?");
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (Tix_TLGetFromTo(interp, wPtr, argc-1, argv+1, &fromPtr, &toPtr)
+ != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+ if (fromPtr == NULL) {
+ goto done;
+ }
+ else {
+ while (1) {
+ fromPtr->selected = 1;
+ if (fromPtr == toPtr) {
+ break;
+ } else {
+ fromPtr=fromPtr->next;
+ }
+ }
+ changed = 1;
+ goto done;
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\": must be anchor, clear, includes or set", NULL);
+ code = TCL_ERROR;
+ }
+
+ done:
+ if (changed) {
+ RedrawWhenIdle(wPtr);
+ }
+
+ return code;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_TLSee --
+ *
+ * Implements the "see" widget subcommand -- make sure that the
+ * given entry is visible as much as possible.
+ *
+ * We don't scroll the widget immediately in this function.
+ * Instead, we set the wPtr->seeElemPtr and the scrolling will be
+ * set when the widget is redrawn. This make sure that the "see"
+ * command works even before the widget's contents has been laid
+ * out.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Widget is scheduled to be redrawn.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+Tix_TLSee(clientData, interp, argc, argv)
+ ClientData clientData; /* The widget data struct */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ ListEntry * chPtr, * dummy;
+
+ if (argc == 1) {
+ if (Tix_TLGetFromTo(interp, wPtr, 1, argv, &chPtr, &dummy) != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (chPtr != NULL) {
+ wPtr->seeElemPtr = chPtr;
+ RedrawWhenIdle(wPtr);
+ }
+ } else {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ Tk_PathName(wPtr->dispData.tkwin), " ", argv[-1],
+ " index", NULL);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "anchor", "dragsite" and "dropsite" sub commands --
+ *
+ * Set/remove the anchor element
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLSetSite(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ int changed = 0;
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ ListEntry * fromPtr;
+ ListEntry * toPtr; /* unused */
+ ListEntry ** changePtr;
+ size_t len;
+
+ /* Determine which site should be changed (the last else clause
+ * doesn't need to check the string because HandleSubCommand
+ * already ensures that only the valid options can be specified.
+ **/
+ len = strlen(argv[-1]);
+ if (strncmp(argv[-1], "anchor", len)==0) {
+ changePtr = &wPtr->anchor;
+ }
+ else if (strncmp(argv[-1], "active", len)==0) {
+ changePtr = &wPtr->active;
+ }
+ else if (strncmp(argv[-1], "dragsite", len)==0) {
+ changePtr = &wPtr->dragSite;
+ }
+ else {
+ changePtr = &wPtr->dropSite;
+ }
+
+ len = strlen(argv[0]);
+ if (strncmp(argv[0], "set", len)==0) {
+ if (argc == 2) {
+ if (Tix_TLGetFromTo(interp,wPtr, argc-1, argv+1, &fromPtr, &toPtr)
+ != TCL_OK) {
+ return TCL_ERROR;
+ }
+ if (*changePtr != fromPtr) {
+ *changePtr = fromPtr;
+ changed = 1;
+ }
+ } else {
+ Tcl_AppendResult(interp, "wrong # of arguments, must be: ",
+ Tk_PathName(wPtr->dispData.tkwin), " ", argv[-1],
+ " set index", NULL);
+ return TCL_ERROR;
+ }
+ }
+ else if (strncmp(argv[0], "clear", len)==0) {
+ if (*changePtr != NULL) {
+ *changePtr = NULL;
+ changed = 1;
+ }
+ }
+ else {
+ Tcl_AppendResult(interp, "wrong option \"", argv[0], "\", ",
+ "must be clear or set", NULL);
+ return TCL_ERROR;
+ }
+
+ if (changed) {
+ RedrawWhenIdle(wPtr);
+ }
+
+ return TCL_OK;
+}
+
+/*----------------------------------------------------------------------
+ * "xview" and "yview" sub command
+ *----------------------------------------------------------------------
+ */
+static int
+Tix_TLView(clientData, interp, argc, argv)
+ ClientData clientData;
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ WidgetPtr wPtr = (WidgetPtr) clientData;
+ int axis;
+
+ if (argv[-1][0] == 'x') {
+ axis = 0;
+ } else {
+ axis = 1;
+ }
+
+ if (argc == 0) {
+ char string[80];
+ double first, last;
+
+ Tix_GetScrollFractions((Tix_ScrollInfo*)&wPtr->scrollInfo[axis],
+ &first, &last);
+
+ sprintf(string, "{%f %f}", first, last);
+ Tcl_AppendResult(interp, string, NULL);
+ return TCL_OK;
+ }
+ else if (Tix_SetScrollBarView(interp,
+ (Tix_ScrollInfo*)&wPtr->scrollInfo[axis], argc, argv, 0) != TCL_OK) {
+
+ return TCL_ERROR;
+ }
+
+ UpdateScrollBars(wPtr, 0);
+ RedrawWhenIdle(wPtr);
+ return TCL_OK;
+}
+/*----------------------------------------------------------------------
+ *
+ *
+ * Memory Management Section
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static int
+ConfigElement(wPtr, chPtr, argc, argv, flags, forced)
+ WidgetPtr wPtr;
+ ListEntry *chPtr;
+ int argc;
+ CONST84 char ** argv;
+ int flags;
+ int forced;
+{
+ int sizeChanged;
+
+ if (Tix_WidgetConfigure2(wPtr->dispData.interp, wPtr->dispData.tkwin,
+ (char*)chPtr, entryConfigSpecs, chPtr->iPtr, argc, argv, flags,
+ forced, &sizeChanged) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (sizeChanged) {
+ chPtr->size[0] = chPtr->iPtr->base.size[0];
+ chPtr->size[1] = chPtr->iPtr->base.size[1];
+ ResizeWhenIdle(wPtr);
+ } else {
+ RedrawWhenIdle(wPtr);
+ }
+ return TCL_OK;
+}
+
+static void
+Realloc(wPtr, new_size)
+ WidgetPtr wPtr;
+ int new_size;
+{
+ if (new_size < 1) {
+ new_size = 1;
+ }
+ if (new_size == wPtr->numRowAllocd) {
+ return;
+ }
+ wPtr->rows = (ListRow*)ckrealloc( (char *)wPtr->rows,
+ sizeof(ListRow)*new_size);
+ wPtr->numRowAllocd = new_size;
+}
+
+static void ResizeRows(wPtr, winW, winH)
+ WidgetPtr wPtr;
+ int winW; /* -1 == current width */
+ int winH; /* -1 == current height */
+{
+ ListEntry * chPtr;
+ ListEntry * rowHead;
+ int n, c, r;
+ int maxI; /* max of width in the current column */
+ int maxJ; /* max of height among all elements */
+ int curRow;
+ int i, j;
+ int sizeJ;
+ int winSize[2];
+
+ if (wPtr->isVertical) {
+ i = 0; /* Column major, 0,0 -> 0,1 -> 0,2 ... -> 1,0 */
+ j = 1;
+ } else {
+ i = 1; /* Row major, 0,0 -> 1,0 -> 2,0 ... -> 0,1 */
+ j = 0;
+ }
+
+ if (winW == -1) {
+ winW = Tk_Width (wPtr->dispData.tkwin);
+ }
+ if (winH == -1) {
+ winH = Tk_Height(wPtr->dispData.tkwin);
+ }
+
+ winSize[0] = winW;
+ winSize[1] = winH;
+
+ if (wPtr->entList.numItems == 0) {
+ wPtr->rows[0].chPtr = NULL;
+ wPtr->rows[0].size[0] = 1;
+ wPtr->rows[0].size[1] = 1;
+ wPtr->rows[0].numEnt = 0;
+
+ wPtr->numRow = 1;
+ goto done;
+ }
+
+ /* -- The following verbal description follows the "Column Major"
+ * model. Row major are similar, just the i,j incides are swapped
+ *
+ * (1) (a) Search for the tallest element, use it as the height of all
+ * the elements;
+ * (b) Search for the widest element, use it as the width of all
+ * the elements;
+ */
+ for (maxJ=1, maxI=1, chPtr = (ListEntry*)wPtr->entList.head;
+ chPtr;
+ chPtr=chPtr->next) {
+
+ if (maxJ < chPtr->iPtr->base.size[j]) {
+ maxJ = chPtr->iPtr->base.size[j];
+ }
+ if (maxI < chPtr->iPtr->base.size[i]) {
+ maxI = chPtr->iPtr->base.size[i];
+ }
+ }
+ wPtr->maxSize[i] = maxI;
+ wPtr->maxSize[j] = maxJ;
+
+ /* (2) Calculate how many elements can be in each column
+ *
+ */
+ n = winSize[j] / maxJ;
+ if (n <=0) {
+ n = 1;
+ }
+
+ wPtr->numRow = 0;
+ curRow = 0;
+ c = 0;
+ sizeJ = 0;
+ rowHead = (ListEntry*)wPtr->entList.head;
+ for(chPtr = (ListEntry*)wPtr->entList.head; chPtr; chPtr=chPtr->next) {
+ sizeJ += chPtr->iPtr->base.size[j];
+ ++ c;
+ if (c == n || chPtr->next == NULL) {
+ if (curRow >= wPtr->numRowAllocd) {
+ Realloc(wPtr, curRow*2);
+ }
+ wPtr->rows[curRow].chPtr = rowHead;
+ wPtr->rows[curRow].size[i] = maxI;
+ wPtr->rows[curRow].size[j] = sizeJ;
+ wPtr->rows[curRow].numEnt = c;
+ ++ curRow;
+ ++ wPtr->numRow;
+ c = 0;
+ rowHead = chPtr->next;
+ sizeJ = 0;
+ }
+ }
+
+ done:
+ /* calculate the size of the total and visible area */
+ wPtr->scrollInfo[i].total = 0;
+ wPtr->scrollInfo[j].total = 0;
+
+ for (r=0; r<wPtr->numRow; r++) {
+ wPtr->scrollInfo[i].total += wPtr->rows[r].size[i];
+ if (wPtr->scrollInfo[j].total < wPtr->rows[r].size[j]) {
+ wPtr->scrollInfo[j].total = wPtr->rows[r].size[j];
+ }
+ }
+
+ wPtr->scrollInfo[i].window = winSize[i];
+ wPtr->scrollInfo[j].window = winSize[j];
+
+ if (wPtr->scrollInfo[i].total < 1) {
+ wPtr->scrollInfo[i].total = 1;
+ }
+ if (wPtr->scrollInfo[j].total < 1) {
+ wPtr->scrollInfo[j].total = 1;
+ }
+ if (wPtr->scrollInfo[i].window < 1) {
+ wPtr->scrollInfo[i].window = 1;
+ }
+ if (wPtr->scrollInfo[j].window < 1) {
+ wPtr->scrollInfo[j].window = 1;
+ }
+
+ /* If we have much fewer rows now, adjust the size of the rows list */
+ if (wPtr->numRowAllocd > (2*wPtr->numRow)) {
+ Realloc(wPtr, 2*wPtr->numRow);
+ }
+
+ /* Update the scrollbars */
+
+ UpdateScrollBars(wPtr, 1);
+}
+/*----------------------------------------------------------------------
+ * RedrawRows --
+ *
+ * Redraw the rows, according to the "offset" in both directions
+ *----------------------------------------------------------------------
+ */
+
+static void
+RedrawRows(wPtr, pixmap)
+ WidgetPtr wPtr;
+ Drawable pixmap;
+{
+ int r, n;
+ int p[2];
+ ListEntry * chPtr;
+ int i, j;
+ int total;
+ int windowSize;
+
+ if (wPtr->entList.numItems == 0) {
+ return;
+ }
+
+ if (wPtr->isVertical) {
+ i = 0; /* Column major, 0,0 -> 0,1 -> 0,2 ... -> 1,0 */
+ j = 1;
+ windowSize = Tk_Width(wPtr->dispData.tkwin);
+ } else {
+ i = 1; /* Row major, 0,0 -> 1,0 -> 2,0 ... -> 0,1 */
+ j = 0;
+ windowSize = Tk_Height(wPtr->dispData.tkwin);
+ }
+
+ p[i] = wPtr->highlightWidth + wPtr->borderWidth;
+ windowSize -= 2*p[i];
+
+ if (windowSize < 1) {
+ windowSize = 1;
+ }
+
+ if (wPtr->seeElemPtr != NULL) {
+ /*
+ * Adjust the scrolling so that the given the entry is visible in
+ * its entirty (as much as allowed by the height of the TList)
+ */
+
+ int start = 0; /* y1 position of the element to see. */
+ int size = 0; /* height of the element to see. */
+ int old = wPtr->scrollInfo[i].offset;
+
+ for (r=0, n=0, chPtr=(ListEntry*)wPtr->entList.head; chPtr;
+ chPtr=chPtr->next) {
+ if (chPtr == wPtr->seeElemPtr) {
+ size = chPtr->size[i];
+ break;
+ }
+ n++;
+ if (n == wPtr->rows[r].numEnt) {
+ n=0;
+ r++;
+ start += wPtr->rows[r].size[i];
+ }
+ }
+
+ if (wPtr->scrollInfo[i].offset + windowSize < start + size) {
+ /*
+ * Bottom of the entry is beneath the bottom edge
+ */
+ wPtr->scrollInfo[i].offset = start + size - windowSize;
+ }
+ if (wPtr->scrollInfo[i].offset > start) {
+ /*
+ * Top of the entry is above the top edge
+ */
+ wPtr->scrollInfo[i].offset = start;
+ }
+ if (wPtr->scrollInfo[i].offset != old) {
+ UpdateScrollBars(wPtr, 0);
+ }
+ wPtr->seeElemPtr = NULL;
+ }
+
+ /*
+ * Search for the first row from the top (or first column from the left)
+ * that is (possibly partially) visible
+ */
+ total=0; r=0;
+ if (wPtr->scrollInfo[i].offset != 0) {
+ for (; r<wPtr->numRow; r++) {
+ total += wPtr->rows[r].size[i];
+
+ if (total > wPtr->scrollInfo[i].offset) {
+ p[i] -= wPtr->scrollInfo[i].offset -
+ (total - wPtr->rows[r].size[i]);
+ break;
+ }
+ if (total == wPtr->scrollInfo[i].offset) {
+ r++;
+ break;
+ }
+ }
+ }
+
+ /* Redraw all the visible rows */
+ for (; r<wPtr->numRow; r++) {
+
+ p[j] = wPtr->highlightWidth + wPtr->borderWidth;
+
+ total=0; n=0; chPtr=wPtr->rows[r].chPtr;
+ if (wPtr->scrollInfo[j].offset > 0) {
+ /* Search for a column that is (possibly partially) visible*/
+ for (;
+ n<wPtr->rows[r].numEnt;
+ n++, chPtr = chPtr->next) {
+
+ total += chPtr->iPtr->base.size[j];
+ if (total > wPtr->scrollInfo[j].offset) {
+ /* Adjust for the shift due to partially visible elements*/
+ p[j] -= wPtr->scrollInfo[j].offset -
+ (total - chPtr->iPtr->base.size[j]);
+ break;
+ }
+ if (total == wPtr->scrollInfo[j].offset) {
+ n++; chPtr = chPtr->next;
+ break;
+ }
+ }
+ }
+
+ /* Redraw all the visible columns in this row */
+ for (; n<wPtr->rows[r].numEnt; n++, chPtr = chPtr->next) {
+ int flags = TIX_DITEM_NORMAL_FG | TIX_DITEM_NORMAL_BG;
+ int W, H;
+
+ if (chPtr->selected) {
+ flags |= TIX_DITEM_SELECTED_FG;
+ flags |= TIX_DITEM_SELECTED_BG;
+ }
+
+ if (wPtr->isVertical) {
+ W = wPtr->rows[r].size[0];
+ H = chPtr->iPtr->base.size[1];
+ } else {
+ H = wPtr->rows[r].size[1];
+ W = chPtr->iPtr->base.size[0];
+ }
+
+ if (chPtr == wPtr->anchor && wPtr->hasFocus) {
+ flags |= TIX_DITEM_ANCHOR;
+ }
+
+ Tix_DItemDisplay(pixmap, chPtr->iPtr, p[0], p[1], W, H,
+ 0, 0, flags);
+
+#if 0
+ if (chPtr == wPtr->anchor && wPtr->hasFocus) {
+ GC ancGC;
+ if (chPtr->selected) {
+ ancGC = wPtr->anchorGC;
+ } else {
+ ancGC = wPtr->anchorGC2;
+ }
+ Tix_DrawAnchorLines(Tk_Display(wPtr->dispData.tkwin), pixmap,
+ ancGC, p[0], p[1], W, H);
+ }
+#endif
+ p[j] += wPtr->maxSize[j];
+ }
+
+ /* advance to the next row */
+ p[i]+= wPtr->rows[r].size[i];
+ }
+}
+
+/*----------------------------------------------------------------------
+ * UpdateScrollBars
+ *----------------------------------------------------------------------
+ */
+static void UpdateScrollBars(wPtr, sizeChanged)
+ WidgetPtr wPtr;
+ int sizeChanged;
+{
+ Tix_UpdateScrollBar(wPtr->dispData.interp,
+ (Tix_ScrollInfo*)&wPtr->scrollInfo[0]);
+ Tix_UpdateScrollBar(wPtr->dispData.interp,
+ (Tix_ScrollInfo*)&wPtr->scrollInfo[1]);
+
+ if (wPtr->sizeCmd && sizeChanged) {
+ if (Tcl_Eval(wPtr->dispData.interp, wPtr->sizeCmd) != TCL_OK) {
+ Tcl_AddErrorInfo(wPtr->dispData.interp,
+ "\n (size command executed by tixTList)");
+ Tk_BackgroundError(wPtr->dispData.interp);
+ }
+ }
+}
Added: external/tix-8.4.2.x/generic/tixTList.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixTList.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,144 @@
+
+/* $Id: tixTList.h,v 1.2 2000/12/24 07:06:22 ioilam 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_
+
+#define TIX_X 0
+#define TIX_Y 1
+
+typedef struct ListEntry {
+ struct ListEntry * next;
+ Tix_DItem * iPtr;
+ Tk_Uid state;
+ 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
+ * around a selected item */
+ GC anchorGC2; /* GC for drawing dotted anchor highlight
+ * around an unselected item */
+ 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
+ */
+ char *command; /* The command when user double-clicks */
+ char *browseCmd; /* The command to call when the selection
+ * changes. */
+ char *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_ */
Added: external/tix-8.4.2.x/generic/tixUtils.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixUtils.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,888 @@
+/*
+ * tixUtils.c --
+ *
+ * This file contains some utility functions for Tix, such as the
+ * subcommand handling functions and option handling functions.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixUtils.c,v 1.12 2005/03/25 20:15:53 hobbs Exp $
+ */
+
+/*
+ * tclInt.h is needed for the va_list declaration.
+ */
+#include <tclInt.h>
+#include <tixPort.h>
+#include <tixInt.h>
+
+/*
+ * Forward declarations for procedures defined later in this file:
+ */
+
+static int ReliefParseProc(ClientData clientData,
+ Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value,
+ char *widRec, int offset);
+static char * ReliefPrintProc(ClientData clientData,
+ Tk_Window tkwin, char *widRec, int offset,
+ Tix_FreeProc **freeProcPtr);
+
+#define WRONG_ARGC 1
+#define NO_MATCH 2
+
+
+/*----------------------------------------------------------------------
+ * TixSaveInterpState --
+ *
+ * Save the current application-visible state of the interpreter.
+ * This can later be restored by the TixSaveInterpState() function.
+ * These two functions are useful if you want to evaluate a Tcl
+ * command, which may cause errors, inside a command function.
+ *
+ * Each TixSaveInterpState() call much be matched by one
+ * TixRestoreInterpState() call with the same statePtr. statePtr
+ * should be allocated by the calling function, usually
+ * as a variable on the stack.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixSaveInterpState(interp, statePtr)
+ Tcl_Interp * interp;
+ TixInterpState * statePtr;
+{
+ CONST84 char * p;
+ if (interp->result) {
+ statePtr->result = tixStrDup(interp->result);
+ } else {
+ statePtr->result = NULL;
+ }
+
+ p = Tcl_GetVar2(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);
+ statePtr->errorInfo = (p ? tixStrDup(p) : NULL);
+
+ p = Tcl_GetVar2(interp, "errorCode", NULL, TCL_GLOBAL_ONLY);
+ statePtr->errorCode = (p ? tixStrDup(p) : NULL);
+}
+
+/*----------------------------------------------------------------------
+ * TixRestoreInterpState --
+ *
+ * See TixSaveInterpState above.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixRestoreInterpState(interp, statePtr)
+ Tcl_Interp * interp;
+ TixInterpState * statePtr;
+{
+ if (statePtr->result) {
+ Tcl_SetResult(interp, statePtr->result, TCL_DYNAMIC);
+ }
+ if (statePtr->errorInfo) {
+ Tcl_SetVar2(interp, "errorInfo", NULL, statePtr->errorInfo,
+ TCL_GLOBAL_ONLY);
+ ckfree((char*)statePtr->errorInfo);
+ } else {
+ Tcl_UnsetVar2(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);
+ }
+ if (statePtr->errorCode) {
+ Tcl_SetVar2(interp, "errorCode", NULL, statePtr->errorCode,
+ TCL_GLOBAL_ONLY);
+ ckfree((char*)statePtr->errorCode);
+ } else {
+ Tcl_UnsetVar2(interp, "errorCode", NULL, TCL_GLOBAL_ONLY);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * Tix_HandleSubCmds --
+ *
+ * This function makes it easier to write major-minor style TCL
+ * commands. It matches the minor command (sub-command) names
+ * with names defined in the cmdInfo structure and call the
+ * appropriate sub-command functions for you. This function will
+ * automatically generate error messages when the user calls an
+ * invalid sub-command or calls a sub-command with incorrect
+ * number of arguments.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int Tix_HandleSubCmds(cmdInfo, subCmdInfo, clientData, interp, argc, argv)
+ Tix_CmdInfo * cmdInfo;
+ Tix_SubCmdInfo * subCmdInfo;
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+
+ int i;
+ int error = NO_MATCH;
+ unsigned int len;
+ Tix_SubCmdInfo * s;
+
+ /*
+ * First check if the number of arguments to the major command
+ * is correct
+ */
+ argc -= 1;
+ if (argc < cmdInfo->minargc ||
+ (cmdInfo->maxargc != TIX_VAR_ARGS && argc > cmdInfo->maxargc)) {
+
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " ", cmdInfo->info, "\".", (char *) NULL);
+
+ return TCL_ERROR;
+ }
+
+ /*
+ * Now try to match the subcommands with argv[1]
+ */
+ argc -= 1;
+ len = strlen(argv[1]);
+
+ for (i = 0, s = subCmdInfo; i < cmdInfo->numSubCmds; i++, s++) {
+ if (s->name == TIX_DEFAULT_SUBCMD) {
+ if (s->checkArgvProc) {
+ if (!((*s->checkArgvProc)(clientData, interp, argc+1, argv+1))) {
+ /* Some improper argv in the arguments of the default
+ * subcommand
+ */
+ break;
+ }
+ }
+ return (*s->proc)(clientData, interp, argc+1, argv+1);
+ }
+
+ if (s->namelen == TIX_DEFAULT_LEN) {
+ s->namelen = strlen(s->name);
+ }
+ if (s->name[0] == argv[1][0] && strncmp(argv[1],s->name,len)==0) {
+ if (argc < s->minargc) {
+ error = WRONG_ARGC;
+ break;
+ }
+
+ if (s->maxargc != TIX_VAR_ARGS &&
+ argc > s->maxargc) {
+ error = WRONG_ARGC;
+ break;
+ }
+
+ /*
+ * Here we have a matched argc and command name --> go for it!
+ */
+ return (*s->proc)(clientData, interp, argc, argv+2);
+ }
+ }
+
+ if (error == WRONG_ARGC) {
+ /*
+ * got a match but incorrect number of arguments
+ */
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " ", argv[1], " ", s->info, "\"", (char *) NULL);
+ } else {
+ int max;
+
+ /*
+ * no match: let print out all the options
+ */
+ Tcl_AppendResult(interp, "unknown option \"",
+ argv[1], "\".", (char *) NULL);
+
+ if (cmdInfo->numSubCmds == 0) {
+ max = 0;
+ } else {
+ if (subCmdInfo[cmdInfo->numSubCmds-1].name == TIX_DEFAULT_SUBCMD) {
+ max = cmdInfo->numSubCmds-1;
+ } else {
+ max = cmdInfo->numSubCmds;
+ }
+ }
+
+ if (max == 0) {
+ Tcl_AppendResult(interp,
+ " This command does not take any options.",
+ (char *) NULL);
+ } else if (max == 1) {
+ Tcl_AppendResult(interp,
+ " Must be ", subCmdInfo->name, ".", (char *)NULL);
+ } else {
+ Tcl_AppendResult(interp, " Must be ", (char *) NULL);
+
+ for (i = 0, s = subCmdInfo; i < max; i++, s++) {
+ if (i == max-1) {
+ Tcl_AppendResult(interp,"or ",s->name, ".", (char *) NULL);
+ } else if (i == max-2) {
+ Tcl_AppendResult(interp, s->name, " ", (char *) NULL);
+ } else {
+ Tcl_AppendResult(interp, s->name, ", ", (char *) NULL);
+ }
+ }
+ }
+ }
+ return TCL_ERROR;
+}
+
+/*----------------------------------------------------------------------
+ * Tix_Exit --
+ *
+ * Call the "exit" tcl command so that things can be cleaned up
+ * before calling the unix exit(2);
+ *
+ *----------------------------------------------------------------------
+ */
+void Tix_Exit(interp, code)
+ Tcl_Interp* interp;
+ int code;
+{
+ if (code != 0 && interp && interp->result != 0) {
+ fprintf(stderr, "%s\n", interp->result);
+ fprintf(stderr, "%s\n",
+ Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY));
+ }
+
+ if (interp) {
+ Tcl_EvalEx(interp, "exit", -1, TCL_GLOBAL_ONLY);
+ }
+ exit(code);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_CreateCommands --
+ *
+ *
+ * Creates a list of commands stored in the array "commands"
+ *----------------------------------------------------------------------
+ */
+
+static int initialized = 0;
+
+void Tix_CreateCommands(interp, commands, clientData, deleteProc)
+ Tcl_Interp *interp;
+ Tix_TclCmd *commands;
+ ClientData clientData;
+ Tcl_CmdDeleteProc *deleteProc;
+{
+ Tix_TclCmd * cmdPtr;
+
+ if (!initialized) {
+ Tcl_CmdInfo cmdInfo;
+
+ initialized = 1;
+ if (!Tcl_GetCommandInfo(interp,"image", (Tcl_CmdInfo *) &cmdInfo)) {
+ Tcl_Panic("cannot find the \"image\" command");
+ } else if (cmdInfo.isNativeObjectProc == 1) {
+ initialized = 2; /* we use objects */
+ }
+ }
+ for (cmdPtr = commands; cmdPtr->name != NULL; cmdPtr++) {
+ Tcl_CreateCommand(interp, cmdPtr->name,
+ cmdPtr->cmdProc, clientData, deleteProc);
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_GetAnchorGC --
+ *
+ * Get the GC for drawing the anchor dotted lines around anchor
+ * elements.
+ *
+ * Results:
+ * Returns a GC that can be passed to Tix_DrawAnchorLines for
+ * drawing an anchor line for the given background color.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+GC
+Tix_GetAnchorGC(tkwin, bgColor)
+ Tk_Window tkwin;
+ XColor *bgColor;
+{
+ XGCValues gcValues;
+ XColor valueKey;
+ XColor * anchorColor;
+ int r, g, b;
+ int max;
+
+ /*
+ * Get the best color to draw the dotted lines on the given background
+ * color.
+ */
+
+ r = bgColor->red;
+ g = bgColor->green;
+ b = bgColor->blue;
+
+ r = (65535 - r) & 0xffff;
+ g = (65535 - g) & 0xffff;
+ b = (65535 - b) & 0xffff;
+
+ max = r;
+ if (max < g) {
+ max = g;
+ }
+ if (max < b) {
+ max = b;
+ }
+
+ max = max / 256;
+ if (max > 96) {
+ /*
+ * scale color up
+ */
+
+ r = (r * 255) / max;
+ g = (g * 255) / max;
+ b = (b * 255) / max;
+ } else {
+ /*
+ * scale color down
+ */
+ int min = r;
+ if (min > g) {
+ min = g;
+ }
+ if (min > b) {
+ min = b;
+ }
+ r = r - min;
+ g = g - min;
+ b = b - min;
+ }
+
+ valueKey.red = r;
+ valueKey.green = g;
+ valueKey.blue = b;
+
+ anchorColor = Tk_GetColorByValue(tkwin, &valueKey);
+
+ gcValues.foreground = anchorColor->pixel;
+ gcValues.graphics_exposures = False;
+ gcValues.subwindow_mode = IncludeInferiors;
+
+ return Tk_GetGC(tkwin, GCForeground|GCGraphicsExposures|GCSubwindowMode,
+ &gcValues);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_DrawAnchorLines --
+ *
+ * Draw dotted anchor lines around anchor elements. The exact
+ * behavior is defined in the platform-specific
+ * TixpDrawAnchorLines function.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+void
+Tix_DrawAnchorLines(display, drawable, gc, x, y, w, h)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ int x;
+ int y;
+ int w;
+ int h;
+{
+ TixpDrawAnchorLines(display, drawable, gc, x, y, w, h);
+}
+
+/*----------------------------------------------------------------------
+ * Tix_CreateSubWindow --
+ *
+ * Creates a subwindow for a widget (usually used to draw headers,
+ * e.g, HList and Grid widgets)
+ *----------------------------------------------------------------------
+ */
+
+Tk_Window
+Tix_CreateSubWindow(interp, tkwin, subPath)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ CONST84 char * subPath;
+{
+ Tcl_DString dString;
+ Tk_Window subwin;
+
+ Tcl_DStringInit(&dString);
+ Tcl_DStringAppend(&dString, Tk_PathName(tkwin),
+ (int) strlen(Tk_PathName(tkwin)));
+ Tcl_DStringAppend(&dString, ".tixsw:", 7);
+ Tcl_DStringAppend(&dString, subPath, (int) strlen(subPath));
+
+ subwin = Tk_CreateWindowFromPath(interp, tkwin, dString.string,
+ (char *) NULL);
+
+ Tcl_DStringFree(&dString);
+
+ return subwin;
+}
+static int
+ErrorProc(clientData, errorEventPtr)
+ ClientData clientData;
+ XErrorEvent *errorEventPtr; /* unused */
+{
+ int * badAllocPtr = (int*) clientData;
+
+ * badAllocPtr = 1;
+ return 0; /* return 0 means error has been
+ * handled properly */
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_GetRenderBuffer --
+ *
+ * Returns a drawable for rendering a widget. If there is
+ * sufficient graphics resource, a pixmap is returned so that
+ * double-buffering can be done. However, if resource is
+ * insufficient, then the windowId is returned. In the second
+ * case happens, the caller of this function has two choices: (1)
+ * draw to the window directly (which may lead to flickering on
+ * the screen) or (2) try to allocate smaller pixmaps.
+ *
+ * Results:
+ * An allocated pixmap of the same depth as the window, or the
+ * window itself.
+ *
+ * Side effects:
+ * A pixmap may be allocated. The caller should call
+ * Tk_FreePixmap() to free the pixmap returned by this function.
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*
+ * Uncomment this if you want to use single-buffer mode drawing to
+ * debug paintings.
+ */
+
+/* #define PAINT_DEBUG 1 */
+
+Drawable
+Tix_GetRenderBuffer(display, windowId, width, height, depth)
+ Display *display; /* Display of the windowId */
+ Window windowId; /* Window to draw into */
+ int width; /* width of the drawing region */
+ int height; /* height of the drawing region */
+ int depth; /* Depth of the window. TODO remove this arg*/
+{
+#ifdef PAINT_DEBUG
+ return windowId;
+#else
+ Tk_ErrorHandler handler;
+ Pixmap pixmap;
+ int badAlloc = 0;
+
+ handler= Tk_CreateErrorHandler(display, BadAlloc,
+ -1, -1, (Tk_ErrorProc *) ErrorProc, (ClientData) &badAlloc);
+ pixmap = Tk_GetPixmap(display, windowId, width, height, depth);
+
+#if !defined(__WIN32__) && !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */
+ /*
+ * This XSync call is necessary because X may delay the delivery of the
+ * error message. This will make our graphics a bit slower, though,
+ * especially over slow lines
+ */
+ XSync(display, 0);
+#endif
+ /* If ErrorProc() is eevr called, it is called before XSync returns */
+
+ Tk_DeleteErrorHandler(handler);
+
+ if (!badAlloc) {
+ return pixmap;
+ } else {
+ return windowId;
+ }
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_GlobalVarEval --
+ *
+ * Given a variable number of string arguments, concatenate them
+ * all together and execute the result as a Tcl command in the global
+ * scope.
+ *
+ * Results:
+ * A standard Tcl return result. An error message or other
+ * result may be left in interp->result.
+ *
+ * Side effects:
+ * Depends on what was done by the command.
+ *
+ *----------------------------------------------------------------------
+ */
+ /* VARARGS2 */ /* ARGSUSED */
+int
+Tix_GlobalVarEval TCL_VARARGS_DEF(Tcl_Interp *,arg1)
+{
+ va_list argList;
+ Tcl_DString buf;
+ char *string;
+ Tcl_Interp *interp;
+ int result;
+
+ /*
+ * Copy the strings one after the other into a single larger
+ * string. Use stack-allocated space for small commands, but if
+ * the command gets too large than call ckalloc to create the
+ * space.
+ */
+
+ interp = TCL_VARARGS_START(Tcl_Interp *,arg1,argList);
+ Tcl_DStringInit(&buf);
+ while (1) {
+ string = va_arg(argList, char *);
+ if (string == NULL) {
+ break;
+ }
+ Tcl_DStringAppend(&buf, string, -1);
+ }
+ va_end(argList);
+
+ result = Tcl_EvalEx(interp, Tcl_DStringValue(&buf),
+ Tcl_DStringLength(&buf), TCL_GLOBAL_ONLY);
+ Tcl_DStringFree(&buf);
+ return result;
+}
+
+/*----------------------------------------------------------------------
+ * TixGetHashTable --
+ *
+ * This functions makes it possible to keep one hash table per
+ * interpreter. This way, Tix classes can be used in multiple
+ * interpreters.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static void DeleteHashTableProc _ANSI_ARGS_((ClientData clientData,
+ Tcl_Interp * interp));
+static void
+DeleteHashTableProc(clientData, interp)
+ ClientData clientData;
+ Tcl_Interp * interp;
+{
+ Tcl_HashTable * htPtr = (Tcl_HashTable *)clientData;
+ Tcl_HashSearch hashSearch;
+ Tcl_HashEntry * hashPtr;
+
+ for (hashPtr = Tcl_FirstHashEntry(htPtr, &hashSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hashSearch)) {
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+
+ Tcl_DeleteHashTable(htPtr);
+ ckfree((char*)htPtr);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixGetHashTable() --
+ *
+ * Returns a named hashtable to be used for the given
+ * interpreter. Creates the hashtable if it doesn't exist yet. It
+ * uses Tcl_GetAssocData to make sure that the hashtable is not
+ * shared by different interpreters.
+ *
+ * Results:
+ * Pointer to the hashtable.
+ *
+ * Side effects:
+ * The hashtable is created if it doesn't exist yet.
+ *
+ *----------------------------------------------------------------------
+ */
+
+Tcl_HashTable *
+TixGetHashTable(interp, name, deleteProc, keyType)
+ Tcl_Interp * interp;
+ char * name;
+ Tcl_InterpDeleteProc *deleteProc;
+ int keyType;
+{
+ Tcl_HashTable * htPtr;
+
+ htPtr = (Tcl_HashTable*)Tcl_GetAssocData(interp, name, NULL);
+
+ if (htPtr == NULL) {
+ htPtr = (Tcl_HashTable *)ckalloc(sizeof(Tcl_HashTable));
+ Tcl_InitHashTable(htPtr, keyType);
+ Tcl_SetAssocData(interp, name, NULL, (ClientData)htPtr);
+
+ if (deleteProc) {
+ Tcl_CallWhenDeleted(interp, deleteProc, (ClientData)htPtr);
+ } else {
+ Tcl_CallWhenDeleted(interp, DeleteHashTableProc,
+ (ClientData)htPtr);
+ }
+ }
+
+ return htPtr;
+}
+
+/*----------------------------------------------------------------------
+ *
+ * The Tix Customed Config Options
+ *
+ *----------------------------------------------------------------------
+ */
+
+/*----------------------------------------------------------------------
+ * ReliefParseProc --
+ *
+ * Parse the text string and store the Tix_Relief information
+ * inside the widget record.
+ *----------------------------------------------------------------------
+ */
+static int
+ReliefParseProc(clientData, interp, tkwin, value, widRec,offset)
+ ClientData clientData;
+ Tcl_Interp *interp;
+ Tk_Window tkwin;
+ CONST84 char *value;
+ char *widRec; /* Must point to a valid Tix_DItem struct */
+ int offset;
+{
+ Tix_Relief * ptr = (Tix_Relief *)(widRec + offset);
+ Tix_Relief newVal;
+
+ if (value != NULL) {
+ size_t len = strlen(value);
+
+ if (strncmp(value, "raised", len) == 0) {
+ newVal = TIX_RELIEF_RAISED;
+ } else if (strncmp(value, "flat", len) == 0) {
+ newVal = TIX_RELIEF_FLAT;
+ } else if (strncmp(value, "sunken", len) == 0) {
+ newVal = TIX_RELIEF_SUNKEN;
+ } else if (strncmp(value, "groove", len) == 0) {
+ newVal = TIX_RELIEF_GROOVE;
+ } else if (strncmp(value, "ridge", len) == 0) {
+ newVal = TIX_RELIEF_RIDGE;
+ } else if (strncmp(value, "solid", len) == 0) {
+ newVal = TIX_RELIEF_SOLID;
+ } else {
+ goto error;
+ }
+ } else {
+ value = "";
+ goto error;
+ }
+
+ *ptr = newVal;
+ return TCL_OK;
+
+ error:
+ Tcl_AppendResult(interp, "bad relief type \"", value,
+ "\": must be flat, groove, raised, ridge, solid or sunken", NULL);
+ return TCL_ERROR;
+}
+
+static char *
+ReliefPrintProc(clientData, tkwin, widRec,offset, freeProcPtr)
+ ClientData clientData;
+ Tk_Window tkwin;
+ char *widRec;
+ int offset;
+ Tix_FreeProc **freeProcPtr;
+{
+ Tix_Relief *ptr = (Tix_Relief*)(widRec+offset);
+
+ switch (*ptr) {
+ case TIX_RELIEF_RAISED:
+ return "raised";
+ case TIX_RELIEF_FLAT:
+ return "flat";
+ case TIX_RELIEF_SUNKEN:
+ return "sunken";
+ case TIX_RELIEF_GROOVE:
+ return "groove";
+ case TIX_RELIEF_RIDGE:
+ return "ridge";
+ case TIX_RELIEF_SOLID:
+ return "solid";
+ default:
+ return "unknown";
+ }
+}
+/*
+ * The global data structures to use in widget configSpecs arrays
+ *
+ * These are declared in <tix.h>
+ */
+
+Tk_CustomOption tixConfigRelief = {
+ ReliefParseProc, ReliefPrintProc, 0,
+};
+
+/* Tix_SetRcFileName --
+ *
+ * Sets a user-specific startup file in a way that's compatible with
+ * different versions of Tclsh
+ */
+void Tix_SetRcFileName(interp, rcFileName)
+ Tcl_Interp * interp;
+ CONST84 char * rcFileName;
+{
+ /*
+ * Starting from TCL 7.5, the symbol tcl_rcFileName is no longer
+ * exported by libtcl.a. Instead, this variable must be set using
+ * a TCL global variable
+ */
+ Tcl_SetVar(interp, "tcl_rcFileName", rcFileName, TCL_GLOBAL_ONLY);
+}
+
+/*
+ * The TkComputeTextGeometry function is no longer supported in Tk 8.0+
+ */
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixComputeTextGeometry --
+ *
+ * This procedure computes the amount of screen space needed to
+ * display a multi-line string of text.
+ *
+ * Results:
+ * There is no return value. The dimensions of the screen area
+ * needed to display the text are returned in *widthPtr, and *heightPtr.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixComputeTextGeometry(font, string, numChars, wrapLength,
+ widthPtr, heightPtr)
+ TixFont font; /* Font that will be used to display text. */
+ CONST84 char *string; /* String whose dimensions are to be
+ * computed. */
+ int numChars; /* Number of characters to consider from
+ * string. -1 means the entire size of
+ * the text string */
+ int wrapLength; /* Longest permissible line length, in
+ * pixels. <= 0 means no automatic wrapping:
+ * just let lines get as long as needed. */
+ int *widthPtr; /* Store width of string here. */
+ int *heightPtr; /* Store height of string here. */
+{
+ Tk_TextLayout textLayout;
+
+ /*
+ * The justification itself doesn't affect the geometry (size) of
+ * the text string. We pass TK_JUSTIFY_LEFT.
+ */
+
+ textLayout = Tk_ComputeTextLayout(font,
+ string, numChars, wrapLength, TK_JUSTIFY_LEFT, 0,
+ widthPtr, heightPtr);
+ Tk_FreeTextLayout(textLayout);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixDisplayText --
+ *
+ * Display a text string on one or more lines.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * The text given by "string" gets displayed at the given location
+ * in the given drawable with the given font etc.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixDisplayText(display, drawable, font, string, numChars, x, y,
+ length, justify, underline, gc)
+ Display *display; /* X display to use for drawing text. */
+ Drawable drawable; /* Window or pixmap in which to draw the
+ * text. */
+ TixFont font; /* Font that determines geometry of text
+ * (should be same as font in gc). */
+ CONST84 char *string; /* String to display; may contain embedded
+ * newlines. */
+ int numChars; /* Number of characters to use from string. */
+ int x, y; /* Pixel coordinates within drawable of
+ * upper left corner of display area. */
+ int length; /* Line length in pixels; used to compute
+ * word wrap points and also for
+ * justification. Must be > 0. */
+ Tk_Justify justify; /* How to justify lines. */
+ int underline; /* Index of character to underline, or < 0
+ * for no underlining. */
+ GC gc; /* Graphics context to use for drawing text. */
+{
+ Tk_TextLayout textLayout;
+ int dummyx, dummyy;
+
+ textLayout = Tk_ComputeTextLayout(font,
+ string, numChars, length, justify, 0,
+ &dummyx, &dummyy);
+
+ Tk_DrawTextLayout(display, drawable, gc, textLayout,
+ x, y, 0, -1);
+ Tk_UnderlineTextLayout(display, drawable, gc,
+ textLayout, x, y, underline);
+
+ Tk_FreeTextLayout(textLayout);
+}
+
+/*
+ *----------------------------------------------------------------------
+ * Tix_ZAlloc --
+ *
+ * Allocate the memory block with ckalloc and zeros it.
+ *
+ * Results:
+ * Same as ckalloc() except the new memory block is filled with
+ * zero. Returns NULL if memory allocation fails.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+char * Tix_ZAlloc(nbytes)
+ unsigned int nbytes; /* size of memory block to alloc, in
+ * number of bytes.*/
+{
+ char * ptr = (char*)ckalloc(nbytes);
+ if (ptr) {
+ memset(ptr, 0, nbytes);
+ }
+ return ptr;
+}
Added: external/tix-8.4.2.x/generic/tixWidget.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/generic/tixWidget.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,305 @@
+/*
+ * tixWidget.c --
+ *
+ * Constructs Tix-based mega widgets
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000-2001 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixWidget.c,v 1.6 2005/03/25 20:15:53 hobbs Exp $
+ */
+
+#include <tcl.h>
+#include <tclInt.h>
+#include <tixInt.h>
+
+static int ParseOptions(Tcl_Interp *interp, TixClassRecord *cPtr,
+ CONST84 char *widRec, int argc, CONST84 char** argv);
+
+TIX_DECLARE_CMD(Tix_InstanceCmd);
+
+/*----------------------------------------------------------------------
+ * Tix_CreateWidgetCmd
+ *
+ * Create an instance object of a Tix widget class.
+ *
+ * argv[0] = object name.
+ * argv[1+] = args
+ *----------------------------------------------------------------------
+ */
+TIX_DEFINE_CMD(Tix_CreateWidgetCmd)
+{
+ TixClassRecord * cPtr =(TixClassRecord *)clientData;
+ TixConfigSpec * spec;
+ CONST84 char * value;
+ CONST84 char * widRec = NULL;
+ char * widCmd = NULL, * rootCmd = NULL;
+ int i;
+ int code = TCL_OK;
+ Tk_Window mainWin = Tk_MainWindow(interp);
+
+ if (argc <= 1) {
+ return Tix_ArgcError(interp, argc, argv, 1, "pathname ?arg? ...");
+ } else {
+ widRec = argv[1];
+ }
+
+ if (strstr(argv[1], "::") != NULL) {
+ /*
+ * Cannot contain :: in widget name, otherwise all hell will
+ * rise w.r.t. namespace
+ */
+
+ Tcl_AppendResult(interp, "invalid widget name \"", argv[1],
+ "\": may not contain substring \"::\"", NULL);
+ return TCL_ERROR;
+ }
+
+ if (Tk_NameToWindow(interp, widRec, mainWin) != NULL) {
+ Tcl_ResetResult(interp);
+ Tcl_AppendResult(interp, "window name \"", widRec,
+ "\" already exists", NULL);
+ return TCL_ERROR;
+ } else {
+ Tcl_ResetResult(interp);
+ }
+
+ /*
+ * Before doing anything, let's reset the TCL result, errorInfo,
+ * errorCode, etc.
+ */
+ Tcl_SetVar2(interp, "errorInfo", NULL, "", TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "errorCode", NULL, "", TCL_GLOBAL_ONLY);
+ Tcl_ResetResult(interp);
+
+ /*
+ * Set up the widget record
+ *
+ * TODO: avoid buffer allocation if possible.
+ */
+ widCmd = ckalloc(strlen(widRec) + 3);
+ sprintf(widCmd, "::%s", widRec);
+ rootCmd = ckalloc(strlen(widRec) + 8);
+ sprintf(rootCmd, "::%s:root", widRec);
+
+ Tcl_SetVar2(interp, widRec, "className", cPtr->className, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, widRec, "ClassName", cPtr->ClassName, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, widRec, "context", cPtr->className, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, widRec, "w:root", widRec, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, widRec, "rootCmd", rootCmd, TCL_GLOBAL_ONLY);
+
+ /* We need to create the root widget in order to parse the options
+ * database
+ */
+ if (Tix_CallMethod(interp, cPtr->className, widRec, "CreateRootWidget",
+ argc-2, argv+2, NULL) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /* Parse the options specified in the option database and supplied
+ * in the command line.
+ */
+ Tcl_ResetResult(interp);
+ if (ParseOptions(interp, cPtr, widRec, argc-2, argv+2) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /* Rename the root widget command and create a new TCL command for
+ * this widget
+ */
+
+ if (TclRenameCommand(interp, widCmd, rootCmd) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ Tcl_CreateCommand(interp, widRec, Tix_InstanceCmd,
+ (ClientData)cPtr, NULL);
+
+ /* Now call the initialization methods defined by the Tix Intrinsics
+ */
+ if (Tix_CallMethod(interp, cPtr->className, widRec, "InitWidgetRec",
+ 0, 0, NULL) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (Tix_CallMethod(interp, cPtr->className, widRec, "ConstructWidget",
+ 0, 0, NULL) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ if (Tix_CallMethod(interp, cPtr->className, widRec, "SetBindings",
+ 0, 0, NULL) != TCL_OK) {
+ code = TCL_ERROR;
+ goto done;
+ }
+
+ /* The widget has been successfully initialized. Now call the config
+ * method for all -forceCall options
+ */
+ for (i=0; i<cPtr->nSpecs; i++) {
+ spec = cPtr->specs[i];
+ if (spec->forceCall) {
+ value = Tcl_GetVar2(interp, widRec, spec->argvName,
+ TCL_GLOBAL_ONLY);
+ if (Tix_CallConfigMethod(interp, cPtr, widRec, spec,
+ value)!=TCL_OK){
+ code = TCL_ERROR;
+ goto done;
+ }
+ }
+ }
+
+ Tcl_SetResult(interp, (char *) widRec, TCL_VOLATILE);
+
+ done:
+
+ if (code != TCL_OK) {
+ /* %% TCL CORE USED !! %% */
+ Interp *iPtr = (Interp *) interp;
+ CONST84 char * oldResult, * oldErrorInfo, * oldErrorCode;
+ Tk_Window topLevel, tkwin;
+
+ /* We need to save the old error message because
+ * interp->result may be changed by some of the following function
+ * calls.
+ */
+ if (interp->result) {
+ oldResult = tixStrDup(interp->result);
+ } else {
+ oldResult = NULL;
+ }
+ oldErrorInfo = Tcl_GetVar2(interp, "errorInfo", NULL, TCL_GLOBAL_ONLY);
+ oldErrorCode = Tcl_GetVar2(interp, "errorCode", NULL, TCL_GLOBAL_ONLY);
+
+ Tcl_ResetResult(interp);
+
+ /* (1) window */
+ topLevel = cPtr->mainWindow;
+
+ if (widRec != NULL) {
+ Display *display = NULL;
+
+ tkwin = Tk_NameToWindow(interp, widRec, topLevel);
+ if (tkwin != NULL) {
+ display = Tk_Display(tkwin);
+ Tk_DestroyWindow(tkwin);
+ }
+
+ /*
+ * (2) Clean up widget command + root command. Because widCmd
+ * and rootCmd contains ::, the commands will be correctly
+ * deleted from the global namespace.
+ */
+
+ Tcl_DeleteCommand(interp, widCmd);
+ Tcl_DeleteCommand(interp, rootCmd);
+
+ /* (3) widget record */
+ Tcl_UnsetVar(interp, widRec, TCL_GLOBAL_ONLY);
+
+ if (display) {
+#if !defined(__WIN32__) && !defined(MAC_TCL) && !defined(MAC_OSX_TK) /* UNIX */
+ /* TODO: why is this necessary?? */
+ XSync(display, False);
+#endif
+ while (1) {
+ if (Tk_DoOneEvent(TK_X_EVENTS|TK_DONT_WAIT) == 0) {
+ break;
+ }
+ }
+ }
+ }
+ if (oldResult) {
+ Tcl_SetResult(interp, (char *) oldResult, TCL_DYNAMIC);
+ }
+ if (oldErrorInfo && *oldErrorInfo) {
+ Tcl_SetVar2(interp, "errorInfo", NULL, oldErrorInfo,
+ TCL_GLOBAL_ONLY);
+ } else {
+ Tcl_SetVar2(interp, "errorInfo", NULL, oldResult,
+ TCL_GLOBAL_ONLY);
+ }
+ if (oldErrorCode) {
+ Tcl_SetVar2(interp, "errorCode", NULL, oldErrorCode,
+ TCL_GLOBAL_ONLY);
+ }
+ iPtr->flags |= ERR_IN_PROGRESS;
+ }
+ if (widCmd) {
+ ckfree(widCmd);
+ }
+ if (rootCmd) {
+ ckfree(rootCmd);
+ }
+
+ return code;
+}
+
+/*----------------------------------------------------------------------
+ * Subroutines for object instantiation.
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+static int ParseOptions(interp, cPtr, widRec, argc, argv)
+ Tcl_Interp * interp;
+ TixClassRecord * cPtr;
+ CONST84 char *widRec;
+ int argc;
+ CONST84 char** argv;
+{
+ int i;
+ TixConfigSpec *spec;
+ Tk_Window tkwin;
+ CONST84 char * value;
+
+ if ((argc %2) != 0) {
+ Tcl_AppendResult(interp, "missing argument for \"", argv[argc-1],
+ "\"", NULL);
+ return TCL_ERROR;
+ }
+
+ if ((tkwin = Tk_NameToWindow(interp, widRec, cPtr->mainWindow)) == NULL) {
+ return TCL_ERROR;
+ }
+
+ /* Set all specs by their default values */
+ /* BUG: default value may be override by options database */
+ for (i=0; i<cPtr->nSpecs; i++) {
+ spec = cPtr->specs[i];
+
+ if (!spec->isAlias) {
+ if ((value=Tk_GetOption(tkwin,spec->dbName,spec->dbClass))==NULL) {
+ value = spec->defValue;
+ }
+ if (Tix_ChangeOneOption(interp, cPtr, widRec, spec,
+ value, 1, 0)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+ }
+
+ /* Set specs according to argument line values */
+ for (i=0; i<argc; i+=2) {
+ spec = Tix_FindConfigSpecByName(interp, cPtr, argv[i]);
+
+ if (spec == NULL) { /* this is an invalid flag */
+ return TCL_ERROR;
+ }
+
+ if (Tix_ChangeOneOption(interp, cPtr, widRec, spec,
+ argv[i+1], 0, 1)!=TCL_OK) {
+ return TCL_ERROR;
+ }
+ }
+
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/index.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/index.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,101 @@
+<HTML>
+<HEAD>
+<TITLE>Tix Documentation Index</TITLE>
+<!-- $Id -->
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+
+<Center><H2>Tix Documentation Index</H2></Center>
+
+ This file is the index of all the documentation included in this Tix
+ source release package. For additional information about Tix, please
+ visit the Tix Home Page at <a href="http://tix.sourceforge.net">
+ http://tix.sourceforge.net</a>. <p>
+
+ Tix is open-source software. See <a
+ href="license.terms">license.terms</a> for details.
+
+<h3> General Documents </h3>
+
+<ul>
+
+ <li> <b><a href="ABOUT.html">ABOUT.html</a></b><br>
+ A brief descriptions of Tix.
+ <p>
+
+ <li> <b><a href="docs/Release.html">docs/Release.html</a></b><br>
+ Important release notes about this version of Tix.
+ <p>
+
+
+ <li> <b><a href="license.terms">license.terms</a></b><br>
+ Licensing terms and a <b><i>disclaimer of all
+ liabilities</i></b>. You should use Tix only if you agree to
+ <i><b>all</b></i> of its licensing terms. <p>
+
+ <li> <b><a href="ChangeLog">ChangeLog</a></b><br>
+ A log of changes made to Tix.
+ <p>
+
+</ul>
+
+<h3> Build Instructions </h3>
+
+<ul>
+ <li> <b><a href="unix/README.txt">unix/README.txt</a></b><br>
+ Build instruction for Unix/Linux and OS X platforms.
+ <p>
+
+ <li> <b><a href="win/README.txt">win/README.txt</a></b><br>
+ Build instruction for Win32 platforms.
+ <p>
+
+</ul>
+
+<h3> Programming with Tix </h3>
+
+<ul>
+
+ <li> <b><a href="docs/html/TixUser/TixUser.html">
+ docs/html/TixUser/TixUser.html</a></b><br>
+
+ Tix Users's Guide. An introduction to Tix under Python or Tcl.<BR>
+ Also available in <A HREF="docs/pdf/TixUser.pdf">PDF</A>.
+ <p>
+
+ <li> <b><a href="docs/tix-book/tix.book.html">
+ docs/tix-book/tix.book.html</a></b><br>
+
+ Tix Programmer's Guide. It was written for Tix 4.0, but most
+ of its contents are still relevant for this version of Tix.
+ <p>
+
+ <li> <b><a href="man/html/contents.htm">man/html/contents.htm</a></b><br>
+ Tix Reference Manual.
+ <p>
+
+ <li> <b><a href="docs/FAQ.html">docs/FAQ.html</a></b><br>
+ Frequent Asked Questions about Tix.
+ <p>
+
+ <li> <b><a href="tools/README.html">tools/README.html</a></b><br>
+ Useful development tools included in this package
+ <p>
+
+</ul>
+
+<h3> Our Web Site </h3>
+
+ To contact the Tix Project Group, reach your fellow Tix users,
+ submit patches or bug reports, and find a range of other
+ information, please visit our web site at <a
+ href="http://tix.sourceforge.net"> http://tix.sourceforge.net
+ </a>.
+
+<hr>
+
+<a href=http://tix.sourceforge.net> Tix Home Page</a><br>
+</FONT>
+</BODY>
+</HTML>
Added: external/tix-8.4.2.x/library/Balloon.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Balloon.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,579 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Balloon.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+#
+# Balloon.tcl --
+#
+# The help widget. It provides both "balloon" type of help
+# message and "status bar" type of help message. You can use
+# this widget to indicate the function of the widgets inside
+# your application.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixBalloon {
+ -classname TixBalloon
+ -superclass tixShell
+ -method {
+ bind post unbind
+ }
+ -flag {
+ -installcolormap -initwait -state -statusbar -cursor
+ }
+ -configspec {
+ {-installcolormap installColormap InstallColormap false}
+ {-initwait initWait InitWait 1000}
+ {-state state State both}
+ {-statusbar statusBar StatusBar ""}
+ {-cursor cursor Cursor left_ptr}
+ }
+ -default {
+ {*background #ffff60}
+ {*foreground black}
+ {*borderWidth 0}
+ {.borderWidth 1}
+ {.background black}
+ {*Label.anchor w}
+ {*Label.justify left}
+ }
+}
+# static seem to be -installcolormap -initwait -statusbar -cursor
+
+# Class Record
+#
+global tixBalloon
+set tixBalloon(bals) ""
+
+proc tixBalloon:InitWidgetRec {w} {
+ upvar #0 $w data
+ global tixBalloon
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(isActive) 0
+ set data(client) ""
+
+ lappend tixBalloon(bals) $w
+}
+
+proc tixBalloon:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ wm overrideredirect $w 1
+ wm withdraw $w
+
+ # Frame 1 : arrow
+ frame $w.f1 -bd 0
+ set data(w:label) [label $w.f1.lab -bd 0 -relief flat \
+ -bitmap [tix getbitmap balarrow]]
+ pack $data(w:label) -side left -padx 1 -pady 1
+
+ # Frame 2 : Message
+ frame $w.f2 -bd 0
+ set data(w:message) [label $w.f2.message -padx 0 -pady 0 -bd 0]
+ pack $data(w:message) -side left -expand yes -fill both -padx 10 -pady 1
+
+ # Pack all
+ pack $w.f1 -fill both
+ pack $w.f2 -fill both
+
+ # This is an event tag used by the clients
+ #
+ bind TixBal$w <Destroy> [list tixBalloon:ClientDestroy $w %W]
+}
+
+proc tixBalloon:Destructor {w} {
+ global tixBalloon
+
+ set bals ""
+ foreach b $tixBalloon(bals) {
+ if {$w != $b} {
+ lappend bals $b
+ }
+ }
+ set tixBalloon(bals) $bals
+
+ tixChainMethod $w Destructor
+}
+
+#----------------------------------------------------------------------
+# Config:
+#----------------------------------------------------------------------
+proc tixBalloon:config-state {w value} {
+ upvar #0 $w data
+
+ set re {^(none|balloon|status|both)$}
+ if {![regexp -- $re $value]} {
+ error "invalid value $value, must be none, balloon, status, or both"
+ }
+}
+
+#----------------------------------------------------------------------
+# "RAW" event bindings:
+#----------------------------------------------------------------------
+
+bind all <B1-Motion> "+tixBalloon_XXMotion %X %Y 1"
+bind all <B2-Motion> "+tixBalloon_XXMotion %X %Y 2"
+bind all <B3-Motion> "+tixBalloon_XXMotion %X %Y 3"
+bind all <B4-Motion> "+tixBalloon_XXMotion %X %Y 4"
+bind all <B5-Motion> "+tixBalloon_XXMotion %X %Y 5"
+bind all <Any-Motion> "+tixBalloon_XXMotion %X %Y 0"
+# Should %b be 0? %b is illegal
+bind all <Leave> "+tixBalloon_XXMotion %X %Y 0"
+bind all <Button> "+tixBalloon_XXButton %X %Y %b"
+bind all <ButtonRelease> "+tixBalloon_XXButtonUp %X %Y %b"
+
+proc tixBalloon_XXMotion {rootX rootY b} {
+ global tixBalloon
+
+ foreach w $tixBalloon(bals) {
+ tixBalloon:XXMotion $w $rootX $rootY $b
+ }
+}
+
+proc tixBalloon_XXButton {rootX rootY b} {
+ global tixBalloon
+
+ foreach w $tixBalloon(bals) {
+ tixBalloon:XXButton $w $rootX $rootY $b
+ }
+}
+
+proc tixBalloon_XXButtonUp {rootX rootY b} {
+ global tixBalloon
+
+ foreach w $tixBalloon(bals) {
+ tixBalloon:XXButtonUp $w $rootX $rootY $b
+ }
+}
+
+# return true if d is a descendant of w
+#
+proc tixIsDescendant {w d} {
+ return [expr {$w eq "." || [string match $w.* $d]}]
+}
+
+# All the button events are fine if the ballooned widget is
+# a descendant of the grabbing widget
+#
+proc tixBalloon:GrabBad {w cw} {
+ global tixBalloon
+
+ set g [grab current $w]
+ if {$g == ""} {
+ return 0
+ }
+ if {[info exists tixBalloon(g_ignore,$g)]} {
+ return 1
+ }
+ if {[info exists tixBalloon(g_ignore,[winfo class $g])]} {
+ return 1
+ }
+ if {$g == $cw || [tixIsDescendant $g $cw]} {
+ return 0
+ }
+ return 1
+}
+
+proc tixBalloon:XXMotion {w rootX rootY b} {
+ upvar #0 $w data
+
+ if {![info exists data(-state)]} {
+ # puts "tixBalloon:XXMotion called without a state\n$w"
+ set data(state) none
+ return
+ }
+ if {$data(-state) eq "none"} {
+ return
+ }
+
+ if {$b == 0} {
+ if {[info exists data(b:1)]} {unset data(b:1)}
+ if {[info exists data(b:2)]} {unset data(b:2)}
+ if {[info exists data(b:3)]} {unset data(b:3)}
+ if {[info exists data(b:4)]} {unset data(b:4)}
+ if {[info exists data(b:5)]} {unset data(b:5)}
+ }
+
+ if {[llength [array names data b:*]]} {
+ # Some buttons are down. Do nothing
+ #
+ return
+ }
+
+ set cw [winfo containing -displayof $w $rootX $rootY]
+ if {[tixBalloon:GrabBad $w $cw]} {
+ return
+ }
+
+ # Find the a client window that matches
+ #
+ if {$w eq $cw || [string match $w.* $cw]} {
+ # Cursor moved over the balloon -- Ignore
+ return
+ }
+
+ while {$cw != ""} {
+ if {[info exists data(m:$cw)]} {
+ set client $cw
+ break
+ } else {
+ set cw [winfo parent $cw]
+ }
+ }
+ if {![info exists client]} {
+ # The cursor is at a position covered by a non-client
+ # Popdown the balloon if it is up
+ if {$data(isActive)} {
+ tixBalloon:Deactivate $w
+ }
+ set data(client) ""
+ if {[info exists data(cancel)]} {
+ unset data(cancel)
+ }
+ return
+ }
+
+ if {$data(client) ne $client} {
+ if {$data(isActive)} {
+ tixBalloon:Deactivate $w
+ }
+ set data(client) $client
+ after $data(-initwait) tixBalloon:SwitchToClient $w $client
+ }
+}
+
+proc tixBalloon:XXButton {w rootX rootY b} {
+ upvar #0 $w data
+
+ tixBalloon:XXMotion $w $rootX $rootY $b
+
+ set data(b:$b) 1
+
+ if {$data(isActive)} {
+ tixBalloon:Deactivate $w
+ } else {
+ set data(cancel) 1
+ }
+}
+
+proc tixBalloon:XXButtonUp {w rootX rootY b} {
+ upvar #0 $w data
+
+ tixBalloon:XXMotion $w $rootX $rootY $b
+ if {[info exists data(b:$b)]} {
+ unset data(b:$b)
+ }
+}
+
+#----------------------------------------------------------------------
+# "COOKED" event bindings:
+#----------------------------------------------------------------------
+
+# switch the balloon to a new client
+#
+proc tixBalloon:SwitchToClient {w client} {
+ upvar #0 $w data
+
+ if {![winfo exists $w]} {
+ return
+ }
+ if {![winfo exists $client]} {
+ return
+ }
+ if {$client ne $data(client)} {
+ return
+ }
+ if {[info exists data(cancel)]} {
+ unset data(cancel)
+ return
+ }
+
+ if {[tixBalloon:GrabBad $w $w]} {
+ return
+ }
+
+ tixBalloon:Activate $w
+}
+
+proc tixBalloon:ClientDestroy {w client} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ if {$data(client) eq $client} {
+ tixBalloon:Deactivate $w
+ set data(client) ""
+ }
+
+ # Maybe thses have already been unset by the Destroy method
+ #
+ if {[info exists data(m:$client)]} {unset data(m:$client)}
+ if {[info exists data(s:$client)]} {unset data(s:$client)}
+}
+
+#----------------------------------------------------------------------
+# Popping up balloon:
+#----------------------------------------------------------------------
+proc tixBalloon:Activate {w} {
+ upvar #0 $w data
+
+ if {[tixBalloon:GrabBad $w $w]} {
+ return
+ }
+ if {[winfo containing -displayof $w \
+ [winfo pointerx $w] [winfo pointery $w]] == ""} {
+ return
+ }
+
+ if {![info exists data(-state)]} {
+ # puts "tixBalloon:Activate called without a state\n$w"
+ set data(state) none
+ return
+ }
+ if {$data(-state) eq "none"} {
+ return
+ }
+
+ switch -exact -- $data(-state) {
+ "both" {
+ tixBalloon:PopUp $w
+ tixBalloon:SetStatus $w
+ }
+ "balloon" {
+ tixBalloon:PopUp $w
+ }
+ "status" {
+ tixBalloon:SetStatus $w
+ }
+ }
+
+ set data(isActive) 1
+
+ after 200 tixBalloon:Verify $w
+}
+
+
+# %% Perhaps this is no more needed
+#
+proc tixBalloon:Verify {w} {
+ upvar #0 $w data
+
+ if {![winfo exists $w]} {
+ return
+ }
+ if {!$data(isActive)} {
+ return
+ }
+
+ if {[tixBalloon:GrabBad $w $w]} {
+ tixBalloon:Deactivate $w
+ return
+ }
+ if {[winfo containing -displayof $w \
+ [winfo pointerx $w] [winfo pointery $w]] == ""} {
+ tixBalloon:Deactivate $w
+ return
+ }
+ after 200 tixBalloon:Verify $w
+}
+
+proc tixBalloon:Deactivate {w} {
+ upvar #0 $w data
+
+ tixBalloon:PopDown $w
+ tixBalloon:ClearStatus $w
+ set data(isActive) 0
+ if {[info exists data(cancel)]} {
+ unset data(cancel)
+ }
+}
+
+proc tixBalloon:PopUp {w} {
+ upvar #0 $w data
+
+ if {[string is true -strict $data(-installcolormap)]} {
+ wm colormapwindows [winfo toplevel $data(client)] $w
+ }
+
+ # trick: the following lines allow the balloon window to
+ # acquire a stable width and height when it is finally
+ # put on the visible screen
+ #
+ set client $data(client)
+ if {$data(m:$client) == ""} {return ""}
+
+ $data(w:message) config -text $data(m:$client)
+ wm geometry $w +10000+10000
+ wm deiconify $w
+ raise $w
+ update
+
+ # The windows may become destroyed as a result of the "update" command
+ #
+ if {![winfo exists $w]} {
+ return
+ }
+ if {![winfo exists $client]} {
+ return
+ }
+ # Put it on the visible screen
+ #
+ set x [expr {[winfo rootx $client]+[winfo width $client]/2}]
+ set y [expr {int([winfo rooty $client]+[winfo height $client]/1.3)}]
+
+ set width [winfo reqwidth $w]
+ set height [winfo reqheight $w]
+ set scrwidth [winfo vrootwidth $w]
+ set scrheight [winfo vrootheight $w]
+
+ # If the balloon is too far right, pull it back to the left
+ #
+ if {($x + $width) > $scrwidth} {
+ set x [expr {$scrwidth - $width}]
+ }
+
+ # If the balloon is too far left, pull it back to the right
+ #
+ if {$x < 0} {
+ set x 0
+ }
+
+ # If the listbox is below bottom of screen, put it upwards
+ #
+ if {($y + $height) > $scrheight} {
+ set y [expr {$scrheight-$height}]
+ }
+ if {$y < 0} {
+ set y 0
+ }
+
+ wm geometry $w +$x+$y
+ after idle raise $w
+}
+
+proc tixBalloon:PopDown {w} {
+ upvar #0 $w data
+
+ # Close the balloon
+ #
+ wm withdraw $w
+
+ # We don't set the data(client) to be zero, so that the balloon
+ # will re-appear only if you move out then in the client window
+ # set data(client) ""
+}
+
+proc tixBalloon:SetStatus {w} {
+ upvar #0 $w data
+
+ if {![winfo exists $data(-statusbar)]
+ || ![info exists data(s:$data(client))]} {
+ return
+ }
+
+ set vv [$data(-statusbar) cget -textvariable]
+ if {$vv == ""} {
+ $data(-statusbar) config -text $data(s:$data(client))
+ } else {
+ uplevel #0 set $vv [list $data(s:$data(client))]
+ }
+}
+
+proc tixBalloon:ClearStatus {w} {
+ upvar #0 $w data
+
+ if {![winfo exists $data(-statusbar)]} {
+ return
+ }
+
+ # Clear the StatusBar widget
+ #
+ set vv [$data(-statusbar) cget -textvariable]
+ if {$vv == ""} {
+ $data(-statusbar) config -text ""
+ } else {
+ uplevel #0 set $vv [list ""]
+ }
+}
+
+#----------------------------------------------------------------------
+# PublicMethods:
+#----------------------------------------------------------------------
+
+# %% if balloon is already popped-up for this client, change mesage
+#
+proc tixBalloon:bind {w client args} {
+ upvar #0 $w data
+
+ set alreadyBound [info exists data(m:$client)]
+
+ set opt(-balloonmsg) ""
+ set opt(-statusmsg) ""
+ set opt(-msg) ""
+
+ tixHandleOptions opt {-balloonmsg -msg -statusmsg} $args
+
+ if {$opt(-balloonmsg) != ""} {
+ set data(m:$client) $opt(-balloonmsg)
+ } else {
+ set data(m:$client) $opt(-msg)
+ }
+ if {$opt(-statusmsg) != ""} {
+ set data(s:$client) $opt(-statusmsg)
+ } else {
+ set data(s:$client) $opt(-msg)
+ }
+
+ tixAppendBindTag $client TixBal$w
+}
+
+proc tixBalloon:post {w client} {
+ upvar #0 $w data
+
+ if {![info exists data(m:$client)] || $data(m:$client) == ""} {
+ return
+ }
+ tixBalloon:Enter $w $client
+ incr data(fakeEnter)
+}
+
+proc tixBalloon:unbind {w client} {
+ upvar #0 $w data
+
+ if {[info exists data(m:$client)]} {
+ if {[info exists data(m:$client)]} {unset data(m:$client)}
+ if {[info exists data(s:$client)]} {unset data(s:$client)}
+
+ if {[winfo exists $client]} {
+ catch {tixDeleteBindTag $client TixBal$w}
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Utility function
+#
+#----------------------------------------------------------------------
+#
+# $w can be a widget name or a classs name
+proc tixBalIgnoreWhenGrabbed {wc} {
+ global tixBalloon
+ set tixBalloon(g_ignore,$wc) ""
+}
+
+tixBalIgnoreWhenGrabbed TixComboBox
+tixBalIgnoreWhenGrabbed Menu
+tixBalIgnoreWhenGrabbed Menubutton
Added: external/tix-8.4.2.x/library/BtnBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/BtnBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,120 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: BtnBox.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# BtnBox.tcl --
+#
+# Implements the tixButtonBox widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixButtonBox {
+ -superclass tixPrimitive
+ -classname TixButtonBox
+ -method {
+ add invoke button buttons
+ }
+ -flag {
+ -orientation -orient -padx -pady -state
+ }
+ -static {
+ -orientation
+ }
+ -configspec {
+ {-orientation orientation Orientation horizontal}
+ {-padx padX Pad 0}
+ {-pady padY Pad 0}
+ {-state state State normal}
+ }
+ -alias {
+ {-orient -orientation}
+ }
+ -default {
+ {.borderWidth 1}
+ {.relief raised}
+ {.padX 5}
+ {.padY 10}
+ {*Button.anchor c}
+ {*Button.padX 5}
+ }
+}
+
+proc tixButtonBox:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(g:buttons) ""
+}
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixButtonBox:config-padx {w arg} {
+ upvar #0 $w data
+
+ foreach item $data(g:buttons) {
+ pack configure $w.$item -padx $arg
+ }
+}
+
+proc tixButtonBox:config-pady {w arg} {
+ upvar #0 $w data
+
+ foreach item $data(g:buttons) {
+ pack configure $w.$item -pady $arg
+ }
+}
+
+proc tixButtonBox:config-state {w arg} {
+ upvar #0 $w data
+
+ foreach item $data(g:buttons) {
+ $w.$item config -state $arg
+ }
+}
+
+#----------------------------------------------------------------------
+# Methods
+# WIDGET COMMANDS
+#----------------------------------------------------------------------
+proc tixButtonBox:add {w name args} {
+ upvar #0 $w data
+
+ eval button $w.$name $args
+ if {$data(-orientation) == "horizontal"} {
+ pack $w.$name -side left -expand yes -fill y\
+ -padx $data(-padx) -pady $data(-pady)
+ } else {
+ pack $w.$name -side top -expand yes -fill x\
+ -padx $data(-padx) -pady $data(-pady)
+ }
+
+ # allow for subwidget access
+ #
+ lappend data(g:buttons) $name
+ set data(w:$name) $w.$name
+
+ return $w.$name
+}
+
+proc tixButtonBox:button {w name args} {
+ return [eval tixCallMethod $w subwidget $name $args]
+}
+
+proc tixButtonBox:buttons {w args} {
+ return [eval tixCallMethod $w subwidgets -group buttons $args]
+}
+
+#
+# call the command
+proc tixButtonBox:invoke {w name} {
+ upvar #0 $w data
+
+ $w.$name invoke
+}
Added: external/tix-8.4.2.x/library/CObjView.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/CObjView.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,360 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CObjView.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# CObjView.tcl --
+#
+# This file implements the Canvas Object View widget. This is a base
+# class of IconView. It implements:
+
+# (1) Automatic placement/adjustment of the scrollbars according
+# to the canvas objects inside the canvas subwidget. The
+# scrollbars are adjusted so that the canvas is just large
+# enough to see all the objects.
+#
+# (2) D+D bindings of the objects (%% not implemented)
+#
+# (3) Keyboard traversal of the objects (%% not implemented). By the
+# virtual method :SelectObject.
+#
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixCObjView {
+ -classname TixCObjView
+ -superclass tixScrolledWidget
+ -method {
+ adjustscrollregion
+ }
+ -flag {
+ -xscrollincrement -yscrollincrement
+ }
+ -static {
+ }
+ -configspec {
+ {-xscrollincrement xScrollIncrement ScrollIncrement 10}
+ {-yscrollincrement yScrollIncrement ScrollIncrement 10}
+ }
+ -default {
+ {.scrollbar auto}
+ {*borderWidth 1}
+ {*canvas.background #c3c3c3}
+ {*canvas.highlightBackground #d9d9d9}
+ {*canvas.relief sunken}
+ {*canvas.takeFocus 1}
+ {*Scrollbar.takeFocus 0}
+ }
+ -forcecall {
+ -scrollbar
+ }
+}
+
+proc tixCObjView:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:canvas) \
+ [canvas $w.canvas]
+ set data(w:hsb) \
+ [scrollbar $w.hsb -orient horizontal]
+ set data(w:vsb) \
+ [scrollbar $w.vsb -orient vertical]
+
+ set data(pw:client) $data(w:canvas)
+
+ set data(xorig) 0
+ set data(yorig) 0
+
+ set data(sx1) 0
+ set data(sy1) 0
+ set data(sx2) 0
+ set data(sy2) 0
+}
+
+proc tixCObjView:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+# %% scan/drag of canvas??
+#
+# $data(w:canvas) config \
+# -xscrollcommand "tixCObjView:XScroll $w"\
+# -yscrollcommand "tixCObjView:YScroll $w"
+
+ $data(w:hsb) config -command "tixCObjView:UserScroll $w x"
+ $data(w:vsb) config -command "tixCObjView:UserScroll $w y"
+}
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+proc tixCObjView:config-takefocus {w value} {
+ upvar #0 $w data
+
+ $data(w:canvas) config -takefocus $value
+}
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+proc tixCObjView:adjustscrollregion {w} {
+ upvar #0 $w data
+
+ set cW [tixWinWidth $data(w:canvas)]
+ set cH [tixWinHeight $data(w:canvas)]
+
+ tixCObjView:GetScrollRegion $w $cW $cH 1 1
+}
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+
+proc tixCObjView:GeometryInfo {w cW cH} {
+ upvar #0 $w data
+
+ set bd \
+ [expr [$data(w:canvas) cget -bd] + [$data(w:canvas) cget -highlightthickness]]
+
+ incr cW -[expr {2*$bd}]
+ incr cH -[expr {2*$bd}]
+
+ return [tixCObjView:GetScrollRegion $w $cW $cH 0 0]
+}
+
+proc tixCObjView:PlaceWindow {w} {
+ upvar #0 $w data
+
+ set cW [tixWinWidth $data(w:canvas)]
+ set cH [tixWinHeight $data(w:canvas)]
+
+ tixCObjView:GetScrollRegion $w $cW $cH 1 0
+
+ tixChainMethod $w PlaceWindow
+}
+
+proc tixCObjView:GetScrollRegion {w cW cH setReg callConfig} {
+ upvar #0 $w data
+
+ set x1max $data(xorig)
+ set y1max $data(yorig)
+
+ set x2min [expr {$x1max + $cW - 1}]
+ set y2min [expr {$y1max + $cH - 1}]
+
+ set bbox [$data(w:canvas) bbox all]
+
+ if {$bbox == ""} {
+ set bbox {0 0 1 1}
+ }
+
+ set x1 [lindex $bbox 0]
+ set y1 [lindex $bbox 1]
+ set x2 [lindex $bbox 2]
+ set y2 [lindex $bbox 3]
+
+ set bd \
+ [expr [$data(w:canvas) cget -bd] + [$data(w:canvas) cget -highlightthickness]]
+
+ incr x1 -$bd
+ incr y1 -$bd
+ incr x2 -$bd
+ incr y2 -$bd
+
+ if {$x1 > $x1max} {
+ set x1 $x1max
+ }
+ if {$y1 > $y1max} {
+ set y1 $y1max
+ }
+ if {$x2 < $x2min} {
+ set x2 $x2min
+ }
+ if {$y2 < $y2min} {
+ set y2 $y2min
+ }
+
+ set data(sx1) $x1
+ set data(sy1) $y1
+ set data(sx2) $x2
+ set data(sy2) $y2
+
+ set sW [expr {$x2 - $x1 + 1}]
+ set sH [expr {$y2 - $y1 + 1}]
+
+# puts "sregion = {$x1 $y1 $x2 $y2}; sW=$sW; cW=$cW"
+
+ if {$sW > $cW} {
+ set hsbSpec {0.5 1}
+ } else {
+ set hsbSpec {0 1}
+ }
+ if {$sH > $cH} {
+ set vsbSpec {0.5 1}
+ } else {
+ set vsbSpec {0 1}
+ }
+
+ if $setReg {
+ tixCObjView:SetScrollBars $w $cW $cH $sW $sH
+ }
+ if $callConfig {
+ tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+ }
+
+ return [list $hsbSpec $vsbSpec]
+}
+
+#xF = xFirst
+#
+proc tixCObjView:SetScrollBars {w cW cH sW sH} {
+ upvar #0 $w data
+
+# puts "$data(xorig) <--> $data(sx1)"
+
+ set xF [expr ($data(xorig).0-$data(sx1).0)/$sW.0]
+ set xL [expr $cW.0/$sW.0 + $xF]
+
+ set yF [expr ($data(yorig).0-$data(sy1).0)/$sH.0]
+ set yL [expr $cH.0/$sH.0 + $yF]
+
+# puts "$xF $xL : $yF $yL"
+ $data(w:hsb) set $xF $xL
+ $data(w:vsb) set $yF $yL
+}
+
+proc tixCObjView:UserScroll {w dir type args} {
+ upvar #0 $w data
+
+ $data(w:canvas) config -xscrollincrement 1 -yscrollincrement 1
+
+ case $dir {
+ x {
+ set n $data(xorig)
+ set orig $data(xorig)
+ set s1 $data(sx1)
+ set total [expr {$data(sx2)-$data(sx1)}]
+ set page [tixWinWidth $data(w:canvas)]
+ set min $data(sx1)
+ set max [expr {$data(sx1)+$total-$page}]
+ set inc $data(-xscrollincrement)
+ }
+ y {
+ set n $data(yorig)
+ set orig $data(yorig)
+ set s1 $data(sy1)
+ set total [expr {$data(sy2)-$data(sy1)}]
+ set page [tixWinHeight $data(w:canvas)]
+ set min $data(sy1)
+ set max [expr {$data(sy1)+$total-$page}]
+ set inc $data(-yscrollincrement)
+ }
+ }
+
+ case $type {
+ scroll {
+ set amt [lindex $args 0]
+ set unit [lindex $args 1]
+
+ case $unit {
+ units {
+ incr n [expr int($inc)*$amt]
+ }
+ pages {
+ incr n [expr {$page*$amt}]
+ }
+ }
+ }
+ moveto {
+ set first [lindex $args 0]
+ set n [expr round($first*$total)+$s1]
+ }
+ }
+
+ if {$n < $min} {
+ set n $min
+ }
+ if {$n > $max} {
+ set n $max
+ }
+
+# puts "n=$n min=$min max=$max"
+
+ case $dir {
+ x {
+ $data(w:canvas) xview scroll [expr {$n-$orig}] units
+ set data(xorig) $n
+ }
+ y {
+ $data(w:canvas) yview scroll [expr {$n-$orig}] units
+ set data(yorig) $n
+ }
+ }
+
+ set cW [tixWinWidth $data(w:canvas)]
+ set cH [tixWinHeight $data(w:canvas)]
+ set sW [expr {$data(sx2)-$data(sx1)+1}]
+ set sH [expr {$data(sy2)-$data(sy1)+1}]
+
+ tixCObjView:SetScrollBars $w $cW $cH $sW $sH
+}
+
+# Junk
+#
+#
+proc tixCObjView:XScroll {w first last} {
+ upvar #0 $w data
+
+ set sc [$data(w:canvas) cget -scrollregion]
+ if {$sc == ""} {
+ set x1 1
+ set x2 [tixWinWidth $data(w:canvas)]
+ } else {
+ set x1 [lindex $sc 0]
+ set x2 [lindex $sc 2]
+ }
+
+ set W [expr {$x2 - $x1}]
+ if {$W < 1} {
+ set W 1
+ }
+
+ $data(w:hsb) set $first $last
+
+# tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+}
+
+# Junk
+#
+proc tixCObjView:YScroll {w first last} {
+ upvar #0 $w data
+
+ set sc [$data(w:canvas) cget -scrollregion]
+
+ if {$sc == ""} {
+ set y1 1
+ set y2 [tixWinHeight $data(w:canvas)]
+ } else {
+ set y1 [lindex $sc 1]
+ set y2 [lindex $sc 3]
+ }
+
+ set H [expr {$y2 - $y1}]
+ if {$H < 1} {
+ set H 1
+ }
+
+ $data(w:vsb) set $first $last
+
+# tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+}
Added: external/tix-8.4.2.x/library/ChkList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/ChkList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,239 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ChkList.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+#
+# ChkList.tcl --
+#
+# This file implements the TixCheckList widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixCheckList {
+ -classname TixCheckList
+ -superclass tixTree
+ -method {
+ getselection getstatus setstatus
+ }
+ -flag {
+ -radio
+ }
+ -configspec {
+ {-radio radio Radio false tixVerifyBoolean}
+
+ {-ignoreinvoke ignoreInvoke IgnoreInvoke true tixVerifyBoolean}
+ }
+ -static {
+ -radio
+ }
+ -default {
+ {.scrollbar auto}
+ {.doubleClick false}
+ {*Scrollbar.takeFocus 0}
+ {*borderWidth 1}
+ {*hlist.background #c3c3c3}
+ {*hlist.drawBranch 1}
+ {*hlist.height 10}
+ {*hlist.highlightBackground #d9d9d9}
+ {*hlist.indicator 1}
+ {*hlist.indent 20}
+ {*hlist.itemType imagetext}
+ {*hlist.padX 3}
+ {*hlist.padY 0}
+ {*hlist.relief sunken}
+ {*hlist.takeFocus 1}
+ {*hlist.wideSelection 0}
+ {*hlist.width 20}
+ }
+}
+
+proc tixCheckList:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ if {$data(-radio)} {
+ set data(selected) ""
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#
+#----------------------------------------------------------------------
+
+# Helper function for getselection
+#
+proc tixCheckList:GetSel {w var ent mode} {
+ upvar #0 $w data
+ upvar $var img
+
+ set ents ""
+
+ catch {
+ if {[$data(w:hlist) entrycget $ent -bitmap] eq $img($mode)} {
+ lappend ents $ent
+ }
+ }
+
+ foreach child [$data(w:hlist) info children $ent] {
+ set ents [concat $ents [tixCheckList:GetSel $w img $child $mode]]
+ }
+
+ return $ents
+}
+
+
+# Mode can be on, off, default
+#
+proc tixCheckList:getselection {w {mode on}} {
+ upvar #0 $w data
+
+ set img(on) [tix getbitmap ck_on]
+ set img(off) [tix getbitmap ck_off]
+ set img(default) [tix getbitmap ck_def]
+
+ set ents ""
+ foreach child [$data(w:hlist) info children] {
+ set ents [concat $ents [tixCheckList:GetSel $w img $child $mode]]
+ }
+ return $ents
+}
+
+proc tixCheckList:getstatus {w ent} {
+ upvar #0 $w data
+
+ if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
+ set img(on) [tix getbitmap ck_on]
+ set img(off) [tix getbitmap ck_off]
+ set img(default) [tix getbitmap ck_def]
+
+ set bitmap [$data(w:hlist) entrycget $ent -bitmap]
+
+ if {$bitmap eq $img(on)} {
+ set status on
+ }
+ if {$bitmap eq $img(off)} {
+ set status off
+ }
+ if {$bitmap eq $img(default)} {
+ set status default
+ }
+ }
+
+ if {[info exists status]} {
+ return $status
+ } else {
+ return "none"
+ }
+}
+
+proc tixCheckList:setstatus {w ent {mode on}} {
+ upvar #0 $w data
+
+ if {$data(-radio)} {
+ set status [tixCheckList:getstatus $w $ent]
+
+ if {$status eq $mode} {
+ return
+ }
+
+ if {$mode eq "on"} {
+ if {$data(selected) != ""} {
+ tixCheckList:Select $w $data(selected) off
+ }
+ set data(selected) $ent
+ tixCheckList:Select $w $ent $mode
+ } elseif {$mode eq "off"} {
+ if {$data(selected) eq $ent} {
+ return
+ }
+ tixCheckList:Select $w $ent $mode
+ } else {
+ tixCheckList:Select $w $ent $mode
+ }
+ } else {
+ tixCheckList:Select $w $ent $mode
+ }
+}
+
+proc tixCheckList:Select {w ent mode} {
+ upvar #0 $w data
+
+ if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
+ set img(on) ck_on
+ set img(off) ck_off
+ set img(default) ck_def
+
+ if [catch {
+ set bitmap [tix getbitmap $img($mode)]
+ $data(w:hlist) entryconfig $ent -bitmap $bitmap
+ }] {
+ # must be the "none" mode
+ #
+ catch {
+ $data(w:hlist) entryconfig $ent -bitmap ""
+ }
+ }
+ }
+
+ return $mode
+}
+
+proc tixCheckList:HandleCheck {w ent} {
+ upvar #0 $w data
+
+ if {[$data(w:hlist) entrycget $ent -itemtype] eq "imagetext"} {
+ set img(on) [tix getbitmap ck_on]
+ set img(off) [tix getbitmap ck_off]
+ set img(default) [tix getbitmap ck_def]
+
+ set curMode [tixCheckList:getstatus $w $ent]
+
+ case $curMode {
+ on {
+ tixCheckList:setstatus $w $ent off
+ }
+ off {
+ tixCheckList:setstatus $w $ent on
+ }
+ none {
+ return
+ }
+ default {
+ tixCheckList:setstatus $w $ent on
+ }
+ }
+ }
+}
+
+proc tixCheckList:Command {w B} {
+ upvar #0 $w data
+ upvar $B bind
+
+ set ent [tixEvent flag V]
+ tixCheckList:HandleCheck $w $ent
+
+ tixChainMethod $w Command $B
+}
+
+proc tixCheckList:BrowseCmd {w B} {
+ upvar #0 $w data
+ upvar $B bind
+
+ set ent [tixEvent flag V]
+
+ case [tixEvent type] {
+ {<ButtonPress-1> <space>} {
+ tixCheckList:HandleCheck $w $ent
+ }
+ }
+
+ tixChainMethod $w BrowseCmd $B
+}
Added: external/tix-8.4.2.x/library/ComboBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/ComboBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1558 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ComboBox.tcl,v 1.8 2004/03/28 02:44:57 hobbs Exp $
+#
+# tixCombobox --
+#
+# A combobox widget is basically a listbox widget with an entry
+# widget.
+#
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+global tkPriv
+if {![llength [info globals tkPriv]]} {
+ tk::unsupported::ExposePrivateVariable tkPriv
+}
+#--------------------------------------------------------------------------
+# tkPriv elements used in this file:
+#
+# afterId - Token returned by "after" for autoscanning.
+#--------------------------------------------------------------------------
+#
+foreach fun {tkCancelRepeat tkListboxUpDown tkButtonUp} {
+ if {![llength [info commands $fun]]} {
+ tk::unsupported::ExposePrivateCommand $fun
+ }
+}
+unset fun
+
+tixWidgetClass tixComboBox {
+ -classname TixComboBox
+ -superclass tixLabelWidget
+ -method {
+ addhistory align appendhistory flash invoke insert pick popdown
+ }
+ -flag {
+ -anchor -arrowbitmap -browsecmd -command -crossbitmap
+ -disablecallback -disabledforeground -dropdown -editable
+ -fancy -grab -histlimit -historylimit -history -listcmd
+ -listwidth -prunehistory -selection -selectmode -state
+ -tickbitmap -validatecmd -value -variable
+ }
+ -static {
+ -dropdown -fancy
+ }
+ -forcecall {
+ -variable -selectmode -state
+ }
+ -configspec {
+ {-arrowbitmap arrowBitmap ArrowBitmap ""}
+ {-anchor anchor Anchor w}
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-crossbitmap crossBitmap CrossBitmap ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-disabledforeground disabledForeground DisabledForeground #606060}
+ {-dropdown dropDown DropDown true tixVerifyBoolean}
+ {-editable editable Editable false tixVerifyBoolean}
+ {-fancy fancy Fancy false tixVerifyBoolean}
+ {-grab grab Grab global}
+ {-listcmd listCmd ListCmd ""}
+ {-listwidth listWidth ListWidth ""}
+ {-historylimit historyLimit HistoryLimit ""}
+ {-history history History false tixVerifyBoolean}
+ {-prunehistory pruneHistory PruneHistory true tixVerifyBoolean}
+ {-selectmode selectMode SelectMode browse}
+ {-selection selection Selection ""}
+ {-state state State normal}
+ {-validatecmd validateCmd ValidateCmd ""}
+ {-value value Value ""}
+ {-variable variable Variable ""}
+ {-tickbitmap tickBitmap TickBitmap ""}
+ }
+ -alias {
+ {-histlimit -historylimit}
+ }
+ -default {
+ {*Entry.relief sunken}
+ {*TixScrolledListBox.scrollbar auto}
+ {*Listbox.exportSelection false}
+ {*Listbox.takeFocus false}
+ {*shell.borderWidth 2}
+ {*shell.relief raised}
+ {*shell.cursor arrow}
+ {*Button.anchor c}
+ {*Button.borderWidth 1}
+ {*Button.highlightThickness 0}
+ {*Button.padX 0}
+ {*Button.padY 0}
+ {*tick.width 18}
+ {*tick.height 18}
+ {*cross.width 18}
+ {*cross.height 18}
+ {*arrow.anchor c}
+ {*arrow.width 15}
+ {*arrow.height 18}
+ }
+}
+
+# States: normal numbers: for dropdown style
+# d+digit(s) : for non-dropdown style
+#
+proc tixComboBox:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(curIndex) ""
+ set data(varInited) 0
+ set data(state) none
+ set data(ignore) 0
+
+ if {$data(-history)} {
+ set data(-editable) 1
+ }
+
+ if {$data(-arrowbitmap) eq ""} {
+ set data(-arrowbitmap) [tix getbitmap cbxarrow]
+ }
+ if {$data(-crossbitmap) eq ""} {
+ set data(-crossbitmap) [tix getbitmap cross]
+ }
+ if {$data(-tickbitmap) eq ""} {
+ set data(-tickbitmap) [tix getbitmap tick]
+ }
+}
+
+proc tixComboBox:ConstructFramedWidget {w frame} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructFramedWidget $frame
+
+ if {$data(-dropdown)} {
+ tixComboBox:ConstructEntryFrame $w $frame
+ tixComboBox:ConstructListShell $w
+ } else {
+ set f1 [frame $frame.f1]
+ set f2 [frame $frame.f2]
+
+ tixComboBox:ConstructEntryFrame $w $f1
+ tixComboBox:ConstructListFrame $w $f2
+ pack $f1 -side top -pady 2 -fill x
+ pack $f2 -side top -pady 2 -fill both -expand yes
+ }
+}
+
+proc tixComboBox:ConstructEntryFrame {w frame} {
+ upvar #0 $w data
+
+ # (1) The entry
+ #
+ set data(w:entry) [entry $frame.entry]
+
+ if {!$data(-editable)} {
+ set bg [$w cget -bg]
+ $data(w:entry) config -bg $bg -state disabled -takefocus 1
+ }
+
+ # This is used during "config-state"
+ #
+ set data(entryfg) [$data(w:entry) cget -fg]
+
+ # (2) The dropdown button, not necessary when not in dropdown mode
+ #
+ set data(w:arrow) [button $frame.arrow -bitmap $data(-arrowbitmap)]
+ if {!$data(-dropdown)} {
+ set xframe [frame $frame.xframe -width 19]
+ }
+
+ # (3) The fancy tick and cross buttons
+ #
+ if {$data(-fancy)} {
+ if {$data(-editable)} {
+ set data(w:cross) [button $frame.cross -bitmap $data(-crossbitmap)]
+ set data(w:tick) [button $frame.tick -bitmap $data(-tickbitmap)]
+
+ pack $frame.cross -side left -padx 1
+ pack $frame.tick -side left -padx 1
+ } else {
+ set data(w:tick) [button $frame.tick -bitmap $data(-tickbitmap)]
+ pack $frame.tick -side left -padx 1
+ }
+ }
+
+ if {$data(-dropdown)} {
+ pack $data(w:arrow) -side right -padx 1
+ foreach wid [list $data(w:frame) $data(w:label)] {
+ tixAddBindTag $wid TixComboWid
+ tixSetMegaWidget $wid $w TixComboBox
+ }
+ } else {
+ pack $xframe -side right -padx 1
+ }
+ pack $frame.entry -side right -fill x -expand yes -padx 1
+}
+
+proc tixComboBox:ConstructListShell {w} {
+ upvar #0 $w data
+
+ # Create the shell and the list
+ #------------------------------
+ set data(w:shell) [menu $w.shell -bd 2 -relief raised -tearoff 0]
+ wm overrideredirect $data(w:shell) 1
+ wm withdraw $data(w:shell)
+
+ set data(w:slistbox) [tixScrolledListBox $data(w:shell).slistbox \
+ -anchor $data(-anchor) -scrollbarspace y \
+ -options {listbox.selectMode "browse"}]
+
+ set data(w:listbox) [$data(w:slistbox) subwidget listbox]
+
+ pack $data(w:slistbox) -expand yes -fill both -padx 2 -pady 2
+}
+
+proc tixComboBox:ConstructListFrame {w frame} {
+ upvar #0 $w data
+
+ set data(w:slistbox) [tixScrolledListBox $frame.slistbox \
+ -anchor $data(-anchor)]
+
+ set data(w:listbox) [$data(w:slistbox) subwidget listbox]
+
+ pack $data(w:slistbox) -expand yes -fill both
+}
+
+
+proc tixComboBox:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ # (1) Fix the bindings for the combobox
+ #
+ bindtags $w [list $w TixComboBox [winfo toplevel $w] all]
+
+ # (2) The entry subwidget
+ #
+ tixSetMegaWidget $data(w:entry) $w TixComboBox
+
+ bindtags $data(w:entry) [list $data(w:entry) Entry TixComboEntry\
+ TixComboWid [winfo toplevel $data(w:entry)] all]
+
+ # (3) The listbox and slistbox
+ #
+ $data(w:slistbox) config -browsecmd \
+ [list tixComboBox:LbBrowse $w]
+ $data(w:slistbox) config -command\
+ [list tixComboBox:LbCommand $w]
+ $data(w:listbox) config -takefocus 0
+
+ tixAddBindTag $data(w:listbox) TixComboLb
+ tixAddBindTag $data(w:slistbox) TixComboLb
+ tixSetMegaWidget $data(w:listbox) $w TixComboBox
+ tixSetMegaWidget $data(w:slistbox) $w TixComboBox
+
+ # (4) The buttons
+ #
+ if {$data(-dropdown)} {
+ $data(w:arrow) config -takefocus 0
+ tixAddBindTag $data(w:arrow) TixComboArrow
+ tixSetMegaWidget $data(w:arrow) $w TixComboBox
+
+ bind $data(w:root) <1> [list tixComboBox:RootDown $w]
+ bind $data(w:root) <ButtonRelease-1> [list tixComboBox:RootUp $w]
+ }
+
+ if {$data(-fancy)} {
+ if {$data(-editable)} {
+ $data(w:cross) config -command [list tixComboBox:CrossBtn $w] \
+ -takefocus 0
+ }
+ $data(w:tick) config -command [list tixComboBox:Invoke $w] -takefocus 0
+ }
+
+ if {$data(-dropdown)} {
+ set data(state) 0
+ } else {
+ set data(state) n0
+ }
+}
+
+proc tixComboBoxBind {} {
+ #----------------------------------------------------------------------
+ # The class bindings for the TixComboBox
+ #
+ tixBind TixComboBox <Escape> {
+ if {[tixComboBox:EscKey %W]} {
+ break
+ }
+ }
+ tixBind TixComboBox <Configure> {
+ tixWidgetDoWhenIdle tixComboBox:align %W
+ }
+ # Only the two "linear" detail_fields are for tabbing (moving) among
+ # widgets inside the same toplevel. Other detail_fields are sort
+ # of irrelevant
+ #
+ tixBind TixComboBox <FocusOut> {
+ if {[string equal %d NotifyNonlinear] ||
+ [string equal %d NotifyNonlinearVirtual]} {
+
+ if {[info exists %W(cancelTab)]} {
+ unset %W(cancelTab)
+ } else {
+ if {[set %W(-state)] ne "disabled"} {
+ if {[set %W(-selection)] ne [set %W(-value)]} {
+ tixComboBox:Invoke %W
+ }
+ }
+ }
+ }
+ }
+ tixBind TixComboBox <FocusIn> {
+ if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
+ focus [%W subwidget entry]
+
+ # CYGNUS: Setting the selection if there is no data
+ # causes backspace to misbehave.
+ if {[[set %W(w:entry)] get] ne ""} {
+ [set %W(w:entry)] selection from 0
+ [set %W(w:entry)] selection to end
+ }
+
+ }
+ }
+
+ #----------------------------------------------------------------------
+ # The class tixBindings for the arrow button widget inside the TixComboBox
+ #
+
+ tixBind TixComboArrow <1> {
+ tixComboBox:ArrowDown [tixGetMegaWidget %W TixComboBox]
+ }
+ tixBind TixComboArrow <ButtonRelease-1> {
+ tixComboBox:ArrowUp [tixGetMegaWidget %W TixComboBox]
+ }
+ tixBind TixComboArrow <Escape> {
+ if {[tixComboBox:EscKey [tixGetMegaWidget %W TixComboBox]]} {
+ break
+ }
+ }
+
+
+ #----------------------------------------------------------------------
+ # The class tixBindings for the entry widget inside the TixComboBox
+ #
+ tixBind TixComboEntry <Up> {
+ tixComboBox:EntDirKey [tixGetMegaWidget %W TixComboBox] up
+ }
+ tixBind TixComboEntry <Down> {
+ tixComboBox:EntDirKey [tixGetMegaWidget %W TixComboBox] down
+ }
+ tixBind TixComboEntry <Prior> {
+ tixComboBox:EntDirKey [tixGetMegaWidget %W TixComboBox] pageup
+ }
+ tixBind TixComboEntry <Next> {
+ tixComboBox:EntDirKey [tixGetMegaWidget %W TixComboBox] pagedown
+ }
+ tixBind TixComboEntry <Return> {
+ tixComboBox:EntReturnKey [tixGetMegaWidget %W TixComboBox]
+ }
+ tixBind TixComboEntry <KeyPress> {
+ tixComboBox:EntKeyPress [tixGetMegaWidget %W TixComboBox]
+ }
+ tixBind TixComboEntry <Escape> {
+ if {[tixComboBox:EscKey [tixGetMegaWidget %W TixComboBox]]} {
+ break
+ }
+ }
+ tixBind TixComboEntry <Tab> {
+ if {[set [tixGetMegaWidget %W TixComboBox](-state)] ne "disabled"} {
+ if {[tixComboBox:EntTab [tixGetMegaWidget %W TixComboBox]]} {
+ break
+ }
+ }
+ }
+ tixBind TixComboEntry <1> {
+ if {[set [tixGetMegaWidget %W TixComboBox](-state)] ne "disabled"} {
+ focus %W
+ }
+ }
+ tixBind TixComboEntry <ButtonRelease-2> {
+ tixComboBox:EntKeyPress [tixGetMegaWidget %W TixComboBox]
+ }
+
+ #----------------------------------------------------------------------
+ # The class bindings for the listbox subwidget
+ #
+
+ tixBind TixComboWid <Escape> {
+ if {[tixComboBox:EscKey [tixGetMegaWidget %W TixComboBox]]} {
+ break
+ }
+ }
+
+ #----------------------------------------------------------------------
+ # The class bindings for some widgets inside ComboBox
+ #
+ tixBind TixComboWid <ButtonRelease-1> {
+ tixComboBox:WidUp [tixGetMegaWidget %W TixComboBox]
+ }
+ tixBind TixComboWid <Escape> {
+ if {[tixComboBox:EscKey [tixGetMegaWidget %W TixComboBox]]} {
+ break
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+# Cooked events
+#----------------------------------------------------------------------
+proc tixComboBox:ArrowDown {w} {
+ upvar #0 $w data
+
+ if {$data(-state) eq "disabled"} {
+ return
+ }
+
+ switch -exact -- $data(state) {
+ 0 { tixComboBox:GoState 1 $w }
+ 2 { tixComboBox:GoState 19 $w }
+ default { tixComboBox:StateError $w }
+ }
+}
+
+proc tixComboBox:ArrowUp {w} {
+ upvar #0 $w data
+
+ switch -exact -- $data(state) {
+ 1 { tixComboBox:GoState 2 $w }
+ 19 {
+ # data(ignore) was already set in state 19
+ tixComboBox:GoState 4 $w
+ }
+ 5 { tixComboBox:GoState 13 $w }
+ default { tixComboBox:StateError $w }
+ }
+}
+
+proc tixComboBox:RootDown {w} {
+ upvar #0 $w data
+
+ switch -exact -- $data(state) {
+ 0 {
+ # Ignore
+ }
+ 2 { tixComboBox:GoState 3 $w }
+ default { tixComboBox:StateError $w }
+ }
+}
+
+proc tixComboBox:RootUp {w} {
+ upvar #0 $w data
+
+ switch -exact -- $data(state) {
+ {1} {
+ tixComboBox:GoState 12 $w
+ }
+ {3} {
+ # data(ignore) was already set in state 3
+ tixComboBox:GoState 4 $w
+ }
+ {5} {
+ tixComboBox:GoState 7 $w
+ }
+ default {
+ tixComboBox:StateError $w
+ }
+ }
+}
+
+proc tixComboBox:WidUp {w} {
+ upvar #0 $w data
+
+ switch -exact -- $data(state) {
+ {1} {
+ tixComboBox:GoState 12 $w
+ }
+ {5} {
+ tixComboBox:GoState 13 $w
+ }
+ }
+}
+
+proc tixComboBox:LbBrowse {w args} {
+ upvar #0 $w data
+
+ set event [tixEvent type]
+ set x [tixEvent flag x]
+ set y [tixEvent flag y]
+ set X [tixEvent flag X]
+ set Y [tixEvent flag Y]
+
+ if {$data(-state) eq "disabled"} { return }
+
+ switch -exact -- $event {
+ <1> {
+ case $data(state) {
+ {2} {
+ tixComboBox:GoState 5 $w $x $y $X $Y
+ }
+ {5} {
+ tixComboBox:GoState 5 $w $x $y $X $Y
+ }
+ {n0} {
+ tixComboBox:GoState n6 $w $x $y $X $Y
+ }
+ default {
+ tixComboBox:StateError $w
+ }
+ }
+ }
+ <ButtonRelease-1> {
+ case $data(state) {
+ {5} {
+ tixComboBox:GoState 6 $w $x $y $X $Y
+ }
+ {n6} {
+ tixComboBox:GoState n0 $w
+ }
+ default {
+ tixComboBox:StateError $w
+ }
+ }
+ }
+ default {
+ # Must be a motion event
+ case $data(state) {
+ {1} {
+ tixComboBox:GoState 9 $w $x $y $X $Y
+ }
+ {5} {
+ tixComboBox:GoState 5 $w $x $y $X $Y
+ }
+ {n6} {
+ tixComboBox:GoState n6 $w $x $y $X $Y
+ }
+ default {
+ tixComboBox:StateError $w
+ }
+ }
+ }
+ }
+}
+
+proc tixComboBox:LbCommand {w} {
+ upvar #0 $w data
+
+ if {$data(state) eq "n0"} {
+ tixComboBox:GoState n1 $w
+ }
+}
+
+#----------------------------------------------------------------------
+# General keyboard event
+
+# returns 1 if the combobox is in some special state and the Escape key
+# shouldn't be handled by the toplevel bind tag. As a result, when a combobox
+# is popped up in a dialog box, Escape will popdown the combo. If the combo
+# is not popped up, Escape will invoke the toplevel bindtag (which can
+# pop down the dialog box)
+#
+proc tixComboBox:EscKey {w} {
+ upvar #0 $w data
+
+ if {$data(-state) eq "disabled"} { return }
+
+ switch -exact -- $data(state) {
+ {0} {
+ tixComboBox:GoState 17 $w
+ }
+ {2} {
+ tixComboBox:GoState 16 $w
+ return 1
+ }
+ {n0} {
+ tixComboBox:GoState n4 $w
+ }
+ default {
+ # ignore
+ return 1
+ }
+ }
+
+ return 0
+}
+
+#----------------------------------------
+# Keyboard events
+#----------------------------------------
+proc tixComboBox:EntDirKey {w dir} {
+ upvar #0 $w data
+
+ if {$data(-state) eq "disabled"} { return }
+
+ switch -exact -- $data(state) {
+ {0} {
+ tixComboBox:GoState 10 $w $dir
+ }
+ {2} {
+ tixComboBox:GoState 11 $w $dir
+ }
+ {5} {
+ # ignore
+ }
+ {n0} {
+ tixComboBox:GoState n3 $w $dir
+ }
+ }
+}
+
+proc tixComboBox:EntReturnKey {w} {
+ upvar #0 $w data
+
+ if {$data(-state) eq "disabled"} { return }
+
+ switch -exact -- $data(state) {
+ {0} {
+ tixComboBox:GoState 14 $w
+ }
+ {2} {
+ tixComboBox:GoState 15 $w
+ }
+ {5} {
+ # ignore
+ }
+ {n0} {
+ tixComboBox:GoState n1 $w
+ }
+ }
+}
+
+# Return 1 == break from the binding == no keyboard focus traversal
+proc tixComboBox:EntTab {w} {
+ upvar #0 $w data
+
+ switch -exact -- $data(state) {
+ {0} {
+ tixComboBox:GoState 14 $w
+ set data(cancelTab) ""
+ return 0
+ }
+ {2} {
+ tixComboBox:GoState 15 $w
+ set data(cancelTab) ""
+ return 0
+ }
+ {n0} {
+ tixComboBox:GoState n1 $w
+ set data(cancelTab) ""
+ return 0
+ }
+ default {
+ return 1
+ }
+ }
+}
+
+proc tixComboBox:EntKeyPress {w} {
+ upvar #0 $w data
+
+ if {$data(-state) eq "disabled" || !$data(-editable)} { return }
+
+ switch -exact -- $data(state) {
+ 0 - 2 - n0 {
+ tixComboBox:ClearListboxSelection $w
+ tixComboBox:SetSelection $w [$data(w:entry) get] 0 0
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+
+proc tixComboBox:HandleDirKey {w dir} {
+ upvar #0 $w data
+
+ if {[tixComboBox:CheckListboxSelection $w]} {
+ switch -exact -- $dir {
+ "up" {
+ tkListboxUpDown $data(w:listbox) -1
+ set data(curIndex) [lindex [$data(w:listbox) curselection] 0]
+ tixComboBox:SetSelectionFromListbox $w
+ }
+ "down" {
+ tkListboxUpDown $data(w:listbox) 1
+ set data(curIndex) [lindex [$data(w:listbox) curselection] 0]
+ tixComboBox:SetSelectionFromListbox $w
+ }
+ "pageup" {
+ $data(w:listbox) yview scroll -1 pages
+ }
+ "pagedown" {
+ $data(w:listbox) yview scroll 1 pages
+ }
+ }
+ } else {
+ # There wasn't good selection in the listbox.
+ #
+ tixComboBox:SetSelectionFromListbox $w
+ }
+}
+
+proc tixComboBox:Invoke {w} {
+ upvar #0 $w data
+
+ tixComboBox:SetValue $w $data(-selection)
+ if {![winfo exists $w]} {
+ return
+ }
+
+ if {$data(-history)} {
+ tixComboBox:addhistory $w $data(-value)
+ set data(curIndex) 0
+ }
+ $data(w:entry) selection from 0
+ $data(w:entry) selection to end
+ $data(w:entry) icursor end
+}
+
+#----------------------------------------------------------------------
+# MAINTAINING THE -VALUE
+#----------------------------------------------------------------------
+proc tixComboBox:SetValue {w newValue {noUpdate 0} {updateEnt 1}} {
+ upvar #0 $w data
+
+ if {[llength $data(-validatecmd)]} {
+ set data(-value) [tixEvalCmdBinding $w $data(-validatecmd) "" $newValue]
+ } else {
+ set data(-value) $newValue
+ }
+
+ if {! $noUpdate} {
+ tixVariable:UpdateVariable $w
+ }
+
+ if {$updateEnt} {
+ if {!$data(-editable)} {
+ $data(w:entry) delete 0 end
+ $data(w:entry) insert 0 $data(-value)
+ }
+ }
+
+ if {!$data(-disablecallback) && [llength $data(-command)]} {
+ if {![info exists data(varInited)]} {
+ set bind(specs) {%V}
+ set bind(%V) $data(-value)
+
+ tixEvalCmdBinding $w $data(-command) bind $data(-value)
+ if {![winfo exists $w]} {
+ # The user destroyed the window!
+ return
+ }
+ }
+ }
+
+ set data(-selection) $data(-value)
+ if {$updateEnt} {
+ tixSetEntry $data(w:entry) $data(-value)
+
+ if {$data(-anchor) eq "e"} {
+ tixComboBox:EntryAlignEnd $w
+ }
+ }
+}
+
+# markSel: should the all the text in the entry be highlighted?
+#
+proc tixComboBox:SetSelection {w value {markSel 1} {setent 1}} {
+ upvar #0 $w data
+
+ if {$setent} {
+ tixSetEntry $data(w:entry) $value
+ }
+ set data(-selection) $value
+
+ if {$data(-selectmode) eq "browse"} {
+ if {$markSel} {
+ $data(w:entry) selection range 0 end
+ }
+ if {[llength $data(-browsecmd)]} {
+ set bind(specs) {%V}
+ set bind(%V) [$data(w:entry) get]
+ tixEvalCmdBinding $w $data(-browsecmd) bind [$data(w:entry) get]
+ }
+ } else {
+ tixComboBox:SetValue $w $value 0 0
+ }
+}
+
+proc tixComboBox:ClearListboxSelection {w} {
+ upvar #0 $w data
+
+ if {![winfo exists $data(w:listbox)]} {
+ tixDebug "tixComboBox:ClearListboxSelection error non-existent $data(w:listbox)"
+ return
+ }
+
+ $data(w:listbox) selection clear 0 end
+}
+
+proc tixComboBox:UpdateListboxSelection {w index} {
+ upvar #0 $w data
+
+ if {![winfo exists $data(w:listbox)]} {
+ tixDebug "tixComboBox:UpdateListboxSelection error non-existent $data(w:listbox)"
+ return
+ }
+ if {$index != ""} {
+ $data(w:listbox) selection set $index
+ $data(w:listbox) selection anchor $index
+ }
+}
+
+
+proc tixComboBox:Cancel {w} {
+ upvar #0 $w data
+
+ tixSetEntry $data(w:entry) $data(-value)
+ tixComboBox:SetSelection $w $data(-value)
+
+ if {[tixComboBox:LbGetSelection $w] ne $data(-selection)} {
+ tixComboBox:ClearListboxSelection $w
+ }
+}
+
+proc tixComboBox:flash {w} {
+ tixComboBox:BlinkEntry $w
+}
+
+# Make the entry blink when the user selects a choice
+#
+proc tixComboBox:BlinkEntry {w} {
+ upvar #0 $w data
+
+ if {![info exists data(entryBlacken)]} {
+ set old_bg [$data(w:entry) cget -bg]
+ set old_fg [$data(w:entry) cget -fg]
+
+ $data(w:entry) config -fg $old_bg
+ $data(w:entry) config -bg $old_fg
+
+ set data(entryBlacken) 1
+ after 50 tixComboBox:RestoreBlink $w [list $old_bg] [list $old_fg]
+ }
+}
+
+proc tixComboBox:RestoreBlink {w old_bg old_fg} {
+ upvar #0 $w data
+
+ if {[info exists data(w:entry)] && [winfo exists $data(w:entry)]} {
+ $data(w:entry) config -fg $old_fg
+ $data(w:entry) config -bg $old_bg
+ }
+
+ if {[info exists data(entryBlacken)]} {
+ unset data(entryBlacken)
+ }
+}
+
+#----------------------------------------
+# Handle events inside the list box
+#----------------------------------------
+
+proc tixComboBox:LbIndex {w {flag ""}} {
+ upvar #0 $w data
+
+ if {![winfo exists $data(w:listbox)]} {
+ tixDebug "tixComboBox:LbIndex error non-existent $data(w:listbox)"
+ if {$flag eq "emptyOK"} {
+ return ""
+ } else {
+ return 0
+ }
+ }
+ set sel [lindex [$data(w:listbox) curselection] 0]
+ if {$sel != ""} {
+ return $sel
+ } else {
+ if {$flag eq "emptyOK"} {
+ return ""
+ } else {
+ return 0
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# STATE MANIPULATION
+#
+#----------------------------------------------------------------------
+proc tixComboBox:GoState-0 {w} {
+ upvar #0 $w data
+
+ if {[info exists data(w:root)] && [grab current] eq "$data(w:root)"} {
+ grab release $w
+ }
+}
+
+proc tixComboBox:GoState-1 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Popup $w
+}
+
+proc tixComboBox:GoState-2 {w} {
+ upvar #0 $w data
+
+}
+
+proc tixComboBox:GoState-3 {w} {
+ upvar #0 $w data
+
+ set data(ignore) 1
+ tixComboBox:Popdown $w
+}
+
+proc tixComboBox:GoState-4 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Ungrab $w
+ if {$data(ignore)} {
+ tixComboBox:Cancel $w
+ } else {
+ tixComboBox:Invoke $w
+ }
+ tixComboBox:GoState 0 $w
+}
+
+proc tixComboBox:GoState-5 {w x y X Y} {
+ upvar #0 $w data
+
+ tixComboBox:LbSelect $w $x $y $X $Y
+}
+
+proc tixComboBox:GoState-6 {w x y X Y} {
+ upvar #0 $w data
+
+ tixComboBox:Popdown $w
+
+ if {[tixWithinWindow $data(w:shell) $X $Y]} {
+ set data(ignore) 0
+ } else {
+ set data(ignore) 1
+ }
+
+ tixComboBox:GoState 4 $w
+}
+
+proc tixComboBox:GoState-7 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Popdown $w
+ set data(ignore) 1
+ catch {
+ global tkPriv
+ if {$tkPriv(afterId) != ""} {
+ tkCancelRepeat
+ }
+ }
+
+ set data(ignore) 1
+ tixComboBox:GoState 4 $w
+}
+
+proc tixComboBox:GoState-9 {w x y X Y} {
+ upvar #0 $w data
+
+ catch {
+ tkButtonUp $data(w:arrow)
+ }
+ tixComboBox:GoState 5 $w $x $y $X $Y
+}
+
+proc tixComboBox:GoState-10 {w dir} {
+ upvar #0 $w data
+
+ tixComboBox:Popup $w
+ if {![tixComboBox:CheckListboxSelection $w]} {
+ # There wasn't good selection in the listbox.
+ #
+ tixComboBox:SetSelectionFromListbox $w
+ }
+
+ tixComboBox:GoState 2 $w
+}
+
+proc tixComboBox:GoState-11 {w dir} {
+ upvar #0 $w data
+
+ tixComboBox:HandleDirKey $w $dir
+
+ tixComboBox:GoState 2 $w
+}
+
+proc tixComboBox:GoState-12 {w} {
+ upvar #0 $w data
+
+ catch {
+ tkButtonUp $data(w:arrow)
+ }
+
+ tixComboBox:GoState 2 $w
+}
+
+proc tixComboBox:GoState-13 {w} {
+ upvar #0 $w data
+
+ catch {
+ global tkPriv
+ if {$tkPriv(afterId) != ""} {
+ tkCancelRepeat
+ }
+ }
+ tixComboBox:GoState 2 $w
+}
+
+proc tixComboBox:GoState-14 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Invoke $w
+ tixComboBox:GoState 0 $w
+}
+
+proc tixComboBox:GoState-15 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Popdown $w
+ set data(ignore) 0
+ tixComboBox:GoState 4 $w
+}
+
+proc tixComboBox:GoState-16 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Popdown $w
+ tixComboBox:Cancel $w
+ set data(ignore) 1
+ tixComboBox:GoState 4 $w
+}
+
+proc tixComboBox:GoState-17 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Cancel $w
+ tixComboBox:GoState 0 $w
+}
+
+proc tixComboBox:GoState-19 {w} {
+ upvar #0 $w data
+
+ set data(ignore) [string equal $data(-selection) $data(-value)]
+ tixComboBox:Popdown $w
+}
+
+#----------------------------------------------------------------------
+# Non-dropdown states
+#----------------------------------------------------------------------
+proc tixComboBox:GoState-n0 {w} {
+ upvar #0 $w data
+}
+
+proc tixComboBox:GoState-n1 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Invoke $w
+ tixComboBox:GoState n0 $w
+}
+
+proc tixComboBox:GoState-n3 {w dir} {
+ upvar #0 $w data
+
+ tixComboBox:HandleDirKey $w $dir
+ tixComboBox:GoState n0 $w
+}
+
+proc tixComboBox:GoState-n4 {w} {
+ upvar #0 $w data
+
+ tixComboBox:Cancel $w
+ tixComboBox:GoState n0 $w
+}
+
+proc tixComboBox:GoState-n6 {w x y X Y} {
+ upvar #0 $w data
+
+ tixComboBox:LbSelect $w $x $y $X $Y
+}
+
+#----------------------------------------------------------------------
+# General State Manipulation
+#----------------------------------------------------------------------
+proc tixComboBox:GoState {s w args} {
+ upvar #0 $w data
+
+ tixComboBox:SetState $w $s
+ eval tixComboBox:GoState-$s $w $args
+}
+
+proc tixComboBox:SetState {w s} {
+ upvar #0 $w data
+
+# catch {puts [info level -2]}
+# puts "setting state $data(state) --> $s"
+ set data(state) $s
+}
+
+proc tixComboBox:StateError {w} {
+ upvar #0 $w data
+
+# error "wrong state $data(state)"
+}
+
+#----------------------------------------------------------------------
+# Listbox handling
+#----------------------------------------------------------------------
+
+# Set a selection if there isn't one. Returns true if there was already
+# a good selection inside the listbox
+#
+proc tixComboBox:CheckListboxSelection {w} {
+ upvar #0 $w data
+
+ if {![winfo exists $data(w:listbox)]} {
+ tixDebug "tixComboBox:CheckListboxSelection error non-existent $data(w:listbox)"
+ return 0
+ }
+ if {[$data(w:listbox) curselection] == ""} {
+ if {$data(curIndex) == ""} {
+ set data(curIndex) 0
+ }
+
+ $data(w:listbox) activate $data(curIndex)
+ $data(w:listbox) selection clear 0 end
+ $data(w:listbox) selection set $data(curIndex)
+ $data(w:listbox) see $data(curIndex)
+ return 0
+ } else {
+ return 1
+ }
+}
+
+proc tixComboBox:SetSelectionFromListbox {w} {
+ upvar #0 $w data
+
+ set string [$data(w:listbox) get $data(curIndex)]
+ tixComboBox:SetSelection $w $string
+ tixComboBox:UpdateListboxSelection $w $data(curIndex)
+}
+
+proc tixComboBox:LbGetSelection {w} {
+ upvar #0 $w data
+ set index [tixComboBox:LbIndex $w emptyOK]
+
+ if {$index >=0} {
+ return [$data(w:listbox) get $index]
+ } else {
+ return ""
+ }
+}
+
+proc tixComboBox:LbSelect {w x y X Y} {
+ upvar #0 $w data
+
+ set index [tixComboBox:LbIndex $w emptyOK]
+ if {$index == ""} {
+ set index [$data(w:listbox) nearest $y]
+ }
+
+ if {$index >= 0} {
+ if {[focus -lastfor $data(w:entry)] ne $data(w:entry) &&
+ [focus -lastfor $data(w:entry)] ne $data(w:listbox)} {
+ focus $data(w:entry)
+ }
+
+ set string [$data(w:listbox) get $index]
+ tixComboBox:SetSelection $w $string
+
+ tixComboBox:UpdateListboxSelection $w $index
+ }
+}
+
+#----------------------------------------------------------------------
+# Internal commands
+#----------------------------------------------------------------------
+proc tixComboBox:CrossBtn {w} {
+ upvar #0 $w data
+
+ $data(w:entry) delete 0 end
+ tixComboBox:ClearListboxSelection $w
+ tixComboBox:SetSelection $w ""
+}
+
+#--------------------------------------------------
+# Popping up list shell
+#--------------------------------------------------
+
+# Popup the listbox and grab
+#
+#
+proc tixComboBox:Popup {w} {
+ global tcl_platform
+ upvar #0 $w data
+
+ if {![winfo ismapped $data(w:root)]} {
+ return
+ }
+
+ #---------------------------------------------------------------------
+ # Pop up
+ #
+ if {$data(-listcmd) != ""} {
+ # This option allows the user to fill in the listbox on demand
+ #
+ tixEvalCmdBinding $w $data(-listcmd)
+ }
+
+ # calculate the size
+ set y [winfo rooty $data(w:entry)]
+ incr y [winfo height $data(w:entry)]
+ incr y 3
+
+ set bd [$data(w:shell) cget -bd]
+# incr bd [$data(w:shell) cget -highlightthickness]
+ set height [expr {[winfo reqheight $data(w:slistbox)] + 2*$bd}]
+
+ set x1 [winfo rootx $data(w:entry)]
+ if {$data(-listwidth) == ""} {
+ if {[winfo ismapped $data(w:arrow)]} {
+ set x2 [winfo rootx $data(w:arrow)]
+ if {$x2 >= $x1} {
+ incr x2 [winfo width $data(w:arrow)]
+ set width [expr {$x2 - $x1}]
+ } else {
+ set width [winfo width $data(w:entry)]
+ set x2 [expr {$x1 + $width}]
+ }
+ } else {
+ set width [winfo width $data(w:entry)]
+ set x2 [expr {$x1 + $width}]
+ }
+ } else {
+ set width $data(-listwidth)
+ set x2 [expr {$x1 + $width}]
+ }
+
+ set reqwidth [winfo reqwidth $data(w:shell)]
+ if {$reqwidth < $width} {
+ set reqwidth $width
+ } else {
+ if {$reqwidth > [expr {$width *3}]} {
+ set reqwidth [expr {$width *3}]
+ }
+ if {$reqwidth > [winfo vrootwidth .]} {
+ set reqwidth [winfo vrootwidth .]
+ }
+ }
+ set width $reqwidth
+
+
+ # If the listbox is too far right, pull it back to the left
+ #
+ set scrwidth [winfo vrootwidth .]
+ if {$x2 > $scrwidth} {
+ set x1 [expr {$scrwidth - $width}]
+ }
+
+ # If the listbox is too far left, pull it back to the right
+ #
+ if {$x1 < 0} {
+ set x1 0
+ }
+
+ # If the listbox is below bottom of screen, put it upwards
+ #
+ set scrheight [winfo vrootheight .]
+ set bottom [expr {$y+$height}]
+ if {$bottom > $scrheight} {
+ set y [expr {$y-$height-[winfo height $data(w:entry)]-5}]
+ }
+
+ # OK , popup the shell
+ #
+ global tcl_platform
+
+ wm geometry $data(w:shell) $reqwidth\x$height+$x1+$y
+ if {$tcl_platform(platform) eq "windows"} {
+ update
+ }
+ wm deiconify $data(w:shell)
+ if {$tcl_platform(platform) eq "windows"} {
+ update
+ }
+ raise $data(w:shell)
+ focus $data(w:entry)
+ set data(popped) 1
+
+ # add for safety
+ update
+
+ tixComboBox:Grab $w
+}
+
+proc tixComboBox:SetCursor {w cursor} {
+ upvar #0 $w data
+
+ $w config -cursor $cursor
+}
+
+proc tixComboBox:Popdown {w} {
+ upvar #0 $w data
+
+ wm withdraw $data(w:shell)
+ tixComboBox:SetCursor $w ""
+}
+
+# Grab the server so that user cannot move the windows around
+proc tixComboBox:Grab {w} {
+ upvar #0 $w data
+
+ tixComboBox:SetCursor $w arrow
+ if {[catch {
+ # We catch here because grab may fail under a lot of circumstances
+ # Just don't want to break the code ...
+ switch -exact -- $data(-grab) {
+ global { tixPushGrab -global $data(w:root) }
+ local { tixPushGrab $data(w:root) }
+ }
+ } err]} {
+ tixDebug "tixComboBox:Grab+: Error grabbing $data(w:root)\n$err"
+ }
+}
+
+proc tixComboBox:Ungrab {w} {
+ upvar #0 $w data
+
+ if {[catch {
+ catch {
+ switch -exact -- $data(-grab) {
+ global { tixPopGrab }
+ local { tixPopGrab }
+ }
+ }
+ } err]} {
+ tixDebug "tixComboBox:Grab+: Error grabbing $data(w:root)\n$err"
+ }
+}
+
+#----------------------------------------------------------------------
+# Alignment
+#----------------------------------------------------------------------
+# The following two routines can emulate a "right align mode" for the
+# entry in the combo box.
+
+proc tixComboBox:EntryAlignEnd {w} {
+ upvar #0 $w data
+ $data(w:entry) xview end
+}
+
+
+proc tixComboBox:Destructor {w} {
+ upvar #0 $w data
+
+ tixUnsetMegaWidget $data(w:entry)
+ tixVariable:DeleteVariable $w
+
+ # Chain this to the superclass
+ #
+ tixChainMethod $w Destructor
+}
+
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+
+proc tixComboBox:config-state {w value} {
+ upvar #0 $w data
+ catch {if {[$data(w:arrow) cget -state] eq $value} {set a 1}}
+ if {[info exists a]} {
+ return
+ }
+
+ catch {$data(w:arrow) config -state $value}
+ catch {$data(w:tick) config -state $value}
+ catch {$data(w:cross) config -state $value}
+ catch {$data(w:slistbox) config -state $value}
+
+ if {[string equal $value normal]} {
+ set fg [$data(w:arrow) cget -fg]
+ set entryFg $data(entryfg)
+ set lbSelFg [lindex [$data(w:listbox) config -selectforeground] 3]
+ set lbSelBg [lindex [$data(w:listbox) config -selectbackground] 3]
+ set entrySelFg [lindex [$data(w:entry) config -selectforeground] 3]
+ set entrySelBg [lindex [$data(w:entry) config -selectbackground] 3]
+ } else {
+ set fg [$data(w:arrow) cget -disabledforeground]
+ set entryFg $data(-disabledforeground)
+ set lbSelFg $entryFg
+ set lbSelBg [$data(w:listbox) cget -bg]
+ set entrySelFg $entryFg
+ set entrySelBg [$data(w:entry) cget -bg]
+ }
+ if {$fg ne ""} {
+ $data(w:label) config -fg $fg
+ $data(w:listbox) config -fg $fg -selectforeground $lbSelFg \
+ -selectbackground $lbSelBg
+ }
+ $data(w:entry) config -fg $entryFg -selectforeground $entrySelFg \
+ -selectbackground $entrySelBg
+
+ if {$value eq "normal"} {
+ if {$data(-editable)} {
+ $data(w:entry) config -state normal
+ }
+ $data(w:entry) config -takefocus 1
+ } else {
+ if {$data(-editable)} {
+ $data(w:entry) config -state disabled
+ }
+ $data(w:entry) config -takefocus 0
+ }
+}
+
+proc tixComboBox:config-value {w value} {
+ upvar #0 $w data
+
+ tixComboBox:SetValue $w $value
+
+ set data(-selection) $value
+
+ if {[tixComboBox:LbGetSelection $w] ne $value} {
+ tixComboBox:ClearListboxSelection $w
+ }
+}
+
+proc tixComboBox:config-selection {w value} {
+ upvar #0 $w data
+
+ tixComboBox:SetSelection $w $value
+
+ if {[tixComboBox:LbGetSelection $w] ne $value} {
+ tixComboBox:ClearListboxSelection $w
+ }
+}
+
+proc tixComboBox:config-variable {w arg} {
+ upvar #0 $w data
+
+ if {[tixVariable:ConfigVariable $w $arg]} {
+ # The value of data(-value) is changed if tixVariable:ConfigVariable
+ # returns true
+ set data(-selection) $data(-value)
+ tixComboBox:SetValue $w $data(-value) 1
+ }
+ catch {
+ unset data(varInited)
+ }
+ set data(-variable) $arg
+}
+
+
+#----------------------------------------------------------------------
+# WIDGET COMMANDS
+#----------------------------------------------------------------------
+proc tixComboBox:align {w args} {
+ upvar #0 $w data
+
+ if {$data(-anchor) eq "e"} {
+ tixComboBox:EntryAlignEnd $w
+ }
+}
+
+proc tixComboBox:addhistory {w value} {
+ upvar #0 $w data
+
+ tixComboBox:insert $w 0 $value
+ $data(w:listbox) selection clear 0 end
+
+ if {$data(-prunehistory)} {
+ # Prune from the end
+ #
+ set max [$data(w:listbox) size]
+ if {$max <= 1} {
+ return
+ }
+ for {set i [expr {$max -1}]} {$i >= 1} {incr i -1} {
+ if {[$data(w:listbox) get $i] eq $value} {
+ $data(w:listbox) delete $i
+ break
+ }
+ }
+ }
+}
+
+proc tixComboBox:appendhistory {w value} {
+ upvar #0 $w data
+
+ tixComboBox:insert $w end $value
+ $data(w:listbox) selection clear 0 end
+
+ if {$data(-prunehistory)} {
+ # Prune from the end
+ #
+ set max [$data(w:listbox) size]
+ if {$max <= 1} {
+ return
+ }
+ for {set i [expr {$max -2}]} {$i >= 0} {incr i -1} {
+ if {[$data(w:listbox) get $i] eq $value} {
+ $data(w:listbox) delete $i
+ break
+ }
+ }
+ }
+}
+
+proc tixComboBox:insert {w index newitem} {
+ upvar #0 $w data
+
+ $data(w:listbox) insert $index $newitem
+
+ if {$data(-history) && $data(-historylimit) != ""
+ && [$data(w:listbox) size] eq $data(-historylimit)} {
+ $data(w:listbox) delete 0
+ }
+}
+
+proc tixComboBox:pick {w index} {
+ upvar #0 $w data
+
+ $data(w:listbox) activate $index
+ $data(w:listbox) selection clear 0 end
+ $data(w:listbox) selection set active
+ $data(w:listbox) see active
+ set text [$data(w:listbox) get $index]
+
+ tixComboBox:SetValue $w $text
+
+ set data(curIndex) $index
+}
+
+proc tixComboBox:invoke {w} {
+ tixComboBox:Invoke $w
+}
+
+proc tixComboBox:popdown {w} {
+ upvar #0 $w data
+
+ if {$data(-dropdown)} {
+ tixComboBox:Popdown $w
+ }
+}
Added: external/tix-8.4.2.x/library/Compat.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Compat.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,33 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Compat.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
+#
+# Compat.tcl --
+#
+# This file wraps around many incompatibilities from Tix 3.6
+# to Tix 4.0.
+#
+# (1) "box" to "Box" changes
+# (2) "DlgBtns" to "ButtonBox" changes
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+foreach {old new} {
+ tixDlgBtns tixButtonBox
+ tixStdDlgBtns tixStdButtonBox
+ tixCombobox tixComboBox
+ tixFileSelectbox tixFileSelectBox
+ tixScrolledListbox tixScrolledListBox
+} {
+ interp alias {} $old {} $new
+}
+
+proc tixInit {args} {
+ eval tix config $args
+ puts stderr "tixInit no longer needed for this version of Tix"
+}
Added: external/tix-8.4.2.x/library/Console.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Console.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,613 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Console.tcl,v 1.4 2002/01/24 09:13:58 idiscovery Exp $
+#
+# Console.tcl --
+#
+# This code constructs the console window for an application.
+# It can be used by non-unix systems that do not have built-in
+# support for shells.
+#
+# This file was distributed as a part of Tk 4.1 by Sun
+# Microsystems, Inc. and subsequently modified by Expert
+# Interface Techonoligies and included as a part of Tix.
+#
+# Some of the functions in this file have been renamed from
+# using a "tk" prefix to a "tix" prefix to avoid namespace
+# conflict with the original file.
+#
+# Copyright (c) 1995-1996 Sun Microsystems, Inc.
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "docs/license.tcltk" for information on usage and
+# redistribution of the original file "console.tcl". These license
+# terms do NOT apply to other files in the Tix distribution.
+#
+# See the file "license.terms" for information on usage and
+# redistribution * of this file, and for a DISCLAIMER OF ALL
+# WARRANTIES.
+
+# tixConsoleInit --
+# This procedure constructs and configures the console windows.
+#
+# Arguments:
+# None.
+
+foreach fun {tkTextSetCursor} {
+ if {![llength [info commands $fun]]} {
+ tk::unsupported::ExposePrivateCommand $fun
+ }
+}
+unset fun
+
+proc tixConsoleInit {} {
+ global tcl_platform
+
+ uplevel #0 set tixConsoleTextFont Courier
+ uplevel #0 set tixConsoleTextSize 14
+
+ set f [frame .f]
+ set fontcb [tixComboBox $f.size -label "" -command "tixConsoleSetFont" \
+ -variable tixConsoleTextFont \
+ -options {
+ entry.width 15
+ listbox.height 5
+ }]
+ set sizecb [tixComboBox $f.font -label "" -command "tixConsoleSetFont" \
+ -variable tixConsoleTextSize \
+ -options {
+ entry.width 4
+ listbox.width 6
+ listbox.height 5
+ }]
+ pack $fontcb $sizecb -side left
+ pack $f -side top -fill x -padx 2 -pady 2
+ foreach font {
+ "Courier New"
+ "Courier"
+ "Helvetica"
+ "Lucida"
+ "Lucida Typewriter"
+ "MS LineDraw"
+ "System"
+ "Times Roman"
+ } {
+ $fontcb subwidget listbox insert end $font
+ }
+
+ for {set s 6} {$s < 25} {incr s} {
+ $sizecb subwidget listbox insert end $s
+ }
+
+ bind [$fontcb subwidget entry] <Escape> "focus .console"
+ bind [$sizecb subwidget entry] <Escape> "focus .console"
+
+ text .console -yscrollcommand ".sb set" -setgrid true \
+ -highlightcolor [. cget -bg] -highlightbackground [. cget -bg] \
+ -cursor left_ptr
+ scrollbar .sb -command ".console yview" -highlightcolor [. cget -bg] \
+ -highlightbackground [. cget -bg]
+ pack .sb -side right -fill both
+ pack .console -fill both -expand 1 -side left
+
+ tixConsoleBind .console
+
+ .console tag configure stderr -foreground red
+ .console tag configure stdin -foreground blue
+
+ focus .console
+
+ wm protocol . WM_DELETE_WINDOW { wm withdraw . }
+ wm title . "Console"
+ flush stdout
+ .console mark set output [.console index "end - 1 char"]
+ tkTextSetCursor .console end
+ .console mark set promptEnd insert
+ .console mark gravity promptEnd left
+
+ tixConsoleSetFont
+}
+
+proc tixConsoleSetFont {args} {
+ if ![winfo exists .console] tixConsoleInit
+
+ global tixConsoleTextFont tixConsoleTextSize
+
+ set font -*-$tixConsoleTextFont-medium-r-normal-*-$tixConsoleTextSize-*-*-*-*-*-*-*
+ .console config -font $font
+}
+
+# tixConsoleInvoke --
+# Processes the command line input. If the command is complete it
+# is evaled in the main interpreter. Otherwise, the continuation
+# prompt is added and more input may be added.
+#
+# Arguments:
+# None.
+
+proc tixConsoleInvoke {args} {
+ if ![winfo exists .console] tixConsoleInit
+
+ if {[.console dlineinfo insert] != {}} {
+ set setend 1
+ } else {
+ set setend 0
+ }
+ set ranges [.console tag ranges input]
+ set cmd ""
+ if {$ranges != ""} {
+ set pos 0
+ while {[lindex $ranges $pos] != ""} {
+ set start [lindex $ranges $pos]
+ set end [lindex $ranges [incr pos]]
+ append cmd [.console get $start $end]
+ incr pos
+ }
+ }
+ if {$cmd == ""} {
+ tixConsolePrompt
+ } elseif {[info complete $cmd]} {
+ .console mark set output end
+ .console tag delete input
+ set err [catch {
+ set result [interp record $cmd]
+ } result]
+
+ if {$result != ""} {
+ if {$err} {
+ .console insert insert "$result\n" stderr
+ } else {
+ .console insert insert "$result\n"
+ }
+ }
+ tixConsoleHistory reset
+ tixConsolePrompt
+ } else {
+ tixConsolePrompt partial
+ }
+ if {$setend} {
+ .console yview -pickplace insert
+ }
+}
+
+# tixConsoleHistory --
+# This procedure implements command line history for the
+# console. In general is evals the history command in the
+# main interpreter to obtain the history. The global variable
+# histNum is used to store the current location in the history.
+#
+# Arguments:
+# cmd - Which action to take: prev, next, reset.
+
+set histNum 1
+proc tixConsoleHistory {cmd} {
+ if ![winfo exists .console] tixConsoleInit
+
+ global histNum
+
+ switch $cmd {
+ prev {
+ incr histNum -1
+ if {$histNum == 0} {
+ set cmd {history event [expr [history nextid] -1]}
+ } else {
+ set cmd "history event $histNum"
+ }
+ if {[catch {interp eval $cmd} cmd]} {
+ incr histNum
+ return
+ }
+ .console delete promptEnd end
+ .console insert promptEnd $cmd {input stdin}
+ }
+ next {
+ incr histNum
+ if {$histNum == 0} {
+ set cmd {history event [expr [history nextid] -1]}
+ } elseif {$histNum > 0} {
+ set cmd ""
+ set histNum 1
+ } else {
+ set cmd "history event $histNum"
+ }
+ if {$cmd != ""} {
+ catch {interp eval $cmd} cmd
+ }
+ .console delete promptEnd end
+ .console insert promptEnd $cmd {input stdin}
+ }
+ reset {
+ set histNum 1
+ }
+ }
+}
+
+# tixConsolePrompt --
+# This procedure draws the prompt. If tcl_prompt1 or tcl_prompt2
+# exists in the main interpreter it will be called to generate the
+# prompt. Otherwise, a hard coded default prompt is printed.
+#
+# Arguments:
+# partial - Flag to specify which prompt to print.
+
+proc tixConsolePrompt {{partial normal}} {
+ if ![winfo exists .console] tixConsoleInit
+
+ if {$partial == "normal"} {
+ set temp [.console index "end - 1 char"]
+ .console mark set output end
+ if {[interp eval "info exists tcl_prompt1"]} {
+ interp eval "eval \[set tcl_prompt1\]"
+ } else {
+ puts -nonewline "% "
+ }
+ } else {
+ set temp [.console index output]
+ .console mark set output end
+ if {[interp eval "info exists tcl_prompt2"]} {
+ interp eval "eval \[set tcl_prompt2\]"
+ } else {
+ puts -nonewline "> "
+ }
+ }
+
+ flush stdout
+ .console mark set output $temp
+ tkTextSetCursor .console end
+ .console mark set promptEnd insert
+ .console mark gravity promptEnd left
+}
+
+# tixConsoleBind --
+# This procedure first ensures that the default bindings for the Text
+# class have been defined. Then certain bindings are overridden for
+# the class.
+#
+# Arguments:
+# None.
+
+proc tixConsoleBind {win} {
+ if ![winfo exists .console] tixConsoleInit
+
+ bindtags $win "$win Text . all"
+
+ # 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 <Escape>.
+
+ bind $win <Alt-KeyPress> {# nothing }
+ bind $win <Meta-KeyPress> {# nothing}
+ bind $win <Control-KeyPress> {# nothing}
+ bind $win <Escape> {# nothing}
+ bind $win <KP_Enter> {# nothing}
+
+ bind $win <Tab> {
+ tixConsoleInsert %W \t
+ focus %W
+ break
+ }
+ bind $win <Return> {
+ %W mark set insert {end - 1c}
+ tixConsoleInsert %W "\n"
+ tixConsoleInvoke
+ break
+ }
+ bind $win <Delete> {
+ if {[%W tag nextrange sel 1.0 end] != ""} {
+ %W tag remove sel sel.first promptEnd
+ } else {
+ if {[%W compare insert < promptEnd]} {
+ break
+ }
+ }
+ }
+ bind $win <BackSpace> {
+ if {[%W tag nextrange sel 1.0 end] != ""} {
+ %W tag remove sel sel.first promptEnd
+ } else {
+ if {[%W compare insert <= promptEnd]} {
+ break
+ }
+ }
+ }
+ foreach left {Control-a Home} {
+ bind $win <$left> {
+ if {[%W compare insert < promptEnd]} {
+ tkTextSetCursor %W {insert linestart}
+ } else {
+ tkTextSetCursor %W promptEnd
+ }
+ break
+ }
+ }
+ foreach right {Control-e End} {
+ bind $win <$right> {
+ tkTextSetCursor %W {insert lineend}
+ break
+ }
+ }
+ bind $win <Control-d> {
+ if {[%W compare insert < promptEnd]} {
+ break
+ }
+ }
+ bind $win <Control-k> {
+ if {[%W compare insert < promptEnd]} {
+ %W mark set insert promptEnd
+ }
+ }
+ bind $win <Control-t> {
+ if {[%W compare insert < promptEnd]} {
+ break
+ }
+ }
+ bind $win <Meta-d> {
+ if {[%W compare insert < promptEnd]} {
+ break
+ }
+ }
+ bind $win <Meta-BackSpace> {
+ if {[%W compare insert <= promptEnd]} {
+ break
+ }
+ }
+ bind $win <Control-h> {
+ if {[%W compare insert <= promptEnd]} {
+ break
+ }
+ }
+ foreach prev {Control-p Up} {
+ bind $win <$prev> {
+ tixConsoleHistory prev
+ break
+ }
+ }
+ foreach prev {Control-n Down} {
+ bind $win <$prev> {
+ tixConsoleHistory next
+ break
+ }
+ }
+ bind $win <Control-v> {
+ if {[%W compare insert > promptEnd]} {
+ catch {
+ %W insert insert [selection get -displayof %W] {input stdin}
+ %W see insert
+ }
+ }
+ break
+ }
+ bind $win <Insert> {
+ catch {tixConsoleInsert %W [selection get -displayof %W]}
+ break
+ }
+ bind $win <KeyPress> {
+ tixConsoleInsert %W %A
+ break
+ }
+ foreach left {Control-b Left} {
+ bind $win <$left> {
+ if {[%W compare insert == promptEnd]} {
+ break
+ }
+ tkTextSetCursor %W insert-1c
+ break
+ }
+ }
+ foreach right {Control-f Right} {
+ bind $win <$right> {
+ tkTextSetCursor %W insert+1c
+ break
+ }
+ }
+ bind $win <Control-Up> {
+ %W yview scroll -1 unit
+ break;
+ }
+ bind $win <Control-Down> {
+ %W yview scroll 1 unit
+ break;
+ }
+ bind $win <Prior> {
+ %W yview scroll -1 pages
+ }
+ bind $win <Next> {
+ %W yview scroll 1 pages
+ }
+ bind $win <F9> {
+ eval destroy [winfo child .]
+ source $tix_library/Console.tcl
+ }
+ foreach copy {F16 Meta-w Control-i} {
+ bind $win <$copy> {
+ if {[selection own -displayof %W] == "%W"} {
+ clipboard clear -displayof %W
+ catch {
+ clipboard append -displayof %W [selection get -displayof %W]
+ }
+ }
+ break
+ }
+ }
+ foreach paste {F18 Control-y} {
+ bind $win <$paste> {
+ catch {
+ set clip [selection get -displayof %W -selection CLIPBOARD]
+ set list [split $clip \n\r]
+ tixConsoleInsert %W [lindex $list 0]
+ foreach x [lrange $list 1 end] {
+ %W mark set insert {end - 1c}
+ tixConsoleInsert %W "\n"
+ tixConsoleInvoke
+ tixConsoleInsert %W $x
+ }
+ }
+ break
+ }
+ }
+}
+
+# tixConsoleInsert --
+# 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. Insertion
+# is restricted to the prompt area.
+#
+# Arguments:
+# w - The text window in which to insert the string
+# s - The string to insert (usually just a single character)
+
+proc tixConsoleInsert {w s} {
+ if ![winfo exists .console] tixConsoleInit
+
+ if {[.console dlineinfo insert] != {}} {
+ set setend 1
+ } else {
+ set setend 0
+ }
+ if {$s == ""} {
+ return
+ }
+ catch {
+ if {[$w compare sel.first <= insert]
+ && [$w compare sel.last >= insert]} {
+ $w tag remove sel sel.first promptEnd
+ $w delete sel.first sel.last
+ }
+ }
+ if {[$w compare insert < promptEnd]} {
+ $w mark set insert end
+ }
+ $w insert insert $s {input stdin}
+ if $setend {
+ .console see insert
+ }
+}
+
+
+
+# tixConsoleOutput --
+#
+# This routine is called directly by ConsolePutsCmd to cause a string
+# to be displayed in the console.
+#
+# Arguments:
+# dest - The output tag to be used: either "stderr" or "stdout".
+# string - The string to be displayed.
+
+proc tixConsoleOutput {dest string} {
+ if ![winfo exists .console] tixConsoleInit
+
+ if {[.console dlineinfo insert] != {}} {
+ set setend 1
+ } else {
+ set setend 0
+ }
+ .console insert output $string $dest
+ if $setend {
+ .console see insert
+ }
+}
+
+# tixConsoleExit --
+#
+# This routine is called by ConsoleEventProc when the main window of
+# the application is destroyed.
+#
+# Arguments:
+# None.
+
+proc tixConsoleExit {} {
+ if ![winfo exists .console] tixConsoleInit
+
+ exit
+}
+
+# Configure the default Tk console
+proc tixConsoleEvalAppend {inter} {
+ global tixOption
+ # A slave like the console interp has no global variables set!
+
+ if {!$inter} {
+ console hide
+
+ # Change the menubar to Close the console instead of exiting
+ # Your code must provide a way for the user to do a "console show"
+ console eval {
+ if {[winfo exists .menubar.file]} {
+ .menubar.file entryconfigure "Hide Console" \
+ -underline 0 \
+ -label Close \
+ -command [list wm withdraw .]
+ .menubar.file entryconfigure Exit -state disabled
+ }
+ }
+ }
+
+ console eval ".option configure -font \{$tixOption(fixed_font)\}"
+
+ console eval {
+ if {[winfo exists .menubar.edit]} {
+ .menubar.edit add sep
+ .menubar.edit add command \
+ -accelerator 'Ctrl+l' \
+ -underline 0 \
+ -label Clear \
+ -command [list .console delete 1.0 end]
+ bind .console <Control-Key-l> [list .console delete 1.0 end]
+ }
+ if {![winfo exists .menubar.font]} {
+ set m .menubar.font
+ menu $m -tearoff 0
+ .menubar add cascade -menu .menubar.font \
+ -underline 0 -label Options
+
+ global _TixConsole
+ set font [font actual [.console cget -font]]
+ set pos [lsearch $font -family]
+ set _TixConsole(font) [lindex $font [incr pos]]
+ set pos [lsearch $font -size]
+ set _TixConsole(size) [lindex $font [incr pos]]
+ set pos [lsearch $font -weight]
+ set _TixConsole(weight) [lindex $font [incr pos]]
+
+ set allowed {System Fixedsys Terminal {MS Serif}
+ {MS Sans Serif} Courier {Lucida Console} Tahoma
+ Arial {Courier New} {Times New Roman}
+ {Arial Black} Verdana Garamond {Arial Narrow}}
+ .menubar.font add cascade -label Font -menu $m.font
+ menu $m.font -tearoff 0
+ foreach font [lsort [font families]] {
+ if {[lsearch $allowed $font] < 0} {continue}
+ $m.font add radiobutton -label $font \
+ -variable _TixConsole(font) \
+ -value $font \
+ -command \
+ ".console configure -font \"\{$font\} \$_TixConsole(size) \$_TixConsole(weight)\""
+ }
+
+ .menubar.font add cascade -label Size -menu $m.size
+ menu $m.size -tearoff 0
+ foreach size {8 9 10 12 14 16 18} {
+ $m.size add radiobutton -label $size \
+ -variable _TixConsole(size) \
+ -value $size \
+ -command \
+ ".console configure -font \"\{\$_TixConsole(font)\} $size \$_TixConsole(weight)\""
+ }
+
+ .menubar.font add cascade -label Weight -menu $m.weight
+ menu $m.weight -tearoff 0
+ foreach weight {normal bold} {
+ $m.weight add radiobutton -label [string totit $weight] \
+ -variable _TixConsole(weight) \
+ -value $weight \
+ -command \
+ ".console configure -font \"\{\$_TixConsole(font)\} \$_TixConsole(size) $weight\""
+ }
+
+ }
+ }
+}
Added: external/tix-8.4.2.x/library/Control.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Control.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,482 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Control.tcl,v 1.9 2004/03/28 02:44:57 hobbs Exp $
+#
+# Control.tcl --
+#
+# Implements the TixControl Widget. It is called the "SpinBox"
+# in other toolkits.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixControl {
+ -classname TixControl
+ -superclass tixLabelWidget
+ -method {
+ incr decr invoke update
+ }
+ -flag {
+ -allowempty -autorepeat -command -decrcmd -disablecallback
+ -disabledforeground -incrcmd -initwait -integer -llimit
+ -repeatrate -max -min -selectmode -step -state -validatecmd
+ -value -variable -ulimit
+ }
+ -forcecall {
+ -variable -state
+ }
+ -configspec {
+ {-allowempty allowEmpty AllowEmpty false}
+ {-autorepeat autoRepeat AutoRepeat true}
+ {-command command Command ""}
+ {-decrcmd decrCmd DecrCmd ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-disabledforeground disabledForeground DisabledForeground #303030}
+ {-incrcmd incrCmd IncrCmd ""}
+ {-initwait initWait InitWait 500}
+ {-integer integer Integer false}
+ {-max max Max ""}
+ {-min min Min ""}
+ {-repeatrate repeatRate RepeatRate 50}
+ {-step step Step 1}
+ {-state state State normal}
+ {-selectmode selectMode SelectMode normal}
+ {-validatecmd validateCmd ValidateCmd ""}
+ {-value value Value 0}
+ {-variable variable Variable ""}
+ }
+ -alias {
+ {-llimit -min}
+ {-ulimit -max}
+ }
+ -default {
+ {.borderWidth 0}
+ {*entry.relief sunken}
+ {*entry.width 5}
+ {*label.anchor e}
+ {*label.borderWidth 0}
+ {*Button.anchor c}
+ {*Button.borderWidth 2}
+ {*Button.highlightThickness 1}
+ {*Button.takeFocus 0}
+ }
+}
+
+proc tixControl:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(varInited) 0
+ set data(serial) 0
+}
+
+proc tixControl:ConstructFramedWidget {w frame} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructFramedWidget $frame
+
+ set data(w:entry) [entry $frame.entry]
+
+ set data(w:incr) \
+ [button $frame.incr -bitmap [tix getbitmap incr] -takefocus 0]
+ set data(w:decr) \
+ [button $frame.decr -bitmap [tix getbitmap decr] -takefocus 0]
+
+# tixForm $data(w:entry) -left 0 -top 0 -bottom -1 -right $data(w:decr)
+# tixForm $data(w:incr) -right -1 -top 0 -bottom %50
+# tixForm $data(w:decr) -right -1 -top $data(w:incr) -bottom -1
+
+ pack $data(w:entry) -side left -expand yes -fill both
+ pack $data(w:decr) -side bottom -fill both -expand yes
+ pack $data(w:incr) -side top -fill both -expand yes
+
+ $data(w:entry) delete 0 end
+ $data(w:entry) insert 0 $data(-value)
+
+ # This value is used to configure the disable/normal fg of the ebtry
+ set data(entryfg) [$data(w:entry) cget -fg]
+ set data(labelfg) [$data(w:label) cget -fg]
+}
+
+proc tixControl:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ bind $data(w:incr) <ButtonPress-1> \
+ [list after idle tixControl:StartRepeat $w 1]
+ bind $data(w:decr) <ButtonPress-1> \
+ [list after idle tixControl:StartRepeat $w -1]
+
+ # These bindings will stop the button autorepeat when the
+ # mouse button is up
+ foreach btn [list $data(w:incr) $data(w:decr)] {
+ bind $btn <ButtonRelease-1> [list tixControl:StopRepeat $w]
+ }
+
+ tixSetMegaWidget $data(w:entry) $w
+
+ # If user press <return>, verify the value and call the -command
+ #
+ tixAddBindTag $data(w:entry) TixControl:Entry
+}
+
+proc tixControlBind {} {
+ tixBind TixControl:Entry <Return> {
+ tixControl:Invoke [tixGetMegaWidget %W] 1
+ }
+ tixBind TixControl:Entry <Escape> {
+ tixControl:Escape [tixGetMegaWidget %W]
+ }
+ tixBind TixControl:Entry <Up> {
+ [tixGetMegaWidget %W] incr
+ }
+ tixBind TixControl:Entry <Down> {
+ [tixGetMegaWidget %W] decr
+ }
+ tixBind TixControl:Entry <FocusOut> {
+ if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
+ tixControl:Tab [tixGetMegaWidget %W] %d
+ }
+ }
+ tixBind TixControl:Entry <Any-KeyPress> {
+ tixControl:KeyPress [tixGetMegaWidget %W]
+ }
+ tixBind TixControl:Entry <Any-Tab> {
+ # This has a higher priority than the <Any-KeyPress> binding
+ # --> so that data(edited) is not set
+ }
+}
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixControl:config-state {w arg} {
+ upvar #0 $w data
+
+ if {$arg eq "normal"} {
+ $data(w:incr) config -state $arg
+ $data(w:decr) config -state $arg
+ catch {
+ $data(w:label) config -fg $data(labelfg)
+ }
+ $data(w:entry) config -state $arg -fg $data(entryfg)
+ } else {
+ $data(w:incr) config -state $arg
+ $data(w:decr) config -state $arg
+ catch {
+ $data(w:label) config -fg $data(-disabledforeground)
+ }
+ $data(w:entry) config -state $arg -fg $data(-disabledforeground)
+ }
+}
+
+proc tixControl:config-value {w value} {
+ upvar #0 $w data
+
+ tixControl:SetValue $w $value 0 1
+
+ # This will tell the Intrinsics: "Please use this value"
+ # because "value" might be altered by SetValues
+ #
+ return $data(-value)
+}
+
+proc tixControl:config-variable {w arg} {
+ upvar #0 $w data
+
+ if {[tixVariable:ConfigVariable $w $arg]} {
+ # The value of data(-value) is changed if tixVariable:ConfigVariable
+ # returns true
+ tixControl:SetValue $w $data(-value) 1 1
+ }
+ catch {
+ unset data(varInited)
+ }
+ set data(-variable) $arg
+}
+
+#----------------------------------------------------------------------
+# User Commands
+#----------------------------------------------------------------------
+proc tixControl:incr {w {by 1}} {
+ upvar #0 $w data
+
+ if {$data(-state) ne "disabled"} {
+ if {![catch {$data(w:entry) index sel.first}]} {
+ $data(w:entry) select from end
+ $data(w:entry) select to end
+ }
+ # CYGNUS - why set value before changing it?
+ #tixControl:SetValue $w [$data(w:entry) get] 0 1
+ tixControl:AdjustValue $w $by
+ }
+}
+
+proc tixControl:decr {w {by 1}} {
+ upvar #0 $w data
+
+ if {$data(-state) ne "disabled"} {
+ if {![catch {$data(w:entry) index sel.first}]} {
+ $data(w:entry) select from end
+ $data(w:entry) select to end
+ }
+ # CYGNUS - why set value before changing it?
+ #tixControl:SetValue $w [$data(w:entry) get] 0 1
+ tixControl:AdjustValue $w [expr {0 - $by}]
+ }
+}
+
+proc tixControl:invoke {w} {
+ upvar #0 $w data
+
+ tixControl:Invoke $w 0
+}
+
+proc tixControl:update {w} {
+ upvar #0 $w data
+
+ if {[info exists data(edited)]} {
+ tixControl:invoke $w
+ }
+}
+
+#----------------------------------------------------------------------
+# Internal Commands
+#----------------------------------------------------------------------
+
+# Change the value by a multiple of the data(-step)
+#
+proc tixControl:AdjustValue {w amount} {
+ upvar #0 $w data
+
+ if {$amount == 1 && [llength $data(-incrcmd)]} {
+ set newValue [tixEvalCmdBinding $w $data(-incrcmd) "" $data(-value)]
+ } elseif {$amount == -1 && [llength $data(-decrcmd)]} {
+ set newValue [tixEvalCmdBinding $w $data(-decrcmd) "" $data(-value)]
+ } else {
+ set newValue [expr {$data(-value) + $amount * $data(-step)}]
+ }
+
+ if {$data(-state) ne "disabled"} {
+ tixControl:SetValue $w $newValue 0 1
+ }
+}
+
+proc tixControl:SetValue {w newvalue noUpdate forced} {
+ upvar #0 $w data
+
+ if {[$data(w:entry) selection present]} {
+ set oldSelection [list [$data(w:entry) index sel.first] \
+ [$data(w:entry) index sel.last]]
+ }
+
+ set oldvalue $data(-value)
+ set oldCursor [$data(w:entry) index insert]
+ set changed 0
+
+
+ if {[llength $data(-validatecmd)]} {
+ # Call the user supplied validation command
+ #
+ set data(-value) [tixEvalCmdBinding $w $data(-validatecmd) "" $newvalue]
+ } else {
+ # Here we only allow int or floating numbers
+ #
+ # If the new value is not a valid number, the old value will be
+ # kept due to the "catch" statements
+ #
+ if {[catch {expr 0+$newvalue}]} {
+ set newvalue 0
+ set data(-value) 0
+ set changed 1
+ }
+
+ if {$newvalue == ""} {
+ if {![string is true -strict $data(-allowempty)]} {
+ set newvalue 0
+ set changed 1
+ } else {
+ set data(-value) ""
+ }
+ }
+
+ if {$newvalue != ""} {
+ # Change this to a valid decimal string (trim leading 0)
+ #
+ regsub -- {^[0]*} $newvalue "" newvalue
+ if {[catch {expr 0+$newvalue}]} {
+ set newvalue 0
+ set data(-value) 0
+ set changed 1
+ }
+ if {$newvalue == ""} {
+ set newvalue 0
+ }
+
+ if {[string is true -strict $data(-integer)]} {
+ set data(-value) [tixGetInt -nocomplain $newvalue]
+ } else {
+ if {[catch {set data(-value) [format "%d" $newvalue]}]} {
+ if {[catch {set data(-value) [expr $newvalue+0.0]}]} {
+ set data(-value) $oldvalue
+ }
+ }
+ }
+
+ # Now perform boundary checking
+ #
+ if {$data(-max) != "" && $data(-value) > $data(-max)} {
+ set data(-value) $data(-max)
+ }
+ if {$data(-min) != "" && $data(-value) < $data(-min)} {
+ set data(-value) $data(-min)
+ }
+ }
+ }
+
+ if {! $noUpdate} {
+ tixVariable:UpdateVariable $w
+ }
+
+ if {$forced || ($newvalue ne $data(-value)) || $changed} {
+ $data(w:entry) delete 0 end
+ $data(w:entry) insert 0 $data(-value)
+ $data(w:entry) icursor $oldCursor
+ if {[info exists oldSelection]} {
+ eval [list $data(w:entry) selection range] $oldSelection
+ }
+ }
+
+ if {!$data(-disablecallback) && $data(-command) != ""} {
+ if {![info exists data(varInited)]} {
+ set bind(specs) ""
+ tixEvalCmdBinding $w $data(-command) bind $data(-value)
+ }
+ }
+}
+
+proc tixControl:Invoke {w forced} {
+ upvar #0 $w data
+
+ catch {
+ unset data(edited)
+ }
+
+ if {[catch {$data(w:entry) index sel.first}] == 0} {
+ # THIS ENTRY OWNS SELECTION --> TURN IT OFF
+ #
+ $data(w:entry) select from end
+ $data(w:entry) select to end
+ }
+
+ tixControl:SetValue $w [$data(w:entry) get] 0 $forced
+}
+
+#----------------------------------------------------------------------
+# The three functions StartRepeat, Repeat and StopRepeat make use of the
+# data(serial) variable to discard spurious repeats: If a button is clicked
+# repeatedly but is not hold down, the serial counter will increase
+# successively and all "after" time event handlers will be discarded
+#----------------------------------------------------------------------
+proc tixControl:StartRepeat {w amount} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ incr data(serial)
+ # CYGNUS bug fix
+ # Need to set a local variable because otherwise the buttonrelease
+ # callback could change the value of data(serial) between now and
+ # the time the repeat is scheduled.
+ set serial $data(serial)
+
+ if {![catch {$data(w:entry) index sel.first}]} {
+ $data(w:entry) select from end
+ $data(w:entry) select to end
+ }
+
+ if {[info exists data(edited)]} {
+ unset data(edited)
+ tixControl:SetValue $w [$data(w:entry) get] 0 1
+ }
+
+ tixControl:AdjustValue $w $amount
+
+ if {$data(-autorepeat)} {
+ after $data(-initwait) tixControl:Repeat $w $amount $serial
+ }
+
+ focus $data(w:entry)
+}
+
+proc tixControl:Repeat {w amount serial} {
+ if {![winfo exists $w]} {
+ return
+ }
+ upvar #0 $w data
+
+ if {$serial eq $data(serial)} {
+ tixControl:AdjustValue $w $amount
+
+ if {$data(-autorepeat)} {
+ after $data(-repeatrate) tixControl:Repeat $w $amount $serial
+ }
+ }
+}
+
+proc tixControl:StopRepeat {w} {
+ upvar #0 $w data
+
+ incr data(serial)
+}
+
+proc tixControl:Destructor {w} {
+
+ tixVariable:DeleteVariable $w
+
+ # Chain this to the superclass
+ #
+ tixChainMethod $w Destructor
+}
+
+# ToDo: maybe should return -code break if the value is not good ...
+#
+proc tixControl:Tab {w detail} {
+ upvar #0 $w data
+
+ if {![info exists data(edited)]} {
+ return
+ } else {
+ unset data(edited)
+ }
+
+ tixControl:invoke $w
+}
+
+proc tixControl:Escape {w} {
+ upvar #0 $w data
+
+ $data(w:entry) delete 0 end
+ $data(w:entry) insert 0 $data(-value)
+}
+
+proc tixControl:KeyPress {w} {
+ upvar #0 $w data
+
+ if {$data(-selectmode) eq "normal"} {
+ set data(edited) 0
+ return
+ } else {
+ # == "immediate"
+ after 1 tixControl:invoke $w
+ }
+}
Added: external/tix-8.4.2.x/library/DefSchm.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DefSchm.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,103 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DefSchm.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# DefSchm.tcl --
+#
+# Implements the default color and font schemes for Tix.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+proc tixSetDefaultFontset {} {
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ # This should be Tahoma for Win2000/XP
+ set font "MS Sans Serif"
+ set fixedfont "Courier New"
+ set size 8
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ set size -12
+ }
+
+ set tixOption(font) [list $font $size]
+ set tixOption(bold_font) [list $font $size bold]
+ set tixOption(menu_font) [list $font $size]
+ set tixOption(italic_font) [list $font $size bold italic]
+ set tixOption(fixed_font) [list $fixedfont $size]
+ set tixOption(border1) 1
+}
+
+proc tixSetDefaultScheme-Color {} {
+ global tixOption
+
+ set tixOption(bg) #d9d9d9
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) #c3c3c3
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) #a3a3a3
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) #a3a3a3
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) #ececec
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) #fcfcfc
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) #d9d9d9
+ set tixOption(input2_bg) #d9d9d9
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) #c3c3c3
+
+ set tixOption(selector) #b03060
+}
+
+proc tixSetDefaultScheme-Mono {} {
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+}
Added: external/tix-8.4.2.x/library/DialogS.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DialogS.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,175 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DialogS.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# DialogS.tcl --
+#
+#
+# Implements the DialogShell widget. It tells the window
+# manager that it is a dialog window and should be treated specially.
+# The exact treatment depends on the treatment of the window
+# manager
+#
+# Copyright (c) 1994-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.
+#
+
+tixWidgetClass tixDialogShell {
+ -superclass tixShell
+ -classname TixDialogShell
+ -method {
+ popdown popup center
+ }
+ -flag {
+ -mapped -minheight -minwidth -parent -transient
+ }
+ -static {}
+ -configspec {
+ {-mapped mapped Mapped 0}
+ {-minwidth minWidth MinWidth 0}
+ {-minheight minHeight MinHeight 0}
+ {-transient transient Transient true}
+ {-parent parent Parent ""}
+ }
+}
+
+#----------------------------------------------------------------------
+# Construct widget
+#----------------------------------------------------------------------
+
+proc tixDialogShell:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ # Set the title of this shell appropriately
+ #
+ if {$data(-title) == ""} {
+ # dynamically sets the title
+ #
+ set data(-title) [winfo name $w]
+ }
+ wm title $w $data(-title)
+
+ # Set the parent of this dialog shell
+ #
+ if {$data(-parent) == ""} {
+ set data(-parent) [winfo parent $w]
+ }
+
+ # Set the minsize and maxsize of the thing
+ #
+ wm minsize $w $data(-minwidth) $data(-minheight)
+ wm transient $w ""
+}
+
+# The next procedures manage the dialog boxes
+#
+proc tixDialogShell:popup {w {parent ""}} {
+ upvar #0 $w data
+
+ # First update to make sure the boxes are the right size
+ #
+ update idletask
+
+ # Then we set the position and update
+ #
+ # tixDialogShell:center $w $parent
+
+ # and now make it visible. Viola! Centered over parent.
+ #
+ wm deiconify $w
+ after idle raise $w
+}
+
+# This procedure centers a dialog box over a window making sure that the
+# dialog box doesn't appear off the screen
+#
+# However, if the parent is smaller than this dialog, make this dialog
+# appear at parent(x,y) + (20,20)
+#
+proc tixDialogShell:center {w {parent ""}} {
+ upvar #0 $w data
+
+ # Tell the WM that we'll do this ourselves.
+ wm sizefrom $w user
+ wm positionfrom $w user
+
+ if {$parent == ""} {
+ set parent $data(-parent)
+ }
+ if {$parent == "" || [catch {set parent [winfo toplevel $parent]}]} {
+ set parent "."
+ }
+
+ # Where is my parent and what are it's dimensions
+ #
+ if {$parent != ""} {
+ set pargeo [split [wm geometry $parent] "+x"]
+ set parentW [lindex $pargeo 0]
+ set parentH [lindex $pargeo 1]
+ set parx [lindex $pargeo 2]
+ set pary [lindex $pargeo 3]
+
+ if {[string is true -strict $data(-transient)]} {
+ wm transient $w $parent
+ }
+ } else {
+ set parentW [winfo screenwidth $w]
+ set parentH [winfo screenheight $w]
+ set parx 0
+ set pary 0
+ set parent [winfo parent $w]
+ }
+
+ # What are is the offset of the virtual window
+ set vrootx [winfo vrootx $parent]
+ set vrooty [winfo vrooty $parent]
+
+ # What are my dimensions ?
+ set dialogW [winfo reqwidth $w]
+ set dialogH [winfo reqheight $w]
+
+ if {$dialogW < $parentW-30 || $dialogW < $parentH-30} {
+ set dialogx [expr {$parx+($parentW-$dialogW)/2+$vrootx}]
+ set dialogy [expr {$pary+($parentH-$dialogH)/2+$vrooty}]
+ } else {
+ # This dialog is too big. Place it at (parentx, parenty) + (20,20)
+ #
+ set dialogx [expr {$parx+20+$vrootx}]
+ set dialogy [expr {$pary+20+$vrooty}]
+ }
+
+ set maxx [expr {[winfo screenwidth $parent] - $dialogW}]
+ set maxy [expr {[winfo screenheight $parent] - $dialogH}]
+
+ # Make sure it doesn't go off screen
+ #
+ if {$dialogx < 0} {
+ set dialogx 0
+ } else {
+ if {$dialogx > $maxx} {
+ set dialogx $maxx
+ }
+ }
+ if {$dialogy < 0} {
+ set dialogy 0
+ } else {
+ if {$dialogy > $maxy} {
+ set dialogy $maxy
+ }
+ }
+
+ # set my new position (and dimensions)
+ #
+ if {[wm geometry $w] == "1x1+0+0"} {
+ wm geometry $w ${dialogW}x${dialogH}+${dialogx}+${dialogy}
+ }
+}
+
+proc tixDialogShell:popdown {w args} {
+ wm withdraw $w
+}
+
Added: external/tix-8.4.2.x/library/DirBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DirBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,207 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirBox.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# DirBox.tcl --
+#
+# Implements the tixDirSelectBox widget.
+#
+# - overrides the -browsecmd and -command options of the
+# HList subwidget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixDirSelectBox {
+ -classname TixDirSelectBox
+ -superclass tixPrimitive
+ -method {
+ }
+ -flag {
+ -command -disablecallback -value
+ }
+ -configspec {
+ {-command command Command ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-label label Label "Directory:"}
+ {-value value Value ""}
+ }
+ -forcecall {
+ -value -label
+ }
+ -default {
+ {*combo*listbox.height 5}
+ {*combo.label.anchor w}
+ {*combo.labelSide top}
+ {*combo.history true}
+ {*combo.historyLimit 20}
+ }
+}
+
+proc tixDirSelectBox:InitWidgetRec {w} {
+ upvar #0 $w data
+ tixChainMethod $w InitWidgetRec
+}
+
+proc tixDirSelectBox:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ set data(w:dircbx) [tixFileComboBox $w.dircbx]
+ set data(w:dirlist) [tixDirList $w.dirlist]
+
+ pack $data(w:dircbx) -side top -fill x -padx 4 -pady 2
+ pack $data(w:dirlist) -side top -fill both -expand yes -padx 4 -pady 2
+
+ if {$data(-value) eq ""} {
+ set data(-value) [pwd]
+ }
+}
+
+proc tixDirSelectBox:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:dircbx) config -command [list tixDirSelectBox:Cmd-DirCbx $w]
+ $data(w:dirlist) config -command [list tixDirSelectBox:Cmd-DirList $w]\
+ -browsecmd [list tixDirSelectBox:Browse-DirList $w]
+}
+
+#----------------------------------------------------------------------
+# Incoming event: User
+#----------------------------------------------------------------------
+
+# User activates the FileComboBox
+#
+#
+proc tixDirSelectBox:Cmd-DirCbx {w args} {
+ upvar #0 $w data
+
+ set fInfo [tixEvent value]
+ set path [lindex $fInfo 0]
+
+ if {![file exists $path]} {
+ # 1.1 Check for validity. The pathname cannot contain invalid chars
+ #
+ if {![tixFSIsValid $path]} {
+ tk_messageBox -title "Invalid Directory" \
+ -type ok -icon error \
+ -message "\"$path\" is not a valid directory name"
+ $data(w:dircbx) config \
+ -text [tixFSDisplayName [file normalize $data(-value)]] \
+ -directory $data(-value)
+ return
+ }
+
+ # 1.2 Prompt for creation
+ #
+ set choice [tk_messageBox -title "Create Directory?" \
+ -type yesno -icon question \
+ -message "Directory \"$path\" does not exist.\
+ \nDo you want to create it?"]
+ if {$choice eq "yes"
+ && [catch {file mkdir [file dirname $path]} err]} {
+ tk_messageBox -title "Error Creating Directory" \
+ -icon error -type ok \
+ -message "Cannot create directory \"$path\":\n$err"
+ set choice "no"
+ }
+ if {$choice eq "no"} {
+ $data(w:dircbx) config \
+ -text [tixFSDisplayName [file normalize $data(-value)]] \
+ -directory $data(-value)
+ return
+ }
+ tixDirSelectBox:SetValue $w $path 1 1
+ } elseif {![file isdirectory $path]} {
+ # 2.1: Can't choose a non-directory file
+ #
+ tk_messageBox -title "Invalid Directory" \
+ -type ok -icon error \
+ -message "\"$path\" is not a directory"
+ $data(w:dircbx) config \
+ -text [tixFSDisplayName [file normalize $data(-value)]] \
+ -directory $data(-value)
+ return
+ } else {
+ # OK. It is an existing directory
+ #
+ tixDirSelectBox:SetValue $w $path 1 1
+ }
+}
+
+# User activates the dir list
+#
+#
+proc tixDirSelectBox:Cmd-DirList {w args} {
+ upvar #0 $w data
+
+ set dir $data(-value)
+ catch {set dir [tixEvent flag V]}
+ set dir [tixFSNormalize $dir]
+ tixDirSelectBox:SetValue $w $dir 0 0
+}
+
+# User browses the dir list
+#
+#
+proc tixDirSelectBox:Browse-DirList {w args} {
+ upvar #0 $w data
+
+ set dir $data(-value)
+ catch {set dir [tixEvent flag V]}
+ set dir [tixFSNormalize $dir]
+ tixDirSelectBox:SetValue $w $dir 0 0
+}
+
+#----------------------------------------------------------------------
+# Incoming event: Application
+#----------------------------------------------------------------------
+proc tixDirSelectBox:config-value {w value} {
+ upvar #0 $w data
+
+ set value [tixFSNormalize $value]
+ tixDirSelectBox:SetValue $w $value 1 1
+ return $value
+}
+
+proc tixDirSelectBox:config-label {w value} {
+ upvar #0 $w data
+
+ $data(w:dircbx) subwidget combo config -label $value
+}
+
+#----------------------------------------------------------------------
+#
+# Internal functions
+#
+#----------------------------------------------------------------------
+
+# Arguments:
+# callback:Bool Should we invoke the the -command.
+# setlist:Bool Should we set the -value of the DirList subwidget.
+#
+proc tixDirSelectBox:SetValue {w dir callback setlist} {
+ upvar #0 $w data
+
+ set data(-value) $dir
+ $data(w:dircbx) config -text [tixFSDisplayName $dir] -directory $dir
+ if {$setlist && [file isdirectory $dir]} {
+ tixSetSilent $data(w:dirlist) $dir
+ }
+
+ if {$callback} {
+ if {!$data(-disablecallback) && [llength $data(-command)]} {
+ set bind(specs) {%V}
+ set bind(%V) $data(-value)
+
+ tixEvalCmdBinding $w $data(-command) bind $data(-value)
+ }
+ }
+}
Added: external/tix-8.4.2.x/library/DirDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DirDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,95 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirDlg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# DirDlg.tcl --
+#
+# Implements the Directory Selection Dialog widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixDirSelectDialog {
+ -classname TixDirSelectDialog
+ -superclass tixDialogShell
+ -method {}
+ -flag {
+ -command
+ }
+ -configspec {
+ {-command command Command ""}
+ {-title title Title "Select A Directory"}
+ }
+
+ -default {
+ {*ok.text "OK"}
+ {*ok.underline 0}
+ {*ok.width 6}
+ {*cancel.text "Cancel"}
+ {*cancel.underline 0}
+ {*cancel.width 6}
+ {*dirbox.borderWidth 1}
+ {*dirbox.relief raised}
+ }
+}
+
+proc tixDirSelectDialog:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ # the buttons
+ frame $w.f -relief raised -bd 1
+ set data(w:ok) [button $w.f.ok -command \
+ "tixDirSelectDialog:OK $w"]
+ set data(w:cancel) [button $w.f.cancel -command \
+ "tixDirSelectDialog:Cancel $w"]
+
+ pack $data(w:ok) $data(w:cancel) -side left -expand yes -padx 10 -pady 8
+ pack $w.f -side bottom -fill x
+ # the dir select box
+ set data(w:dirbox) [tixDirSelectBox $w.dirbox \
+ -command [list tixDirSelectDialog:DirBoxCmd $w]]
+ pack $data(w:dirbox) -expand yes -fill both
+}
+
+proc tixDirSelectDialog:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ bind $w <Alt-Key-d> "focus [$data(w:dirbox) subwidget dircbx]"
+}
+
+proc tixDirSelectDialog:OK {w} {
+ upvar #0 $w data
+
+ wm withdraw $w
+ $data(w:dirbox) subwidget dircbx invoke
+}
+
+proc tixDirSelectDialog:DirBoxCmd {w args} {
+ upvar #0 $w data
+
+ set value [tixEvent flag V]
+ wm withdraw $w
+ tixDirSelectDialog:CallCmd $w $value
+}
+
+proc tixDirSelectDialog:CallCmd {w value} {
+ upvar #0 $w data
+
+ if {$data(-command) != ""} {
+ set bind(specs) "%V"
+ set bind(%V) $value
+ tixEvalCmdBinding $w $data(-command) bind $value
+ }
+}
+
+proc tixDirSelectDialog:Cancel {w} {
+ wm withdraw $w
+}
Added: external/tix-8.4.2.x/library/DirList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DirList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,272 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirList.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# DirList.tcl --
+#
+# Implements the tixDirList widget.
+#
+# - overrides the -browsecmd and -command options of the
+# HList subwidget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixDirList {
+ -classname TixDirList
+ -superclass tixScrolledHList
+ -method {
+ chdir
+ }
+ -flag {
+ -browsecmd -command -dircmd -disablecallback
+ -root -rootname -showhidden -value
+ }
+ -configspec {
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-dircmd dirCmd DirCmd ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-root root Root ""}
+ {-rootname rootName RootName ""}
+ {-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
+ {-value value Value ""}
+ }
+ -default {
+ {.scrollbar auto}
+ {*borderWidth 1}
+ {*hlist.background #c3c3c3}
+ {*hlist.indent 7}
+ {*hlist.relief sunken}
+ {*hlist.height 10}
+ {*hlist.width 20}
+ {*hlist.padX 2}
+ {*hlist.padY 0}
+ {*hlist.wideSelection 0}
+ {*hlist.drawBranch 0}
+ {*hlist.highlightBackground #d9d9d9}
+ {*hlist.itemType imagetext}
+ {*hlist.takeFocus 1}
+ }
+ -forcecall {
+ -value
+ }
+}
+
+# Important data members:
+#
+# data(vpath)
+# The currently selected vpath. This internal variable is useful on
+# the Win95 platform, where an directory may correspond to more than
+# one node in the hierarchy. For example, C:\Windows\Desktop\Foo
+# can appead as "Desktop\Foo" and
+# "Desktop\My Computer\C:\Windows\Desktop\Foo". This variable tells us
+# which icon should we show given the same DOS pathname.
+#
+
+proc tixDirList:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+}
+
+proc tixDirList:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ $data(w:hlist) config -separator [tixFSSep] -selectmode "single"
+}
+
+proc tixDirList:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:hlist) config \
+ -browsecmd [list tixDirList:Browse $w] \
+ -command [list tixDirList:Command $w]
+
+ if {$data(-value) eq ""
+ || [catch {set data(-value) [tixFSNormalize $data(-value)]}]} {
+ set data(-value) [pwd]
+ }
+ set data(vpath) [tixFSInternal $data(-value)]
+}
+
+#----------------------------------------------------------------------
+# Incoming-Events
+#----------------------------------------------------------------------
+proc tixDirList:Browse {w args} {
+ upvar #0 $w data
+
+ set vpath [tixEvent flag V]
+ set value [$data(w:hlist) info data $vpath]
+
+ tixDirList:HighLight $w $vpath
+
+ set data(vpath) $vpath
+ set data(-value) [tixFSExternal $value]
+
+ tixDirList:CallBrowseCmd $w $data(-value)
+}
+
+proc tixDirList:Command {w args} {
+ upvar #0 $w data
+
+ set vpath [tixEvent value]
+ set value [$data(w:hlist) info data $vpath]
+ set data(-value) [tixFSExternal $value]
+
+ tixDirList:LoadDir $w [tixFSNativeNorm $value] $vpath
+ tixDirList:HighLight $w $vpath
+
+ set data(vpath) $vpath
+ tixDirList:CallCommand $w $data(-value)
+}
+
+#----------------------------------------------------------------------
+# Outgoing-Events
+#----------------------------------------------------------------------
+
+proc tixDirList:CallBrowseCmd {w npath} {
+ upvar #0 $w data
+
+ if {[llength $data(-browsecmd)]} {
+ set bind(specs) "%V"
+ set bind(%V) $npath
+ tixEvalCmdBinding $w $data(-browsecmd) bind $npath
+ }
+}
+
+proc tixDirList:CallCommand {w npath} {
+ upvar #0 $w data
+
+ if {[llength $data(-command)] && !$data(-disablecallback)} {
+ set bind(specs) "%V"
+ set bind(%V) $npath
+ tixEvalCmdBinding $w $data(-command) bind $npath
+ }
+}
+
+#----------------------------------------------------------------------
+# Directory loading
+#----------------------------------------------------------------------
+proc tixDirList:LoadDir {w {npath ""} {vpath ""}} {
+ upvar #0 $w data
+
+ tixBusy $w on $data(w:hlist)
+
+ $data(w:hlist) delete all
+
+ if {$npath eq ""} {
+ set npath [tixFSNativeNorm $data(-value)]
+ set vpath [tixFSInternal $npath]
+ }
+
+ tixDirList:ListHierachy $w $npath $vpath
+ tixDirList:ListSubDirs $w $npath $vpath
+
+ tixWidgetDoWhenIdle tixBusy $w off $data(w:hlist)
+}
+
+proc tixDirList:ListHierachy {w npath vpath} {
+ upvar #0 $w data
+
+ set img [tix getimage openfold]
+ set curpath ""
+ foreach part [tixFSAncestors $npath] {
+ set curpath [file join $curpath $part]
+ set text [tixFSDisplayFileName $curpath]
+ set vpath [tixFSInternal $curpath]
+ $data(w:hlist) add $vpath -text $text -data $curpath -image $img
+ }
+}
+
+proc tixDirList:ListSubDirs {w npath vpath} {
+ upvar #0 $w data
+
+ $data(w:hlist) entryconfig $vpath -image [tix getimage act_fold]
+
+ set img [tix getimage folder]
+ foreach ent [tixFSListDir $npath 1 0 0 $data(-showhidden)] {
+ set curpath [file join $npath $ent]
+ set vp [tixFSInternal $curpath]
+ if {![$data(w:hlist) info exists $vp]} {
+ $data(w:hlist) add $vp -text $ent -data $curpath -image $img
+ }
+ }
+}
+
+proc tixDirList:SetValue {w npath vpath {flag ""}} {
+ upvar #0 $w data
+
+ if {$flag eq "reload" || ![$data(w:hlist) info exists $vpath]} {
+ tixDirList:LoadDir $w $npath $vpath
+ }
+
+ tixDirList:HighLight $w $vpath
+
+ set data(-value) [tixFSNativeNorm $npath]
+ set data(vpath) $vpath
+ tixDirList:CallCommand $w $data(-value)
+}
+
+proc tixDirList:HighLight {w vpath} {
+ upvar #0 $w data
+
+ if {$data(vpath) ne $vpath} {
+ set old $data(vpath)
+
+ if {[$data(w:hlist) info exists $old]} {
+ # Un-highlight the originally selected entry by changing its
+ # folder image
+
+ if {[llength [$data(w:hlist) info children $old]]} {
+ set img [tix getimage openfold]
+ } else {
+ set img [tix getimage folder]
+ }
+ $data(w:hlist) entryconfig $old -image $img
+ }
+ }
+
+ # Highlight the newly selected entry
+ #
+ $data(w:hlist) entryconfig $vpath -image [tix getimage act_fold]
+ $data(w:hlist) anchor set $vpath
+ $data(w:hlist) select clear
+ $data(w:hlist) select set $vpath
+ $data(w:hlist) see $vpath
+}
+
+#----------------------------------------------------------------------
+# Config options
+#----------------------------------------------------------------------
+proc tixDirList:config-value {w value} {
+ upvar #0 $w data
+
+ tixDirList:chdir $w $value
+ return $data(-value)
+}
+
+proc tixDirList:config-showhidden {w value} {
+ upvar #0 $w data
+
+ tixWidgetDoWhenIdle tixDirList:LoadDir $w
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+proc tixDirList:chdir {w value} {
+ upvar #0 $w data
+
+ set npath [tixFSNativeNorm $value]
+ tixDirList:SetValue $w $npath [tixFSInternal $npath]
+}
Added: external/tix-8.4.2.x/library/DirTree.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DirTree.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,350 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirTree.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# DirTree.tcl --
+#
+# Implements directory tree for Unix file systems
+#
+# What the indicators mean:
+#
+# (+): There are some subdirectories in this directory which are not
+# currently visible.
+# (-): This directory has some subdirectories and they are all visible
+#
+# none: The dir has no subdirectori(es).
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+##
+## The tixDirTree require special FS handling due to it's limited
+## separator idea (instead of real tree).
+##
+
+tixWidgetClass tixDirTree {
+ -classname TixDirTree
+ -superclass tixVTree
+ -method {
+ activate chdir refresh
+ }
+ -flag {
+ -browsecmd -command -directory -disablecallback -showhidden -value
+ }
+ -configspec {
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
+ {-value value Value ""}
+ }
+ -alias {
+ {-directory -value}
+ }
+ -default {
+ {.scrollbar auto}
+ {*Scrollbar.takeFocus 0}
+ {*borderWidth 1}
+ {*hlist.indicator 1}
+ {*hlist.background #c3c3c3}
+ {*hlist.drawBranch 1}
+ {*hlist.height 10}
+ {*hlist.highlightBackground #d9d9d9}
+ {*hlist.indent 20}
+ {*hlist.itemType imagetext}
+ {*hlist.padX 3}
+ {*hlist.padY 0}
+ {*hlist.relief sunken}
+ {*hlist.takeFocus 1}
+ {*hlist.wideSelection 0}
+ {*hlist.width 20}
+ }
+}
+
+proc tixDirTree:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ if {$data(-value) == ""} {
+ set data(-value) [pwd]
+ }
+
+ tixDirTree:SetDir $w [file normalize $data(-value)]
+}
+
+proc tixDirTree:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ tixDoWhenMapped $w [list tixDirTree:StartUp $w]
+
+ $data(w:hlist) config -separator [tixFSSep] \
+ -selectmode "single" -drawbranch 1
+
+ # We must creat an extra copy of these images to avoid flashes on
+ # the screen when user changes directory
+ #
+ set data(images) [image create compound -window $data(w:hlist)]
+ $data(images) add image -image [tix getimage act_fold]
+ $data(images) add image -image [tix getimage folder]
+ $data(images) add image -image [tix getimage openfold]
+}
+
+proc tixDirTree:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+}
+
+# Add one dir into the node (parent directory), sorted alphabetically
+#
+proc tixDirTree:AddToList {w fsdir image} {
+ upvar #0 $w data
+
+ set dir [tixFSInternal $fsdir]
+
+ if {[$data(w:hlist) info exists $dir]} { return }
+
+ set parent [file dirname $fsdir]
+ if {$fsdir eq $parent} {
+ # root node
+ set node ""
+ } else {
+ # regular node
+ set node [tixFSInternal $parent]
+ }
+ set added 0
+ set text [tixFSDisplayFileName $fsdir]
+ foreach sib [$data(w:hlist) info children $node] {
+ if {[string compare $dir $sib] < 0} {
+ $data(w:hlist) add $dir -before $sib -text $text -image $image
+ set added 1
+ break
+ }
+ }
+ if {!$added} {
+ $data(w:hlist) add $dir -text $text -image $image
+ }
+
+ # Check to see if we have children (%% optimize!)
+ if {[llength [tixFSListDir $fsdir 1 0 0 $data(-showhidden)]]} {
+ tixVTree:SetMode $w $dir open
+ }
+}
+
+proc tixDirTree:LoadDir {w fsdir {mode toggle}} {
+ if {![winfo exists $w]} { return }
+ upvar #0 $w data
+
+ # Add the directory and set it to the active directory
+ #
+ set fsdir [tixFSNormalize $fsdir]
+ set dir [tixFSInternal $fsdir]
+ if {![$data(w:hlist) info exists $dir]} {
+ # Add $dir and all ancestors of $dir into the HList widget
+ set fspath ""
+ set imgopenfold [tix getimage openfold]
+ foreach part [tixFSAncestors $fsdir] {
+ set fspath [file join $fspath $part]
+ tixDirTree:AddToList $w $fspath $imgopenfold
+ }
+ }
+ $data(w:hlist) entryconfig $dir -image [tix getimage act_fold]
+
+ if {$mode eq "toggle"} {
+ if {[llength [$data(w:hlist) info children $dir]]} {
+ set mode flatten
+ } else {
+ set mode expand
+ }
+ }
+
+ if {$mode eq "expand"} {
+ # Add all the sub directories of fsdir into the HList widget
+ tixBusy $w on $data(w:hlist)
+ set imgfolder [tix getimage folder]
+ foreach part [tixFSListDir $fsdir 1 0 0 $data(-showhidden)] {
+ tixDirTree:AddToList $w [file join $fsdir $part] $imgfolder
+ }
+ tixWidgetDoWhenIdle tixBusy $w off $data(w:hlist)
+ # correct indicator to represent children status (added above)
+ if {[llength [$data(w:hlist) info children $dir]]} {
+ tixVTree:SetMode $w $dir close
+ } else {
+ tixVTree:SetMode $w $dir none
+ }
+ } else {
+ $data(w:hlist) delete offsprings $dir
+ tixVTree:SetMode $w $dir open
+ }
+}
+
+proc tixDirTree:ToggleDir {w value mode} {
+ upvar #0 $w data
+
+ tixDirTree:LoadDir $w $value $mode
+ tixDirTree:CallCommand $w
+}
+
+proc tixDirTree:CallCommand {w} {
+ upvar #0 $w data
+
+ if {[llength $data(-command)] && !$data(-disablecallback)} {
+ set bind(specs) {%V}
+ set bind(%V) $data(-value)
+
+ tixEvalCmdBinding $w $data(-command) bind $data(-value)
+ }
+}
+
+proc tixDirTree:CallBrowseCmd {w ent} {
+ upvar #0 $w data
+
+ if {[llength $data(-browsecmd)] && !$data(-disablecallback)} {
+ set bind(specs) {%V}
+ set bind(%V) $data(-value)
+
+ tixEvalCmdBinding $w $data(-browsecmd) bind [list $data(-value)]
+ }
+}
+
+proc tixDirTree:StartUp {w} {
+ if {![winfo exists $w]} { return }
+
+ upvar #0 $w data
+
+ # make sure that all the basic volumes are listed
+ set imgopenfold [tix getimage openfold]
+ foreach fspath [tixFSVolumes] {
+ tixDirTree:AddToList $w $fspath $imgopenfold
+ }
+
+ tixDirTree:LoadDir $w [tixFSExternal $data(i-directory)]
+}
+
+proc tixDirTree:ChangeDir {w fsdir {forced 0}} {
+ upvar #0 $w data
+
+ set dir [tixFSInternal $fsdir]
+ if {!$forced && $data(i-directory) eq $dir} {
+ return
+ }
+
+ if {!$forced && [$data(w:hlist) info exists $dir]} {
+ # Set the old directory to "non active"
+ #
+ if {[$data(w:hlist) info exists $data(i-directory)]} {
+ $data(w:hlist) entryconfig $data(i-directory) \
+ -image [tix getimage folder]
+ }
+
+ $data(w:hlist) entryconfig $dir -image [tix getimage act_fold]
+ } else {
+ if {$forced} {
+ if {[llength [$data(w:hlist) info children $dir]]} {
+ set mode expand
+ } else {
+ set mode flatten
+ }
+ } else {
+ set mode toggle
+ }
+ tixDirTree:LoadDir $w $fsdir $mode
+ tixDirTree:CallCommand $w
+ }
+ tixDirTree:SetDir $w $fsdir
+}
+
+
+proc tixDirTree:SetDir {w path} {
+ upvar #0 $w data
+
+ set data(i-directory) [tixFSInternal $path]
+ set data(-value) [tixFSNativeNorm $path]
+}
+
+#----------------------------------------------------------------------
+#
+# Virtual Methods
+#
+#----------------------------------------------------------------------
+proc tixDirTree:OpenCmd {w ent} {
+ set fsdir [tixFSExternal $ent]
+ tixDirTree:ToggleDir $w $fsdir expand
+ tixDirTree:ChangeDir $w $fsdir
+ tixDirTree:CallBrowseCmd $w $fsdir
+}
+
+proc tixDirTree:CloseCmd {w ent} {
+ set fsdir [tixFSExternal $ent]
+ tixDirTree:ToggleDir $w $fsdir flatten
+ tixDirTree:ChangeDir $w $fsdir
+ tixDirTree:CallBrowseCmd $w $fsdir
+}
+
+proc tixDirTree:Command {w B} {
+ upvar #0 $w data
+ upvar $B bind
+
+ set ent [tixEvent flag V]
+ tixChainMethod $w Command $B
+
+ if {[llength $data(-command)]} {
+ set fsdir [tixFSExternal $ent]
+ tixEvalCmdBinding $w $data(-command) bind $fsdir
+ }
+}
+
+# This is a virtual method
+#
+proc tixDirTree:BrowseCmd {w B} {
+ upvar #0 $w data
+ upvar 1 $B bind
+
+ set ent [tixEvent flag V]
+ set fsdir [tixFSExternal $ent]
+
+ # This is a hack because %V may have been modified by callbrowsecmd
+ set fsdir [file normalize $fsdir]
+
+ tixDirTree:ChangeDir $w $fsdir
+ tixDirTree:CallBrowseCmd $w $fsdir
+}
+
+#----------------------------------------------------------------------
+#
+# Public Methods
+#
+#----------------------------------------------------------------------
+proc tixDirTree:chdir {w value} {
+ tixDirTree:ChangeDir $w [file normalize $value]
+}
+
+proc tixDirTree:refresh {w {dir ""}} {
+ upvar #0 $w data
+
+ if {$dir eq ""} {
+ set dir $data(-value)
+ }
+ set dir [file normalize $dir]
+
+ tixDirTree:ChangeDir $w $dir 1
+
+ # Delete any stale directories that no longer exist
+ #
+ foreach child [$data(w:hlist) info children [tixFSInternal $dir]] {
+ if {![file exists [tixFSExternal $child]]} {
+ $data(w:hlist) delete entry $child
+ }
+ }
+}
+
+proc tixDirTree:config-directory {w value} {
+ tixDirTree:ChangeDir $w [file normalize $value]
+}
Added: external/tix-8.4.2.x/library/DragDrop.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DragDrop.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,166 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DragDrop.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
+#
+# DragDrop.tcl ---
+#
+# Implements drag+drop for Tix widgets.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixClass tixDragDropContext {
+ -superclass {}
+ -classname TixDragDropContext
+ -method {
+ cget configure drag drop set startdrag
+ }
+ -flag {
+ -command -source
+ }
+ -configspec {
+ {-command ""}
+ {-source ""}
+ }
+}
+
+proc tixDragDropContext:Constructor {w} {
+ upvar #0 $w data
+}
+
+#----------------------------------------------------------------------
+# Private methods
+#
+#----------------------------------------------------------------------
+proc tixDragDropContext:CallCommand {w target command X Y} {
+ upvar #0 $w data
+
+ set x [expr $X-[winfo rootx $target]]
+ set y [expr $Y-[winfo rooty $target]]
+
+ regsub %x $command $x command
+ regsub %y $command $y command
+ regsub %X $command $X command
+ regsub %Y $command $Y command
+ regsub %W $command $target command
+ regsub %S $command [list $data(-command)] command
+
+ eval $command
+}
+
+proc tixDragDropContext:Send {w target event X Y} {
+ upvar #0 $w data
+ global tixDrop
+
+ foreach tag [tixDropBindTags $target] {
+ if {[info exists tixDrop($tag,$event)]} {
+ tixDragDropContext:CallCommand $w $target \
+ $tixDrop($tag,$event) $X $Y
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+# set --
+#
+# Set the "small data" of the type supported by the source widget
+#----------------------------------------------------------------------
+
+proc tixDragDropContext:set {w type data} {
+
+}
+
+#----------------------------------------------------------------------
+# startdrag --
+#
+# Start the dragging action
+#----------------------------------------------------------------------
+proc tixDragDropContext:startdrag {w x y} {
+ upvar #0 $w data
+
+ set data(oldTarget) ""
+
+ $data(-source) config -cursor "[tix getbitmap drop] black"
+ tixDragDropContext:drag $w $x $y
+}
+
+#----------------------------------------------------------------------
+# drag --
+#
+# Continue the dragging action
+#----------------------------------------------------------------------
+proc tixDragDropContext:drag {w X Y} {
+ upvar #0 $w data
+ global tixDrop
+
+ set target [winfo containing -displayof $w $X $Y]
+
+ if {$target != $data(oldTarget)} {
+ if {$data(oldTarget) != ""} {
+ tixDragDropContext:Send $w $data(oldTarget) <Out> $X $Y
+ }
+ if {$target != ""} {
+ tixDragDropContext:Send $w $target <In> $X $Y
+ }
+ set data(oldTarget) $target
+ }
+ if {$target != ""} {
+ tixDragDropContext:Send $w $target <Over> $X $Y
+ }
+}
+
+proc tixDragDropContext:drop {w X Y} {
+ upvar #0 $w data
+ global tixDrop
+
+ set target [winfo containing -displayof $w $X $Y]
+ if {$target != ""} {
+ tixDragDropContext:Send $w $target <Drop> $X $Y
+ }
+
+ if {$data(-source) != ""} {
+ $data(-source) config -cursor ""
+ }
+ set data(-source) ""
+}
+
+#----------------------------------------------------------------------
+# Public Procedures -- This is NOT a member of the tixDragDropContext
+# class!
+#
+# parameters :
+# $w: who wants to start dragging? (currently ignored)
+#----------------------------------------------------------------------
+proc tixGetDragDropContext {w} {
+ global tixDD
+ if {[info exists tixDD]} {
+ return tixDD
+ }
+
+ return [tixDragDropContext tixDD]
+}
+
+proc tixDropBind {w event command} {
+ global tixDrop
+
+ set tixDrop($w) 1
+ set tixDrop($w,$event) $command
+}
+
+proc tixDropBindTags {w args} {
+ global tixDropTags
+
+ if {$args == ""} {
+ if {[info exists tixDropTags($w)]} {
+ return $tixDropTags($w)
+ } else {
+ return [list [winfo class $w] $w]
+ }
+ } else {
+ set tixDropTags($w) $args
+ }
+}
Added: external/tix-8.4.2.x/library/DtlList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/DtlList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DtlList.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# DtlList.tcl --
+#
+# This file implements DetailList widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixDetailList {
+ -classname TixDetailList
+ -superclass tixScrolledGrid
+ -method {
+ }
+ -flag {
+ -hdrbackground
+ }
+ -configspec {
+ {-hdrbackground hdrBackground HdrBackground #606060}
+ }
+ -alias {
+ {-hdrbg -hdrbackground}
+ }
+ -default {
+ {*grid.topMargin 1}
+ {*grid.leftMargin 0}
+ }
+}
+
+
+proc tixDetailList:FormatCmd {w area x1 y1 x2 y2} {
+ upvar #0 $w data
+
+ case $area {
+ main {
+ }
+ default {
+ $data(w:grid) format border $x1 $y1 $x2 $y2 \
+ -filled 1 \
+ -relief raised -bd 1 -bg $data(-hdrbackground)
+ }
+ }
+}
Added: external/tix-8.4.2.x/library/EFileBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/EFileBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,436 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: EFileBox.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# EFileBox.tcl --
+#
+# Implements the Extended File Selection Box widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+#
+# ToDo
+# (1) If user has entered an invalid directory, give an error dialog
+#
+
+tixWidgetClass tixExFileSelectBox {
+ -classname TixExFileSelectBox
+ -superclass tixPrimitive
+ -method {
+ filter invoke
+ }
+ -flag {
+ -browsecmd -command -dialog -dir -dircmd -directory
+ -disablecallback -filetypes -pattern -selection -showhidden -value
+ }
+ -forcecall {
+ -filetypes
+ }
+ -configspec {
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-dialog dialog Dialog ""}
+ {-dircmd dirCmd DirCmd ""}
+ {-directory directory Directory ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-filetypes fileTypes FileTypes ""}
+ {-pattern pattern Pattern *}
+ {-showhidden showHidden ShowHidden 0 tixVerifyBoolean}
+ {-value value Value ""}
+ }
+ -alias {
+ {-dir -directory}
+ {-selection -value}
+ }
+
+ -default {
+ {*dir.label {Directories:}}
+ {*dir.editable true}
+ {*dir.history true}
+ {*dir*listbox.height 5}
+ {*file.label Files:}
+ {*file.editable true}
+ {*file.history false}
+ {*file*listbox.height 5}
+ {*types.label {List Files of Type:}}
+ {*types*listbox.height 3}
+ {*TixComboBox.labelSide top}
+ {*TixComboBox*Label.anchor w}
+ {*dir.label.underline 0}
+ {*file.label.underline 0}
+ {*types.label.underline 14}
+ {*TixComboBox.anchor e}
+ {*TixHList.height 7}
+ {*filelist*listbox.height 7}
+ {*hidden.wrapLength 3c}
+ {*hidden.justify left}
+ }
+}
+
+proc tixExFileSelectBox:InitWidgetRec {w} {
+ upvar #0 $w data
+ global env
+
+ tixChainMethod $w InitWidgetRec
+
+ if {$data(-directory) eq ""} {
+ set data(-directory) [pwd]
+ }
+ set data(oldDir) ""
+ set data(flag) 0
+}
+
+
+#----------------------------------------------------------------------
+# Construct widget
+#----------------------------------------------------------------------
+proc tixExFileSelectBox:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ # listbox frame
+ set lf [frame $w.lf]
+
+ # The pane that contains the two listboxes
+ #
+ set pane [tixPanedWindow $lf.pane -orientation horizontal]
+ set dpane [$pane add 1 -size 160]
+ set fpane [$pane add 2 -size 160]
+
+ $dpane config -relief flat
+ $fpane config -relief flat
+
+ # The File List Pane
+ #
+ set data(w:file) [tixComboBox $fpane.file\
+ -command [list tixExFileSelectBox:Cmd-FileCombo $w]\
+ -prunehistory true \
+ -options {
+ label.anchor w
+ }]
+ set data(w:filelist) \
+ [tixScrolledListBox $fpane.filelist \
+ -command [list tixExFileSelectBox:Cmd-FileList $w 1] \
+ -browsecmd [list tixExFileSelectBox:Cmd-FileList $w 0]]
+ pack $data(w:file) -padx 8 -pady 4 -side top -fill x
+ pack $data(w:filelist) -padx 8 -pady 4 -side top -fill both -expand yes
+
+ # The Directory Pane
+ #
+ set data(w:dir) [tixComboBox $dpane.dir \
+ -command [list tixExFileSelectBox:Cmd-DirCombo $w]\
+ -prunehistory true \
+ -options {
+ label.anchor w
+ }]
+ set data(w:dirlist) \
+ [tixDirList $dpane.dirlist \
+ -command [list tixExFileSelectBox:Cmd-DirList $w]\
+ -browsecmd [list tixExFileSelectBox:Browse-DirList $w]]
+ pack $data(w:dir) -padx 8 -pady 4 -side top -fill x
+ pack $data(w:dirlist) -padx 8 -pady 4 -side top -fill both -expand yes
+
+ # The file types listbox
+ #
+ set data(w:types) [tixComboBox $lf.types\
+ -command [list tixExFileSelectBox:Cmd-TypeCombo $w]\
+ -options {
+ label.anchor w
+ }]
+
+ pack $data(w:types) -padx 12 -pady 4 -side bottom -fill x -anchor w
+ pack $pane -side top -padx 4 -pady 4 -expand yes -fill both
+
+ # Buttons to the right
+ #
+ set bf [frame $w.bf]
+ set data(w:ok) [button $bf.ok -text Ok -width 6 \
+ -underline 0 -command [list tixExFileSelectBox:Ok $w]]
+ set data(w:cancel) [button $bf.cancel -text Cancel -width 6 \
+ -underline 0 -command [list tixExFileSelectBox:Cancel $w]]
+ set data(w:hidden) [checkbutton $bf.hidden -text "Show Hidden Files"\
+ -underline 0\
+ -variable [format %s(-showhidden) $w] -onvalue 1 -offvalue 0\
+ -command [list tixExFileSelectBox:SetShowHidden $w]]
+
+ pack $data(w:ok) $data(w:cancel) $data(w:hidden)\
+ -side top -fill x -padx 6 -pady 3
+
+ pack $bf -side right -fill y -pady 6
+ pack $lf -side left -expand yes -fill both
+
+ tixDoWhenMapped $w [list tixExFileSelectBox:Map $w]
+
+ if {$data(-filetypes) == ""} {
+ $data(w:types) config -state disabled
+ }
+}
+
+
+#----------------------------------------------------------------------
+# Configuration
+#----------------------------------------------------------------------
+proc tixExFileSelectBox:config-showhidden {w value} {
+ upvar #0 $w data
+
+ set data(-showhidden) $value
+ tixExFileSelectBox:SetShowHidden $w
+}
+
+# Update both DirList and {file list and dir combo}
+#
+proc tixExFileSelectBox:config-directory {w value} {
+ upvar #0 $w data
+
+ set data(-directory) [tixFSNormalize $value]
+ tixSetSilent $data(w:dirlist) $data(-directory)
+ tixSetSilent $data(w:dir) $data(-directory)
+ tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
+
+ return $data(-directory)
+}
+
+proc tixExFileSelectBox:config-filetypes {w value} {
+ upvar #0 $w data
+
+ $data(w:types) subwidget listbox delete 0 end
+
+ foreach name [array names data] {
+ if {[string match type,* $name]} {
+ catch {unset data($name)}
+ }
+ }
+
+ if {$value == ""} {
+ $data(w:types) config -state disabled
+ } else {
+ $data(w:types) config -state normal
+
+ foreach type $value {
+ $data(w:types) insert end [lindex $type 1]
+ set data(type,[lindex $type 1]) [lindex $type 0]
+ }
+ tixSetSilent $data(w:types) ""
+ }
+}
+
+#----------------------------------------------------------------------
+# MISC Methods
+#----------------------------------------------------------------------
+proc tixExFileSelectBox:SetShowHidden {w} {
+ upvar #0 $w data
+
+ $data(w:dirlist) config -showhidden $data(-showhidden)
+
+ tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
+}
+
+# User activates the dir combobox
+#
+#
+proc tixExFileSelectBox:Cmd-DirCombo {w args} {
+ upvar #0 $w data
+
+ set dir [tixEvent flag V]
+ set dir [tixFSExternal $dir]
+ if {![file isdirectory $dir]} {
+ return
+ }
+ set dir [tixFSNormalize $dir]
+
+ $data(w:dirlist) config -value $dir
+ set data(-directory) $dir
+}
+
+# User activates the dir list
+#
+#
+proc tixExFileSelectBox:Cmd-DirList {w args} {
+ upvar #0 $w data
+
+ set dir $data(-directory)
+ catch {set dir [tixEvent flag V]}
+ set dir [tixFSNormalize [tixFSExternal $dir]]
+
+ tixSetSilent $data(w:dir) $dir
+ set data(-directory) $dir
+
+ tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w noreload
+}
+
+# User activates the dir list
+#
+#
+proc tixExFileSelectBox:Browse-DirList {w args} {
+ upvar #0 $w data
+
+ set dir [tixEvent flag V]
+ set dir [tixFSNormalize [tixFSExternal $dir]]
+ tixExFileSelectBox:Cmd-DirList $w $dir
+}
+
+proc tixExFileSelectBox:IsPattern {w string} {
+ return [regexp "\[\[\\\{\\*\\?\]" $string]
+}
+
+proc tixExFileSelectBox:Cmd-FileCombo {w value} {
+ upvar #0 $w data
+
+ if {[tixEvent type] eq "<Return>"} {
+ tixExFileSelectBox:Ok $w
+ }
+}
+
+proc tixExFileSelectBox:Ok {w} {
+ upvar #0 $w data
+
+ set value [string trim [$data(w:file) subwidget entry get]]
+ if {$value == ""} {
+ set value $data(-pattern)
+ }
+ tixSetSilent $data(w:file) $value
+
+ if {[tixExFileSelectBox:IsPattern $w $value]} {
+ set data(-pattern) $value
+ tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
+ } else {
+ # ensure absolute path
+ set value [file join $data(-directory) $value]; # native
+ set data(-value) [tixFSNativeNorm $value]
+ tixExFileSelectBox:Invoke $w
+ }
+}
+
+proc tixExFileSelectBox:Cancel {w} {
+ upvar #0 $w data
+
+ if {$data(-dialog) != ""} {
+ eval $data(-dialog) popdown
+ }
+}
+
+proc tixExFileSelectBox:Invoke {w} {
+ upvar #0 $w data
+
+ # Save some old history
+ #
+ $data(w:dir) addhistory [$data(w:dir) cget -value]
+ $data(w:file) addhistory $data(-pattern)
+ $data(w:file) addhistory $data(-value)
+ if {$data(-dialog) != ""} {
+ eval $data(-dialog) popdown
+ }
+ if {$data(-command) != "" && !$data(-disablecallback)} {
+ set bind(specs) "%V"
+ set bind(%V) $data(-value)
+ tixEvalCmdBinding $w $data(-command) bind $data(-value)
+ }
+}
+
+proc tixExFileSelectBox:Cmd-FileList {w invoke args} {
+ upvar #0 $w data
+
+ set index [lindex [$data(w:filelist) subwidget listbox curselection] 0]
+ if {$index == ""} {
+ set index 0
+ }
+
+ set file [$data(w:filelist) subwidget listbox get $index]
+ tixSetSilent $data(w:file) $file
+
+ set value [file join $data(-directory) $file]
+ set data(-value) [tixFSNativeNorm $value]
+
+ if {$invoke == 1} {
+ tixExFileSelectBox:Invoke $w
+ } elseif {$data(-browsecmd) != ""} {
+ tixEvalCmdBinding $w $data(-browsecmd) "" $data(-value)
+ }
+}
+
+proc tixExFileSelectBox:Cmd-TypeCombo {w args} {
+ upvar #0 $w data
+
+ set value [tixEvent flag V]
+
+ if {[info exists data(type,$value)]} {
+ set data(-pattern) $data(type,$value)
+ tixSetSilent $data(w:file) $data(-pattern)
+ tixWidgetDoWhenIdle tixExFileSelectBox:LoadFiles $w reload
+ }
+}
+
+proc tixExFileSelectBox:LoadFiles {w flag} {
+ upvar #0 $w data
+
+ if {$flag ne "reload" && $data(-directory) eq $data(oldDir)} {
+ return
+ }
+
+ if {![winfo ismapped [winfo toplevel $w]]} {
+ tixDoWhenMapped [winfo toplevel $w] \
+ [list tixExFileSelectBox:LoadFiles $w $flag]
+ return
+ }
+
+ set listbox [$data(w:filelist) subwidget listbox]
+ $listbox delete 0 end
+
+ set data(-value) ""
+
+ tixBusy $w on [$data(w:dirlist) subwidget hlist]
+
+ # wrap in a catch so you can't get stuck in a Busy state
+ if {[catch {
+ foreach name [tixFSListDir $data(-directory) 0 1 0 \
+ $data(-showhidden) $data(-pattern)] {
+ $listbox insert end $name
+ }
+
+ if {$data(oldDir) ne $data(-directory)} {
+ # Otherwise if the user has already selected a file and then
+ # presses "show hidden", the selection won't be wiped out.
+ tixSetSilent $data(w:file) $data(-pattern)
+ }
+ } err]} {
+ tixDebug "tixExFileSelectBox:LoadFiles error for $w\n$err"
+ }
+ set data(oldDir) $data(-directory)
+
+ tixWidgetDoWhenIdle tixBusy $w off [$data(w:dirlist) subwidget hlist]
+}
+
+#
+# Called when thd listbox is first mapped
+proc tixExFileSelectBox:Map {w} {
+ if {![winfo exists $w]} {
+ return
+ }
+ upvar #0 $w data
+
+ set bind(specs) "%V"
+ set bind(%V) $data(-value)
+ tixEvalCmdBinding $w bind \
+ [list tixExFileSelectBox:Cmd-DirList $w] $data(-directory)
+}
+
+#----------------------------------------------------------------------
+# Public commands
+#
+#----------------------------------------------------------------------
+proc tixExFileSelectBox:invoke {w} {
+ tixExFileSelectBox:Invoke $w
+}
+
+proc tixExFileSelectBox:filter {w} {
+ tixExFileSelectBox:LoadFiles $w reload
+}
+
Added: external/tix-8.4.2.x/library/EFileDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/EFileDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,65 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: EFileDlg.tcl,v 1.3 2002/01/24 09:13:58 idiscovery Exp $
+#
+# EFileDlg.tcl --
+#
+# Implements the Extended File Selection Dialog widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+foreach fun {tkButtonInvoke} {
+ if {![llength [info commands $fun]]} {
+ tk::unsupported::ExposePrivateCommand $fun
+ }
+}
+unset fun
+
+tixWidgetClass tixExFileSelectDialog {
+ -classname TixExFileSelectDialog
+ -superclass tixDialogShell
+ -method {}
+ -flag {
+ -command
+ }
+ -configspec {
+ {-command command Command ""}
+
+ {-title title Title "Select A File"}
+ }
+}
+
+proc tixExFileSelectDialog:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ set data(w:fsbox) [tixExFileSelectBox $w.fsbox -dialog $w \
+ -command $data(-command)]
+ pack $data(w:fsbox) -expand yes -fill both
+
+
+}
+
+proc tixExFileSelectDialog:config-command {w value} {
+ upvar #0 $w data
+
+ $data(w:fsbox) config -command $value
+}
+
+proc tixExFileSelectDialog:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ bind $w <Alt-Key-f> "focus [$data(w:fsbox) subwidget file]"
+ bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget types]"
+ bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dir]"
+ bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:fsbox) subwidget ok]"
+ bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:fsbox) subwidget cancel]"
+ bind $w <Alt-Key-s> "tkButtonInvoke [$data(w:fsbox) subwidget hidden]"
+}
Added: external/tix-8.4.2.x/library/Event.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Event.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,217 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Event.tcl,v 1.6 2004/04/09 21:37:01 hobbs Exp $
+#
+# Event.tcl --
+#
+# Handles the event bindings of the -command and -browsecmd options
+# (and various of others such as -validatecmd).
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+#----------------------------------------------------------------------
+# Evaluate high-level bindings (-command, -browsecmd, etc):
+# with % subsitution or without (compatibility mode)
+#
+#
+# BUG : if a -command is intercepted by a hook, the hook must use
+# the same record name as the issuer of the -command. For the time
+# being, you must use the name "bind" as the record name!!!!!
+#
+#----------------------------------------------------------------------
+
+namespace eval ::tix {
+ variable event_flags ""
+ set evs [list % \# a b c d f h k m o p s t w x y A B E K N R S T W X Y]
+ foreach ev $evs {
+ lappend event_flags "%$ev"
+ }
+
+ # This is a "name stack" for storing the "bind" structures
+ #
+ # The bottom of the event stack is usually a raw event (generated by
+ # tixBind) but it may also be a programatically triggered (caused by
+ # tixEvalCmdBinding)
+ variable EVENT
+ set EVENT(nameStack) ""
+ set EVENT(stackLevel) 0
+}
+
+proc tixBind {tag event action} {
+ set cmd [linsert $::tix::event_flags 0 _tixRecordFlags $event]
+ append cmd "; $action; _tixDeleteFlags;"
+
+ bind $tag $event $cmd
+}
+
+proc tixPushEventStack {} {
+ variable ::tix::EVENT
+
+ set lastEvent [lindex $EVENT(nameStack) 0]
+ incr EVENT(stackLevel)
+ set thisEvent ::tix::_event$EVENT(stackLevel)
+
+ set EVENT(nameStack) [list $thisEvent $EVENT(nameStack)]
+
+ if {$lastEvent == ""} {
+ upvar #0 $thisEvent this
+ set this(type) <Application>
+ } else {
+ upvar #0 $lastEvent last
+ upvar #0 $thisEvent this
+
+ foreach name [array names last] {
+ set this($name) $last($name)
+ }
+ }
+
+ return $thisEvent
+}
+
+proc tixPopEventStack {varName} {
+ variable ::tix::EVENT
+
+ if {$varName ne [lindex $EVENT(nameStack) 0]} {
+ error "unmatched tixPushEventStack and tixPopEventStack calls"
+ }
+ incr EVENT(stackLevel) -1
+ set EVENT(nameStack) [lindex $EVENT(nameStack) 1]
+ global $varName
+ unset $varName
+}
+
+
+# Events triggered by tixBind
+#
+proc _tixRecordFlags [concat event $::tix::event_flags] {
+ set thisName [tixPushEventStack]; upvar #0 $thisName this
+
+ set this(type) $event
+ foreach f $::tix::event_flags {
+ set this($f) [set $f]
+ }
+}
+
+proc _tixDeleteFlags {} {
+ variable ::tix::EVENT
+
+ tixPopEventStack [lindex $EVENT(nameStack) 0]
+}
+
+# programatically trigged events
+#
+proc tixEvalCmdBinding {w cmd {subst ""} args} {
+ global tixPriv tix
+ variable ::tix::EVENT
+
+ set thisName [tixPushEventStack]; upvar #0 $thisName this
+
+ if {$subst != ""} {
+ upvar $subst bind
+
+ if {[info exists bind(specs)]} {
+ foreach spec $bind(specs) {
+ set this($spec) $bind($spec)
+ }
+ }
+ if {[info exists bind(type)]} {
+ set this(type) $bind(type)
+ }
+ }
+
+ if {[catch {
+ if {![info exists tix(-extracmdargs)]
+ || [string is true -strict $tix(-extracmdargs)]} {
+ # Compatibility mode
+ set ret [uplevel \#0 $cmd $args]
+ } else {
+ set ret [uplevel 1 $cmd]
+ }
+ } error]} {
+ if {[catch {tixCmdErrorHandler $error} error]} {
+ # double fault: just print out
+ tixBuiltInCmdErrorHandler $error
+ }
+ tixPopEventStack $thisName
+ return ""
+ } else {
+ tixPopEventStack $thisName
+
+ return $ret
+ }
+}
+
+proc tixEvent {option args} {
+ global tixPriv
+ variable ::tix::EVENT
+ set varName [lindex $EVENT(nameStack) 0]
+
+ if {$varName == ""} {
+ error "tixEvent called when no event is being processed"
+ } else {
+ upvar #0 $varName event
+ }
+
+ switch -exact -- $option {
+ type {
+ return $event(type)
+ }
+ value {
+ if {[info exists event(%V)]} {
+ return $event(%V)
+ } else {
+ return ""
+ }
+ }
+ flag {
+ set f %[lindex $args 0]
+ if {[info exists event($f)]} {
+ return $event($f)
+ }
+ error "The flag \"[lindex $args 0]\" does not exist"
+ }
+ match {
+ return [string match [lindex $args 0] $event(type)]
+ }
+ default {
+ error "unknown option \"$option\""
+ }
+ }
+}
+
+# tixBuiltInCmdErrorHandler --
+#
+# Default method to report command handler errors. This procedure is
+# also called if double-fault happens (command handler causes error,
+# then tixCmdErrorHandler causes error).
+#
+proc tixBuiltInCmdErrorHandler {errorMsg} {
+ global errorInfo tcl_platform
+ if {![info exists errorInfo]} {
+ set errorInfo "???"
+ }
+ if {$tcl_platform(platform) eq "windows"} {
+ bgerror "Tix Error: $errorMsg"
+ } else {
+ puts "Error:\n $errorMsg\n$errorInfo"
+ }
+}
+
+# tixCmdErrorHandler --
+#
+# You can redefine this command to handle the errors that occur
+# in the command handlers. See the programmer's documentation
+# for details
+#
+if {![llength [info commands tixCmdErrorHandler]]} {
+ proc tixCmdErrorHandler {errorMsg} {
+ tixBuiltInCmdErrorHandler $errorMsg
+ }
+}
+
Added: external/tix-8.4.2.x/library/FileBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/FileBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,568 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FileBox.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# FileBox.tcl --
+#
+# Implements the File Selection Box widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+# ToDo
+# (1) If user has entered an invalid directory, give an error dialog
+#
+
+tixWidgetClass tixFileSelectBox {
+ -superclass tixPrimitive
+ -classname TixFileSelectBox
+ -method {
+ filter invoke
+ }
+ -flag {
+ -browsecmd -command -dir -directory -disablecallback
+ -grab -pattern -selection -value
+ }
+ -configspec {
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-directory directory Directory ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-grab grab Grab global}
+ {-pattern pattern Pattern *}
+ {-value value Value ""}
+ }
+ -alias {
+ {-selection -value}
+ {-dir -directory}
+ }
+ -forcecall {
+ -value
+ }
+ -default {
+ {.relief raised}
+ {*filelist*Listbox.takeFocus true}
+ {.borderWidth 1}
+ {*Label.anchor w}
+ {*Label.borderWidth 0}
+ {*TixComboBox*scrollbar auto}
+ {*TixComboBox*Label.anchor w}
+ {*TixScrolledListBox.scrollbar auto}
+ {*Listbox.exportSelection false}
+ {*directory*Label.text "Directories:"}
+ {*directory*Label.underline 0}
+ {*file*Label.text "Files:"}
+ {*file*Label.underline 2}
+ {*filter.label "Filter:"}
+ {*filter*label.underline 3}
+ {*filter.labelSide top}
+ {*selection.label "Selection:"}
+ {*selection*label.underline 0}
+ {*selection.labelSide top}
+ }
+}
+
+
+proc tixFileSelectBox:InitWidgetRec {w} {
+ upvar #0 $w data
+ global env
+
+ tixChainMethod $w InitWidgetRec
+
+ if {$data(-directory) eq ""} {
+ set data(-directory) [pwd]
+ }
+ if {$data(-pattern) eq ""} {
+ set data(-pattern) "*"
+ }
+
+ tixFileSelectBox:SetPat $w $data(-pattern)
+ tixFileSelectBox:SetDir $w [tixFSNormalize $data(-directory)]
+
+ set data(flag) 0
+ set data(fakeDir) 0
+}
+
+#----------------------------------------------------------------------
+# Construct widget
+#----------------------------------------------------------------------
+proc tixFileSelectBox:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set frame1 [tixFileSelectBox:CreateFrame1 $w]
+ set frame2 [tixFileSelectBox:CreateFrame2 $w]
+ set frame3 [tixFileSelectBox:CreateFrame3 $w]
+
+ pack $frame1 -in $w -side top -fill x
+ pack $frame3 -in $w -side bottom -fill x
+ pack $frame2 -in $w -side top -fill both -expand yes
+}
+
+proc tixFileSelectBox:CreateFrame1 {w} {
+ upvar #0 $w data
+
+ frame $w.f1 -border 10
+ tixComboBox $w.f1.filter -editable 1\
+ -command [list $w filter] -anchor e \
+ -options {
+ slistbox.scrollbar auto
+ listbox.height 5
+ label.anchor w
+ }
+ set data(w:filter) $w.f1.filter
+
+ pack $data(w:filter) -side top -expand yes -fill both
+ return $w.f1
+}
+
+proc tixFileSelectBox:CreateFrame2 {w} {
+ upvar #0 $w data
+
+ tixPanedWindow $w.f2 -orientation horizontal
+ # THE LEFT FRAME
+ #-----------------------
+ set dir [$w.f2 add directory -size 120]
+ $dir config -relief flat
+ label $dir.lab
+ set data(w:dirlist) [tixScrolledListBox $dir.dirlist\
+ -scrollbar auto\
+ -options {listbox.width 4 listbox.height 6}]
+
+ pack $dir.lab -side top -fill x -padx 10
+ pack $data(w:dirlist) -side bottom -expand yes -fill both -padx 10
+
+ # THE RIGHT FRAME
+ #-----------------------
+ set file [$w.f2 add file -size 160]
+ $file config -relief flat
+ label $file.lab
+ set data(w:filelist) [tixScrolledListBox $file.filelist \
+ -scrollbar auto\
+ -options {listbox.width 4 listbox.height 6}]
+
+ pack $file.lab -side top -fill x -padx 10
+ pack $data(w:filelist) -side bottom -expand yes -fill both -padx 10
+
+ return $w.f2
+}
+
+proc tixFileSelectBox:CreateFrame3 {w} {
+ upvar #0 $w data
+
+ frame $w.f3 -border 10
+ tixComboBox $w.f3.selection -editable 1\
+ -command [list tixFileSelectBox:SelInvoke $w] \
+ -anchor e \
+ -options {
+ slistbox.scrollbar auto
+ listbox.height 5
+ label.anchor w
+ }
+
+ set data(w:selection) $w.f3.selection
+
+ pack $data(w:selection) -side top -fill both
+
+ return $w.f3
+}
+
+proc tixFileSelectBox:SelInvoke {w args} {
+ upvar #0 $w data
+
+ set event [tixEvent type]
+
+ if {$event ne "<FocusOut>" && $event ne "<Tab>"} {
+ $w invoke
+ }
+}
+
+proc tixFileSelectBox:SetValue {w value} {
+ upvar #0 $w data
+
+ set data(i-value) $value
+ set data(-value) [tixFSNative $value]
+}
+
+proc tixFileSelectBox:SetDir {w value} {
+ upvar #0 $w data
+
+ set data(i-directory) $value
+ set data(-directory) [tixFSNative $value]
+}
+
+proc tixFileSelectBox:SetPat {w value} {
+ upvar #0 $w data
+
+ set data(i-pattern) $value
+ set data(-pattern) [tixFSNative $value]
+}
+
+
+#----------------------------------------------------------------------
+# BINDINGS
+#----------------------------------------------------------------------
+
+proc tixFileSelectBox:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ tixDoWhenMapped $w [list tixFileSelectBox:FirstMapped $w]
+
+ $data(w:dirlist) config \
+ -browsecmd [list tixFileSelectBox:SelectDir $w] \
+ -command [list tixFileSelectBox:InvokeDir $w]
+
+ $data(w:filelist) config \
+ -browsecmd [list tixFileSelectBox:SelectFile $w] \
+ -command [list tixFileSelectBox:InvokeFile $w]
+}
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixFileSelectBox:config-directory {w value} {
+ upvar #0 $w data
+
+ if {$value eq ""} {
+ set value [pwd]
+ }
+ tixFileSelectBox:SetDir $w [tixFSNormalize $value]
+ tixFileSelectBox:SetFilter $w $data(i-directory) $data(i-pattern)
+ $w filter
+
+ return $data(-directory)
+}
+
+proc tixFileSelectBox:config-pattern {w value} {
+ upvar #0 $w data
+
+ if {$value eq ""} {
+ set value "*"
+ }
+
+ tixFileSelectBox:SetPat $w $value
+ tixFileSelectBox:SetFilter $w $data(i-directory) $data(i-pattern)
+
+ # Returning a value means we have overridden the value and updated
+ # the widget record ourselves.
+ #
+ return $data(-pattern)
+}
+
+proc tixFileSelectBox:config-value {w value} {
+ upvar #0 $w data
+
+ tixFileSelectBox:SetValue $w [tixFSNormalize $value]
+ tixSetSilent $data(w:selection) $value
+
+ return $data(-value)
+}
+
+#----------------------------------------------------------------------
+# PUBLIC METHODS
+#----------------------------------------------------------------------
+proc tixFileSelectBox:filter {w args} {
+ upvar #0 $w data
+
+ $data(w:filter) popdown
+ tixFileSelectBox:InterpFilter $w
+ tixFileSelectBox:LoadDir $w
+}
+
+proc tixFileSelectBox:invoke {w args} {
+ upvar #0 $w data
+
+ if {[$data(w:selection) cget -value] ne
+ [$data(w:selection) cget -selection]} {
+ # this will in turn call "invoke" again ...
+ #
+ $data(w:selection) invoke
+ return
+ }
+
+ # record the filter
+ #
+ set filter [tixFileSelectBox:InterpFilter $w]
+ $data(w:filter) addhistory $filter
+
+ # record the selection
+ #
+ set userInput [string trim [$data(w:selection) cget -value]]
+ tixFileSelectBox:SetValue $w \
+ [tixFSNormalize [file join $data(i-directory) $userInput]]
+ $data(w:selection) addhistory $data(-value)
+
+ $data(w:filter) align
+ $data(w:selection) align
+
+ if {[llength $data(-command)] && !$data(-disablecallback)} {
+ set bind(specs) "%V"
+ set bind(%V) $data(-value)
+ tixEvalCmdBinding $w $data(-command) bind $data(-value)
+ }
+}
+
+#----------------------------------------------------------------------
+# INTERNAL METHODS
+#----------------------------------------------------------------------
+# InterpFilter:
+# Interprets the value of the w:filter widget.
+#
+# Side effects:
+# Changes the fields data(-directory) and data(-pattenn)
+#
+proc tixFileSelectBox:InterpFilter {w {filter ""}} {
+ upvar #0 $w data
+
+ if {$filter == ""} {
+ set filter [$data(w:filter) cget -selection]
+ if {$filter == ""} {
+ set filter [$data(w:filter) cget -value]
+ }
+ }
+
+ set i_filter [tixFSNormalize $filter]
+
+ if {[file isdirectory $filter]} {
+ tixFileSelectBox:SetDir $w $i_filter
+ tixFileSelectBox:SetPat $w "*"
+ } else {
+ set nDir [file dirname $filter]
+ if {$nDir eq "" || $nDir eq "."} {
+ tixFileSelectBox:SetDir $w [tixFSNormalize $data(i-directory)]
+ } else {
+ tixFileSelectBox:SetDir $w [tixFSNormalize $nDir]
+ }
+ tixFileSelectBox:SetPat $w [file tail $filter]
+ }
+
+ tixFileSelectBox:SetFilter $w $data(i-directory) $data(i-pattern)
+
+ return $data(filter)
+}
+
+proc tixFileSelectBox:SetFilter {w dir pattern} {
+ upvar #0 $w data
+
+ set data(filter) [file join $dir $pattern]
+ tixSetSilent $data(w:filter) $data(filter)
+}
+
+proc tixFileSelectBox:LoadDirIntoLists {w} {
+ upvar #0 $w data
+
+ $data(w:dirlist) subwidget listbox delete 0 end
+ $data(w:filelist) subwidget listbox delete 0 end
+
+ set dir $data(i-directory)
+
+ # (1) List the directories
+ #
+ set isDrive [expr {[llength [file split $dir]] == 1}]
+ foreach name [tixFSListDir $dir 1 0 1 1] {
+ if {".." eq $name && $isDrive} { continue }
+ $data(w:dirlist) subwidget listbox insert end $name
+ }
+
+ # (2) List the files
+ #
+ # %% UNIX'ISM:
+ # If the pattern is "*" force glob to list the .* files.
+ # However, since the user might not
+ # be interested in them, shift the listbox so that the "normal" files
+ # are seen first
+ #
+ # NOTE: if we pass $pat == "" but with $showHidden set to true,
+ # tixFSListDir will list "* .*" in Unix. See the comment on top of
+ # the tixFSListDir code.
+ #
+ if {$data(i-pattern) eq "*"} {
+ set pat ""
+ } else {
+ set pat $data(i-pattern)
+ }
+
+ set top 0
+ foreach name [tixFSListDir $dir 0 1 0 0 $pat] {
+ $data(w:filelist) subwidget listbox insert end $name
+ if {[string match .* $name]} {
+ incr top
+ }
+ }
+
+ $data(w:filelist) subwidget listbox yview $top
+}
+
+proc tixFileSelectBox:LoadDir {w} {
+ upvar #0 $w data
+
+ tixBusy $w on [$data(w:dirlist) subwidget listbox]
+
+ tixFileSelectBox:LoadDirIntoLists $w
+
+ if {[$data(w:dirlist) subwidget listbox size] == 0} {
+ # fail safe, just in case the user has inputed an errnoeuos
+ # directory
+ $data(w:dirlist) subwidget listbox insert 0 ".."
+ }
+
+ tixWidgetDoWhenIdle tixBusy $w off [$data(w:dirlist) subwidget listbox]
+}
+
+# User single clicks on the directory listbox
+#
+proc tixFileSelectBox:SelectDir {w} {
+ upvar #0 $w data
+
+ if {$data(fakeDir) > 0} {
+ incr data(fakeDir) -1
+ $data(w:dirlist) subwidget listbox select clear 0 end
+ $data(w:dirlist) subwidget listbox activate -1
+ return
+ }
+
+ if {$data(flag)} {
+ return
+ }
+ set data(flag) 1
+
+ set subdir [tixListboxGetCurrent [$data(w:dirlist) subwidget listbox]]
+ if {$subdir == ""} {
+ set subdir "."
+ }
+
+ tixFileSelectBox:SetFilter $w \
+ [tixFSNormalize [file join $data(i-directory) $subdir]] \
+ $data(i-pattern)
+ set data(flag) 0
+}
+
+proc tixFileSelectBox:InvokeDir {w} {
+ upvar #0 $w data
+
+ set theDir [$data(w:dirlist) subwidget listbox get active]
+
+ tixFileSelectBox:SetDir $w \
+ [tixFSNormalize [file join $data(i-directory) $theDir]]
+
+ $data(w:dirlist) subwidget listbox select clear 0 end
+
+ tixFileSelectBox:SetFilter $w $data(i-directory) $data(i-pattern)
+ tixFileSelectBox:InterpFilter $w [tixFSNativeNorm $data(filter)]
+
+ tixFileSelectBox:LoadDir $w
+
+ if {![tixEvent match <Return>]} {
+ incr data(fakeDir) 1
+ }
+}
+
+proc tixFileSelectBox:SelectFile {w} {
+ upvar #0 $w data
+
+ if {$data(flag)} {
+ return
+ }
+ set data(flag) 1
+
+ # Reset the "Filter:" box to the current directory:
+ #
+ $data(w:dirlist) subwidget listbox select clear 0 end
+ tixFileSelectBox:SetFilter $w $data(i-directory) $data(i-pattern)
+
+ # Now select the file
+ #
+ set selected [tixListboxGetCurrent [$data(w:filelist) subwidget listbox]]
+ if {$selected != ""} {
+ # Make sure that the selection is not empty!
+ #
+ tixFileSelectBox:SetValue $w \
+ [tixFSNormalize [file join $data(i-directory) $selected]]
+ tixSetSilent $data(w:selection) $data(-value)
+
+ if {[llength $data(-browsecmd)]} {
+ tixEvalCmdBinding $w $data(-browsecmd) "" $data(-value)
+ }
+ }
+ set data(flag) 0
+}
+
+proc tixFileSelectBox:InvokeFile {w} {
+ upvar #0 $w data
+
+ set selected [tixListboxGetCurrent [$data(w:filelist) subwidget listbox]]
+ if {$selected != ""} {
+ $w invoke
+ }
+}
+
+# This is only called the first this fileBox is mapped -- load the directory
+#
+proc tixFileSelectBox:FirstMapped {w} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ tixFileSelectBox:SetFilter $w $data(i-directory) $data(i-pattern)
+ tixFileSelectBox:LoadDir $w
+ $data(w:filter) align
+}
+
+
+#----------------------------------------------------------------------
+#
+#
+# C O N V E N I E N C E R O U T I N E S
+#
+#
+#----------------------------------------------------------------------
+
+# This is obsolete. Use the widget tixFileSelectDialog instead
+#
+#
+proc tixMkFileDialog {w args} {
+ set option(-okcmd) ""
+ set option(-helpcmd) ""
+
+ tixHandleOptions option {-okcmd -helpcmd} $args
+
+ toplevel $w
+ wm minsize $w 10 10
+
+ tixStdDlgBtns $w.btns
+
+ if {$option(-okcmd) != ""} {
+ tixFileSelectBox $w.fsb \
+ -command "[list wm withdraw $w]; $option(-okcmd)"
+ } else {
+ tixFileSelectBox $w.fsb -command [list wm withdraw $w]
+ }
+
+ $w.btns button ok config -command [list $w.fsb invoke]
+ $w.btns button apply config -command [list $w.fsb filter] -text Filter
+ $w.btns button cancel config -command [list wm withdraw $w]
+
+ if {$option(-helpcmd) == ""} {
+ $w.btns button help config -state disabled
+ } else {
+ $w.btns button help config -command $option(-helpcmd)
+ }
+ wm protocol $w WM_DELETE_WINDOW [list wm withdraw $w]
+ pack $w.btns -side bottom -fill both
+ pack $w.fsb -fill both -expand yes
+
+ return $w.fsb
+}
+
+
Added: external/tix-8.4.2.x/library/FileCbx.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/FileCbx.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,108 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FileCbx.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# tixFileCombobox --
+#
+# A combobox widget for entering file names, directory names, file
+# patterns, etc.
+#
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+# tixFileComboBox displays and accepts the DOS pathnames only. It doesn't
+# recognize UNC file names or Tix VPATHS.
+#
+tixWidgetClass tixFileComboBox {
+ -classname TixFileComboBox
+ -superclass tixPrimitive
+ -method {
+ invoke
+ }
+ -flag {
+ -command -defaultfile -directory -text
+ }
+ -forcecall {
+ -directory
+ }
+ -configspec {
+ {-defaultfile defaultFile DefaultFile ""}
+ {-directory directory Directory ""}
+ {-command command Command ""}
+ {-text text Text ""}
+ }
+ -default {
+ }
+}
+
+proc tixFileComboBox:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ if {$data(-directory) eq ""} {
+ set data(-directory) [pwd]
+ }
+}
+
+proc tixFileComboBox:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ set data(w:combo) [tixComboBox $w.combo -editable true -dropdown true]
+ pack $data(w:combo) -expand yes -fill both
+}
+
+proc tixFileComboBox:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+ $data(w:combo) config -command [list tixFileComboBox:OnComboCmd $w]
+}
+
+proc tixFileComboBox:OnComboCmd {w args} {
+ upvar #0 $w data
+
+ set text [string trim [tixEvent value]]
+
+ set path [tixFSJoin $data(-directory) $text]
+ if {[file isdirectory $path]} {
+ set path [tixFSJoin $path $data(-defaultfile)]
+ set tail $data(-defaultfile)
+ } else {
+ set tail [file tail $path]
+ }
+ set norm [tixFSNormalize $path]
+ tixSetSilent $data(w:combo) $norm
+ if {[llength $data(-command)]} {
+ set bind(specs) {%V}
+ set bind(%V) [list $norm $path $tail ""]
+ tixEvalCmdBinding $w $data(-command) bind $bind(%V)
+ }
+}
+
+proc tixFileComboBox:config-text {w val} {
+ upvar #0 $w data
+
+ tixSetSilent $data(w:combo) $val
+}
+
+proc tixFileComboBox:config-directory {w val} {
+ upvar #0 $w data
+
+ set data(-directory) [tixFSNormalize $val]
+ return $data(-directory)
+}
+
+proc tixFileComboBox:invoke {w} {
+ upvar #0 $w data
+
+ $data(w:combo) invoke
+}
+
+
Added: external/tix-8.4.2.x/library/FileDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/FileDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,75 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FileDlg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# FileDlg.tcl --
+#
+# Implements the File Selection Dialog widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixFileSelectDialog {
+ -classname TixFileSelectDialog
+ -superclass tixStdDialogShell
+ -method {
+ }
+ -flag {
+ -command
+ }
+ -configspec {
+ {-command command Command ""}
+
+ {-title title Title "Select A File"}
+ }
+}
+
+proc tixFileSelectDialog:ConstructTopFrame {w frame} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructTopFrame $frame
+
+ set data(w:fsbox) [tixFileSelectBox $frame.fsbox \
+ -command [list tixFileSelectDialog:Invoke $w]]
+ pack $data(w:fsbox) -expand yes -fill both
+}
+
+proc tixFileSelectDialog:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:btns) subwidget ok config -command "$data(w:fsbox) invoke" \
+ -underline 0
+ $data(w:btns) subwidget apply config -command "$data(w:fsbox) filter" \
+ -text Filter -underline 0
+ $data(w:btns) subwidget cancel config -command "wm withdraw $w" \
+ -underline 0
+ $data(w:btns) subwidget help config -underline 0
+
+
+ bind $w <Alt-Key-l> "focus [$data(w:fsbox) subwidget filelist]"
+ bind $w <Alt-Key-d> "focus [$data(w:fsbox) subwidget dirlist]"
+ bind $w <Alt-Key-s> "focus [$data(w:fsbox) subwidget selection]"
+ bind $w <Alt-Key-t> "focus [$data(w:fsbox) subwidget filter]"
+ bind $w <Alt-Key-o> "tkButtonInvoke [$data(w:btns) subwidget ok]"
+ bind $w <Alt-Key-f> "tkButtonInvoke [$data(w:btns) subwidget apply]"
+ bind $w <Alt-Key-c> "tkButtonInvoke [$data(w:btns) subwidget cancel]"
+ bind $w <Alt-Key-h> "tkButtonInvoke [$data(w:btns) subwidget help]"
+}
+
+proc tixFileSelectDialog:Invoke {w filename} {
+ upvar #0 $w data
+
+ wm withdraw $w
+
+ if {$data(-command) != ""} {
+ set bind(specs) "%V"
+ set bind(%V) $filename
+ tixEvalCmdBinding $w $data(-command) bind $filename
+ }
+}
Added: external/tix-8.4.2.x/library/FileEnt.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/FileEnt.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,270 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FileEnt.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
+#
+# FileEnt.tcl --
+#
+# TixFileEntry Widget: an entry box for entering filenames.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixFileEntry {
+ -classname TixFileEntry
+ -superclass tixLabelWidget
+ -method {
+ invoke filedialog update
+ }
+ -flag {
+ -activatecmd -command -dialogtype -disablecallback -disabledforeground
+ -filebitmap -selectmode -state -validatecmd -value -variable
+ }
+ -forcecall {
+ -variable
+ }
+ -static {
+ -filebitmap
+ }
+ -configspec {
+ {-activatecmd activateCmd ActivateCmd ""}
+ {-command command Command ""}
+ {-dialogtype dialogType DialogType ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-disabledforeground disabledForeground DisabledForeground #303030}
+ {-filebitmap fileBitmap FileBitmap ""}
+ {-selectmode selectMode SelectMode normal}
+ {-state state State normal}
+ {-validatecmd validateCmd ValidateCmd ""}
+ {-value value Value ""}
+ {-variable variable Variable ""}
+ }
+ -default {
+ {*frame.borderWidth 2}
+ {*frame.relief sunken}
+ {*Button.highlightThickness 0}
+ {*Entry.highlightThickness 0}
+ {*Entry.borderWidth 0}
+ }
+}
+
+proc tixFileEntry:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+ set data(varInited) 0
+
+ if {$data(-filebitmap) eq ""} {
+ set data(-filebitmap) [tix getbitmap openfile]
+ }
+}
+
+proc tixFileEntry:ConstructFramedWidget {w frame} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructFramedWidget $frame
+
+ set data(w:entry) [entry $frame.entry]
+ set data(w:button) [button $frame.button -bitmap $data(-filebitmap) \
+ -takefocus 0]
+ set data(entryfg) [$data(w:entry) cget -fg]
+
+ pack $data(w:button) -side right -fill both
+ pack $data(w:entry) -side left -expand yes -fill both
+}
+
+proc tixFileEntry:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:button) config -command [list tixFileEntry:OpenFile $w]
+ tixSetMegaWidget $data(w:entry) $w
+
+ # If user press <return>, verify the value and call the -command
+ #
+ bind $data(w:entry) <Return> [list tixFileEntry:invoke $w]
+ bind $data(w:entry) <KeyPress> {
+ if {[set [tixGetMegaWidget %W](-selectmode)] eq "immediate"} {
+ tixFileEntry:invoke [tixGetMegaWidget %W]
+ }
+ }
+ bind $data(w:entry) <FocusOut> {
+ if {"%d" eq "NotifyNonlinear" || "%d" eq "NotifyNonlinearVirtual"} {
+ tixFileEntry:invoke [tixGetMegaWidget %W]
+ }
+ }
+ bind $w <FocusIn> [list focus $data(w:entry)]
+}
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixFileEntry:config-state {w value} {
+ upvar #0 $w data
+
+ if {$value eq "normal"} {
+ $data(w:button) config -state $value
+ $data(w:entry) config -state $value -fg $data(entryfg)
+ catch {$data(w:label) config -fg $data(entryfg)}
+ } else {
+ $data(w:button) config -state $value
+ $data(w:entry) config -state $value -fg $data(-disabledforeground)
+ catch {$data(w:label) config -fg $data(-disabledforeground)}
+ }
+
+ return ""
+}
+
+proc tixFileEntry:config-value {w value} {
+ tixFileEntry:SetValue $w $value
+}
+
+proc tixFileEntry:config-variable {w arg} {
+ upvar #0 $w data
+
+ if {[tixVariable:ConfigVariable $w $arg]} {
+ # The value of data(-value) is changed if tixVariable:ConfigVariable
+ # returns true
+ tixFileEntry:SetValue $w $data(-value)
+ }
+ catch {
+ unset data(varInited)
+ }
+ set data(-variable) $arg
+}
+
+#----------------------------------------------------------------------
+# User Commands
+#----------------------------------------------------------------------
+proc tixFileEntry:invoke {w} {
+ upvar #0 $w data
+
+ if {![catch {$data(w:entry) index sel.first}]} {
+ # THIS ENTRY OWNS SELECTION --> TURN IT OFF
+ #
+ $data(w:entry) select from end
+ $data(w:entry) select to end
+ }
+
+ tixFileEntry:SetValue $w [$data(w:entry) get]
+}
+
+proc tixFileEntry:filedialog {w args} {
+ upvar #0 $w data
+
+ if {[llength $args]} {
+ return [eval [tix filedialog $data(-dialogtype)] $args]
+ } else {
+ return [tix filedialog $data(-dialogtype)]
+ }
+}
+
+proc tixFileEntry:update {w} {
+ upvar #0 $w data
+
+ if {[$data(w:entry) get] ne $data(-value)} {
+ tixFileEntry:invoke $w
+ }
+}
+#----------------------------------------------------------------------
+# Internal Commands
+#----------------------------------------------------------------------
+proc tixFileEntry:OpenFile {w} {
+ upvar #0 $w data
+
+ if {$data(-activatecmd) != ""} {
+ uplevel #0 $data(-activatecmd)
+ }
+
+ switch -- $data(-dialogtype) tk_chooseDirectory {
+ set args [list -parent [winfo toplevel $w]]
+ if {[set initial $data(-value)] != ""} {
+ lappend args -initialdir $data(value)
+ }
+ set retval [eval [linsert $args 0 tk_chooseDirectory]]
+
+ if {$retval != ""} {tixFileEntry:SetValue $w [tixFSNative $retval]}
+ } tk_getOpenFile - tk_getSaveFile {
+ set args [list -parent [winfo toplevel $w]]
+
+ if {[set initial [$data(w:entry) get]] != ""} {
+ switch -glob -- $initial *.py {
+ set types [list {"Python Files" {.py .pyw}} {"All Files" *}]
+ } *.txt {
+ set types [list {"Text Files" .txt} {"All Files" *}]
+ } *.tcl {
+ set types [list {"Tcl Files" .tcl} {"All Files" *}]
+ } * - default {
+ set types [list {"All Files" *}]
+ }
+ if {[file isfile $initial]} {
+ lappend args -initialdir [file dir $initial] \
+ -initialfile $initial
+ } elseif {[file isdir $initial]} {
+ lappend args -initialdir $initial
+ }
+ } else {
+ set types [list {"All Files" *}]
+ }
+ lappend args -filetypes $types
+
+ set retval [eval $data(-dialogtype) $args]
+ if {$retval != ""} {tixFileEntry:SetValue $w [tixFSNative $retval]}
+ } default {
+ set filedlg [tix filedialog $data(-dialogtype)]
+
+ $filedlg config -parent [winfo toplevel $w] \
+ -command [list tixFileEntry:FileDlgCallback $w]
+
+ focus $data(w:entry)
+
+ $filedlg popup
+ }
+}
+
+proc tixFileEntry:FileDlgCallback {w args} {
+ set filename [tixEvent flag V]
+
+ tixFileEntry:SetValue $w $filename
+}
+
+proc tixFileEntry:SetValue {w value} {
+ upvar #0 $w data
+
+ if {[llength $data(-validatecmd)]} {
+ set value [tixEvalCmdBinding $w $data(-validatecmd) "" $value]
+ }
+
+ if {$data(-state) eq "normal"} {
+ $data(w:entry) delete 0 end
+ $data(w:entry) insert 0 $value
+ $data(w:entry) xview end
+ }
+
+ set data(-value) $value
+
+ tixVariable:UpdateVariable $w
+
+ if {[llength $data(-command)] && !$data(-disablecallback)} {
+ if {![info exists data(varInited)]} {
+ set bind(specs) ""
+ tixEvalCmdBinding $w $data(-command) bind $value
+ }
+ }
+}
+
+proc tixFileEntry:Destructor {w} {
+ upvar #0 $w data
+
+ tixUnsetMegaWidget $data(w:entry)
+ tixVariable:DeleteVariable $w
+
+ # Chain this to the superclass
+ #
+ tixChainMethod $w Destructor
+}
Added: external/tix-8.4.2.x/library/FloatEnt.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/FloatEnt.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,132 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: FloatEnt.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# FloatEnt.tcl --
+#
+# An entry widget that can be attached on top of any widget to
+# provide dynamic editing. It is used to provide dynamic editing
+# for the tixGrid widget, among other things.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixFloatEntry {
+ -classname TixFloatEntry
+ -superclass tixPrimitive
+ -method {
+ invoke post unpost
+ }
+ -flag {
+ -command -value
+ }
+ -configspec {
+ {-value value Value ""}
+ {-command command Command ""}
+ }
+ -default {
+ {.entry.highlightThickness 0}
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Initialization bindings
+#
+#----------------------------------------------------------------------
+
+proc tixFloatEntry:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+}
+
+proc tixFloatEntry:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ set data(w:entry) [entry $w.entry]
+ pack $data(w:entry) -expand yes -fill both
+}
+
+proc tixFloatEntry:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+ tixBind $data(w:entry) <Return> [list tixFloatEntry:invoke $w]
+}
+
+#----------------------------------------------------------------------
+#
+# Class bindings
+#
+#----------------------------------------------------------------------
+
+proc tixFloatEntryBind {} {
+ tixBind TixFloatEntry <FocusIn> {
+ if {[focus -displayof [set %W(w:entry)]] ne [set %W(w:entry)]} {
+ focus [%W subwidget entry]
+ [set %W(w:entry)] selection from 0
+ [set %W(w:entry)] selection to end
+ [set %W(w:entry)] icursor end
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Public methods
+#
+#----------------------------------------------------------------------
+proc tixFloatEntry:post {w x y {width ""} {height ""}} {
+ upvar #0 $w data
+
+ if {$width == ""} {
+ set width [winfo reqwidth $data(w:entry)]
+ }
+ if {$height == ""} {
+ set height [winfo reqheight $data(w:entry)]
+ }
+
+ place $w -x $x -y $y -width $width -height $height -bordermode ignore
+ raise $w
+ focus $data(w:entry)
+}
+
+proc tixFloatEntry:unpost {w} {
+ upvar #0 $w data
+
+ place forget $w
+}
+
+proc tixFloatEntry:config-value {w val} {
+ upvar #0 $w data
+
+ $data(w:entry) delete 0 end
+ $data(w:entry) insert 0 $val
+
+ $data(w:entry) selection from 0
+ $data(w:entry) selection to end
+ $data(w:entry) icursor end
+}
+#----------------------------------------------------------------------
+#
+# Private methods
+#
+#----------------------------------------------------------------------
+
+proc tixFloatEntry:invoke {w} {
+ upvar #0 $w data
+
+ if {[llength $data(-command)]} {
+ set bind(specs) {%V}
+ set bind(%V) [$data(w:entry) get]
+
+ tixEvalCmdBinding $w $data(-command) bind $bind(%V)
+ }
+}
Added: external/tix-8.4.2.x/library/Grid.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Grid.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1122 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Grid.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+#
+# Grid.tcl --
+#
+# This file defines the default bindings for Tix Grid widgets.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+global tkPriv
+if {![llength [info globals tkPriv]]} {
+ tk::unsupported::ExposePrivateVariable tkPriv
+}
+#--------------------------------------------------------------------------
+# tkPriv elements used in this file:
+#
+# afterId - Token returned by "after" for autoscanning.
+# fakeRelease - Cancel the ButtonRelease-1 after the user double click
+#--------------------------------------------------------------------------
+#
+foreach fun {tkCancelRepeat} {
+ if {![llength [info commands $fun]]} {
+ tk::unsupported::ExposePrivateCommand $fun
+ }
+}
+unset fun
+
+proc tixGridBind {} {
+ tixBind TixGrid <ButtonPress-1> {
+ tixGrid:Button-1 %W %x %y
+ }
+ tixBind TixGrid <Shift-ButtonPress-1> {
+ tixGrid:Shift-Button-1 %W %x %y
+ }
+ tixBind TixGrid <Control-ButtonPress-1> {
+ tixGrid:Control-Button-1 %W %x %y
+ }
+ tixBind TixGrid <ButtonRelease-1> {
+ tixGrid:ButtonRelease-1 %W %x %y
+ }
+ tixBind TixGrid <Double-ButtonPress-1> {
+ tixGrid:Double-1 %W %x %y
+ }
+ tixBind TixGrid <B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixGrid:B1-Motion %W %x %y
+ }
+ tixBind TixGrid <Control-B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixGrid:Control-B1-Motion %W %x %y
+ }
+ tixBind TixGrid <B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixGrid:B1-Leave %W
+ }
+ tixBind TixGrid <B1-Enter> {
+ tixGrid:B1-Enter %W %x %y
+ }
+ tixBind TixGrid <Control-B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixGrid:Control-B1-Leave %W
+ }
+ tixBind TixGrid <Control-B1-Enter> {
+ tixGrid:Control-B1-Enter %W %x %y
+ }
+
+ # Keyboard bindings
+ #
+ tixBind TixGrid <Up> {
+ tixGrid:DirKey %W up
+ }
+ tixBind TixGrid <Down> {
+ tixGrid:DirKey %W down
+ }
+ tixBind TixGrid <Left> {
+ tixGrid:DirKey %W left
+ }
+ tixBind TixGrid <Right> {
+ tixGrid:DirKey %W right
+ }
+ tixBind TixGrid <Prior> {
+ %W yview scroll -1 pages
+ }
+ tixBind TixGrid <Next> {
+ %W yview scroll 1 pages
+ }
+ tixBind TixGrid <Return> {
+ tixGrid:Return %W
+ }
+ tixBind TixGrid <space> {
+ tixGrid:Space %W
+ }
+ #
+ # Don't use tixBind because %A causes Tk 8.3.2 to crash
+ #
+ bind TixGrid <MouseWheel> {
+ %W yview scroll [expr {- (%D / 120) * 2}] units
+ }
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Mouse bindings
+#
+#
+#----------------------------------------------------------------------
+
+proc tixGrid:Button-1 {w x y} {
+ if {[$w cget -state] eq "disabled"} {
+ return
+ }
+ tixGrid:SetFocus $w
+
+ if {[tixGrid:GetState $w] == 0} {
+ tixGrid:GoState 1 $w $x $y
+ }
+}
+
+proc tixGrid:Shift-Button-1 {w x y} {
+ if {[$w cget -state] eq "disabled"} {
+ return
+ }
+ tixGrid:SetFocus $w
+}
+
+proc tixGrid:Control-Button-1 {w x y} {
+ if {[$w cget -state] eq "disabled"} {
+ return
+ }
+ tixGrid:SetFocus $w
+
+ case [tixGrid:GetState $w] {
+ {s0} {
+ tixGrid:GoState s1 $w $x $y
+ }
+ {b0} {
+ tixGrid:GoState b1 $w $x $y
+ }
+ {m0} {
+ tixGrid:GoState m1 $w $x $y
+ }
+ {e0} {
+ tixGrid:GoState e10 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:ButtonRelease-1 {w x y} {
+ case [tixGrid:GetState $w] {
+ {2} {
+ tixGrid:GoState 5 $w $x $y
+ }
+ {4} {
+ tixGrid:GoState 3 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:B1-Motion {w x y} {
+ case [tixGrid:GetState $w] {
+ {2 4} {
+ tixGrid:GoState 4 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:Control-B1-Motion {w x y} {
+ case [tixGrid:GetState $w] {
+ {s2 s4} {
+ tixGrid:GoState s4 $w $x $y
+ }
+ {b2 b4} {
+ tixGrid:GoState b4 $w $x $y
+ }
+ {m2 m5} {
+ tixGrid:GoState m4 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:Double-1 {w x y} {
+ case [tixGrid:GetState $w] {
+ {s0} {
+ tixGrid:GoState s7 $w $x $y
+ }
+ {b0} {
+ tixGrid:GoState b7 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:B1-Leave {w} {
+ case [tixGrid:GetState $w] {
+ {s2 s4} {
+ tixGrid:GoState s5 $w
+ }
+ {b2 b4} {
+ tixGrid:GoState b5 $w
+ }
+ {m2 m5} {
+ tixGrid:GoState m8 $w
+ }
+ {e2 e5} {
+ tixGrid:GoState e8 $w
+ }
+ }
+}
+
+proc tixGrid:B1-Enter {w x y} {
+ case [tixGrid:GetState $w] {
+ {s5 s6} {
+ tixGrid:GoState s4 $w $x $y
+ }
+ {b5 b6} {
+ tixGrid:GoState b4 $w $x $y
+ }
+ {m8 m9} {
+ tixGrid:GoState m4 $w $x $y
+ }
+ {e8 e9} {
+ tixGrid:GoState e4 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:Control-B1-Leave {w} {
+ case [tixGrid:GetState $w] {
+ {s2 s4} {
+ tixGrid:GoState s5 $w
+ }
+ {b2 b4} {
+ tixGrid:GoState b5 $w
+ }
+ {m2 m5} {
+ tixGrid:GoState m8 $w
+ }
+ }
+}
+
+proc tixGrid:Control-B1-Enter {w x y} {
+ case [tixGrid:GetState $w] {
+ {s5 s6} {
+ tixGrid:GoState s4 $w $x $y
+ }
+ {b5 b6} {
+ tixGrid:GoState b4 $w $x $y
+ }
+ {m8 m9} {
+ tixGrid:GoState m4 $w $x $y
+ }
+ }
+}
+
+proc tixGrid:AutoScan {w} {
+ case [tixGrid:GetState $w] {
+ {s5 s6} {
+ tixGrid:GoState s6 $w
+ }
+ {b5 b6} {
+ tixGrid:GoState b6 $w
+ }
+ {m8 m9} {
+ tixGrid:GoState m9 $w
+ }
+ {e8 e9} {
+ tixGrid:GoState e9 $w
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Key bindings
+#
+#
+#----------------------------------------------------------------------
+proc tixGrid:DirKey {w key} {
+ if {[$w cget -state] eq "disabled"} {
+ return
+ }
+ case [tixGrid:GetState $w] {
+ {s0} {
+ tixGrid:GoState s8 $w $key
+ }
+ {b0} {
+ tixGrid:GoState b8 $w $key
+ }
+ }
+}
+
+proc tixGrid:Return {w} {
+ if {[$w cget -state] eq "disabled"} {
+ return
+ }
+ case [tixGrid:GetState $w] {
+ {s0} {
+ tixGrid:GoState s9 $w
+ }
+ {b0} {
+ tixGrid:GoState b9 $w
+ }
+ }
+}
+
+proc tixGrid:Space {w} {
+ if {[$w cget -state] eq "disabled"} {
+ return
+ }
+ case [tixGrid:GetState $w] {
+ {s0} {
+ tixGrid:GoState s10 $w
+ }
+ {b0} {
+ tixGrid:GoState b10 $w
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# STATE MANIPULATION
+#
+#
+#----------------------------------------------------------------------
+proc tixGrid:GetState {w} {
+ global $w:priv:state
+
+ if {![info exists $w:priv:state]} {
+ set $w:priv:state 0
+ }
+ return [set $w:priv:state]
+}
+
+proc tixGrid:SetState {w n} {
+ global $w:priv:state
+
+ set $w:priv:state $n
+}
+
+proc tixGrid:GoState {n w args} {
+
+# puts "going from [tixGrid:GetState $w] --> $n"
+
+ tixGrid:SetState $w $n
+ eval tixGrid:GoState-$n $w $args
+}
+
+#----------------------------------------------------------------------
+# SELECTION ROUTINES
+#----------------------------------------------------------------------
+proc tixGrid:SelectSingle {w ent} {
+ $w selection set [lindex $ent 0] [lindex $ent 1]
+ tixGrid:CallBrowseCmd $w $ent
+}
+
+#----------------------------------------------------------------------
+# SINGLE SELECTION
+#----------------------------------------------------------------------
+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
+ }
+ }
+}
+
+proc tixGrid:GoState-1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ tixGrid:SetAnchor $w $ent
+ }
+ tixGrid:CheckEdit $w
+ $w selection clear 0 0 max max
+
+ if {[$w cget -selectmode] ne "single"} {
+ tixGrid:SelectSingle $w $ent
+ }
+ tixGrid:GoState 2 $w
+}
+
+proc tixGrid:GoState-2 {w} {
+}
+
+proc tixGrid:GoState-3 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ tixGrid:SelectSingle $w $ent
+ }
+ tixGrid:GoState 0 $w
+}
+
+proc tixGrid:GoState-5 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ tixGrid:SelectSingle $w $ent
+ tixGrid:SetEdit $w $ent
+ }
+ tixGrid:GoState 0 $w
+}
+
+
+proc tixGrid:GoState-4 {w x y} {
+ set ent [$w nearest $x $y]
+
+ case [$w cget -selectmode] {
+ single {
+ tixGrid:SetAnchor $w $ent
+ }
+ browse {
+ tixGrid:SetAnchor $w $ent
+ $w selection clear 0 0 max max
+ tixGrid:SelectSingle $w $ent
+ }
+ {multiple extended} {
+ set anchor [$w anchor get]
+ $w selection adjust [lindex $anchor 0] [lindex $anchor 1] \
+ [lindex $ent 0] [lindex $ent 1]
+ }
+ }
+}
+
+proc tixGrid:GoState-s5 {w} {
+ tixGrid:StartScan $w
+}
+
+proc tixGrid:GoState-s6 {w} {
+ global tkPriv
+
+ tixGrid:DoScan $w
+}
+
+proc tixGrid:GoState-s7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallCommand $w $ent
+ }
+ tixGrid:GoState s0 $w
+}
+
+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
+}
+
+proc tixGrid:GoState-s9 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixGrid:CallCommand $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixGrid:GoState s0 $w
+}
+
+proc tixGrid:GoState-s10 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixGrid:CallBrowseCmd $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixGrid:GoState s0 $w
+}
+
+#----------------------------------------------------------------------
+# BROWSE SELECTION
+#----------------------------------------------------------------------
+proc tixGrid:GoState-b0 {w} {
+}
+
+proc tixGrid:GoState-b1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState b2 $w
+}
+
+proc tixGrid:GoState-b2 {w} {
+}
+
+proc tixGrid:GoState-b3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState b0 $w
+}
+
+proc tixGrid:GoState-b4 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallBrowseCmd $w $ent
+ }
+}
+
+proc tixGrid:GoState-b5 {w} {
+ tixGrid:StartScan $w
+}
+
+proc tixGrid:GoState-b6 {w} {
+ global tkPriv
+
+ tixGrid:DoScan $w
+}
+
+proc tixGrid:GoState-b7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallCommand $w $ent
+ }
+ tixGrid:GoState b0 $w
+}
+
+proc tixGrid:GoState-b8 {w key} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ } else {
+ set anchor [$w info $key $anchor]
+ }
+
+ $w anchor set $anchor
+ $w selection clear
+ $w selection set $anchor
+ $w see $anchor
+
+ tixGrid:CallBrowseCmd $w $anchor
+ tixGrid:GoState b0 $w
+}
+
+proc tixGrid:GoState-b9 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixGrid:CallCommand $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixGrid:GoState b0 $w
+}
+
+proc tixGrid:GoState-b10 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixGrid:CallBrowseCmd $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixGrid:GoState b0 $w
+}
+
+#----------------------------------------------------------------------
+# MULTIPLE SELECTION
+#----------------------------------------------------------------------
+proc tixGrid:GoState-m0 {w} {
+}
+
+proc tixGrid:GoState-m1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState m2 $w
+}
+
+proc tixGrid:GoState-m2 {w} {
+}
+
+proc tixGrid:GoState-m3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState m0 $w
+}
+
+proc tixGrid:GoState-m4 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixGrid:CallBrowseCmd $w $to
+ }
+ tixGrid:GoState m5 $w
+}
+
+proc tixGrid:GoState-m5 {w} {
+}
+
+proc tixGrid:GoState-m6 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState m0 $w
+}
+
+proc tixGrid:GoState-m7 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$from == ""} {
+ set from $to
+ $w anchor set $from
+ }
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixGrid:CallBrowseCmd $w $to
+ }
+ tixGrid:GoState m5 $w
+}
+
+
+proc tixGrid:GoState-m8 {w} {
+ tixGrid:StartScan $w
+}
+
+proc tixGrid:GoState-m9 {w} {
+ tixGrid:DoScan $w
+}
+
+proc tixGrid:GoState-xm7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallCommand $w $ent
+ }
+ tixGrid:GoState m0 $w
+}
+
+#----------------------------------------------------------------------
+# EXTENDED SELECTION
+#----------------------------------------------------------------------
+proc tixGrid:GoState-e0 {w} {
+}
+
+proc tixGrid:GoState-e1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState e2 $w
+}
+
+proc tixGrid:GoState-e2 {w} {
+}
+
+proc tixGrid:GoState-e3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState e0 $w
+}
+
+proc tixGrid:GoState-e4 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixGrid:CallBrowseCmd $w $to
+ }
+ tixGrid:GoState e5 $w
+}
+
+proc tixGrid:GoState-e5 {w} {
+}
+
+proc tixGrid:GoState-e6 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState e0 $w
+}
+
+proc tixGrid:GoState-e7 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$from == ""} {
+ set from $to
+ $w anchor set $from
+ }
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixGrid:CallBrowseCmd $w $to
+ }
+ tixGrid:GoState e5 $w
+}
+
+
+proc tixGrid:GoState-e8 {w} {
+ tixGrid:StartScan $w
+}
+
+proc tixGrid:GoState-e9 {w} {
+ tixGrid:DoScan $w
+}
+
+proc tixGrid:GoState-e10 {w x y} {
+ set ent [$w nearest $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
+ }
+ tixGrid:CallBrowseCmd $w $ent
+ }
+ tixGrid:GoState e2 $w
+}
+
+proc tixGrid:GoState-xm7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixGrid:CallCommand $w $ent
+ }
+ tixGrid:GoState e0 $w
+}
+
+#----------------------------------------------------------------------
+# HODGE PODGE
+#----------------------------------------------------------------------
+
+proc tixGrid:GoState-12 {w x y} {
+ tkCancelRepeat
+ tixGrid:GoState 5 $w $x $y
+}
+
+proc tixGrid:GoState-13 {w ent oldEnt} {
+ global tkPriv
+ set tkPriv(tix,indicator) $ent
+ set tkPriv(tix,oldEnt) $oldEnt
+ tixGrid:IndicatorCmd $w <Arm> $ent
+}
+
+proc tixGrid:GoState-14 {w x y} {
+ global tkPriv
+
+ if {[tixGrid:InsideArmedIndicator $w $x $y]} {
+ $w anchor set $tkPriv(tix,indicator)
+ $w select clear
+ $w select set $tkPriv(tix,indicator)
+ tixGrid:IndicatorCmd $w <Activate> $tkPriv(tix,indicator)
+ } else {
+ tixGrid:IndicatorCmd $w <Disarm> $tkPriv(tix,indicator)
+ }
+
+ unset tkPriv(tix,indicator)
+ tixGrid:GoState 0 $w
+}
+
+proc tixGrid:GoState-16 {w ent} {
+ if {$ent == ""} {
+ return
+ }
+ if {[$w cget -selectmode] ne "single"} {
+ tixGrid:Select $w $ent
+ tixGrid:Browse $w $ent
+ }
+}
+
+proc tixGrid:GoState-18 {w} {
+ global tkPriv
+ tkCancelRepeat
+ tixGrid:GoState 6 $w $tkPriv(x) $tkPriv(y)
+}
+
+proc tixGrid:GoState-20 {w x y} {
+ global tkPriv
+
+ if {![tixGrid:InsideArmedIndicator $w $x $y]} {
+ tixGrid:GoState 21 $w $x $y
+ } else {
+ tixGrid:IndicatorCmd $w <Arm> $tkPriv(tix,indicator)
+ }
+}
+
+proc tixGrid:GoState-21 {w x y} {
+ global tkPriv
+
+ if {[tixGrid:InsideArmedIndicator $w $x $y]} {
+ tixGrid:GoState 20 $w $x $y
+ } else {
+ tixGrid:IndicatorCmd $w <Disarm> $tkPriv(tix,indicator)
+ }
+}
+
+proc tixGrid:GoState-22 {w} {
+ global tkPriv
+
+ if {$tkPriv(tix,oldEnt) != ""} {
+ $w anchor set $tkPriv(tix,oldEnt)
+ } else {
+ $w anchor clear
+ }
+ tixGrid:GoState 0 $w
+}
+
+
+#----------------------------------------------------------------------
+# callback actions
+#----------------------------------------------------------------------
+proc tixGrid:SetAnchor {w ent} {
+ if {$ent ne ""} {
+ $w anchor set [lindex $ent 0] [lindex $ent 1]
+# $w see $ent
+ }
+}
+
+proc tixGrid:Select {w ent} {
+ $w selection clear
+ $w select set $ent
+}
+
+proc tixGrid:StartScan {w} {
+ global tkPriv
+ set tkPriv(afterId) [after 50 tixGrid:AutoScan $w]
+}
+
+proc tixGrid:DoScan {w} {
+ global tkPriv
+ set x $tkPriv(x)
+ set y $tkPriv(y)
+ set X $tkPriv(X)
+ set Y $tkPriv(Y)
+
+ set out 0
+ if {$y >= [winfo height $w]} {
+ $w yview scroll 1 units
+ set out 1
+ }
+ if {$y < 0} {
+ $w yview scroll -1 units
+ set out 1
+ }
+ if {$x >= [winfo width $w]} {
+ $w xview scroll 2 units
+ set out 1
+ }
+ if {$x < 0} {
+ $w xview scroll -2 units
+ set out 1
+ }
+
+ if {$out} {
+ set tkPriv(afterId) [after 50 tixGrid: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.
+#
+proc tixGrid:EditCell {w x y} {
+ set list $w:_list
+ global $list
+
+ if {[tixGrid:GetState $w] == 0} {
+ tixGrid:SetEdit $w [list $x $y]
+ } else {
+ 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.
+#
+proc tixGrid:EditApply {w} {
+ set list $w:_list
+ global $list
+
+ if {[tixGrid:GetState $w] == 0} {
+ tixGrid:CheckEdit $w
+ } else {
+ 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.
+#
+proc tixGrid:CheckEdit {w} {
+ set edit $w.tixpriv__edit
+ if {[winfo 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 {[$edit cget -command] ne ""} {
+ $edit invoke
+ }
+ }
+}
+
+# tixGrid:SetEdit --
+#
+# Puts a floatentry on top of an editable entry.
+#
+proc tixGrid:SetEdit {w ent} {
+ set edit $w.tixpriv__edit
+ tixGrid:CheckEdit $w
+
+ set editnotifycmd [$w cget -editnotifycmd]
+ if {$editnotifycmd eq ""} {
+ return
+ }
+ set px [lindex $ent 0]
+ set py [lindex $ent 1]
+
+ if {![uplevel #0 $editnotifycmd $px $py]} {
+ return
+ }
+ if {[$w info exists $px $py]} {
+ if [catch {
+ set oldValue [$w entrycget $px $py -text]
+ }] {
+ # The 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.
+ #
+ return
+ }
+ } else {
+ set oldValue ""
+ }
+
+ set bbox [$w info bbox [lindex $ent 0] [lindex $ent 1]]
+ set x [lindex $bbox 0]
+ set y [lindex $bbox 1]
+ set W [lindex $bbox 2]
+ set H [lindex $bbox 3]
+
+ if {![winfo exists $edit]} {
+ tixFloatEntry $edit
+ }
+
+ $edit config -command "tixGrid:DoneEdit $w $ent"
+ $edit post $x $y $W $H
+
+ $edit config -value $oldValue
+}
+
+proc tixGrid:DoneEdit {w x y args} {
+ set edit $w.tixpriv__edit
+ $edit config -command ""
+ $edit unpost
+
+ set value [tixEvent value]
+ if {[$w info exists $x $y]} {
+ if [catch {
+ $w entryconfig $x $y -text $value
+ }] {
+ return
+ }
+ } elseif {$value ne ""} {
+ if {[catch {
+ # This needs to be catch'ed because the default itemtype may
+ # not support the -text option
+ #
+ $w set $x $y -text $value
+ }]} {
+ return
+ }
+ } else {
+ return
+ }
+
+ set editDoneCmd [$w cget -editdonecmd]
+ if {$editDoneCmd ne ""} {
+ uplevel #0 $editDoneCmd $x $y
+ }
+}
+
+proc tixGrid:SetFocus {w} {
+ if {[$w cget -takefocus] && ![string match $w.* [focus -displayof $w]]} {
+ focus $w
+ }
+}
Added: external/tix-8.4.2.x/library/HList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/HList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,917 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: HList.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+#
+# HList.tcl --
+#
+# This file defines the default bindings for Tix Hierarchical Listbox
+# widgets.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+global tkPriv
+if {![llength [info globals tkPriv]]} {
+ tk::unsupported::ExposePrivateVariable tkPriv
+}
+#--------------------------------------------------------------------------
+# tkPriv elements used in this file:
+#
+# afterId - Token returned by "after" for autoscanning.
+# fakeRelease - Cancel the ButtonRelease-1 after the user double click
+#--------------------------------------------------------------------------
+#
+foreach fun {tkCancelRepeat} {
+ if {![llength [info commands $fun]]} {
+ tk::unsupported::ExposePrivateCommand $fun
+ }
+}
+unset fun
+
+proc tixHListBind {} {
+ tixBind TixHList <ButtonPress-1> {
+ tixHList:Button-1 %W %x %y ""
+ }
+ tixBind TixHList <Shift-ButtonPress-1> {
+ tixHList:Button-1 %W %x %y s
+ }
+ tixBind TixHList <Control-ButtonPress-1> {
+ tixHList:Button-1 %W %x %y c
+ }
+ tixBind TixHList <ButtonRelease-1> {
+ tixHList:ButtonRelease-1 %W %x %y
+ }
+ tixBind TixHList <Double-ButtonPress-1> {
+ tixHList:Double-1 %W %x %y
+ }
+ tixBind TixHList <B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixHList:B1-Motion %W %x %y
+ }
+ tixBind TixHList <B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixHList:B1-Leave %W
+ }
+ tixBind TixHList <B1-Enter> {
+ tixHList:B1-Enter %W %x %y
+ }
+
+ # Keyboard bindings
+ #
+ tixBind TixHList <Up> {
+ tixHList:UpDown %W prev ""
+ }
+ tixBind TixHList <Down> {
+ tixHList:UpDown %W next ""
+ }
+ tixBind TixHList <Shift-Up> {
+ tixHList:UpDown %W prev s
+ }
+ tixBind TixHList <Shift-Down> {
+ tixHList:UpDown %W next s
+ }
+ tixBind TixHList <Left> {
+ tixHList:LeftRight %W left
+ }
+ tixBind TixHList <Right> {
+ tixHList:LeftRight %W right
+ }
+ tixBind TixHList <Prior> {
+ %W yview scroll -1 pages
+ }
+ tixBind TixHList <Next> {
+ %W yview scroll 1 pages
+ }
+ tixBind TixHList <Return> {
+ tixHList:Keyboard-Activate %W
+ }
+ tixBind TixHList <space> {
+ tixHList:Keyboard-Browse %W
+ }
+
+ # Under Windows <Home> moves up, clears the sel and sets the selection
+ # Under Windows <Control-Home> moves up, leaves the selection, and sets the anchor
+ tixBind TixHList <Home> {
+ set w %W
+ $w yview moveto 0; # $w xview moveto 0
+ set sel [lindex [$w info children] 0]
+ # should be first not disabled
+ $w anchor set $sel
+ tixHList:Keyboard-Browse $w
+ }
+ tixBind TixHList <End> {
+ set w %W
+ $w yview moveto 1; # $w xview moveto 0
+ $w select clear
+ # should be last not disabled
+ set sel [lindex [$w info children .] end]
+ while {[set next [$w info next $sel]] ne "" && \
+ ![$w info hidden $next] && \
+ [llength [set kids [$w info child $sel]]]} {
+ set sel [lindex $kids end]
+ }
+ $w anchor set $sel
+ tixHList:Keyboard-Browse $w
+ }
+ tixBind TixHList <Control-Home> {
+ set w %W
+ $w yview moveto 0; # $w xview moveto 0
+ set sel [lindex [$w info children] 0]
+ # should be first not disabled
+ $w anchor set $sel
+ }
+ tixBind TixHList <Control-End> {
+ set w %W
+ $w yview moveto 1; # $w xview moveto 0
+ # should be last not disabled
+ set sel [lindex [$w info children .] end]
+ while {[set next [$w info next $sel]] ne "" && \
+ ![$w info hidden $next] && \
+ [llength [set kids [$w info child $sel]]]} {
+ set sel [lindex $kids end]
+ }
+ $w anchor set $sel
+ }
+ #
+ # Don't use tixBind because %A causes Tk 8.3.2 to crash
+ #
+ bind TixHList <MouseWheel> {
+ %W yview scroll [expr {- (%D / 120) * 2}] units
+ }
+
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Key bindings
+#
+#
+#----------------------------------------------------------------------
+proc tixHList:Keyboard-Activate {w} {
+ if {[tixHList:GetState $w] != 0} {
+ return
+ }
+ set ent [$w info anchor]
+
+ if {$ent eq ""} {
+ return
+ }
+
+ if {[$w cget -selectmode] eq "single"} {
+ $w select clear
+ }
+ $w select set $ent
+
+ set command [$w cget -command]
+ if {$command ne ""} {
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $command bind $ent
+ }
+}
+
+proc tixHList:Keyboard-Browse {w} {
+ if {[tixHList:GetState $w] != 0} {
+ return
+ }
+ set ent [$w info anchor]
+
+ if {$ent eq ""} {
+ return
+ }
+
+ if {[$w cget -selectmode] eq "single"} {
+ $w select clear
+ }
+ $w select set $ent
+
+ tixHList:Browse $w $ent
+}
+
+proc tixHList:LeftRight {w spec} {
+ catch {
+ uplevel #0 unset $w:priv:shiftanchor
+ }
+ if {[tixHList:GetState $w] != 0} {
+ return
+ }
+
+ set anchor [$w info anchor]
+ if {$anchor eq ""} {
+ set anchor [lindex [$w info children] 0]
+ }
+ if {$anchor eq ""} {
+ return
+ }
+
+ set ent $anchor
+ while {1} {
+ set e $ent
+ if {$spec eq "left"} {
+ set ent [$w info parent $e]
+
+ if {$ent eq "" || [$w entrycget $ent -state] eq "disabled"} {
+ set ent [$w info prev $e]
+ }
+ } else {
+ set ent [lindex [$w info children $e] 0]
+
+ if {$ent eq "" || [$w entrycget $ent -state] eq "disabled"} {
+ set ent [$w info next $e]
+ }
+ }
+
+ if {$ent eq ""} {
+ break
+ }
+ if {[$w entrycget $ent -state] eq "disabled"} {
+ continue
+ }
+ if {[$w info hidden $ent]} {
+ continue
+ }
+ break
+ }
+
+ if {$ent eq ""} {
+ return
+ }
+
+ $w anchor set $ent
+ $w see $ent
+
+ if {[$w cget -selectmode] ne "single"} {
+ $w select clear
+ $w selection set $ent
+
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:UpDown {w spec mod} {
+ if {[tixHList:GetState $w] ne 0} {
+ return
+ }
+ set anchor [$w info anchor]
+ set done 0
+
+ if {$anchor eq ""} {
+ set anchor [lindex [$w info children] 0]
+
+ if {$anchor eq ""} {
+ return
+ }
+
+ if {[$w entrycget $anchor -state] ne "disabled"} {
+ # That's a good anchor
+ set done 1
+ } else {
+ # We search for the first non-disabled entry (downward)
+ set spec next
+ }
+ }
+
+ set ent $anchor
+ # mike - bulletproofing
+ if {![$w info exists $ent]} {return}
+ # Find the prev/next non-disabled entry
+ #
+ while {!$done} {
+ set ent [$w info $spec $ent]
+ if {$ent eq ""} {
+ break
+ }
+ if {[$w entrycget $ent -state] eq "disabled"} {
+ continue
+ }
+ if {[$w info hidden $ent]} {
+ continue
+ }
+ break
+ }
+
+ if {$ent eq ""} {
+ return
+ } else {
+ $w see $ent
+ $w anchor set $ent
+
+ set selMode [$w cget -selectmode]
+ if {$mod eq "s" && ($selMode eq "extended" || $selMode eq "multiple")} {
+ global $w:priv:shiftanchor
+
+ if {![info exists $w:priv:shiftanchor]} {
+ set $w:priv:shiftanchor $anchor
+ }
+
+ $w selection clear
+ # mike - bulletproofing
+ if {![catch {$w selection set $ent [set $w:priv:shiftanchor]}]} {
+ tixHList:Browse $w $ent
+ }
+ } else {
+ catch {
+ uplevel #0 unset $w:priv:shiftanchor
+ }
+
+ if {[$w cget -selectmode] ne "single"} {
+ $w select clear
+ $w selection set $ent
+
+ tixHList:Browse $w $ent
+ }
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Mouse bindings
+#
+#
+#----------------------------------------------------------------------
+
+proc tixHList:Button-1 {w x y mod} {
+# if {[$w cget -state] eq "disabled"} {
+# return
+# }
+
+ if {[$w cget -takefocus]} {
+ focus $w
+ }
+
+ set selMode [$w cget -selectmode]
+
+ case [tixHList:GetState $w] {
+ {0} {
+ if {$mod eq "s" && $selMode eq "multiple"} {
+ tixHList:GoState 28 $w $x $y
+ return
+ }
+ if {$mod eq "s" && $selMode eq "extended"} {
+ tixHList:GoState 28 $w $x $y
+ return
+ }
+ if {$mod eq "c" && $selMode eq "extended"} {
+ tixHList:GoState 33 $w $x $y
+ return
+ }
+
+ tixHList:GoState 1 $w $x $y
+ }
+ }
+}
+
+proc tixHList:ButtonRelease-1 {w x y} {
+ case [tixHList:GetState $w] {
+ {5 16} {
+ tixHList:GoState 6 $w $x $y
+ }
+ {15} {
+ tixHList:GoState 17 $w $x $y
+ }
+ {10 11} {
+ tixHList:GoState 18 $w
+ }
+ {13 20} {
+ tixHList:GoState 14 $w $x $y
+ }
+ {21} {
+ tixHList:GoState 22 $w
+ }
+ {24} {
+ tixHList:GoState 25 $w
+ }
+ {26 28 33} {
+ tixHList:GoState 27 $w
+ }
+ {30} {
+ tixHList:GoState 32 $w
+ }
+ }
+}
+
+proc tixHList:Double-1 {w x y} {
+ case [tixHList:GetState $w] {
+ {0} {
+ tixHList:GoState 23 $w $x $y
+ }
+ }
+}
+
+proc tixHList:B1-Motion {w x y} {
+ case [tixHList:GetState $w] {
+ {1} {
+ tixHList:GoState 5 $w $x $y
+ }
+ {5 16} {
+ tixHList:GoState 5 $w $x $y
+ }
+ {13 20 21} {
+ tixHList:GoState 20 $w $x $y
+ }
+ {24 26 28} {
+ tixHList:GoState 26 $w $x $y
+ }
+ }
+}
+
+proc tixHList:B1-Leave {w} {
+ case [tixHList:GetState $w] {
+ {5} {
+ tixHList:GoState 10 $w
+ }
+ {26} {
+ tixHList:GoState 29 $w
+ }
+ }
+}
+
+proc tixHList:B1-Enter {w x y} {
+ case [tixHList:GetState $w] {
+ {10 11} {
+ tixHList:GoState 12 $w $x $y
+ }
+ {29 30} {
+ tixHList:GoState 31 $w $x $y
+ }
+ }
+}
+
+proc tixHList:AutoScan {w} {
+ case [tixHList:GetState $w] {
+ {29 30} {
+ tixHList:GoState 30 $w
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# STATE MANIPULATION
+#
+#
+#----------------------------------------------------------------------
+proc tixHList:GetState {w} {
+ global $w:priv:state
+
+ if {![info exists $w:priv:state]} {
+ set $w:priv:state 0
+ }
+ return [set $w:priv:state]
+}
+
+proc tixHList:SetState {w n} {
+ global $w:priv:state
+
+ set $w:priv:state $n
+}
+
+proc tixHList:GoState {n w args} {
+
+# puts "going from [tixHList:GetState $w] --> $n"
+
+ tixHList:SetState $w $n
+ eval tixHList:GoState-$n $w $args
+}
+
+#----------------------------------------------------------------------
+# States
+#----------------------------------------------------------------------
+proc tixHList:GoState-0 {w} {
+
+}
+proc tixHList:GoState-1 {w x y} {
+ set oldEnt [$w info anchor]
+ set ent [tixHList:SetAnchor $w $x $y 1]
+
+ if {$ent eq ""} {
+ tixHList:GoState 0 $w
+ return
+ }
+
+ set info [$w info item $x $y]
+ if {[lindex $info 1] eq "indicator"} {
+ tixHList:GoState 13 $w $ent $oldEnt
+ } else {
+ if {[$w entrycget $ent -state] eq "disabled"} {
+ tixHList:GoState 0 $w
+ } else {
+ case [$w cget -selectmode] {
+ {single browse} {
+ tixHList:GoState 16 $w $ent
+ }
+ default {
+ tixHList:GoState 24 $w $ent
+ }
+ }
+ }
+ }
+}
+
+proc tixHList:GoState-5 {w x y} {
+ set oldEnt [$w info anchor]
+
+ set ent [tixHList:SetAnchor $w $x $y]
+
+ if {$ent eq "" || $oldEnt eq $ent} {
+ return
+ }
+
+ if {[$w cget -selectmode] ne "single"} {
+ tixHList:Select $w $ent
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-6 {w x y} {
+ set ent [tixHList:SetAnchor $w $x $y]
+
+ if {$ent eq ""} {
+ tixHList:GoState 0 $w
+ return
+ }
+ tixHList:Select $w $ent
+ tixHList:Browse $w $ent
+
+ tixHList:GoState 0 $w
+}
+
+proc tixHList:GoState-10 {w} {
+ tixHList:StartScan $w
+}
+
+proc tixHList:GoState-11 {w} {
+ global tkPriv
+
+ tixHList:DoScan $w
+
+ set oldEnt [$w info anchor]
+ set ent [tixHList:SetAnchor $w $tkPriv(x) $tkPriv(y)]
+
+ if {$ent eq "" || $oldEnt eq $ent} {
+ return
+ }
+
+ if {[$w cget -selectmode] ne "single"} {
+ tixHList:Select $w $ent
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-12 {w x y} {
+ tkCancelRepeat
+ tixHList:GoState 5 $w $x $y
+}
+
+proc tixHList:GoState-13 {w ent oldEnt} {
+ global tkPriv
+ set tkPriv(tix,indicator) $ent
+ set tkPriv(tix,oldEnt) $oldEnt
+ tixHList:CallIndicatorCmd $w <Arm> $ent
+}
+
+proc tixHList:GoState-14 {w x y} {
+ global tkPriv
+
+ if {[tixHList:InsideArmedIndicator $w $x $y]} {
+ $w anchor set $tkPriv(tix,indicator)
+ $w select clear
+ $w select set $tkPriv(tix,indicator)
+ tixHList:CallIndicatorCmd $w <Activate> $tkPriv(tix,indicator)
+ } else {
+ tixHList:CallIndicatorCmd $w <Disarm> $tkPriv(tix,indicator)
+ }
+
+ unset tkPriv(tix,indicator)
+ tixHList:GoState 0 $w
+}
+
+proc tixHList:GoState-16 {w ent} {
+ if {$ent ne "" && [$w cget -selectmode] ne "single"} {
+ tixHList:Select $w $ent
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-18 {w} {
+ global tkPriv
+ tkCancelRepeat
+ tixHList:GoState 6 $w $tkPriv(x) $tkPriv(y)
+}
+
+proc tixHList:GoState-20 {w x y} {
+ global tkPriv
+
+ if {![tixHList:InsideArmedIndicator $w $x $y]} {
+ tixHList:GoState 21 $w $x $y
+ } else {
+ tixHList:CallIndicatorCmd $w <Arm> $tkPriv(tix,indicator)
+ }
+}
+
+proc tixHList:GoState-21 {w x y} {
+ global tkPriv
+
+ if {[tixHList:InsideArmedIndicator $w $x $y]} {
+ tixHList:GoState 20 $w $x $y
+ } else {
+ tixHList:CallIndicatorCmd $w <Disarm> $tkPriv(tix,indicator)
+ }
+}
+
+proc tixHList:GoState-22 {w} {
+ global tkPriv
+
+ if {$tkPriv(tix,oldEnt) ne ""} {
+ $w anchor set $tkPriv(tix,oldEnt)
+ } else {
+ $w anchor clear
+ }
+ tixHList:GoState 0 $w
+}
+
+proc tixHList:GoState-23 {w x y} {
+ set ent [tixHList:GetNearest $w $y]
+
+ if {$ent ne ""} {
+ set info [$w info item $x $y]
+
+ if {[lindex $info 1] eq "indicator"} {
+ tixHList:CallIndicatorCmd $w <Activate> $ent
+ } else {
+ $w select set $ent
+ set command [$w cget -command]
+ if {$command ne ""} {
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $command bind $ent
+ }
+ }
+ }
+ tixHList:GoState 0 $w
+}
+
+proc tixHList:GoState-24 {w ent} {
+ if {$ent ne ""} {
+ tixHList:Select $w $ent
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-25 {w} {
+ set ent [$w info anchor]
+
+ if {$ent ne ""} {
+ tixHList:Select $w $ent
+ tixHList:Browse $w $ent
+ }
+
+ tixHList:GoState 0 $w
+}
+
+
+proc tixHList:GoState-26 {w x y} {
+ set anchor [$w info anchor]
+ if {$anchor eq ""} {
+ set first [lindex [$w info children ""] 0]
+ if {$first ne ""} {
+ $w anchor set $first
+ set anchor $first
+ } else {
+ return
+ }
+ }
+
+ set ent [tixHList:GetNearest $w $y 1]
+
+ if {$ent ne ""} {
+ $w selection clear
+ $w selection set $anchor $ent
+
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-27 {w} {
+ set ent [$w info anchor]
+
+ if {$ent ne ""} {
+ tixHList:Browse $w $ent
+ }
+
+ tixHList:GoState 0 $w
+}
+
+proc tixHList:GoState-28 {w x y} {
+ set anchor [$w info anchor]
+ if {$anchor eq ""} {
+ set first [lindex [$w info children ""] 0]
+ if {$first ne ""} {
+ $w anchor set $first
+ set anchor $first
+ } else {
+ return
+ }
+ }
+
+ set ent [tixHList:GetNearest $w $y 1]
+ if {$ent ne ""} {
+ $w selection clear
+ $w selection set $anchor $ent
+
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-29 {w} {
+ tixHList:StartScan $w
+}
+
+proc tixHList:GoState-30 {w} {
+ global tkPriv
+
+ tixHList:DoScan $w
+
+ set anchor [$w info anchor]
+ if {$anchor eq ""} {
+ set first [lindex [$w info children ""] 0]
+ if {$first ne ""} {
+ $w anchor set $first
+ set anchor $first
+ } else {
+ return
+ }
+ }
+
+ set ent [tixHList:GetNearest $w $tkPriv(y) 1]
+ if {$ent ne ""} {
+ $w selection clear
+ $w selection set $anchor $ent
+
+ tixHList:Browse $w $ent
+ }
+}
+
+proc tixHList:GoState-31 {w x y} {
+ tkCancelRepeat
+ tixHList:GoState 26 $w $x $y
+}
+
+proc tixHList:GoState-32 {w} {
+ tkCancelRepeat
+ tixHList:GoState 0 $w
+}
+
+proc tixHList:GoState-33 {w x y} {
+ set ent [tixHList:GetNearest $w $y]
+ if {$ent ne ""} {
+ $w anchor set $ent
+ if {[lsearch [$w selection get] $ent] > -1} {
+ # This was missing - mike
+ $w selection clear $ent
+ } else {
+ $w selection set $ent
+ }
+ tixHList:Browse $w $ent
+ }
+}
+
+
+
+#----------------------------------------------------------------------
+#
+# Common actions
+#
+#----------------------------------------------------------------------
+proc tixHList:GetNearest {w y {disableOK 0}} {
+ set ent [$w nearest $y]
+
+ if {$ent ne ""} {
+ if {!$disableOK && [$w entrycget $ent -state] eq "disabled"} {
+ return ""
+ }
+ }
+
+ return $ent
+}
+
+proc tixHList:SetAnchor {w x y {disableOK 0}} {
+ set ent [tixHList:GetNearest $w $y $disableOK]
+
+ if {$ent ne ""} {
+ if {[$w entrycget $ent -state] ne "disabled"} {
+ $w anchor set $ent
+ # mike This is non-standard and has a wierd effect: too much motion
+ # $w see $ent
+ return $ent
+ } elseif $disableOK {
+ return $ent
+ }
+ }
+
+ return ""
+}
+
+proc tixHList:Select {w ent} {
+ if {[$w info selection] ne $ent} {
+ $w selection clear
+ $w select set $ent
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Auto scan
+#
+#----------------------------------------------------------------------
+proc tixHList:StartScan {w} {
+ global tkPriv
+ set tkPriv(afterId) [after 50 tixHList:AutoScan $w]
+}
+
+proc tixHList:DoScan {w} {
+ global tkPriv
+ set x $tkPriv(x)
+ set y $tkPriv(y)
+ set X $tkPriv(X)
+ set Y $tkPriv(Y)
+
+ if {$y >= [winfo height $w]} {
+ $w yview scroll 1 units
+ } elseif {$y < 0} {
+ $w yview scroll -1 units
+ } elseif {$x >= [winfo width $w]} {
+ $w xview scroll 2 units
+ } elseif {$x < 0} {
+ $w xview scroll -2 units
+ } else {
+ return
+ }
+
+ set tkPriv(afterId) [after 50 tixHList:AutoScan $w]
+}
+
+
+#----------------------------------------------------------------------
+#
+# Indicator handling
+#
+#----------------------------------------------------------------------
+
+proc tixHList:CallIndicatorCmd {w event ent} {
+ set cmd [$w cget -indicatorcmd]
+
+ if {$cmd ne ""} {
+ set bind(type) $event
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $cmd bind $ent
+ }
+}
+
+proc tixHList:InsideArmedIndicator {w x y} {
+ global tkPriv
+
+ set ent [tixHList:GetNearest $w $y 1]
+ if {$ent eq "" || $ent ne $tkPriv(tix,indicator)} {
+ return 0
+ }
+
+ set info [$w info item $x $y]
+ if {[lindex $info 1] eq "indicator"} {
+ return 1
+ } else {
+ return 0
+ }
+}
+
+proc tixHList:Browse {w ent} {
+ set browsecmd [$w cget -browsecmd]
+ if {$browsecmd ne ""} {
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $browsecmd bind $ent
+ }
+}
+
+
Added: external/tix-8.4.2.x/library/HListDD.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/HListDD.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,204 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: HListDD.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# HListDD.tcl --
+#
+# !!! PRE-ALPHA CODE, NOT USED, DON'T USE !!!
+#
+# This file implements drag+drop for HList.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+#
+# events
+#
+#
+
+proc tixHListSingle:DragTimer {w ent} {
+ case [tixHListSingle:GetState $w] {
+ {1} {
+ # fire up
+ }
+ }
+}
+
+
+
+
+
+#----------------------------------------------------------------------
+#
+# Drag + Drop Bindings
+#
+#----------------------------------------------------------------------
+
+ #----------------------------------------#
+ # Sending Actions #
+ #----------------------------------------#
+
+#----------------------------------------------------------------------
+# tixHListSingle:Send:WaitDrag --
+#
+# Sender wait for dragging action
+#----------------------------------------------------------------------
+proc tixHListSingle:Send:WaitDrag {w x y} {
+ global tixPriv
+
+ set ent [tixHListSingle:GetNearest $w $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w select clear
+ $w select set $ent
+
+ set tixPriv(dd,$w:moved) 0
+ set tixPriv(dd,$w:entry) $ent
+
+# set browsecmd [$w cget -browsecmd]
+# if {$browsecmd != "" && $ent != ""} {
+# eval $browsecmd $ent
+# }
+ }
+}
+
+proc tixHListSingle:Send:StartDrag {w x y} {
+ global tixPriv
+ set dd [tixGetDragDropContext $w]
+
+ if {![info exists tixPriv(dd,$w:entry)]} {
+ return
+ }
+ if {$tixPriv(dd,$w:entry) == ""} {
+ return
+ }
+
+ if {$tixPriv(dd,$w:moved) == 0} {
+ $w dragsite set $tixPriv(dd,$w:entry)
+ set tixPriv(dd,$w:moved) 1
+ $dd config -source $w -command [list tixHListSingle:Send:Cmd $w]
+ $dd startdrag $X $Y
+ } else {
+ $dd drag $X $Y
+ }
+}
+
+proc tixHListSingle:Send:DoneDrag {w x y} {
+ global tixPriv
+ global moved
+
+ if {![info exists tixPriv(dd,$w:entry)]} {
+ return
+ }
+ if {$tixPriv(dd,$w:entry) == ""} {
+ return
+ }
+
+ if {$tixPriv(dd,$w:moved) == 1} {
+ set dd [tixGetDragDropContext $w]
+ $dd drop $X $Y
+ }
+ $w dragsite clear
+ catch {unset tixPriv(dd,$w:moved)}
+ catch {unset tixPriv(dd,$w:entry)}
+}
+
+proc tixHListSingle:Send:Cmd {w option args} {
+ set dragCmd [$w cget -dragcmd]
+ if {$dragCmd != ""} {
+ return [eval $dragCmd $option $args]
+ }
+
+ # Perform the default action
+ #
+ case "$option" {
+ who {
+ return $w
+ }
+ types {
+ return {data text}
+ }
+ get {
+ global tixPriv
+ if {[lindex $args 0] == "text"} {
+ if {$tixPriv(dd,$w:entry) != ""} {
+ return [$w entrycget $tixPriv(dd,$w:entry) -text]
+ }
+ }
+ if {[lindex $args 0] == "data"} {
+ if {$tixPriv(dd,$w:entry) != ""} {
+ return [$w entrycget $tixPriv(dd,$w:entry) -data]
+ }
+ }
+ }
+ }
+}
+
+ #----------------------------------------#
+ # Receiving Actions #
+ #----------------------------------------#
+proc tixHListSingle:Rec:DragOver {w sender x y} {
+ if {[$w cget -selectmode] != "dragdrop"} {
+ return
+ }
+
+ set ent [tixHListSingle:GetNearest $w $y]
+ if {$ent != ""} {
+ $w dropsite set $ent
+ } else {
+ $w dropsite clear
+ }
+}
+
+proc tixHListSingle:Rec:DragIn {w sender x y} {
+ if {[$w cget -selectmode] != "dragdrop"} {
+ return
+ }
+ set ent [tixHListSingle:GetNearest $w $y]
+ if {$ent != ""} {
+ $w dropsite set $ent
+ } else {
+ $w dropsite clear
+ }
+}
+
+proc tixHListSingle:Rec:DragOut {w sender x y} {
+ if {[$w cget -selectmode] != "dragdrop"} {
+ return
+ }
+ $w dropsite clear
+}
+
+proc tixHListSingle:Rec:Drop {w sender x y} {
+ if {[$w cget -selectmode] != "dragdrop"} {
+ return
+ }
+ $w dropsite clear
+
+ set ent [tixHListSingle:GetNearest $w $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w select clear
+ $w select set $ent
+ }
+
+ set dropCmd [$w cget -dropcmd]
+ if {$dropCmd != ""} {
+ eval $dropCmd $sender $x $y
+ return
+ }
+
+# set browsecmd [$w cget -browsecmd]
+# if {$browsecmd != "" && $ent != ""} {
+# eval $browsecmd [list $ent]
+# }
+}
+
+tixDropBind TixHListSingle <In> "tixHListSingle:Rec:DragIn %W %S %x %y"
+tixDropBind TixHListSingle <Over> "tixHListSingle:Rec:DragOver %W %S %x %y"
+tixDropBind TixHListSingle <Out> "tixHListSingle:Rec:DragOut %W %S %x %y"
+tixDropBind TixHListSingle <Drop> "tixHListSingle:Rec:Drop %W %S %x %y"
Added: external/tix-8.4.2.x/library/IconView.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/IconView.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,272 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: IconView.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# IconView.tcl --
+#
+# This file implements the Icon View widget: the "icon" view mode of
+# the MultiView widget. It implements:
+#
+# (1) Creation of the icons in the canvas subwidget.
+# (2) Automatic arrangement of the objects
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixIconView {
+ -classname TixIconView
+ -superclass tixCObjView
+ -method {
+ add arrange
+ }
+ -flag {
+ -autoarrange
+ }
+ -static {
+ }
+ -configspec {
+ {-autoarrange autoArrange AutoArrange 0 tixVerifyBoolean}
+ }
+ -default {
+ {.scrollbar auto}
+ {*borderWidth 1}
+ {*canvas.background #c3c3c3}
+ {*canvas.highlightBackground #d9d9d9}
+ {*canvas.relief sunken}
+ {*canvas.takeFocus 1}
+ {*Scrollbar.takeFocus 0}
+ }
+ -forcecall {
+ }
+}
+
+proc tixIconView:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+}
+
+proc tixIconView:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ set c $data(w:canvas)
+
+ bind $c <1> "tixIconView:StartDrag $w %x %y"
+ bind $c <B1-Motion> "tixIconView:Drag $w %x %y"
+ bind $c <ButtonRelease-1> "tixIconView:EndDrag $w"
+}
+
+proc tixIconView:StartDrag {w x y} {
+ upvar #0 $w data
+ global lastX lastY
+
+ set c $data(w:canvas)
+ $c raise current
+
+ set lastX [$c canvasx $x]
+ set lastY [$c canvasy $y]
+}
+
+
+proc tixIconView:Drag {w x y} {
+ upvar #0 $w data
+ global lastX lastY
+
+ set c $data(w:canvas)
+ set x [$c canvasx $x]
+ set y [$c canvasy $y]
+ $c move current [expr $x-$lastX] [expr $y-$lastY]
+ set lastX $x
+ set lastY $y
+}
+
+proc tixIconView:EndDrag {w} {
+ upvar #0 $w data
+
+ tixCallMethod $w adjustscrollregion
+}
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+proc tixIconView:add {w tag image text} {
+ upvar #0 $w data
+
+ set cmp [image create compound -window $data(w:canvas)]
+
+ $cmp add image -image $image
+ $cmp add line
+ $cmp add text -text $text
+
+ set id [$data(w:canvas) create image 0 0 -image $cmp -anchor nw]
+ $data(w:canvas) addtag $tag withtag $id
+
+ if {$data(-autoarrange)} {
+ tixWidgetDoWhenIdle tixIconView:Arrange $w 1
+ }
+}
+
+# Do it in an idle handler, so that Arrange is not called before the window
+# is properly mapped.
+#
+proc tixIconView:arrange {w} {
+ tixWidgetDoWhenIdle tixIconView:Arrange $w 1
+}
+
+
+proc tixIconView:PackOneRow {w row y maxH bd padX padY} {
+ upvar #0 $w data
+
+ set iX [expr $bd+$padX]
+ foreach i $row {
+ set box [$data(w:canvas) bbox $i]
+ set W [expr [lindex $box 2]-[lindex $box 0]+1]
+ set H [expr [lindex $box 3]-[lindex $box 1]+1]
+
+ set iY [expr $y + $maxH - $H]
+ $data(w:canvas) coords $i $iX $iY
+ incr iX [expr $W+$padX]
+ }
+}
+
+# virtual method
+#
+proc tixIconView:PlaceWindow {w} {
+ upvar #0 $w data
+
+ if {$data(-autoarrange)} {
+ tixWidgetDoWhenIdle tixIconView:Arrange $w 0
+ }
+
+ tixChainMethod $w PlaceWindow
+}
+
+proc tixIconView:Arrange {w adjust} {
+ upvar #0 $w data
+
+ set padX 2
+ set padY 2
+
+ tixIconView:ArrangeGrid $w $padX $padY
+ if {$adjust} {
+ tixCallMethod $w adjustscrollregion
+ }
+}
+
+# the items are not packed
+#
+proc tixIconView:ArrangeGrid {w padX padY} {
+ upvar #0 $w data
+
+ set maxW 0
+ set maxH 0
+ foreach item [$data(w:canvas) find all] {
+ set box [$data(w:canvas) bbox $item]
+ set itemW [expr [lindex $box 2]-[lindex $box 0]+1]
+ set itemH [expr [lindex $box 3]-[lindex $box 1]+1]
+ if {$maxW < $itemW} {
+ set maxW $itemW
+ }
+ if {$maxH < $itemH} {
+ set maxH $itemH
+ }
+ }
+ if {$maxW == 0 || $maxH == 0} {
+ return
+ }
+
+ set winW [tixWinWidth $data(w:canvas)]
+ set bd [expr [$data(w:canvas) cget -bd]+\
+ [$data(w:canvas) cget -highlightthickness]]
+ set cols [expr $winW / ($maxW+$padX)]
+ if {$cols < 1} {
+ set cols 1
+ }
+ set y $bd
+
+ set c 0
+ set x $bd
+ foreach item [$data(w:canvas) find all] {
+ set box [$data(w:canvas) bbox $item]
+ set itemW [expr [lindex $box 2]-[lindex $box 0]+1]
+ set itemH [expr [lindex $box 3]-[lindex $box 1]+1]
+
+ set iX [expr $x + $padX + ($maxW-$itemW)/2]
+ set iY [expr $y + $padY + ($maxH-$itemH) ]
+
+ $data(w:canvas) coords $item $iX $iY
+ incr c
+ incr x [expr $maxW + $padY]
+ if {$c == $cols} {
+ set c 0
+ incr y [expr $maxH + $padY]
+ set x $bd
+ }
+ }
+}
+
+# the items are packed
+#
+proc tixIconView:ArrangePack {w padX padY} {
+ upvar #0 $w data
+
+ set winW [tixWinWidth $data(w:canvas)]
+ set bd [expr [$data(w:canvas) cget -bd]+\
+ [$data(w:canvas) cget -highlightthickness]]
+ set y [expr $bd + $padY]
+
+ set maxH 0
+ set usedW $padX
+ set row ""
+ foreach item [$data(w:canvas) find all] {
+ set box [$data(w:canvas) bbox $item]
+ set itemW [expr [lindex $box 2]-[lindex $box 0]+1]
+ set itemH [expr [lindex $box 3]-[lindex $box 1]+1]
+
+ if {[expr $usedW + $itemW] > $winW} {
+ if {$row == ""} {
+ # only one item in this row
+ #
+ $data(w:canvas) coords $item [expr $bd + $padX] $y
+ incr y [expr $itemH+$padY]
+ continue
+ } else {
+ # this item is not in this row. Arrange the previous items
+ # first
+ #
+ tixIconView:PackOneRow $w $row $y $maxH $bd $padX $padY
+
+ incr y $maxH
+ set row ""
+ set maxH 0
+ set usedW $padX
+ }
+ }
+ lappend row $item
+ if {$maxH < $itemH} {
+ set maxH $itemH
+ }
+ incr usedW [expr $padX+$itemW]
+ }
+ if {$row != ""} {
+ tixIconView:PackOneRow $w $row $y $maxH $bd $padX $padY
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+
Added: external/tix-8.4.2.x/library/Init.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Init.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,232 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Init.tcl,v 1.17 2006/11/16 22:34:41 hobbs Exp $
+#
+# Init.tcl --
+#
+# Initializes the Tix library and performes version checking to ensure
+# the Tcl, Tk and Tix script libraries loaded matches with the binary
+# of the respective packages.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+namespace eval ::tix {
+}
+
+proc tixScriptVersion {} { return $::tix_version }
+proc tixScriptPatchLevel {} { return $::tix_patchLevel }
+
+proc ::tix::Init {dir} {
+ global tix env tix_library tcl_platform auto_path
+
+ if {[info exists tix(initialized)]} {
+ return
+ }
+
+ if {![info exists tix_library]} {
+ # we're running from stand-alone module.
+ set tix_library ""
+ } elseif {[file isdir $tix_library]} {
+ if {![info exists auto_path] ||
+ [lsearch $auto_path $tix_library] == -1} {
+ lappend auto_path $tix_library
+ }
+ }
+
+ # STEP 1: Version checking
+ #
+ #
+ package require Tcl 8.4
+ package require -exact Tix 8.4.2
+
+ # STEP 2: Initialize file compatibility modules
+ #
+
+ foreach file {
+ fs.tcl
+ Tix.tcl Event.tcl
+ Balloon.tcl BtnBox.tcl
+ CObjView.tcl ChkList.tcl
+ ComboBox.tcl Compat.tcl
+ Console.tcl Control.tcl
+ DefSchm.tcl DialogS.tcl
+ DirBox.tcl DirDlg.tcl
+ DirList.tcl DirTree.tcl
+ DragDrop.tcl DtlList.tcl
+ EFileBox.tcl EFileDlg.tcl
+ FileBox.tcl FileCbx.tcl
+ FileDlg.tcl FileEnt.tcl
+ FloatEnt.tcl
+ Grid.tcl HList.tcl
+ HListDD.tcl IconView.tcl
+ LabEntry.tcl LabFrame.tcl
+ LabWidg.tcl ListNBk.tcl
+ Meter.tcl MultView.tcl
+ NoteBook.tcl OldUtil.tcl
+ OptMenu.tcl PanedWin.tcl
+ PopMenu.tcl Primitiv.tcl
+ ResizeH.tcl SGrid.tcl
+ SHList.tcl SListBox.tcl
+ STList.tcl SText.tcl
+ SWidget.tcl SWindow.tcl
+ Select.tcl Shell.tcl
+ SimpDlg.tcl StackWin.tcl
+ StatBar.tcl StdBBox.tcl
+ StdShell.tcl TList.tcl
+ Tree.tcl
+ Utils.tcl VResize.tcl
+ VStack.tcl VTree.tcl
+ Variable.tcl WInfo.tcl
+ } {
+ uplevel \#0 [list source [file join $dir $file]]
+ }
+
+ # STEP 3: Initialize the Tix application context
+ #
+ tixAppContext tix
+
+ # DO NOT DO THIS HERE !!
+ # This causes the global defaults to be altered, which may not
+ # be desirable. The user can call this after requiring Tix if
+ # they wish to use different defaults.
+ #
+ #tix initstyle
+
+ # STEP 4: Initialize the bindings for widgets that are implemented in C
+ #
+ foreach w {
+ HList TList Grid ComboBox Control FloatEntry
+ LabelEntry ScrolledGrid ScrolledListBox
+ } {
+ tix${w}Bind
+ }
+
+ rename ::tix::Init ""
+}
+
+# tixWidgetClassEx --
+#
+# This procedure is similar to tixWidgetClass, except it
+# performs a [subst] on the class declaration before evaluating
+# it. This gives us a chance to specify platform-specific widget
+# default without using a lot of ugly double quotes.
+#
+# The use of subst'able entries in the class declaration should
+# be restrained to widget default values only to avoid producing
+# unreadable code.
+#
+# Arguments:
+# name - The name of the class to declare.
+# classDecl - Various declarations about the class. See documentation
+# of tixWidgetClass for details.
+
+proc tixWidgetClassEx {name classDecl} {
+ tixWidgetClass $name [uplevel [list subst $classDecl]]
+}
+
+#
+# Deprecated tix* functions
+#
+interp alias {} tixFileJoin {} file join
+interp alias {} tixStrEq {} string equal
+proc tixTrue {args} { return 1 }
+proc tixFalse {args} { return 0 }
+proc tixStringSub {var fromStr toStr} {
+ upvar 1 var var
+ set var [string map $var [list $fromStr $toStr]]
+}
+proc tixGetBoolean {args} {
+ set len [llength [info level 0]]
+ set nocomplain 0
+ if {$len == 3} {
+ if {[lindex $args 0] ne "-nocomplain"} {
+ return -code error "wrong \# args:\
+ must be [lindex [info level 0] 0] ?-nocomplain? string"
+ }
+ set nocomplain 1
+ set val [lindex $args 1]
+ } elseif {$len != 2} {
+ return -code error "wrong \# args:\
+ must be [lindex [info level 0] 0] ?-nocomplain? string"
+ } else {
+ set val [lindex $args 0]
+ }
+ if {[string is boolean -strict $val] || $nocomplain} {
+ return [string is true -strict $val]
+ } elseif {$nocomplain} {
+ return 0
+ } else {
+ return -code error "\"$val\" is not a valid boolean"
+ }
+}
+interp alias {} tixVerifyBoolean {} tixGetBoolean
+proc tixGetInt {args} {
+ set len [llength [info level 0]]
+ set nocomplain 0
+ set trunc 0
+ for {set i 1} {$i < $len-1} {incr i} {
+ set arg [lindex $args 0]
+ if {$arg eq "-nocomplain"} {
+ set nocomplain 1
+ } elseif {$arg eq "-trunc"} {
+ set trunc 1
+ } else {
+ return -code error "wrong \# args: must be\
+ [lindex [info level 0] 0] ?-nocomplain? ?-trunc? string"
+ }
+ }
+ if {$i != $len-1} {
+ return -code error "wrong \# args: must be\
+ [lindex [info level 0] 0] ?-nocomplain? ?-trunc? string"
+ }
+ set val [lindex $args end]
+ set code [catch {expr {round($val)}} res]
+ if {$code} {
+ if {$nocomplain} {
+ return 0
+ } else {
+ return -code error "\"$val\" cannot be converted to integer"
+ }
+ }
+ if {$trunc} {
+ return [expr {int($val)}]
+ } else {
+ return $res
+ }
+}
+proc tixFile {option filename} {
+ set len [string length $option]
+ if {$len > 1 && [string equal -length $len $option "tildesubst"]} {
+ set code [catch {file normalize $filename} res]
+ if {$code == 0} {
+ set filename $res
+ }
+ } elseif {$len > 1 && [string equal -length $len $option "trimslash"]} {
+ # normalize extra slashes
+ set filename [file join $filename]
+ if {$filename ne "/"} {
+ set filename [string trimright $filename "/"]
+ }
+ } else {
+ return -code error "unknown option \"$option\",\
+ must be tildesubst or trimslash"
+ }
+ return $filename
+}
+
+interp alias {} tixRaiseWindow {} raise
+#proc tixUnmapWindow {w} { }
+
+#
+# if tix_library is not defined, we're running in SAM mode. ::tix::Init
+# will be called later by the Tix_Init() C code.
+#
+
+if {[info exists tix_library]} {
+ ::tix::Init [file dirname [info script]]
+}
Added: external/tix-8.4.2.x/library/LabEntry.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/LabEntry.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,86 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: LabEntry.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# LabEntry.tcl --
+#
+# TixLabelEntry Widget: an entry box with a label
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixLabelEntry {
+ -classname TixLabelEntry
+ -superclass tixLabelWidget
+ -method {
+ }
+ -flag {
+ -disabledforeground -state
+ }
+ -forcecall {
+ -state
+ }
+ -static {
+ }
+ -configspec {
+ {-disabledforeground disabledForeground DisabledForeground #303030}
+ {-state state State normal}
+ }
+ -default {
+ {.borderWidth 0}
+ {*entry.relief sunken}
+ {*entry.width 7}
+ {*label.anchor e}
+ {*label.borderWidth 0}
+ }
+}
+
+proc tixLabelEntry:ConstructFramedWidget {w frame} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructFramedWidget $frame
+
+ set data(w:entry) [entry $frame.entry]
+ pack $data(w:entry) -side left -expand yes -fill both
+
+ # This value is used to configure the disable/normal fg of the ebtry
+ #
+ set data(entryfg) [$data(w:entry) cget -fg]
+ set data(labelfg) [$data(w:label) cget -fg]
+}
+
+proc tixLabelEntryBind {} {
+ tixBind TixLabelEntry <FocusIn> {
+ if {[focus -displayof [set %W(w:entry)]] ne [set %W(w:entry)]} {
+ focus [%W subwidget entry]
+ [set %W(w:entry)] selection from 0
+ [set %W(w:entry)] selection to end
+ [set %W(w:entry)] icursor end
+ }
+ }
+}
+
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixLabelEntry:config-state {w value} {
+ upvar #0 $w data
+
+ if {$value == "normal"} {
+ catch {
+ $data(w:label) config -fg $data(labelfg)
+ }
+ $data(w:entry) config -state $value -fg $data(entryfg)
+ } else {
+ catch {
+ $data(w:label) config -fg $data(-disabledforeground)
+ }
+ $data(w:entry) config -state $value -fg $data(-disabledforeground)
+ }
+}
Added: external/tix-8.4.2.x/library/LabFrame.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/LabFrame.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: LabFrame.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# LabFrame.tcl --
+#
+# TixLabelFrame Widget: a frame box with a label
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixLabelFrame {
+ -classname TixLabelFrame
+ -superclass tixLabelWidget
+ -method {
+ frame
+ }
+ -flag {}
+ -static {}
+ -configspec {
+ {-labelside labelSide LabelSide acrosstop}
+ {-padx padX Pad 2}
+ {-pady padY Pad 2}
+ }
+ -alias {}
+ -default {
+ {*Label.anchor c}
+ {.frame.borderWidth 2}
+ {.frame.relief groove}
+ {.border.borderWidth 2}
+ {.border.relief groove}
+ {.borderWidth 2}
+ {.padX 2}
+ {.padY 2}
+ {.anchor sw}
+ }
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+proc tixLabelFrame:frame {w args} {
+
+ return [eval tixCallMethod $w subwidget frame $args]
+}
Added: external/tix-8.4.2.x/library/LabWidg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/LabWidg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,157 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: LabWidg.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# LabWidg.tcl --
+#
+# TixLabelWidget: Virtual base class. Do not instantiate
+#
+# This widget class is the base class for all widgets that has a
+# label. Most Tix compound widgets will have a label so that
+# the app programmer doesn't need to add labels themselvel.
+#
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+# LabelSide : top, left, right, bottom, none, acrosstop
+#
+# public widgets:
+# frame, label
+#
+
+tixWidgetClass tixLabelWidget {
+ -superclass tixPrimitive
+ -classname TixLabelWidget
+ -flag {
+ -label -labelside -padx -pady
+ }
+ -static {-labelside}
+ -configspec {
+ {-label label Label ""}
+ {-labelside labelSide LabelSide left}
+ {-padx padX Pad 0}
+ {-pady padY Pad 0}
+ }
+}
+
+proc tixLabelWidget:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ if {$data(-labelside) != "acrosstop"} {
+ set data(w:frame) [frame $w.frame]
+ } else {
+ set data(pw:border) [frame $w.border]
+ set data(pw:pad) [frame $w.border.pad]
+ set data(w:frame) [frame $w.border.frame]
+ }
+
+ if {$data(-labelside) != "none"} {
+ set data(w:label) [label $w.label -text $data(-label)]
+ }
+ tixLabelWidget:Pack $w
+
+ tixCallMethod $w ConstructFramedWidget $data(w:frame)
+}
+
+proc tixLabelWidget:ConstructFramedWidget {w frame} {
+ # Do nothing
+}
+
+proc tixLabelWidget:Pack {w} {
+ upvar #0 $w data
+
+ if {[catch {tixLabelWidget:Pack-$data(-labelside) $w}]} {
+ error "unknown -labelside option \"$data(-labelside)\""
+ }
+}
+
+proc tixLabelWidget:Pack-acrosstop {w} {
+ upvar #0 $w data
+
+ set labHalfHeight [expr [winfo reqheight $data(w:label)] / 2]
+ set padHeight [expr $labHalfHeight - [$data(pw:border) cget -bd]]
+ if {$padHeight < 0} {
+ set padHeight 0
+ }
+
+ tixForm $data(w:label) -top 0 -left 4\
+ -padx [expr $data(-padx) +4] -pady $data(-pady)
+ tixForm $data(pw:border) -top $labHalfHeight -bottom -1 \
+ -left 0 -right -1 -padx $data(-padx) -pady $data(-pady)
+ tixForm $data(pw:pad) -left 0 -right -1 \
+ -top 0 -bottom $padHeight
+ tixForm $data(w:frame) -top $data(pw:pad) -bottom -1 \
+ -left 0 -right -1
+}
+
+proc tixLabelWidget:Pack-top {w} {
+ upvar #0 $w data
+
+ pack $data(w:label) -side top \
+ -padx $data(-padx) -pady $data(-pady) \
+ -fill x
+ pack $data(w:frame) -side top \
+ -padx $data(-padx) -pady $data(-pady) \
+ -expand yes -fill both
+}
+
+proc tixLabelWidget:Pack-bottom {w} {
+ upvar #0 $w data
+
+ pack $data(w:label) -side bottom \
+ -padx $data(-padx) -pady $data(-pady) \
+ -fill x
+ pack $data(w:frame) -side bottom \
+ -padx $data(-padx) -pady $data(-pady) \
+ -expand yes -fill both
+}
+
+proc tixLabelWidget:Pack-left {w} {
+ upvar #0 $w data
+
+ pack $data(w:label) -side left \
+ -padx $data(-padx) -pady $data(-pady) \
+ -fill y
+ pack $data(w:frame) -side left \
+ -padx $data(-padx) -pady $data(-pady) \
+ -expand yes -fill both
+}
+
+proc tixLabelWidget:Pack-right {w} {
+ upvar #0 $w data
+
+ pack $data(w:label) -side right \
+ -padx $data(-padx) -pady $data(-pady) \
+ -fill x
+ pack $data(w:frame) -side right \
+ -padx $data(-padx) -pady $data(-pady) \
+ -expand yes -fill both
+}
+
+proc tixLabelWidget:Pack-none {w} {
+ upvar #0 $w data
+
+ pack $data(w:frame)\
+ -padx $data(-padx) -pady $data(-pady) \
+ -expand yes -fill both
+}
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixLabelWidget:config-label {w value} {
+ upvar #0 $w data
+
+ $data(w:label) config -text $value
+
+ if {$data(-labelside) == "acrosstop"} {
+ tixLabelWidget:Pack-acrosstop $w
+ }
+}
Added: external/tix-8.4.2.x/library/ListNBk.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/ListNBk.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,153 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ListNBk.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# ListNBk.tcl --
+#
+# "List NoteBook" widget. Acts similarly to the notebook but uses a
+# HList widget to represent the pages.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixListNoteBook {
+ -classname TixListNoteBook
+ -superclass tixVStack
+ -method {
+ }
+ -flag {
+ -height -width
+ }
+ -configspec {
+ {-width width Width 0}
+ {-height height Height 0}
+ }
+ -forcecall {
+ -dynamicgeometry -width -height
+ }
+ -default {
+ {*Orientation horizontal}
+ }
+}
+
+proc tixListNoteBook:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ set data(w_pane) [tixPanedWindow $w.pane -panerelief flat]
+ set p1 [$data(w_pane) add p1 -expand 0]
+ set p2 [$data(w_pane) add p2 -expand 1]
+ set data(w_p2) $p2
+ set data(w:shlist) [tixScrolledHList $p1.shlist]
+ set data(w:hlist) [$data(w:shlist) subwidget hlist]
+
+ if {[$data(w_pane) cget -orientation] eq "vertical"} {
+ pack $data(w:shlist) -expand yes -fill both -padx 2 -pady 3
+ } else {
+ pack $data(w:shlist) -expand yes -fill both -padx 3 -pady 2
+ }
+
+ $data(w:hlist) config \
+ -command [list tixListNoteBook:Choose $w] \
+ -browsecmd [list tixListNoteBook:Choose $w] \
+ -selectmode single
+
+ pack $data(w_pane) -expand yes -fill both
+}
+
+proc tixListNoteBook:add {w child args} {
+ upvar #0 $w data
+
+ if {[string match *.* $child]} {
+ error "the name of the page cannot contain the \".\" character"
+ }
+ return [eval tixChainMethod $w add $child $args]
+}
+
+#----------------------------------------------------------------------
+# Virtual Methods
+#----------------------------------------------------------------------
+proc tixListNoteBook:InitGeometryManager {w} {
+ tixWidgetDoWhenIdle tixListNoteBook:InitialRaise $w
+}
+
+proc tixListNoteBook:InitialRaise {w} {
+ upvar #0 $w data
+
+ if {$data(topchild) eq ""} {
+ set top [lindex $data(windows) 0]
+ } else {
+ set top $data(topchild)
+ }
+
+ if {$top ne ""} {
+ tixCallMethod $w raise $top
+ }
+}
+
+proc tixListNoteBook:CreateChildFrame {w child} {
+ upvar #0 $w data
+ return [frame $data(w_p2).$child]
+}
+
+proc tixListNoteBook:RaiseChildFrame {w child} {
+ upvar #0 $w data
+
+ if {$data(topchild) ne $child} {
+ if {$data(topchild) ne ""} {
+ pack forget $data(w:$data(topchild))
+ }
+ pack $data(w:$child) -expand yes -fill both
+ }
+}
+
+#
+#----------------------------------------------------------------------
+#
+
+proc tixListNoteBook:config-dynamicgeometry {w value} {
+ upvar #0 $w data
+
+ $data(w_pane) config -dynamicgeometry $value
+}
+
+proc tixListNoteBook:config-width {w value} {
+ upvar #0 $w data
+
+ if {$value != 0} {
+ $data(w_pane) config -width $value
+ }
+}
+
+proc tixListNoteBook:config-height {w value} {
+ upvar #0 $w data
+
+ if {$value != 0} {
+ $data(w_pane) config -height $value
+ }
+}
+
+proc tixListNoteBook:raise {w child} {
+ upvar #0 $w data
+
+ $data(w:hlist) selection clear
+ $data(w:hlist) selection set $child
+ $data(w:hlist) anchor set $child
+
+ tixChainMethod $w raise $child
+}
+
+proc tixListNoteBook:Choose {w args} {
+ upvar #0 $w data
+
+ set entry [tixEvent flag V]
+
+ if {[lsearch $data(windows) $entry] != -1} {
+ tixCallMethod $w raise $entry
+ }
+}
Added: external/tix-8.4.2.x/library/Makefile
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Makefile Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+tclIndex::
+ ../tools/tixindex *tcl
+
+clean::
+ -rm -f *.bak *~
Added: external/tix-8.4.2.x/library/Meter.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Meter.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,137 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Meter.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# Meter.tcl --
+#
+# Implements the tixMeter widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixMeter {
+ -classname TixMeter
+ -superclass tixPrimitive
+ -method {
+ }
+ -flag {
+ -foreground -text -value
+ }
+ -configspec {
+ {-fillcolor fillColor FillColor #8080ff}
+ {-foreground foreground Foreground black}
+ {-text text Text ""}
+ {-value value Value 0}
+ }
+ -default {
+ {.relief sunken}
+ {.borderWidth 2}
+ {.width 150}
+ }
+}
+
+proc tixMeter:InitWidgetRec {w} {
+ upvar #0 $w data
+ global env
+
+ tixChainMethod $w InitWidgetRec
+}
+
+#----------------------------------------------------------------------
+# Construct widget
+#----------------------------------------------------------------------
+proc tixMeter:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:canvas) [canvas $w.canvas]
+ pack $data(w:canvas) -expand yes -fill both
+
+ tixMeter:Update $w
+}
+
+proc tixMeter:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+}
+
+proc tixMeter:Update {w} {
+ upvar #0 $w data
+
+ # set the width of the canvas
+ set W [expr $data(-width)-\
+ ([$data(w:root) cget -bd]+[$data(w:root) cget -highlightthickness]*2)]
+ $data(w:canvas) config -width $W
+
+ if {$data(-text) == ""} {
+ set text [format "%d%%" [expr int($data(-value)*100)]]
+ } else {
+ set text $data(-text)
+ }
+
+ # (Create/Modify) the text item.
+ #
+ if {![info exists data(text)]} {
+ set data(text) [$data(w:canvas) create text 0 0 -text $text]
+ } else {
+ $data(w:canvas) itemconfig $data(text) -text $text
+ }
+
+ set bbox [$data(w:canvas) bbox $data(text)]
+
+ set itemW [expr [lindex $bbox 2]-[lindex $bbox 0]]
+ set itemH [expr [lindex $bbox 3]-[lindex $bbox 1]]
+
+
+ $data(w:canvas) coord $data(text) [expr $W/2] [expr $itemH/2+4]
+
+ set H [expr $itemH + 4]
+ $data(w:canvas) config -height [expr $H]
+
+
+ set rectW [expr int($W*$data(-value))]
+
+ if {![info exists data(rect)]} {
+ set data(rect) [$data(w:canvas) create rectangle 0 0 $rectW 1000]
+ } else {
+ $data(w:canvas) coord $data(rect) 0 0 $rectW 1000
+ }
+
+ $data(w:canvas) itemconfig $data(rect) \
+ -fill $data(-fillcolor) -outline $data(-fillcolor)
+
+ $data(w:canvas) raise $data(text)
+}
+
+#----------------------------------------------------------------------
+# Configuration
+#----------------------------------------------------------------------
+proc tixMeter:config-value {w value} {
+ upvar #0 $w data
+
+ set data(-value) $value
+ tixMeter:Update $w
+}
+
+proc tixMeter:config-text {w value} {
+ upvar #0 $w data
+
+ set data(-text) $value
+ tixMeter:Update $w
+}
+
+proc tixMeter:config-fillcolor {w value} {
+ upvar #0 $w data
+
+ set data(-fillcolor) $value
+ tixMeter:Update $w
+}
+
+
Added: external/tix-8.4.2.x/library/MultView.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/MultView.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,157 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: MultView.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# MultView.tcl --
+#
+# Implements the multi-view widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixMultiView {
+ -classname TixMultiView
+ -superclass tixPrimitive
+ -method {
+ add
+ }
+ -flag {
+ -browsecmd -command -view
+ }
+ -forcecall {
+ -view
+ }
+ -configspec {
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-view view View icon tixMultiView:VerifyView}
+ }
+ -alias {
+ }
+
+ -default {
+ }
+}
+
+proc tixMultiView:InitWidgetRec {w} {
+ upvar #0 $w data
+ global env
+
+ tixChainMethod $w InitWidgetRec
+}
+
+#----------------------------------------------------------------------
+# Construct widget
+#----------------------------------------------------------------------
+proc tixMultiView:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:stlist) [tixScrolledTList $w.stlist]
+ set data(w:sgrid) [tixScrolledGrid $w.sgrid]
+ set data(w:icon) [tixIconView $w.icon]
+
+ set data(w:tlist) [$data(w:stlist) subwidget tlist]
+ set data(w:grid) [$data(w:sgrid) subwidget grid]
+
+ $data(w:grid) config -formatcmd [list tixMultiView:GridFormat $w] \
+ -leftmargin 0 -topmargin 1
+}
+
+proc tixMultiView:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+}
+
+proc tixMultiView:GetWid {w which} {
+ upvar #0 $w data
+
+ case $which {
+ list {
+ return $data(w:stlist)
+ }
+ icon {
+ return $data(w:icon)
+ }
+ detail {
+ return $data(w:sgrid)
+ }
+ }
+}
+#----------------------------------------------------------------------
+# Configuration
+#----------------------------------------------------------------------
+proc tixMultiView:config-view {w value} {
+ upvar #0 $w data
+
+ if {$data(-view) != ""} {
+ pack forget [tixMultiView:GetWid $w $data(-view)]
+ }
+
+ pack [tixMultiView:GetWid $w $value] -expand yes -fill both
+}
+#----------------------------------------------------------------------
+# Private methods
+#----------------------------------------------------------------------
+proc tixMultiView:GridFormat {w area x1 y1 x2 y2} {
+ upvar #0 $w data
+
+ case $area {
+ main {
+ }
+ {x-margin y-margin s-margin} {
+ # cborder specifies consecutive 3d borders
+ #
+ $data(w:grid) format cborder $x1 $y1 $x2 $y2 \
+ -fill 1 -relief raised -bd 2 -bg gray60 \
+ -selectbackground gray80
+ }
+ }
+
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+
+# Return value is the index of "$name" in the grid subwidget
+#
+#
+proc tixMultiView:add {w name args} {
+ upvar #0 $w data
+
+ set validOptions {-image -text}
+
+ set opt(-image) ""
+ set opt(-text) ""
+
+ tixHandleOptions -nounknown opt $validOptions $args
+
+ $data(w:icon) add $name $opt(-image) $opt(-text)
+ $data(w:tlist) insert end -itemtype imagetext \
+ -image $opt(-image) -text $opt(-text)
+ $data(w:grid) set 0 end -itemtype imagetext \
+ -image $opt(-image) -text $opt(-text)
+
+ return max
+}
+
+#----------------------------------------------------------------------
+# checker
+#----------------------------------------------------------------------
+proc tixMultiView:VerifyView {value} {
+ case $value {
+ {icon list detail} {
+ return $value
+ }
+ }
+ error "bad view \"$value\", must be detail, icon or list"
+}
+
Added: external/tix-8.4.2.x/library/NoteBook.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/NoteBook.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,247 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: NoteBook.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
+#
+# NoteBook.tcl --
+#
+# tixNoteBook: NoteBook type of window.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixNoteBook {
+ -classname TixNoteBook
+ -superclass tixVStack
+ -method {
+ }
+ -flag {
+ }
+ -configspec {
+ {-takefocus takeFocus TakeFocus 0 tixVerifyBoolean}
+ }
+ -default {
+ {.nbframe.tabPadX 8}
+ {.nbframe.tabPadY 5}
+ {.nbframe.borderWidth 2}
+ {*nbframe.relief raised}
+ }
+}
+
+proc tixNoteBook:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(pad-x1) 0
+ set data(pad-x2) 0
+ set data(pad-y1) 20
+ set data(pad-y2) 0
+}
+
+proc tixNoteBook:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:top) [tixNoteBookFrame $w.nbframe -slave 1 -takefocus 1]
+ set data(w:nbframe) $data(w:top)
+
+ bind $data(w:top) <ButtonPress-1> [list tixNoteBook:MouseDown $w %x %y]
+ bind $data(w:top) <ButtonRelease-1> [list tixNoteBook:MouseUp $w %x %y]
+
+ bind $data(w:top) <B1-Motion> [list tixNoteBook:MouseDown $w %x %y]
+
+ bind $data(w:top) <Left> [list tixNoteBook:FocusNext $w prev]
+ bind $data(w:top) <Right> [list tixNoteBook:FocusNext $w next]
+
+ bind $data(w:top) <Return> [list tixNoteBook:SetFocusByKey $w]
+ bind $data(w:top) <space> [list tixNoteBook:SetFocusByKey $w]
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+proc tixNoteBook:add {w child args} {
+ upvar #0 $w data
+
+ set ret [eval tixChainMethod $w add $child $args]
+
+ set new_args ""
+ foreach {flag value} $args {
+ if {$flag ne "-createcmd" && $flag ne "-raisecmd"} {
+ lappend new_args $flag
+ lappend new_args $value
+ }
+ }
+
+ eval [linsert $new_args 0 $data(w:top) add $child]
+
+ return $ret
+}
+
+proc tixNoteBook:raise {w child} {
+ upvar #0 $w data
+
+ tixChainMethod $w raise $child
+
+ if {[$data(w:top) pagecget $child -state] eq "normal"} {
+ $data(w:top) activate $child
+ }
+}
+
+proc tixNoteBook:delete {w child} {
+ upvar #0 $w data
+
+ tixChainMethod $w delete $child
+ $data(w:top) delete $child
+}
+
+#----------------------------------------------------------------------
+# Private methods
+#----------------------------------------------------------------------
+proc tixNoteBook:Resize {w} {
+ upvar #0 $w data
+
+ # We have to take care of the size of the tabs so that
+ #
+ set rootReq [$data(w:top) geometryinfo]
+ set tW [lindex $rootReq 0]
+ set tH [lindex $rootReq 1]
+
+ set data(pad-x1) 2
+ set data(pad-x2) 2
+ set data(pad-y1) [expr {$tH + $data(-ipadx) + 1}]
+ set data(pad-y2) 2
+ set data(minW) [expr {$tW}]
+ set data(minH) [expr {$tH}]
+
+ # Now that we know data(pad-y1), we can chain the call
+ #
+ tixChainMethod $w Resize
+}
+
+proc tixNoteBook:MouseDown {w x y} {
+ upvar #0 $w data
+
+ focus $data(w:top)
+
+ set name [$data(w:top) identify $x $y]
+ $data(w:top) focus $name
+ set data(w:down) $name
+}
+
+proc tixNoteBook:MouseUp {w x y} {
+ upvar #0 $w data
+
+ #it could happen (using the tk/menu) that a MouseUp
+ #proceeds without a MouseDown event!!
+ if {![info exists data(w:down)] || ![info exists data(w:top)]} {
+ return
+ }
+
+ set name [$data(w:top) identify $x $y]
+
+ if {$name ne "" && $name eq $data(w:down)
+ && [$data(w:top) pagecget $name -state] eq "normal"} {
+ $data(w:top) activate $name
+ tixCallMethod $w raise $name
+ } else {
+ $data(w:top) focus ""
+ }
+}
+
+
+#----------------------------------------------------------------------
+#
+# Section for keyboard bindings
+#
+#----------------------------------------------------------------------
+
+proc tixNoteBook:FocusNext {w dir} {
+ upvar #0 $w data
+
+ if {[$data(w:top) info focus] == ""} {
+ set name [$data(w:top) info active]
+ $data(w:top) focus $name
+
+ if {$name ne ""} {
+ return
+ }
+ } else {
+ set name [$data(w:top) info focus$dir]
+ $data(w:top) focus $name
+ }
+}
+
+proc tixNoteBook:SetFocusByKey {w} {
+ upvar #0 $w data
+
+ set name [$data(w:top) info focus]
+
+ if {$name ne "" && [$data(w:top) pagecget $name -state] eq "normal"} {
+ tixCallMethod $w raise $name
+ $data(w:top) activate $name
+ }
+}
+
+#----------------------------------------------------------------------
+# Automatic bindings for alt keys
+#----------------------------------------------------------------------
+proc tixNoteBookFind {w char} {
+ set char [string tolower $char]
+
+ foreach child [winfo child $w] {
+ if {![winfo ismapped $w]} {
+ continue
+ }
+ switch -exact -- [winfo class $child] {
+ Toplevel { continue }
+ TixNoteBook {
+ set nbframe [$child subwidget nbframe]
+ foreach page [$nbframe info pages] {
+ set char2 [string index [$nbframe pagecget $page -label] \
+ [$nbframe pagecget $page -underline]]
+ if {($char eq [string tolower $char2] || $char eq "")
+ && [$nbframe pagecget $page -state] ne "disabled"} {
+ return [list $child $page]
+ }
+ }
+ }
+ }
+ # Well, this notebook doesn't match with the key, but maybe
+ # it contains a "subnotebook" that will match ..
+ set match [tixNoteBookFind $child $char]
+ if {$match ne ""} {
+ return $match
+ }
+ }
+ return ""
+}
+
+proc tixTraverseToNoteBook {w char} {
+ if {$char eq ""} {
+ return 0
+ }
+ if {![winfo exists $w]} {
+ return 0
+ }
+ set list [tixNoteBookFind [winfo toplevel $w] $char]
+ if {$list ne ""} {
+ [lindex $list 0] raise [lindex $list 1]
+ return 1
+ }
+ return 0
+}
+
+#----------------------------------------------------------------------
+# Set default class bindings
+#----------------------------------------------------------------------
+
+bind all <Alt-KeyPress> "+tixTraverseToNoteBook %W %A"
+bind all <Meta-KeyPress> "+tixTraverseToNoteBook %W %A"
+
Added: external/tix-8.4.2.x/library/OldUtil.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/OldUtil.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,108 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: OldUtil.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# OldUtil.tcl -
+#
+# This is an undocumented file.
+# Are these features used in Tix : NO.
+# Should I use these features : NO.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+proc setenv {name args} {
+ global env
+
+ if {[llength $args] == 1} {
+ return [set env($name) [lindex $args 0]]
+ } else {
+ if {[info exists env($ename)] == 0} {
+ bgerror "Error in setenv: "
+ "environment variable \"$name\" does not exist"
+ } else {
+ return $env($name)
+ }
+ }
+}
+#----------------------------------------------------------------------
+#
+#
+# U T I L I T Y F U N C T I O N S F O R T I X
+#
+#
+#----------------------------------------------------------------------
+
+# RESET THE STRING IN THE ENTRY
+proc tixSetEntry {entry string} {
+ set oldstate [lindex [$entry config -state] 4]
+ $entry config -state normal
+ $entry delete 0 end
+ $entry insert 0 $string
+ $entry config -state $oldstate
+}
+
+# GET THE FIRST SELECTED ITEM IN A LIST
+proc tixListGetSingle {lst} {
+ set indices [$lst curselection]
+ if {$indices != ""} {
+ return [$lst get [lindex $indices 0]]
+ } else {
+ return ""
+ }
+}
+
+#----------------------------------------------------------------------
+# RECORD A DIALOG'S POSITION AND RESTORE IT THE NEXT TIME IT IS OPENED
+#----------------------------------------------------------------------
+proc tixDialogRestore {w {flag -geometry}} {
+ global tixDPos
+
+ if {[info exists tixDPos($w)]} {
+ if {![winfo ismapped $w]} {
+ wm geometry $w $tixDPos($w)
+ wm deiconify $w
+ }
+ } elseif {$flag eq "-geometry"} {
+ update
+ set tixDPos($w) [winfo geometry $w]
+ } else {
+ update
+ set tixDPos($w) +[winfo rootx $w]+[winfo rooty $w]
+ }
+}
+#----------------------------------------------------------------------
+# RECORD A DIALOG'S POSITION AND RESTORE IT THE NEXT TIME IT IS OPENED
+#----------------------------------------------------------------------
+proc tixDialogWithdraw {w {flag -geometry}} {
+ global tixDPos
+
+ if {[winfo ismapped $w]} {
+ if {$flag eq "-geometry"} {
+ set tixDPos($w) [winfo geometry $w]
+ } else {
+ set tixDPos($w) +[winfo rootx $w]+[winfo rooty $w]
+ }
+ wm withdraw $w
+ }
+}
+#----------------------------------------------------------------------
+# RECORD A DIALOG'S POSITION AND RESTORE IT THE NEXT TIME IT IS OPENED
+#----------------------------------------------------------------------
+proc tixDialogDestroy {w {flag -geometry}} {
+ global tixDPos
+
+ if {[winfo ismapped $w]} {
+ if {$flag eq "-geometry"} {
+ set tixDPos($w) [winfo geometry $w]
+ } else {
+ set tixDPos($w) +[winfo rootx $w]+[winfo rooty $w]
+ }
+ }
+ destroy $w
+}
Added: external/tix-8.4.2.x/library/OptMenu.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/OptMenu.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,394 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: OptMenu.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# OptMenu.tcl --
+#
+# This file implements the TixOptionMenu widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixOptionMenu {
+ -classname TixOptionMenu
+ -superclass tixLabelWidget
+ -method {
+ add delete disable enable entrycget entryconfigure entries
+ }
+ -flag {
+ -command -disablecallback -dynamicgeometry -value -variable
+ -validatecmd -state
+ }
+ -forcecall {
+ -variable -state
+ }
+ -configspec {
+ {-command command Command ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-dynamicgeometry dynamicGeometry DynamicGeometry 0 tixVerifyBoolean}
+ {-state state State normal}
+ {-value value Value ""}
+ {-validatecmd validateCmd ValidateCmd ""}
+ {-variable variable Variable ""}
+ }
+ -default {
+ {.highlightThickness 0}
+ {.takeFocus 0}
+ {.frame.menubutton.relief raised}
+ {.frame.menubutton.borderWidth 2}
+ {.frame.menubutton.anchor w}
+ {.frame.menubutton.highlightThickness 2}
+ {.frame.menubutton.takeFocus 1}
+ }
+}
+
+proc tixOptionMenu:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(nItems) 0
+ set data(items) ""
+ set data(posted) 0
+ set data(varInited) 0
+ set data(maxWidth) 0
+}
+
+proc tixOptionMenu:ConstructFramedWidget {w frame} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructFramedWidget $frame
+
+ set data(w:menubutton) [menubutton $frame.menubutton -indicatoron 1]
+ set data(w:menu) [menu $frame.menubutton.menu -tearoff 0]
+ pack $data(w:menubutton) -side left -expand yes -fill both
+
+ $data(w:menubutton) config -menu $data(w:menu)
+
+ bind $data(w:menubutton) <Up> [bind Menubutton <space>]
+ bind $data(w:menubutton) <Down> [bind Menubutton <space>]
+
+ tixSetMegaWidget $data(w:menubutton) $w
+}
+
+proc tixOptionMenu:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+}
+
+#----------------------------------------------------------------------
+# Private methods
+#----------------------------------------------------------------------
+proc tixOptionMenu:Invoke {w name} {
+ upvar #0 $w data
+
+ if {"$data(-state)" == "normal"} {
+ tixOptionMenu:SetValue $w $name
+ }
+}
+
+proc tixOptionMenu:SetValue {w value {noUpdate 0}} {
+ upvar #0 $w data
+
+ if {$data(-validatecmd) != ""} {
+ set value [tixEvalCmdBinding $w $data(-validatecmd) "" $value]
+ }
+
+ set name $value
+
+ if {$name == "" || [info exists data(varInited)]} {
+ # variable may contain a bogus value
+ if {![info exists data($name,index)]} {
+ set data(-value) ""
+ tixVariable:UpdateVariable $w
+ $data(w:menubutton) config -text ""
+ return
+ }
+ }
+
+ if {[info exists data($name,index)]} {
+ $data(w:menubutton) config -text $data($name,label)
+
+ set data(-value) $value
+
+ if {! $noUpdate} {
+ tixVariable:UpdateVariable $w
+ }
+
+ if {$data(-command) != "" && !$data(-disablecallback)} {
+ if {![info exists data(varInited)]} {
+ set bind(specs) ""
+ tixEvalCmdBinding $w $data(-command) bind $value
+ }
+ }
+ } else {
+ error "item \"$value\" does not exist"
+ }
+}
+
+proc tixOptionMenu:SetMaxWidth {w} {
+ upvar #0 $w data
+
+ foreach name $data(items) {
+ set len [string length $data($name,label)]
+ if {$data(maxWidth) < $len} {
+ set data(maxWidth) $len
+ }
+ }
+
+ if {$data(maxWidth) > 0} {
+ $data(w:menubutton) config -width $data(maxWidth)
+ }
+}
+
+#----------------------------------------------------------------------
+# Configuration
+#----------------------------------------------------------------------
+proc tixOptionMenu:config-state {w value} {
+ upvar #0 $w data
+
+ if {![info exists data(w:label)]} {
+ return
+ }
+
+ if {$value == "normal"} {
+ catch {
+ $data(w:label) config -fg \
+ [$data(w:menubutton) cget -foreground]
+ }
+ $data(w:menubutton) config -state $value
+ } else {
+ catch {
+ $data(w:label) config -fg \
+ [$data(w:menubutton) cget -disabledforeground]
+ }
+ $data(w:menubutton) config -state $value
+ }
+}
+
+proc tixOptionMenu:config-value {w value} {
+ upvar #0 $w data
+
+ tixOptionMenu:SetValue $w $value
+
+ # This will tell the Intrinsics: "Please use this value"
+ # because "value" might be altered by SetValues
+ #
+ return $data(-value)
+}
+
+proc tixOptionMenu:config-variable {w arg} {
+ upvar #0 $w data
+
+ if {[tixVariable:ConfigVariable $w $arg]} {
+ # The value of data(-value) is changed if tixVariable:ConfigVariable
+ # returns true
+ tixOptionMenu:SetValue $w $data(-value) 1
+ }
+ catch {
+ unset data(varInited)
+ }
+ set data(-variable) $arg
+}
+
+#----------------------------------------------------------------------
+# Public Methdos
+#----------------------------------------------------------------------
+proc tixOptionMenu:add {w type name args} {
+ upvar #0 $w data
+
+ if {[info exists data($name,index)]} {
+ error "item $name already exists in the option menu $w"
+ }
+
+ case $type {
+ "command" {
+ set validOptions {
+ -command -label
+ }
+ set opt(-command) ""
+ set opt(-label) $name
+
+ tixHandleOptions -nounknown opt $validOptions $args
+
+ if {$opt(-command) != ""} {
+ error "option -command cannot be specified"
+ }
+
+ # Create a new item inside the menu
+ #
+ eval $data(w:menu) add command $args \
+ [list -label $opt(-label) \
+ -command "tixOptionMenu:Invoke $w \{$name\}"]
+ set index $data(nItems)
+
+ # Store info about this item
+ #
+ set data($index,name) $name
+ set data($name,type) cmd
+ set data($name,label) $opt(-label)
+ set data($name,index) $index
+
+ if {$index == 0} {
+ $data(w:menubutton) config -text $data($name,label)
+ tixOptionMenu:SetValue $w $name
+ }
+
+ incr data(nItems)
+ lappend data(items) $name
+
+ if $data(-dynamicgeometry) {
+ tixOptionMenu:SetMaxWidth $w
+ }
+ }
+ "separator" {
+ $data(w:menu) add separator
+
+ set index $data(nItems)
+ # Store info about this item
+ #
+ set data($index,name) $name
+ set data($name,type) sep
+ set data($name,label) ""
+ set data($name,index) $index
+
+ incr data(nItems)
+ lappend data(items) $name
+ }
+ default {
+ error "only types \"separator\" and \"command\" are allowed"
+ }
+ }
+
+ return ""
+}
+
+proc tixOptionMenu:delete {w item} {
+ upvar #0 $w data
+
+ if {![info exists data($item,index)]} {
+ error "item $item does not exist in $w"
+ }
+
+ # Rehash the item list
+ set newItems ""
+ set oldIndex 0
+ set newIndex 0
+ foreach name $data(items) {
+ if {$item == $name} {
+ unset data($name,label)
+ unset data($name,index)
+ unset data($name,type)
+ $data(w:menu) delete $oldIndex
+ } else {
+ set data($name,index) $newIndex
+ set data($newIndex,name) $name
+ incr newIndex
+ lappend newItems $name
+ }
+ incr oldIndex
+ }
+ incr oldIndex -1; unset data($oldIndex,name)
+ set data(nItems) $newIndex
+ set data(items) $newItems
+
+ if {$data(-value) == $item} {
+ set newVal ""
+ foreach item $data(items) {
+ if {$data($item,type) == "cmd"} {
+ set newVal $item
+ }
+ }
+ tixOptionMenu:SetValue $w $newVal
+ }
+
+ return ""
+}
+
+
+proc tixOptionMenu:disable {w item} {
+ upvar #0 $w data
+
+ if {![info exists data($item,index)]} {
+ error "item $item does not exist in $w"
+ } else {
+ catch {$data(w:menu) entryconfig $data($item,index) -state disabled}
+ }
+}
+
+proc tixOptionMenu:enable {w item} {
+ upvar #0 $w data
+
+ if {![info exists data($item,index)]} {
+ error "item $item does not exist in $w"
+ } else {
+ catch {$data(w:menu) entryconfig $data($item,index) -state normal}
+ }
+}
+
+proc tixOptionMenu:entryconfigure {w item args} {
+ upvar #0 $w data
+
+ if {![info exists data($item,index)]} {
+ error "item $item does not exist in $w"
+ } else {
+ return [eval $data(w:menu) entryconfig $data($item,index) $args]
+ }
+}
+
+proc tixOptionMenu:entrycget {w item arg} {
+ upvar #0 $w data
+
+ if {![info exists data($item,index)]} {
+ error "item $item does not exist in $w"
+ } else {
+ return [$data(w:menu) entrycget $data($item,index) $arg]
+ }
+}
+
+proc tixOptionMenu:entries {w} {
+ upvar #0 $w data
+
+ return $data(items)
+}
+
+
+proc tixOptionMenu:Destructor {w} {
+
+ tixVariable:DeleteVariable $w
+
+ # Chain this to the superclass
+ #
+ tixChainMethod $w Destructor
+}
+
+#----------------------------------------------------------------------
+# Obsolete
+# These have been replaced by new commands in Tk 4.0
+#
+proc tixOptionMenu:Post {w} {
+ upvar #0 $w data
+
+ set rootx [winfo rootx $data(w:frame)]
+ set rooty [winfo rooty $data(w:frame)]
+
+ # adjust for the border of the menu and frame
+ #
+ incr rootx [lindex [$data(w:menu) config -border] 4]
+ incr rooty [lindex [$data(w:frame) config -border] 4]
+ incr rooty [lindex [$data(w:menu) config -border] 4]
+
+ set value $data(-value)
+ set y [$data(w:menu) yposition $data($value,index)]
+
+ $data(w:menu) post $rootx [expr $rooty - $y]
+ $data(w:menu) activate $data($value,index)
+ grab -global $data(w:menubutton)
+ set data(posted) 1
+}
Added: external/tix-8.4.2.x/library/PanedWin.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/PanedWin.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1215 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: PanedWin.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
+#
+# PanedWin.tcl --
+#
+# This file implements the TixPanedWindow widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixPanedWindow {
+ -classname TixPanedWindow
+ -superclass tixPrimitive
+ -method {
+ add delete forget manage panecget paneconfigure panes setsize
+ }
+ -flag {
+ -command -dynamicgeometry -handleactivebg -handlebg -orient
+ -orientation -panebd -paneborderwidth -panerelief
+ -separatoractivebg -separatorbg
+ }
+ -static {
+ -orientation
+ }
+ -configspec {
+ {-command command Command ""}
+ {-dynamicgeometry dynamicGeometry DynamicGeometry 1 tixVerifyBoolean}
+ {-handleactivebg handleActiveBg HandleActiveBg #ececec}
+ {-handlebg handleBg Background #d9d9d9}
+ {-orientation orientation Orientation vertical}
+ {-paneborderwidth paneBorderWidth PaneBorderWidth 1}
+ {-panerelief paneRelief PaneRelief raised}
+ {-separatoractivebg separatorActiveBg SeparatorActiveBg red}
+ {-separatorbg separatorBg Background #d9d9d9}
+ }
+ -alias {
+ {-panebd -paneborderwidth}
+ {-orient -orientation}
+ }
+}
+
+#----------------------------------------------------------------------
+# ClassInitialization:
+#----------------------------------------------------------------------
+
+proc tixPanedWindow:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(items) ""
+ set data(nItems) 0
+ set data(totalsize) 0
+ set data(movePending) 0
+
+ set data(repack) 0
+ set data(counter) 0
+
+ set data(maxReqW) 1
+ set data(maxReqH) 1
+}
+
+proc tixPanedWindow:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ # Do nothing
+}
+
+proc tixPanedWindow:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ bind $w <Configure> [list tixPanedWindow:MasterGeomProc $w ""]
+}
+
+#----------------------------------------------------------------------
+# ConfigOptions:
+#----------------------------------------------------------------------
+proc tixPanedWindow:config-handlebg {w arg} {
+ upvar #0 $w data
+
+ for {set i 1} {$i < $data(nItems)} {incr i} {
+ $data(btn,$i) config -bg $arg
+ }
+}
+
+#----------------------------------------------------------------------
+# PublicMethods:
+#----------------------------------------------------------------------
+
+
+# method: add
+#
+# Adds a new pane into the PanedWindow.
+#
+# options -size -max -min -allowresize
+#
+proc tixPanedWindow:add {w name args} {
+ upvar #0 $w data
+
+ if {[winfo exists $w.$name] && !$data($name,forgotten)} {
+ error "Pane $name is already managed"
+ }
+ # Step 1: Parse the options to get the children's size options
+
+ # The default values
+ #
+ if {[info exists data($name,forgotten)]} {
+ set option(-size) $data($name,size)
+ set option(-min) $data($name,min)
+ set option(-max) $data($name,max)
+ set option(-allowresize) $data($name,allowresize)
+ set option(-expand) $data($name,expand)
+ } else {
+ set option(-size) 0
+ set option(-min) 0
+ set option(-max) 100000
+ set option(-allowresize) 1
+ set option(-expand) 0
+ }
+
+ set option(-before) ""
+ set option(-after) ""
+ set option(-at) ""
+ set validOpts {-after -allowresize -at -before -expand -max -min -size}
+
+ tixHandleOptions option $validOpts $args
+
+ set data($name,size) $option(-size)
+ set data($name,rsize) $option(-size)
+ set data($name,min) $option(-min)
+ set data($name,max) $option(-max)
+ set data($name,allowresize) $option(-allowresize)
+ set data($name,expand) $option(-expand)
+ set data($name,forgotten) 0
+
+ if {$data($name,expand) < 0} {
+ set data($name,expand) 0
+ }
+
+ # Step 2: Add the frame and the separator (if necessary)
+ #
+ if {![winfo exist $w.$name]} {
+ # need to check because the frame may have been "forget'ten"
+ #
+ frame $w.$name -bd $data(-paneborderwidth) -relief $data(-panerelief)
+ }
+
+ if {$option(-at) != ""} {
+ set at [tixGetInt $option(-at)]
+ if {$at < 0} {
+ set at 0
+ }
+ } elseif {$option(-after) != ""} {
+ set index [lsearch -exact $data(items) $option(-after)]
+ if {$index == -1} {
+ error "Pane $option(-after) doesn't exists"
+ } else {
+ set at [incr index]
+ }
+ } elseif {$option(-before) != ""} {
+ set index [lsearch -exact $data(items) $option(-before)]
+ if {$index == -1} {
+ error "Pane $option(-before) doesn't exists"
+ }
+ set at $index
+ } else {
+ set at end
+ }
+
+ set data(items) [linsert $data(items) $at $name]
+ incr data(nItems)
+
+ if {$data(nItems) > 1} {
+ tixPanedWindow:AddSeparator $w
+ }
+ set data(w:$name) $w.$name
+
+ # Step 3: Add the new frame. Adjust the window later (do when idle)
+ #
+ tixManageGeometry $w.$name [list tixPanedWindow:ClientGeomProc $w]
+ bind $w.$name <Configure> \
+ [list tixPanedWindow:ClientGeomProc $w "" $w.$name]
+
+ tixPanedWindow:RepackWhenIdle $w
+
+ return $w.$name
+}
+
+proc tixPanedWindow:manage {w name args} {
+ upvar #0 $w data
+
+ if {![winfo exists $w.$name]} {
+ error "Pane $name does not exist"
+ }
+ if {!$data($name,forgotten)} {
+ error "Pane $name is already managed"
+ }
+ tixMapWindow $data(w:$name)
+ eval tixPanedWindow:add $w [list $name] $args
+}
+
+proc tixPanedWindow:forget {w name} {
+ upvar #0 $w data
+
+ if {![winfo exists $w.$name]} {
+ error "Pane $name does not exist"
+ }
+ if $data($name,forgotten) {
+ # It has already been forgotten
+ #
+ return
+ }
+
+ set items ""
+ foreach item $data(items) {
+ if {$item != $name} {
+ lappend items $item
+ }
+ }
+ set data(items) $items
+ incr data(nItems) -1
+
+ set i $data(nItems)
+ if {$i > 0} {
+ destroy $data(btn,$i)
+ destroy $data(sep,$i)
+ unset data(btn,$i)
+ unset data(sep,$i)
+ }
+ set data($name,forgotten) 1
+
+ tixUnmapWindow $w.$name
+
+ tixPanedWindow:RepackWhenIdle $w
+}
+
+proc tixPanedWindow:delete {w name} {
+ upvar #0 $w data
+
+ if {![winfo exists $w.$name]} {
+ error "Pane $name does not exist"
+ }
+
+
+ if {!$data($name,forgotten)} {
+ set items ""
+ foreach item $data(items) {
+ if {$item != $name} {
+ lappend items $item
+ }
+ }
+ set data(items) $items
+ incr data(nItems) -1
+
+ set i $data(nItems)
+ if {$i > 0} {
+ destroy $data(btn,$i)
+ destroy $data(sep,$i)
+ unset data(btn,$i)
+ unset data(sep,$i)
+ }
+ }
+ unset data($name,allowresize)
+ unset data($name,expand)
+ unset data($name,forgotten)
+ unset data($name,max)
+ unset data($name,min)
+ unset data($name,rsize)
+ unset data($name,size)
+ unset data(w:$name)
+ destroy $w.$name
+
+ tixPanedWindow:RepackWhenIdle $w
+}
+
+proc tixPanedWindow:paneconfigure {w name args} {
+ upvar #0 $w data
+
+ if {![info exists data($name,size)]} {
+ error "pane \"$name\" does not exist in $w"
+ }
+
+ set len [llength $args]
+
+ if {$len == 0} {
+ set value [$data(w:$name) configure]
+ lappend value [list -allowresize "" "" "" $data($name,allowresize)]
+ lappend value [list -expand "" "" "" $data($name,expand)]
+ lappend value [list -max "" "" "" $data($name,max)]
+ lappend value [list -min "" "" "" $data($name,min)]
+ lappend value [list -size "" "" "" $data($name,size)]
+ return $value
+ }
+
+ if {$len == 1} {
+ case [lindex $args 0] {
+ -allowresize {
+ return [list -allowresize "" "" "" $data($name,allowresize)]
+ }
+ -expand {
+ return [list -expand "" "" "" $data($name,expand)]
+ }
+ -min {
+ return [list -min "" "" "" $data($name,min)]
+ }
+ -max {
+ return [list -max "" "" "" $data($name,max)]
+ }
+ -size {
+ return [list -size "" "" "" $data($name,size)]
+ }
+ default {
+ return [$data(w:$name) configure [lindex $args 0]]
+ }
+ }
+ }
+
+ # By default handle each of the options
+ #
+ set option(-allowresize) $data($name,allowresize)
+ set option(-expand) $data($name,expand)
+ set option(-min) $data($name,min)
+ set option(-max) $data($name,max)
+ set option(-size) $data($name,size)
+
+ tixHandleOptions -nounknown option {-allowresize -expand -max -min -size} \
+ $args
+
+ #
+ # the widget options
+ set new_args ""
+ foreach {flag value} $args {
+ case $flag {
+ {-expand -min -max -allowresize -size} {
+
+ }
+ default {
+ lappend new_args $flag
+ lappend new_args $value
+ }
+ }
+ }
+
+ if {[llength $new_args] >= 2} {
+ eval $data(w:$name) configure $new_args
+ }
+
+ #
+ # The add-on options
+ set data($name,allowresize) $option(-allowresize)
+ set data($name,expand) $option(-expand)
+ set data($name,max) $option(-max)
+ set data($name,min) $option(-min)
+ set data($name,rsize) $option(-size)
+ set data($name,size) $option(-size)
+
+ #
+ # Integrity check
+ if {$data($name,expand) < 0} {
+ set data($name,expand) 0
+ }
+ if {$data($name,size) < $data($name,min)} {
+ set data($name,size) $data($name,min)
+ }
+ if {$data($name,size) > $data($name,max)} {
+ set data($name,size) $data($name,max)
+ }
+
+ tixPanedWindow:RepackWhenIdle $w
+ return ""
+}
+
+proc tixPanedWindow:panecget {w name option} {
+ upvar #0 $w data
+
+ if {![info exists data($name,size)]} {
+ error "pane \"$name\" does not exist in $w"
+ }
+
+ case $option {
+ {-min -max -allowresize -size} {
+ regsub \\\- $option "" option
+ return "$data($name,$option)"
+ }
+ default {
+ return [$data(w:$name) cget $option]
+ }
+ }
+}
+
+# return the name of all panes
+proc tixPanedWindow:panes {w} {
+ upvar #0 $w data
+
+ return $data(items)
+}
+
+# set the size of a pane, specifying which direction it should
+# grow/shrink
+proc tixPanedWindow:setsize {w item size {direction next}} {
+ upvar #0 $w data
+
+ set posn [lsearch $data(items) $item]
+ if {$posn == -1} {
+ error "pane \"$item\" does not exist"
+ }
+
+ set diff [expr {$size - $data($item,size)}]
+ if {$diff == 0} {
+ return
+ }
+
+ if {$posn == 0 && $direction eq "prev"} {
+ set direction next
+ }
+ if {$posn == $data(nItems)-1 && $direction eq "next"} {
+ set direction prev
+ }
+
+ if {$data(-orientation) eq "vertical"} {
+ set rx [winfo rooty $data(w:$item)]
+ } else {
+ set rx [winfo rootx $data(w:$item)]
+ }
+ if {$direction eq "prev"} {
+ set rx [expr {$rx - $diff}]
+ } elseif {$data(-orientation) eq "vertical"} {
+ set rx [expr {$rx + [winfo height $data(w:$item)] + $diff}]
+ incr posn
+ } else {
+ set rx [expr {$rx + [winfo width $data(w:$item)] + $diff}]
+ incr posn
+ }
+
+ # Set up the panedwin in a proper state
+ #
+ tixPanedWindow:BtnDown $w $posn 1
+ tixPanedWindow:BtnMove $w $posn $rx 1
+ tixPanedWindow:BtnUp $w $posn 1
+
+ return $data(items)
+}
+
+#----------------------------------------------------------------------
+# PrivateMethods:
+#----------------------------------------------------------------------
+
+proc tixPanedWindow:AddSeparator {w} {
+ global tcl_platform
+
+ upvar #0 $w data
+
+ set n [expr {$data(nItems)-1}]
+
+ # CYGNUS: On Windows, use relief ridge and a thicker line.
+ if {$tcl_platform(platform) eq "windows"} then {
+ set relief "ridge"
+ set thickness 4
+ } else {
+ set relief "sunken"
+ set thickness 2
+ }
+ if {$data(-orientation) eq "vertical"} {
+ set data(sep,$n) [frame $w.sep$n -relief $relief \
+ -bd 1 -height $thickness -width 10000 -bg $data(-separatorbg)]
+ } else {
+ set data(sep,$n) [frame $w.sep$n -relief $relief \
+ -bd 1 -width $thickness -height 10000 -bg $data(-separatorbg)]
+ }
+
+ set data(btn,$n) [frame $w.btn$n -relief raised \
+ -bd 1 -width 9 -height 9 \
+ -bg $data(-handlebg)]
+
+ if {$data(-orientation) eq "vertical"} {
+ set cursor sb_v_double_arrow
+ } else {
+ set cursor sb_h_double_arrow
+ }
+ $data(sep,$n) config -cursor $cursor
+ $data(btn,$n) config -cursor $cursor
+
+ foreach wid [list $data(btn,$n) $data(sep,$n)] {
+ bind $wid \
+ <ButtonPress-1> [list tixPanedWindow:BtnDown $w $n]
+ bind $wid \
+ <ButtonRelease-1> [list tixPanedWindow:BtnUp $w $n]
+ bind $wid \
+ <Any-Enter> [list tixPanedWindow:HighlightBtn $w $n]
+ bind $wid \
+ <Any-Leave> [list tixPanedWindow:DeHighlightBtn $w $n]
+ }
+
+ if {$data(-orientation) eq "vertical"} {
+ bind $data(btn,$n) <B1-Motion> [list tixPanedWindow:BtnMove $w $n %Y]
+ } else {
+ bind $data(btn,$n) <B1-Motion> [list tixPanedWindow:BtnMove $w $n %X]
+ }
+
+ if {$data(-orientation) eq "vertical"} {
+# place $data(btn,$n) -relx 0.90 -y [expr "$data(totalsize)-5"]
+# place $data(sep,$n) -x 0 -y [expr "$data(totalsize)-1"] -relwidth 1
+ } else {
+# place $data(btn,$n) -rely 0.90 -x [expr "$data(totalsize)-5"]
+# place $data(sep,$n) -y 0 -x [expr "$data(totalsize)-1"] -relheight 1
+ }
+}
+
+proc tixPanedWindow:BtnDown {w item {fake 0}} {
+ upvar #0 $w data
+
+ if {$data(-orientation) eq "vertical"} {
+ set spec -height
+ } else {
+ set spec -width
+ }
+
+ if {!$fake} {
+ for {set i 1} {$i < $data(nItems)} {incr i} {
+ $data(sep,$i) config -bg $data(-separatoractivebg) $spec 1
+ }
+ update idletasks
+ $data(btn,$item) config -relief sunken
+ }
+
+ tixPanedWindow:GetMotionLimit $w $item $fake
+
+ if {!$fake} {
+ grab -global $data(btn,$item)
+ }
+ set data(movePending) 0
+}
+
+proc tixPanedWindow:Min2 {a b} {
+ if {$a < $b} {
+ return $a
+ } else {
+ return $b
+ }
+}
+
+proc tixPanedWindow:GetMotionLimit {w item fake} {
+ upvar #0 $w data
+
+ set curBefore 0
+ set minBefore 0
+ set maxBefore 0
+
+ for {set i 0} {$i < $item} {incr i} {
+ set name [lindex $data(items) $i]
+ incr curBefore $data($name,size)
+ incr minBefore $data($name,min)
+ incr maxBefore $data($name,max)
+ }
+
+ set curAfter 0
+ set minAfter 0
+ set maxAfter 0
+ while {$i < $data(nItems)} {
+ set name [lindex $data(items) $i]
+ incr curAfter $data($name,size)
+ incr minAfter $data($name,min)
+ incr maxAfter $data($name,max)
+ incr i
+ }
+
+ set beforeToGo [tixPanedWindow:Min2 \
+ [expr {$curBefore-$minBefore}] \
+ [expr {$maxAfter-$curAfter}]]
+
+ set afterToGo [tixPanedWindow:Min2 \
+ [expr {$curAfter-$minAfter}] \
+ [expr {$maxBefore-$curBefore}]]
+
+ set data(beforeLimit) [expr {$curBefore-$beforeToGo}]
+ set data(afterLimit) [expr {$curBefore+$afterToGo}]
+ set data(curSize) $curBefore
+
+ if {!$fake} {
+ tixPanedWindow:PlotHandles $w 1
+ }
+}
+
+# Compress the motion so that update is quick even on slow machines
+#
+# rootp = root position (either rootx or rooty)
+proc tixPanedWindow:BtnMove {w item rootp {fake 0}} {
+ upvar #0 $w data
+
+ set data(rootp) $rootp
+
+ if {$fake} {
+ tixPanedWindow:BtnMoveCompressed $w $item $fake
+ } else {
+ if {$data(movePending) == 0} {
+ after 2 tixPanedWindow:BtnMoveCompressed $w $item
+ set data(movePending) 1
+ }
+ }
+}
+
+proc tixPanedWindow:BtnMoveCompressed {w item {fake 0}} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ if {$data(-orientation) eq "vertical"} {
+ set p [expr {$data(rootp)-[winfo rooty $w]}]
+ } else {
+ set p [expr {$data(rootp)-[winfo rootx $w]}]
+ }
+
+ if {$p == $data(curSize)} {
+ set data(movePending) 0
+ return
+ }
+
+ if {$p < $data(beforeLimit)} {
+ set p $data(beforeLimit)
+ }
+ if {$p >= $data(afterLimit)} {
+ set p $data(afterLimit)
+ }
+ tixPanedWindow:CalculateChange $w $item $p $fake
+
+ if {!$fake} {
+ # Force the redraw to happen
+ #
+ update idletasks
+ }
+ set data(movePending) 0
+}
+
+# Calculate the change in response to mouse motions
+#
+proc tixPanedWindow:CalculateChange {w item p {fake 0}} {
+ upvar #0 $w data
+
+ if {$p < $data(curSize)} {
+ tixPanedWindow:MoveBefore $w $item $p
+ } elseif {$p > $data(curSize)} {
+ tixPanedWindow:MoveAfter $w $item $p
+ }
+
+ if {!$fake} {
+ tixPanedWindow:PlotHandles $w 1
+ }
+}
+
+proc tixPanedWindow:MoveBefore {w item p} {
+ upvar #0 $w data
+
+ set n [expr {$data(curSize)-$p}]
+
+ # Shrink the frames before
+ #
+ set from [expr {$item-1}]
+ set to 0
+ tixPanedWindow:Iterate $w $from $to tixPanedWindow:Shrink $n
+
+ # Adjust the frames after
+ #
+ set from $item
+ set to [expr {$data(nItems)-1}]
+ tixPanedWindow:Iterate $w $from $to tixPanedWindow:Grow $n
+
+ set data(curSize) $p
+}
+
+proc tixPanedWindow:MoveAfter {w item p} {
+ upvar #0 $w data
+
+ set n [expr {$p-$data(curSize)}]
+
+ # Shrink the frames after
+ #
+ set from $item
+ set to [expr {$data(nItems)-1}]
+ tixPanedWindow:Iterate $w $from $to tixPanedWindow:Shrink $n
+
+ # Graw the frame before
+ #
+ set from [expr {$item-1}]
+ set to 0
+ tixPanedWindow:Iterate $w $from $to tixPanedWindow:Grow $n
+
+ set data(curSize) $p
+}
+
+proc tixPanedWindow:CancleLines {w} {
+ upvar #0 $w data
+
+ if {[info exists data(lines)]} {
+ foreach line $data(lines) {
+ set x1 [lindex $line 0]
+ set y1 [lindex $line 1]
+ set x2 [lindex $line 2]
+ set y2 [lindex $line 3]
+
+ tixTmpLine $x1 $y1 $x2 $y2 $w
+ }
+
+ catch {unset data(lines)}
+ }
+}
+
+proc tixPanedWindow:PlotHandles {w transient} {
+ global tcl_platform
+
+ upvar #0 $w data
+
+ set totalsize 0
+ set i 0
+
+ if {$data(-orientation) eq "vertical"} {
+ set btnp [expr {[winfo width $w]-13}]
+ } else {
+ set h [winfo height $w]
+ if {$h > 18} {
+ set btnp 9
+ } else {
+ set btnp [expr {$h-9}]
+ }
+ }
+
+ set firstpane [lindex $data(items) 0]
+ set totalsize $data($firstpane,size)
+
+ if {$transient} {
+ tixPanedWindow:CancleLines $w
+ set data(lines) ""
+ }
+
+ for {set i 1} {$i < $data(nItems)} {incr i} {
+ if {! $transient} {
+ if {$data(-orientation) eq "vertical"} {
+ place $data(btn,$i) -x $btnp -y [expr {$totalsize-4}]
+ place $data(sep,$i) -x 0 -y [expr {$totalsize-1}] -relwidth 1
+ } else {
+ place $data(btn,$i) -y $btnp -x [expr {$totalsize-5}]
+ place $data(sep,$i) -y 0 -x [expr {$totalsize-1}] -relheight 1
+ }
+ } else {
+ if {$data(-orientation) eq "vertical"} {
+ set x1 [winfo rootx $w]
+ set x2 [expr {$x1 + [winfo width $w]}]
+ set y [expr {$totalsize-1+[winfo rooty $w]}]
+
+ tixTmpLine $x1 $y $x2 $y $w
+ lappend data(lines) [list $x1 $y $x2 $y]
+ } else {
+ set y1 [winfo rooty $w]
+ set y2 [expr {$y1 + [winfo height $w]}]
+ set x [expr {$totalsize-1+[winfo rootx $w]}]
+
+ tixTmpLine $x $y1 $x $y2 $w
+ lappend data(lines) [list $x $y1 $x $y2]
+ }
+ }
+
+ set name [lindex $data(items) $i]
+ incr totalsize $data($name,size)
+ }
+}
+
+proc tixPanedWindow:BtnUp {w item {fake 0}} {
+ upvar #0 $w data
+
+ if {!$fake} {
+ tixPanedWindow:CancleLines $w
+ }
+
+ tixPanedWindow:UpdateSizes $w
+
+ if {!$fake} {
+ $data(btn,$item) config -relief raised
+ grab release $data(btn,$item)
+ }
+}
+
+
+proc tixPanedWindow:HighlightBtn {w item} {
+ upvar #0 $w data
+
+ $data(btn,$item) config -background $data(-handleactivebg)
+}
+
+proc tixPanedWindow:DeHighlightBtn {w item} {
+ upvar #0 $w data
+
+ $data(btn,$item) config -background $data(-handlebg)
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Geometry management routines
+#
+#
+#----------------------------------------------------------------------
+
+# update the sizes of each pane according to the data($name,size) variables
+#
+proc tixPanedWindow:UpdateSizes {w} {
+ global tcl_platform
+
+ upvar #0 $w data
+
+ set data(totalsize) 0
+
+ set mw [winfo width $w]
+ set mh [winfo height $w]
+
+ for {set i 0} {$i < $data(nItems)} {incr i} {
+ set name [lindex $data(items) $i]
+
+ if {$data($name,size) > 0} {
+ if {$data(-orientation) eq "vertical"} {
+ tixMoveResizeWindow $w.$name 0 $data(totalsize) \
+ $mw $data($name,size)
+ tixMapWindow $w.$name
+ raise $w.$name
+ } else {
+ tixMoveResizeWindow $w.$name $data(totalsize) 0 \
+ $data($name,size) $mh
+ tixMapWindow $w.$name
+ raise $w.$name
+ }
+ } else {
+ tixUnmapWindow $w.$name
+ }
+ incr data(totalsize) $data($name,size)
+ }
+
+ # Reset the color and width of the separator
+ #
+ if {$data(-orientation) eq "vertical"} {
+ set spec -height
+ } else {
+ set spec -width
+ }
+
+ # CYGNUS: On Windows, use a thicker line.
+ if {$tcl_platform(platform) eq "windows"} then {
+ set thickness 4
+ } else {
+ set thickness 2
+ }
+
+ for {set i 1} {$i < $data(nItems)} {incr i} {
+ $data(sep,$i) config -bg $data(-separatorbg) $spec $thickness
+ raise $data(sep,$i)
+ raise $data(btn,$i)
+ }
+
+
+ # Invoke the callback command
+ #
+ if {$data(-command) != ""} {
+ set sizes ""
+ foreach item $data(items) {
+ lappend sizes $data($item,size)
+ }
+ set bind(specs) ""
+ tixEvalCmdBinding $w $data(-command) bind [list $sizes]
+ }
+}
+
+proc tixPanedWindow:GetNaturalSizes {w} {
+ upvar #0 $w data
+
+ set data(totalsize) 0
+ set totalreq 0
+
+ if {$data(-orientation) eq "vertical"} {
+ set majorspec height
+ set minorspec width
+ } else {
+ set majorspec width
+ set minorspec height
+ }
+
+ set minorsize 0
+ foreach name $data(items) {
+ if {[winfo manager $w.$name] ne "tixGeometry"} {
+ error "Geometry management error: pane \"$w.$name\" cannot be managed by \"[winfo manager $w.$name]\"\nhint: delete the line \"[winfo manager $w.$name] $w.$name ...\" from your program"
+ }
+
+ # set the minor size
+ #
+ set req_minor [winfo req$minorspec $w.$name]
+
+ if {$req_minor > $minorsize} {
+ set minorsize $req_minor
+ }
+
+ # Check the natural size against the max, min requirements.
+ # Change the natural size if necessary
+ #
+ if {$data($name,size) <= 1} {
+ set data($name,size) [winfo req$majorspec $w.$name]
+ }
+
+ if {$data($name,size) > 1} {
+ # If we get zero maybe the widget was not initialized yet ...
+ #
+ # %% hazard : what if the window is really 1x1?
+ #
+ if {$data($name,size) < $data($name,min)} {
+ set data($name,size) $data($name,min)
+ }
+ if {$data($name,size) > $data($name,max)} {
+ set data($name,size) $data($name,max)
+ }
+ }
+
+ # kludge: because a frame always returns req size of {1,1} before
+ # the packer processes it, we do the following to mark the
+ # pane as "size unknown"
+ #
+# if {$data($name,size) == 1 && ![winfo ismapped $w.$name]} {
+# set data($name,size) 0
+# }
+
+ # Add up the total size
+ #
+ incr data(totalsize) $data($name,size)
+
+ # Find out the request size
+ #
+ if {$data($name,rsize) == 0} {
+ set rsize [winfo req$majorspec $w.$name]
+ } else {
+ set rsize $data($name,rsize)
+ }
+
+ if {$rsize < $data($name,min)} {
+ set rsize $data($name,min)
+ }
+ if {$rsize > $data($name,max)} {
+ set rsize $data($name,max)
+ }
+
+ incr totalreq $rsize
+ }
+
+ if {$data(-orientation) eq "vertical"} {
+ return [list $minorsize $totalreq]
+ } else {
+ return [list $totalreq $minorsize]
+ }
+}
+
+#--------------------------------------------------
+# Handling resize
+#--------------------------------------------------
+proc tixPanedWindow:ClientGeomProc {w type client} {
+ tixPanedWindow:RepackWhenIdle $w
+}
+
+#
+# This monitor the sizes of the master window
+#
+proc tixPanedWindow:MasterGeomProc {w master} {
+ tixPanedWindow:RepackWhenIdle $w
+}
+
+proc tixPanedWindow:RepackWhenIdle {w} {
+ if {![winfo exist $w]} {
+ return
+ }
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ tixWidgetDoWhenIdle tixPanedWindow:Repack $w
+ set data(repack) 1
+ }
+}
+
+#
+# This monitor the sizes of the master window
+#
+proc tixPanedWindow:Repack {w} {
+ upvar #0 $w data
+
+ # Calculate the desired size of the master
+ #
+ set dim [tixPanedWindow:GetNaturalSizes $w]
+
+ if {$data(-width) != 0} {
+ set mreqw $data(-width)
+ } else {
+ set mreqw [lindex $dim 0]
+ }
+
+ if {$data(-height) != 0} {
+ set mreqh $data(-height)
+ } else {
+ set mreqh [lindex $dim 1]
+ }
+
+ if !$data(-dynamicgeometry) {
+ if {$mreqw < $data(maxReqW)} {
+ set mreqw $data(maxReqW)
+ }
+ if {$mreqh < $data(maxReqH)} {
+ set mreqh $data(maxReqH)
+ }
+ set data(maxReqW) $mreqw
+ set data(maxReqH) $mreqh
+ }
+ if {$mreqw != [winfo reqwidth $w] || $mreqh != [winfo reqheight $w] } {
+ if {![info exists data(counter)]} {
+ set data(counter) 0
+ }
+ if {$data(counter) < 50} {
+ incr data(counter)
+ tixGeometryRequest $w $mreqw $mreqh
+ tixWidgetDoWhenIdle tixPanedWindow:Repack $w
+ set data(repack) 1
+ return
+ }
+ }
+
+ set data(counter) 0
+
+ if {$data(nItems) == 0} {
+ set data(repack) 0
+ return
+ }
+
+ tixWidgetDoWhenIdle tixPanedWindow:DoRepack $w
+}
+
+proc tixPanedWindow:DoRepack {w} {
+ upvar #0 $w data
+
+ if {$data(-orientation) eq "vertical"} {
+ set newSize [winfo height $w]
+ } else {
+ set newSize [winfo width $w]
+ }
+
+ if {$newSize <= 1} {
+ # Probably this window is too small to see anyway
+ # %%Kludge: I don't know if this always work.
+ #
+ set data(repack) 0
+ return
+ }
+
+ set totalExp 0
+ foreach name $data(items) {
+ set totalExp [expr {$totalExp + $data($name,expand)}]
+ }
+
+ if {$newSize > $data(totalsize)} {
+ # Grow
+ #
+ set toGrow [expr {$newSize-$data(totalsize)}]
+
+ set p [llength $data(items)]
+ foreach name $data(items) {
+ set toGrow [tixPanedWindow:xGrow $w $name $toGrow $totalExp $p]
+ if {$toGrow > 0} {
+ set totalExp [expr {$totalExp-$data($name,expand)}]
+ incr p -1
+ } else {
+ break
+ }
+ }
+ } else {
+ # Shrink
+ #
+ set toShrink [expr {$data(totalsize)-$newSize}]
+
+ set usedSize 0
+ foreach name $data(items) {
+ set toShrink [tixPanedWindow:xShrink $w $name $toShrink \
+ $totalExp $newSize $usedSize]
+ if {$toShrink > 0} {
+ set totalExp [expr {$totalExp-$data($name,expand)}]
+ incr usedSize $data($name,size)
+ } else {
+ break
+ }
+ }
+ }
+
+ tixPanedWindow:UpdateSizes $w
+ tixPanedWindow:PlotHandles $w 0
+
+ set data(repack) 0
+}
+
+#--------------------------------------------------
+# Shrink and grow items
+#--------------------------------------------------
+#
+# toGrow: how much free area to grow into
+# p: == 1 if $name is the last in the list of items
+# totalExp: used to calculate the amount of the free area that this
+# window can grow into
+#
+proc tixPanedWindow:xGrow {w name toGrow totalExp p} {
+ upvar #0 $w data
+
+ if {$p == 1} {
+ set canGrow $toGrow
+ } else {
+ if {$totalExp == 0} {
+ set canGrow 0
+ } else {
+ set canGrow [expr {int($toGrow * $data($name,expand) / $totalExp)}]
+ }
+ }
+
+ if {($canGrow + $data($name,size)) > $data($name,max)} {
+ set canGrow [expr {$data($name,max) - $data($name,size)}]
+ }
+
+ incr data($name,size) $canGrow
+ incr toGrow -$canGrow
+
+ return $toGrow
+}
+
+proc tixPanedWindow:xShrink {w name toShrink totalExp newSize usedSize} {
+ upvar #0 $w data
+
+ if {$totalExp == 0} {
+ set canShrink 0
+ } else {
+ set canShrink [expr {int($toShrink * $data($name,expand) / $totalExp)}]
+ }
+
+ if {$data($name,size) - $canShrink < $data($name,min)} {
+ set canShrink [expr {$data($name,size) - $data($name,min)}]
+ }
+ if {$usedSize + $data($name,size) - $canShrink > $newSize} {
+ set data($name,size) [expr {$newSize - $usedSize}]
+ return 0
+ } else {
+ incr data($name,size) -$canShrink
+ incr toShrink -$canShrink
+
+ return $toShrink
+ }
+}
+
+#--------------------------------------------------
+# Shrink and grow items
+#--------------------------------------------------
+proc tixPanedWindow:Shrink {w name n} {
+ upvar #0 $w data
+
+ set canShrink [expr {$data($name,size) - $data($name,min)}]
+
+ if {$canShrink > $n} {
+ incr data($name,size) -$n
+ return 0
+ } elseif {$canShrink > 0} {
+ set data($name,size) $data($name,min)
+ incr n -$canShrink
+ }
+ return $n
+}
+
+proc tixPanedWindow:Grow {w name n} {
+ upvar #0 $w data
+
+ set canGrow [expr {$data($name,max) - $data($name,size)}]
+
+ if {$canGrow > $n} {
+ incr data($name,size) $n
+ return 0
+ } elseif {$canGrow > 0} {
+ set data($name,size) $data($name,max)
+ incr n -$canGrow
+ }
+
+ return $n
+}
+
+proc tixPanedWindow:Iterate {w from to proc n} {
+ upvar #0 $w data
+
+ if {$from <= $to} {
+ for {set i $from} {$i <= $to} {incr i} {
+ set n [$proc $w [lindex $data(items) $i] $n]
+ if {$n == 0} {
+ break
+ }
+ }
+ } else {
+ for {set i $from} {$i >= $to} {incr i -1} {
+ set n [$proc $w [lindex $data(items) $i] $n]
+ if {$n == 0} {
+ break
+ }
+ }
+ }
+}
Added: external/tix-8.4.2.x/library/PopMenu.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/PopMenu.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,239 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: PopMenu.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
+#
+# PopMenu.tcl --
+#
+# This file implements the TixPopupMenu widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+global tkPriv
+if {![llength [info globals tkPriv]]} {
+ tk::unsupported::ExposePrivateVariable tkPriv
+}
+#--------------------------------------------------------------------------
+# tkPriv elements used in this file:
+#
+# inMenubutton -
+#--------------------------------------------------------------------------
+#
+foreach fun {tkMenuUnpost tkMbButtonUp tkMbEnter tkMbPost} {
+ if {![llength [info commands $fun]]} {
+ tk::unsupported::ExposePrivateCommand $fun
+ }
+}
+unset fun
+
+tixWidgetClass tixPopupMenu {
+ -classname TixPopupMenu
+ -superclass tixShell
+ -method {
+ bind post unbind
+ }
+ -flag {
+ -buttons -installcolormap -postcmd -spring -state -title
+ }
+ -configspec {
+ {-buttons buttons Buttons {{3 {Any}}}}
+ {-installcolormap installColormap InstallColormap false}
+ {-postcmd postCmd PostCmd ""}
+ {-spring spring Spring 1 tixVerifyBoolean}
+ {-state state State normal}
+ {-cursor corsor Cursor arrow}
+ }
+ -static {
+ -buttons
+ }
+ -default {
+ {*Menu.tearOff 0}
+ }
+}
+
+proc tixPopupMenu:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(g:clients) ""
+}
+
+proc tixPopupMenu:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ wm overrideredirect $w 1
+ wm withdraw $w
+
+ set data(w:menubutton) [menubutton $w.menubutton -text $data(-title) \
+ -menu $w.menubutton.menu -anchor w]
+ set data(w:menu) [menu $w.menubutton.menu]
+
+ pack $data(w:menubutton) -expand yes -fill both
+}
+
+proc tixPopupMenu:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ foreach elm $data(-buttons) {
+ set btn [lindex $elm 0]
+ foreach mod [lindex $elm 1] {
+ tixBind TixPopupMenu:MB:$w <$mod-ButtonPress-$btn> \
+ "tixPopupMenu:Unpost $w"
+
+ tixBind TixPopupMenu:$w <$mod-ButtonPress-$btn> \
+ "tixPopupMenu:post $w %W %x %y"
+ }
+
+ tixBind TixPopupMenu:MB:$w <ButtonRelease-$btn> \
+ "tixPopupMenu:BtnRelease $w %X %Y"
+
+ tixBind TixPopupMenu:M:$w <Unmap> \
+ "tixPopupMenu:Unmap $w"
+ tixBind TixPopupMenu:$w <ButtonRelease-$btn> \
+ "tixPopupMenu:BtnRelease $w %X %Y"
+
+ tixAddBindTag $data(w:menubutton) TixPopupMenu:MB:$w
+ tixAddBindTag $data(w:menu) TixPopupMenu:M:$w
+ }
+}
+
+
+#----------------------------------------------------------------------
+# PrivateMethods:
+#----------------------------------------------------------------------
+proc tixPopupMenu:Unpost {w} {
+ upvar #0 $w data
+
+ catch {
+ tkMenuUnpost ""
+ }
+# tkMbButtonUp $data(w:menubutton)
+}
+
+proc tixPopupMenu:BtnRelease {w rootX rootY} {
+ upvar #0 $w data
+
+ set cW [winfo containing -displayof $w $rootX $rootY]
+
+ if {$data(-spring)} {
+ tixPopupMenu:Unpost $w
+ }
+}
+
+proc tixPopupMenu:Unmap {w} {
+ upvar #0 $w data
+ wm withdraw $w
+}
+
+proc tixPopupMenu:Destructor {w} {
+ upvar #0 $w data
+
+ foreach client $data(g:clients) {
+ if {[winfo exists $client]} {
+ tixDeleteBindTag $client TixPopupMenu:$w
+ }
+ }
+
+ # delete the extra bindings
+ #
+ foreach tag [list TixPopupMenu:MB:$w TixPopupMenu:M:$w] {
+ foreach e [bind $tag] {
+ bind $tag $e ""
+ }
+ }
+
+ tixChainMethod $w Destructor
+}
+
+proc tixPopupMenu:config-title {w value} {
+ upvar #0 $w data
+
+ $data(w:menubutton) config -text $value
+}
+
+#----------------------------------------------------------------------
+# PublicMethods:
+#----------------------------------------------------------------------
+proc tixPopupMenu:bind {w args} {
+ upvar #0 $w data
+
+ foreach client $args {
+ if {[lsearch $data(g:clients) $client] == -1} {
+ lappend data(g:clients) $client
+ tixAppendBindTag $client TixPopupMenu:$w
+ }
+ }
+}
+
+proc tixPopupMenu:unbind {w args} {
+ upvar #0 $w data
+
+ foreach client $args {
+ if {[winfo exists $client]} {
+ set index [lsearch $data(g:clients) $client]
+ if {$index != -1} {
+ tixDeleteBindTag $client TixPopupMenu:$w
+ set data(g:clients) [lreplace $data(g:clients) $index $index]
+ }
+ }
+ }
+}
+
+proc tixPopupMenu:post {w client x y} {
+ upvar #0 $w data
+ global tkPriv
+
+ if {$data(-state) == "disabled"} {
+ return
+ }
+
+ set rootx [expr $x + [winfo rootx $client]]
+ set rooty [expr $y + [winfo rooty $client]]
+
+ if {$data(-postcmd) != ""} {
+ set ret [tixEvalCmdBinding $w $data(-postcmd) "" $rootx $rooty]
+ if {![tixGetBoolean $ret]} {
+ return
+ }
+ }
+
+ if {[string is true -strict $data(-installcolormap)]} {
+ wm colormapwindows . $w
+ }
+
+
+ set menuWidth [winfo reqwidth $data(w:menu)]
+ set width [winfo reqwidth $w]
+ set height [winfo reqheight $w]
+
+ if {$width < $menuWidth} {
+ set width $menuWidth
+ }
+
+ set wx $rootx
+ set wy $rooty
+
+ # trick: the following lines allow the popup menu
+ # acquire a stable width and height when it is finally
+ # put on the visible screen. Advoid flashing
+ #
+ wm geometry $w +10000+10000
+ wm deiconify $w
+ raise $w
+
+ update
+ wm geometry $w ${width}x${height}+${wx}+${wy}
+ update
+
+ tkMbEnter $data(w:menubutton)
+ tkMbPost $tkPriv(inMenubutton) $rootx $rooty
+}
Added: external/tix-8.4.2.x/library/Primitiv.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Primitiv.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,428 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Primitiv.tcl,v 1.7 2004/03/28 02:44:57 hobbs Exp $
+#
+# Primitiv.tcl --
+#
+# This is the primitive widget. It is just a frame with proper
+# inheritance wrapping. All new Tix widgets will be derived from
+# this widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+# No superclass, so the superclass switch is not used
+#
+#
+tixWidgetClass tixPrimitive {
+ -virtual true
+ -superclass {}
+ -classname TixPrimitive
+ -method {
+ cget configure subwidget subwidgets
+ }
+ -flag {
+ -background -borderwidth -cursor
+ -height -highlightbackground -highlightcolor -highlightthickness
+ -options -relief -takefocus -width -bd -bg
+ }
+ -static {
+ -options
+ }
+ -configspec {
+ {-background background Background #d9d9d9}
+ {-borderwidth borderWidth BorderWidth 0}
+ {-cursor cursor Cursor ""}
+ {-height height Height 0}
+ {-highlightbackground highlightBackground HighlightBackground #c3c3c3}
+ {-highlightcolor highlightColor HighlightColor black}
+ {-highlightthickness highlightThickness HighlightThickness 0}
+ {-options options Options ""}
+ {-relief relief Relief flat}
+ {-takefocus takeFocus TakeFocus 0 tixVerifyBoolean}
+ {-width width Width 0}
+ }
+ -alias {
+ {-bd -borderwidth}
+ {-bg -background}
+ }
+}
+
+#----------------------------------------------------------------------
+# ClassInitialization:
+#----------------------------------------------------------------------
+
+# not used
+# Implemented in C
+#
+# Override: never
+proc tixPrimitive:Constructor {w args} {
+
+ upvar #0 $w data
+ upvar #0 $data(className) classRec
+
+ # Set up some minimal items in the class record.
+ #
+ set data(w:root) $w
+ set data(rootCmd) $w:root
+
+ # We need to create the root widget in order to parse the options
+ # database
+ tixCallMethod $w CreateRootWidget
+
+ # Parse the default options from the options database
+ #
+ tixPrimitive:ParseDefaultOptions $w
+
+ # Parse the options supplied by the user
+ #
+ tixPrimitive:ParseUserOptions $w $args
+
+ # Rename the widget command so that it can be use to access
+ # the methods of this class
+
+ tixPrimitive:MkWidgetCmd $w
+
+ # Inistalize the Widget Record
+ #
+ tixCallMethod $w InitWidgetRec
+
+ # Construct the compound widget
+ #
+ tixCallMethod $w ConstructWidget
+
+ # Do the bindings
+ #
+ tixCallMethod $w SetBindings
+
+ # Call the configuration methods for all "force call" options
+ #
+ foreach option $classRec(forceCall) {
+ tixInt_ChangeOptions $w $option $data($option)
+ }
+}
+
+
+# Create only the root widget. We need the root widget to query the option
+# database.
+#
+# Override: seldom. (unless you want to use a toplevel as root widget)
+# Chain : never.
+
+proc tixPrimitive:CreateRootWidget {w args} {
+ upvar #0 $w data
+ upvar #0 $data(className) classRec
+
+ frame $w -class $data(ClassName)
+}
+
+proc tixPrimitive:ParseDefaultOptions {w} {
+ upvar #0 $w data
+ upvar #0 $data(className) classRec
+
+ # SET UP THE INSTANCE RECORD ACCORDING TO DEFAULT VALUES IN
+ # THE OPTIONS DATABASE
+ #
+ foreach option $classRec(options) {
+ set spec [tixInt_GetOptionSpec $data(className) $option]
+
+ if {[lindex $spec 0] eq "="} {
+ continue
+ }
+
+ set o_name [lindex $spec 1]
+ set o_class [lindex $spec 2]
+ set o_default [lindex $spec 3]
+
+ if {![catch {option get $w $o_name $o_class} db_default]} {
+ if {$db_default ne ""} {
+ set data($option) $db_default
+ } else {
+ set data($option) $o_default
+ }
+ } else {
+ set data($option) $o_default
+ }
+ }
+}
+
+proc tixPrimitive:ParseUserOptions {w arglist} {
+ upvar #0 $w data
+ upvar #0 $data(className) classRec
+
+ # SET UP THE INSTANCE RECORD ACCORDING TO COMMAND ARGUMENTS FROM
+ # THE USER OF THE TIX LIBRARY (i.e. Application programmer:)
+ #
+ foreach {option arg} $arglist {
+ if {[lsearch $classRec(options) $option] != "-1"} {
+ set spec [tixInt_GetOptionSpec $data(className) $option]
+
+ if {[lindex $spec 0] ne "="} {
+ set data($option) $arg
+ } else {
+ set realOption [lindex $spec 1]
+ set data($realOption) $arg
+ }
+ } else {
+ error "unknown option $option. Should be: [tixInt_ListOptions $w]"
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+# Initialize the widget record
+#
+#
+# Override: always
+# Chain : always, before
+proc tixPrimitive:InitWidgetRec {w} {
+ # default: do nothing
+}
+
+#----------------------------------------------------------------------
+# SetBindings
+#
+#
+# Override: sometimes
+# Chain : sometimes, before
+#
+bind TixDestroyHandler <Destroy> {
+ [tixGetMethod %W [set %W(className)] Destructor] %W
+}
+
+proc tixPrimitive:SetBindings {w} {
+ upvar #0 $w data
+
+ if {[winfo toplevel $w] eq $w} {
+ bindtags $w [concat TixDestroyHandler [bindtags $w]]
+ } else {
+ bind $data(w:root) <Destroy> \
+ "[tixGetMethod $w $data(className) Destructor] $w"
+ }
+}
+
+#----------------------------------------------------------------------
+# PrivateMethod: ConstructWidget
+#
+# Construct and set up the compound widget
+#
+# Override: sometimes
+# Chain : sometimes, before
+#
+proc tixPrimitive:ConstructWidget {w} {
+ upvar #0 $w data
+
+ $data(rootCmd) config \
+ -background $data(-background) \
+ -borderwidth $data(-borderwidth) \
+ -cursor $data(-cursor) \
+ -relief $data(-relief)
+
+ if {$data(-width) != 0} {
+ $data(rootCmd) config -width $data(-width)
+ }
+ if {$data(-height) != 0} {
+ $data(rootCmd) config -height $data(-height)
+ }
+
+ set rootname *[string range $w 1 end]
+
+ foreach {spec value} $data(-options) {
+ option add $rootname*$spec $value 100
+ }
+}
+
+#----------------------------------------------------------------------
+# PrivateMethod: MkWidgetCmd
+#
+# Construct and set up the compound widget
+#
+# Override: sometimes
+# Chain : sometimes, before
+#
+proc tixPrimitive:MkWidgetCmd {w} {
+ upvar #0 $w data
+
+ rename $w $data(rootCmd)
+ tixInt_MkInstanceCmd $w
+}
+
+
+#----------------------------------------------------------------------
+# ConfigOptions:
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+# ConfigMethod: config
+#
+# Configure one option.
+#
+# Override: always
+# Chain : automatic.
+#
+# Note the hack of [winfo width] in this procedure
+#
+# The hack is necessary because of the bad interaction between TK's geometry
+# manager (the packer) and the frame widget. The packer determines the size
+# of the root widget of the ComboBox (a frame widget) according to the
+# requirement of the slaves inside the frame widget, NOT the -width
+# option of the frame widget.
+#
+# However, everytime the frame widget is
+# configured, it sends a geometry request to the packer according to its
+# -width and -height options and the packer will temporarily resize
+# the frame widget according to the requested size! The packer then realizes
+# something is wrong and revert to the size determined by the slaves. This
+# cause a flash on the screen.
+#
+foreach opt {-height -width -background -borderwidth -cursor
+ -highlightbackground -highlightcolor -relief -takefocus -bd -bg} {
+
+ set tixPrimOpt($opt) 1
+}
+
+proc tixPrimitive:config {w option value} {
+ global tixPrimOpt
+ upvar #0 $w data
+
+ if {[info exists tixPrimOpt($option)]} {
+ $data(rootCmd) config $option $value
+ }
+}
+
+#----------------------------------------------------------------------
+# PublicMethods:
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+# This method is used to implement the "subwidgets" widget command.
+# Will be re-written in C. It can't be used as a public method because
+# of the lame substring comparison routines used in tixClass.c
+#
+#
+proc tixPrimitive:subwidgets {w type args} {
+ upvar #0 $w data
+
+ case $type {
+ -class {
+ set name [lindex $args 0]
+ set args [lrange $args 1 end]
+ # access subwidgets of a particular class
+ #
+ # note: if $name=="Frame", will *not return the root widget as well
+ #
+ set sub ""
+ foreach des [tixDescendants $w] {
+ if {[winfo class $des] eq $name} {
+ lappend sub $des
+ }
+ }
+
+ # Note: if the there is no subwidget of this class, does not
+ # cause any error.
+ #
+ if {$args eq ""} {
+ return $sub
+ } else {
+ foreach des $sub {
+ eval [linsert $args 0 $des]
+ }
+ return ""
+ }
+ }
+ -group {
+ set name [lindex $args 0]
+ set args [lrange $args 1 end]
+ # access subwidgets of a particular group
+ #
+ if {[info exists data(g:$name)]} {
+ if {$args eq ""} {
+ set ret ""
+ foreach item $data(g:$name) {
+ lappend ret $w.$item
+ }
+ return $ret
+ } else {
+ foreach item $data(g:$name) {
+ eval [linsert $args 0 $w.$item]
+ }
+ return ""
+ }
+ } else {
+ error "no such subwidget group $name"
+ }
+ }
+ -all {
+ set sub [tixDescendants $w]
+
+ if {$args eq ""} {
+ return $sub
+ } else {
+ foreach des $sub {
+ eval [linsert $args 0 $des]
+ }
+ return ""
+ }
+ }
+ default {
+ error "unknown flag $type, should be -all, -class or -group"
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+# PublicMethod: subwidget
+#
+# Access a subwidget withe a particular name
+#
+# Override: never
+# Chain : never
+#
+# This is implemented in native C code in tixClass.c
+#
+proc tixPrimitive:subwidget {w name args} {
+ upvar #0 $w data
+
+ if {[info exists data(w:$name)]} {
+ if {$args eq ""} {
+ return $data(w:$name)
+ } else {
+ return [eval [linsert $args 0 $data(w:$name)]]
+ }
+ } else {
+ error "no such subwidget $name"
+ }
+}
+
+
+#----------------------------------------------------------------------
+# PrivateMethods:
+#----------------------------------------------------------------------
+
+# delete the widget record and remove the command
+#
+proc tixPrimitive:Destructor {w} {
+ upvar #0 $w data
+
+ if {![info exists data(w:root)]} {
+ return
+ }
+
+ if {[llength [info commands $w]]} {
+ # remove the command
+ rename $w ""
+ }
+
+ if {[llength [info commands $data(rootCmd)]]} {
+ # remove the command of the root widget
+ rename $data(rootCmd) ""
+ }
+
+ # delete the widget record
+ catch {unset data}
+}
Added: external/tix-8.4.2.x/library/ResizeH.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/ResizeH.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,505 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: ResizeH.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# ResizeH.tcl --
+#
+# tixResizeHandle: A general purpose "resizing handle"
+# widget. You can use it to resize pictures, widgets, etc. When
+# using it to resize a widget, you can use the "attachwidget"
+# command to attach it to a widget and it will handle all the
+# events for you.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+#
+
+tixWidgetClass tixResizeHandle {
+ -classname TixResizeHandle
+ -superclass tixVResize
+
+ -method {
+ attachwidget detachwidget hide show
+ }
+ -flag {
+ -command -cursorfg -cursorbg -handlesize -hintcolor -hintwidth -x -y
+ }
+ -configspec {
+ {-command command Command ""}
+ {-cursorfg cursorFg CursorColor white}
+ {-cursorbg cursorBg CursorColor red}
+ {-handlesize handleSize HandleSize 6}
+ {-hintcolor hintColor HintColor red}
+ {-hintwidth hintWidth HintWidth 1}
+ {-x x X 0}
+ {-y y Y 0}
+ }
+}
+
+proc tixResizeHandle:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(shown) 0
+ set data(widget) ""
+}
+
+proc tixResizeHandle:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ # Create the hints
+ #
+ set data(w_ht) $w:tix_priv_ht
+ set data(w_hb) $w:tix_priv_hb
+ set data(w_hl) $w:tix_priv_hl
+ set data(w_hr) $w:tix_priv_hr
+
+ frame $data(w_ht) -height $data(-hintwidth) -bg $data(-background)
+ frame $data(w_hb) -height $data(-hintwidth) -bg $data(-background)
+ frame $data(w_hl) -width $data(-hintwidth) -bg $data(-background)
+ frame $data(w_hr) -width $data(-hintwidth) -bg $data(-background)
+
+ # Create the corner resize handles
+ #
+ set data(w_r00) $w
+
+# Windows don't like this
+# $data(rootCmd) config\
+# -cursor "top_left_corner $data(-cursorbg) $data(-cursorfg)"
+
+ $data(rootCmd) config -cursor top_left_corner
+
+ set data(w_r01) $w:tix_priv_01
+ set data(w_r10) $w:tix_priv_10
+ set data(w_r11) $w:tix_priv_11
+
+ frame $data(w_r01) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "bottom_left_corner"\
+ -bg $data(-background)
+ frame $data(w_r10) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "top_right_corner"\
+ -bg $data(-background)
+ frame $data(w_r11) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "bottom_right_corner"\
+ -bg $data(-background)
+
+ # Create the border resize handles
+ #
+ set data(w_bt) $w:tix_priv_bt
+ set data(w_bb) $w:tix_priv_bb
+ set data(w_bl) $w:tix_priv_bl
+ set data(w_br) $w:tix_priv_br
+
+ frame $data(w_bt) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "top_side"\
+ -bg $data(-background)
+ frame $data(w_bb) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "bottom_side"\
+ -bg $data(-background)
+ frame $data(w_bl) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "left_side"\
+ -bg $data(-background)
+ frame $data(w_br) -relief $data(-relief) -bd $data(-borderwidth) \
+ -cursor "right_side"\
+ -bg $data(-background)
+}
+
+proc tixResizeHandle:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ bind $data(w_r00) <1> \
+ "tixResizeHandle:dragstart $w $data(w_r00) 1 %X %Y {1 1 -1 -1}"
+ bind $data(w_r01) <1> \
+ "tixResizeHandle:dragstart $w $data(w_r01) 1 %X %Y {1 0 -1 1}"
+ bind $data(w_r10) <1> \
+ "tixResizeHandle:dragstart $w $data(w_r10) 1 %X %Y {0 1 1 -1}"
+ bind $data(w_r11) <1> \
+ "tixResizeHandle:dragstart $w $data(w_r11) 1 %X %Y {0 0 1 1}"
+ bind $data(w_bt) <1> \
+ "tixResizeHandle:dragstart $w $data(w_bt) 1 %X %Y {0 1 0 -1}"
+ bind $data(w_bb) <1> \
+ "tixResizeHandle:dragstart $w $data(w_bb) 1 %X %Y {0 0 0 1}"
+ bind $data(w_bl) <1> \
+ "tixResizeHandle:dragstart $w $data(w_bl) 1 %X %Y {1 0 -1 0}"
+ bind $data(w_br) <1> \
+ "tixResizeHandle:dragstart $w $data(w_br) 1 %X %Y {0 0 1 0}"
+
+ foreach win [list \
+ $data(w_r00)\
+ $data(w_r01)\
+ $data(w_r10)\
+ $data(w_r11)\
+ $data(w_bt)\
+ $data(w_bb)\
+ $data(w_bl)\
+ $data(w_br)\
+ ] {
+ bind $win <B1-Motion> "tixVResize:drag $w %X %Y"
+ bind $win <ButtonRelease-1> "tixVResize:dragend $w $win 0 %X %Y"
+ bind $win <Any-Escape> "tixVResize:dragend $w $win 1 0 0"
+ }
+}
+
+#----------------------------------------------------------------------
+# Config Methods
+#----------------------------------------------------------------------
+proc tixResizeHandle:config-width {w value} {
+ tixWidgetDoWhenIdle tixResizeHandle:ComposeWindow $w
+}
+
+proc tixResizeHandle:config-height {w value} {
+ tixWidgetDoWhenIdle tixResizeHandle:ComposeWindow $w
+}
+
+proc tixResizeHandle:config-x {w value} {
+ tixWidgetDoWhenIdle tixResizeHandle:ComposeWindow $w
+}
+
+proc tixResizeHandle:config-y {w value} {
+ tixWidgetDoWhenIdle tixResizeHandle:ComposeWindow $w
+}
+
+
+#----------------------------------------------------------------------
+# Public Methods
+#----------------------------------------------------------------------
+proc tixResizeHandle:dragstart {w win depress rootx rooty mrect} {
+ upvar #0 $w data
+
+ set wx $data(-x)
+ set wy $data(-y)
+ set ww $data(-width)
+ set wh $data(-height)
+
+ tixVResize:dragstart $w $win $depress $rootx $rooty \
+ [list $wx $wy $ww $wh] $mrect
+}
+
+# tixDeleteBindTag --
+#
+# Delete the bindtag(s) in the args list from the bindtags of the widget
+#
+proc tixDeleteBindTag {w args} {
+ if {![winfo exists $w]} {
+ return
+ }
+ set newtags ""
+
+ foreach tag [bindtags $w] {
+ if {[lsearch $args $tag] == -1} {
+ lappend newtags $tag
+ }
+ }
+ bindtags $w $newtags
+}
+
+proc tixAddBindTag {w args} {
+ bindtags $w [concat [bindtags $w] $args]
+}
+
+proc tixResizeHandle:attachwidget {w widget args} {
+ upvar #0 $w data
+
+ set opt(-move) 0
+ tixHandleOptions opt {-move} $args
+
+ if {$data(widget) != ""} {
+ tixDeleteBindTag $data(widget) TixResizeHandleTag:$w
+ }
+
+ set data(widget) $widget
+
+ if {$data(widget) != ""} {
+ # Just in case TixResizeHandleTag was already there
+ tixDeleteBindTag $data(widget) TixResizeHandleTag:$w
+ tixAddBindTag $data(widget) TixResizeHandleTag:$w
+
+
+ set data(-x) [winfo x $data(widget)]
+ set data(-y) [winfo y $data(widget)]
+ set data(-width) [winfo width $data(widget)]
+ set data(-height) [winfo height $data(widget)]
+
+ tixResizeHandle:show $w
+ tixResizeHandle:ComposeWindow $w
+
+ # Now set the bindings
+ #
+ if {$opt(-move)} {
+ bind TixResizeHandleTag:$w <1> \
+ "tixResizeHandle:Attach $w %X %Y"
+ bind TixResizeHandleTag:$w <B1-Motion> \
+ "tixResizeHandle:BMotion $w %X %Y"
+ bind TixResizeHandleTag:$w <Any-Escape> \
+ "tixResizeHandle:BRelease $w 1 %X %Y"
+ bind TixResizeHandleTag:$w <ButtonRelease-1>\
+ "tixResizeHandle:BRelease $w 0 %X %Y"
+ } else {
+ # if "move" is false, then the widget won't be moved as a whole --
+ # ResizeHandle will only move its sides
+ bind TixResizeHandleTag:$w <1> {;}
+ bind TixResizeHandleTag:$w <B1-Motion> {;}
+ bind TixResizeHandleTag:$w <Any-Escape> {;}
+ bind TixResizeHandleTag:$w <ButtonRelease-1> {;}
+ }
+ }
+}
+
+proc tixResizeHandle:detachwidget {w} {
+ upvar #0 $w data
+
+ if {$data(widget) != ""} {
+ tixDeleteBindTag $data(widget) TixResizeHandleTag:$w
+ }
+ tixResizeHandle:hide $w
+}
+
+proc tixResizeHandle:show {w} {
+ upvar #0 $w data
+
+ set data(shown) 1
+
+ raise $data(w_ht)
+ raise $data(w_hb)
+ raise $data(w_hl)
+ raise $data(w_hr)
+
+ raise $data(w_r00)
+ raise $data(w_r01)
+ raise $data(w_r10)
+ raise $data(w_r11)
+
+ raise $data(w_bt)
+ raise $data(w_bb)
+ raise $data(w_bl)
+ raise $data(w_br)
+
+# tixCancleIdleTask tixResizeHandle:ComposeWindow $w
+ tixResizeHandle:ComposeWindow $w
+}
+
+
+proc tixResizeHandle:hide {w} {
+ upvar #0 $w data
+
+ if {!$data(shown)} {
+ return
+ }
+
+ set data(shown) 0
+
+ place forget $data(w_r00)
+ place forget $data(w_r01)
+ place forget $data(w_r10)
+ place forget $data(w_r11)
+
+ place forget $data(w_bt)
+ place forget $data(w_bb)
+ place forget $data(w_bl)
+ place forget $data(w_br)
+
+ place forget $data(w_ht)
+ place forget $data(w_hb)
+ place forget $data(w_hl)
+ place forget $data(w_hr)
+}
+
+proc tixResizeHandle:Destructor {w} {
+ upvar #0 $w data
+
+ if {$data(widget) != ""} {
+ tixDeleteBindTag $data(widget) TixResizeHandleTag:$w
+ }
+
+ catch {destroy $data(w_r01)}
+ catch {destroy $data(w_r10)}
+ catch {destroy $data(w_r11)}
+
+ catch {destroy $data(w_bt)}
+ catch {destroy $data(w_bb)}
+ catch {destroy $data(w_bl)}
+ catch {destroy $data(w_br)}
+
+ catch {destroy $data(w_ht)}
+ catch {destroy $data(w_hb)}
+ catch {destroy $data(w_hl)}
+ catch {destroy $data(w_hr)}
+
+ tixChainMethod $w Destructor
+}
+
+#----------------------------------------------------------------------
+# Private Methods Dealing With Attached Widgets
+#----------------------------------------------------------------------
+proc tixResizeHandle:Attach {w rx ry} {
+ upvar #0 $w data
+
+ tixResizeHandle:dragstart $w $data(widget) 0 $rx $ry {1 1 0 0}
+}
+
+proc tixResizeHandle:BMotion {w rx ry} {
+ tixVResize:drag $w $rx $ry
+}
+
+
+proc tixResizeHandle:BRelease {w isAbort rx ry} {
+ upvar #0 $w data
+
+ tixVResize:dragend $w $data(widget) $isAbort $rx $ry
+}
+
+#----------------------------------------------------------------------
+# Private Methods
+#----------------------------------------------------------------------
+proc tixResizeHandle:DrawTmpLines {w} {
+ upvar #0 $w data
+
+ # I've seen this error - mike
+ if {![info exists data(hf:x1)]} {return}
+ set x1 $data(hf:x1)
+ if {![info exists data(hf:y1)]} {return}
+ set y1 $data(hf:y1)
+ if {![info exists data(hf:x2)]} {return}
+ set x2 $data(hf:x2)
+ if {![info exists data(hf:y2)]} {return}
+ set y2 $data(hf:y2)
+
+ tixTmpLine $x1 $y1 $x2 $y1 $w
+ tixTmpLine $x1 $y2 $x2 $y2 $w
+ tixTmpLine $x1 $y1 $x1 $y2 $w
+ tixTmpLine $x2 $y1 $x2 $y2 $w
+}
+
+# Place the hint frame to indicate the changes
+#
+proc tixResizeHandle:SetHintFrame {w x1 y1 width height} {
+ upvar #0 $w data
+
+ # The four sides of the window
+ #
+ set x2 [expr "$x1+$width"]
+ set y2 [expr "$y1+$height"]
+
+ set rx [winfo rootx [winfo parent $w]]
+ set ry [winfo rooty [winfo parent $w]]
+
+ incr x1 $rx
+ incr y1 $ry
+ incr x2 $rx
+ incr y2 $ry
+
+ if {[info exists data(hf:x1)]} {
+ tixResizeHandle:DrawTmpLines $w
+ }
+
+ set data(hf:x1) $x1
+ set data(hf:y1) $y1
+ set data(hf:x2) $x2
+ set data(hf:y2) $y2
+
+ tixResizeHandle:DrawTmpLines $w
+}
+
+proc tixResizeHandle:ShowHintFrame {w} {
+ upvar #0 $w data
+
+ place forget $data(w_ht)
+ place forget $data(w_hb)
+ place forget $data(w_hl)
+ place forget $data(w_hr)
+
+ update
+}
+
+proc tixResizeHandle:HideHintFrame {w} {
+ upvar #0 $w data
+
+ tixResizeHandle:DrawTmpLines $w
+ unset data(hf:x1)
+ unset data(hf:y1)
+ unset data(hf:x2)
+ unset data(hf:y2)
+}
+
+proc tixResizeHandle:UpdateSize {w x y width height} {
+ upvar #0 $w data
+
+ set data(-x) $x
+ set data(-y) $y
+ set data(-width) $width
+ set data(-height) $height
+
+ tixResizeHandle:ComposeWindow $w
+
+ if {$data(widget) != ""} {
+ place $data(widget) -x $x -y $y -width $width -height $height
+ }
+
+ if {$data(-command) != ""} {
+ eval $data(-command) $x $y $width $height
+ }
+}
+
+proc tixResizeHandle:ComposeWindow {w} {
+ upvar #0 $w data
+
+ set px $data(-x)
+ set py $data(-y)
+ set pw $data(-width)
+ set ph $data(-height)
+
+ # Show the hint frames
+ #
+ set x1 $px
+ set y1 $py
+ set x2 [expr "$px+$pw"]
+ set y2 [expr "$py+$ph"]
+
+ place $data(w_ht) -x $x1 -y $y1 -width $pw -bordermode outside
+ place $data(w_hb) -x $x1 -y $y2 -width $pw -bordermode outside
+ place $data(w_hl) -x $x1 -y $y1 -height $ph -bordermode outside
+ place $data(w_hr) -x $x2 -y $y1 -height $ph -bordermode outside
+
+ # Set the four corner resize handles
+ #
+ set sz_2 [expr $data(-handlesize)/2]
+
+ set x1 [expr "$px - $sz_2"]
+ set y1 [expr "$py - $sz_2"]
+ set x2 [expr "$px - $sz_2" + $pw]
+ set y2 [expr "$py - $sz_2" + $ph]
+
+ place $data(w_r00) -x $x1 -y $y1 \
+ -width $data(-handlesize) -height $data(-handlesize)
+ place $data(w_r01) -x $x1 -y $y2\
+ -width $data(-handlesize) -height $data(-handlesize)
+ place $data(w_r10) -x $x2 -y $y1\
+ -width $data(-handlesize) -height $data(-handlesize)
+ place $data(w_r11) -x $x2 -y $y2\
+ -width $data(-handlesize) -height $data(-handlesize)
+
+
+ # Set the four border resize handles
+ #
+ set mx [expr "$px + $pw/2 - $sz_2"]
+ set my [expr "$py + $ph/2 - $sz_2"]
+
+ place $data(w_bt) -x $mx -y $y1 \
+ -width $data(-handlesize) -height $data(-handlesize)
+ place $data(w_bb) -x $mx -y $y2 \
+ -width $data(-handlesize) -height $data(-handlesize)
+ place $data(w_bl) -x $x1 -y $my \
+ -width $data(-handlesize) -height $data(-handlesize)
+ place $data(w_br) -x $x2 -y $my \
+ -width $data(-handlesize) -height $data(-handlesize)
+}
Added: external/tix-8.4.2.x/library/SGrid.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SGrid.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,243 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SGrid.tcl,v 1.6 2002/01/24 09:13:58 idiscovery Exp $
+#
+# SGrid.tcl --
+#
+# This file implements Scrolled Grid widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+global tkPriv
+if {![llength [info globals tkPriv]]} {
+ tk::unsupported::ExposePrivateVariable tkPriv
+}
+#--------------------------------------------------------------------------
+# tkPriv elements used in this file:
+#
+# x -
+# y -
+# X -
+# Y -
+#--------------------------------------------------------------------------
+#
+
+tixWidgetClass tixScrolledGrid {
+ -classname TixScrolledGrid
+ -superclass tixScrolledWidget
+ -method {
+ }
+ -flag {
+ }
+ -configspec {
+ }
+ -default {
+ {.scrollbar auto}
+ {*grid.borderWidth 1}
+ {*grid.Background #c3c3c3}
+ {*grid.highlightBackground #d9d9d9}
+ {*grid.relief sunken}
+ {*grid.takeFocus 1}
+ {*Scrollbar.takeFocus 0}
+ }
+}
+
+proc tixScrolledGrid:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:grid) [tixGrid $w.grid]
+
+ set data(w:hsb) \
+ [scrollbar $w.hsb -orient horizontal -takefocus 0]
+ set data(w:vsb) \
+ [scrollbar $w.vsb -orient vertical -takefocus 0]
+
+ set data(pw:client) $data(w:grid)
+
+ pack $data(w:grid) -expand yes -fill both -padx 0 -pady 0
+}
+
+proc tixScrolledGrid:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:grid) config \
+ -xscrollcommand "$data(w:hsb) set"\
+ -yscrollcommand "$data(w:vsb) set"\
+ -sizecmd [list tixScrolledWidget:Configure $w] \
+ -formatcmd "tixCallMethod $w FormatCmd"
+
+ $data(w:hsb) config -command "$data(w:grid) xview"
+ $data(w:vsb) config -command "$data(w:grid) yview"
+
+ bindtags $data(w:grid) \
+ "$data(w:grid) TixSGrid TixGrid [winfo toplevel $data(w:grid)] all"
+
+ tixSetMegaWidget $data(w:grid) $w
+}
+
+#----------------------------------------------------------------------
+# RAW event bindings
+#----------------------------------------------------------------------
+proc tixScrolledGridBind {} {
+ tixBind TixScrolledGrid <ButtonPress-1> {
+ tixScrolledGrid:Button-1 [tixGetMegaWidget %W] %x %y
+ }
+ tixBind TixScrolledGrid <Shift-ButtonPress-1> {
+ tixScrolledGrid:Shift-Button-1 %W %x %y
+ }
+ tixBind TixScrolledGrid <Control-ButtonPress-1> {
+ tixScrolledGrid:Control-Button-1 %W %x %y
+ }
+ tixBind TixScrolledGrid <ButtonRelease-1> {
+ tixScrolledGrid:ButtonRelease-1 %W %x %y
+ }
+ tixBind TixScrolledGrid <Double-ButtonPress-1> {
+ tixScrolledGrid:Double-1 %W %x %y
+ }
+ tixBind TixScrolledGrid <B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixScrolledGrid:B1-Motion %W %x %y
+ }
+ tixBind TixScrolledGrid <Control-B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixScrolledGrid:Control-B1-Motion %W %x %y
+ }
+ tixBind TixScrolledGrid <B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixScrolledGrid:B1-Leave %W
+ }
+ tixBind TixScrolledGrid <B1-Enter> {
+ tixScrolledGrid:B1-Enter %W %x %y
+ }
+ tixBind TixScrolledGrid <Control-B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixScrolledGrid:Control-B1-Leave %W
+ }
+ tixBind TixScrolledGrid <Control-B1-Enter> {
+ tixScrolledGrid:Control-B1-Enter %W %x %y
+ }
+
+ # Keyboard bindings
+ #
+ tixBind TixScrolledGrid <Up> {
+ tixScrolledGrid:DirKey %W up
+ }
+ tixBind TixScrolledGrid <Down> {
+ tixScrolledGrid:DirKey %W down
+ }
+ tixBind TixScrolledGrid <Left> {
+ tixScrolledGrid:DirKey %W left
+ }
+ tixBind TixScrolledGrid <Right> {
+ tixScrolledGrid:DirKey %W right
+ }
+ tixBind TixScrolledGrid <Prior> {
+ %W yview scroll -1 pages
+ }
+ tixBind TixScrolledGrid <Next> {
+ %W yview scroll 1 pages
+ }
+ tixBind TixScrolledGrid <Return> {
+ tixScrolledGrid:Return %W
+ }
+ tixBind TixScrolledGrid <space> {
+ tixScrolledGrid:Space %W
+ }
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Mouse bindings
+#
+#
+#----------------------------------------------------------------------
+proc tixScrolledGrid:Button-1 {w x y} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ if {[$w cget -takefocus]} {
+ focus $w
+ }
+ case [tixScrolled:GetState $w] {
+ {0} {
+ tixScrolledGrid:GoState s1 $w $x $y
+ }
+ {b0} {
+ tixScrolledGrid:GoState b1 $w $x $y
+ }
+ {m0} {
+ tixScrolledGrid:GoState m1 $w $x $y
+ }
+ {e0} {
+ tixScrolledGrid:GoState e1 $w $x $y
+ }
+ }
+}
+
+
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+# Virtual Methods
+#----------------------------------------------------------------------
+proc tixScrolledGrid:FormatCmd {w area x1 y1 x2 y2} {
+ # do nothing
+}
+
+#----------------------------------------------------------------------
+# virtual functions to query the client window's scroll requirement
+#----------------------------------------------------------------------
+proc tixScrolledGrid:GeometryInfo {w mW mH} {
+ upvar #0 $w data
+
+
+ if {$mW < 1} {
+ set mW 1
+ }
+ if {$mH < 1} {
+ set mH 1
+ }
+
+ return [$data(w:grid) geometryinfo $mW $mH]
+}
Added: external/tix-8.4.2.x/library/SHList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SHList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,140 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SHList.tcl,v 1.7 2004/04/09 21:37:33 hobbs Exp $
+#
+# SHList.tcl --
+#
+# This file implements Scrolled HList widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixScrolledHList {
+ -classname TixScrolledHList
+ -superclass tixScrolledWidget
+ -method {
+ }
+ -flag {
+ -highlightbackground -highlightcolor -highlightthickness
+ }
+ -configspec {
+ {-highlightbackground -highlightBackground HighlightBackground #d9d9d9}
+ {-highlightcolor -highlightColor HighlightColor black}
+ {-highlightthickness -highlightThickness HighlightThickness 2}
+ }
+ -default {
+ {.scrollbar auto}
+ {*f1.borderWidth 1}
+ {*hlist.Background #c3c3c3}
+ {*hlist.highlightBackground #d9d9d9}
+ {*hlist.relief sunken}
+ {*hlist.takeFocus 1}
+ {*Scrollbar.takeFocus 0}
+ }
+ -forcecall {
+ -highlightbackground -highlightcolor -highlightthickness
+ }
+}
+
+proc tixScrolledHList:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(pw:f1) [frame $w.f1 -takefocus 0]
+ set data(w:hlist) \
+ [tixHList $w.f1.hlist -bd 0 -takefocus 1 -highlightthickness 0]
+
+ pack $data(w:hlist) -in $data(pw:f1) -expand yes -fill both -padx 0 -pady 0
+
+ set data(w:hsb) [scrollbar $w.hsb -orient horizontal -takefocus 0]
+ set data(w:vsb) [scrollbar $w.vsb -orient vertical -takefocus 0]
+
+ set data(pw:client) $data(pw:f1)
+}
+
+proc tixScrolledHList:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:hlist) config \
+ -xscrollcommand [list $data(w:hsb) set] \
+ -yscrollcommand [list $data(w:vsb) set] \
+ -sizecmd [list tixScrolledWidget:Configure $w]
+
+ $data(w:hsb) config -command [list $data(w:hlist) xview]
+ $data(w:vsb) config -command [list $data(w:hlist) yview]
+
+}
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+proc tixScrolledHList:config-takefocus {w value} {
+ upvar #0 $w data
+ $data(w:hlist) config -takefocus $value
+}
+
+proc tixScrolledHList:config-highlightbackground {w value} {
+ upvar #0 $w data
+ $data(pw:f1) config -highlightbackground $value
+}
+
+proc tixScrolledHList:config-highlightcolor {w value} {
+ upvar #0 $w data
+ $data(pw:f1) config -highlightcolor $value
+}
+
+proc tixScrolledHList:config-highlightthickness {w value} {
+ upvar #0 $w data
+ $data(pw:f1) config -highlightthickness $value
+}
+
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+# virtual
+#
+proc tixScrolledHList:RepackHook {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w RepackHook
+}
+#----------------------------------------------------------------------
+# virtual functions to query the client window's scroll requirement
+#----------------------------------------------------------------------
+proc tixScrolledHList:GeometryInfo {w mW mH} {
+ upvar #0 $w data
+
+ if {[winfo class $w.f1] eq "Frame"} {
+ set extra [expr {[$w.f1 cget -bd]+[$w.f1 cget -highlightthickness]}]
+ } else {
+ set extra 0
+ }
+
+ set mW [expr {$mW - $extra*2}]
+ set mH [expr {$mH - $extra*2}]
+
+ if {$mW < 1} {
+ set mW 1
+ }
+ if {$mH < 1} {
+ set mH 1
+ }
+
+ return [$data(w:hlist) geometryinfo $mW $mH]
+}
Added: external/tix-8.4.2.x/library/SListBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SListBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,295 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SListBox.tcl,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+#
+# SListBox.tcl --
+#
+# This file implements Scrolled Listbox widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+# ToDo:
+# -anchor (none)
+#
+
+tixWidgetClass tixScrolledListBox {
+ -classname TixScrolledListBox
+ -superclass tixScrolledWidget
+ -method {
+ }
+ -flag {
+ -anchor -browsecmd -command -state
+ }
+ -static {
+ -anchor
+ }
+ -configspec {
+ {-anchor anchor Anchor w}
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-state state State normal}
+ {-takefocus takeFocus TakeFocus 1 tixVerifyBoolean}
+ }
+ -default {
+ {.scrollbar auto}
+ {*borderWidth 1}
+ {*listbox.highlightBackground #d9d9d9}
+ {*listbox.relief sunken}
+ {*listbox.background #c3c3c3}
+ {*listbox.takeFocus 1}
+ {*Scrollbar.takeFocus 0}
+ }
+}
+
+proc tixScrolledListBox:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(x-first) 0
+ set data(x-last) 1
+ set data(y-first) 0
+ set data(y-last) 1
+}
+
+proc tixScrolledListBox:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:listbox) \
+ [listbox $w.listbox]
+ set data(w:hsb) \
+ [scrollbar $w.hsb -orient horizontal]
+ set data(w:vsb) \
+ [scrollbar $w.vsb -orient vertical ]
+
+ set data(pw:client) $data(w:listbox)
+}
+
+proc tixScrolledListBox:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:listbox) config \
+ -xscrollcommand "tixScrolledListBox:XView $w"\
+ -yscrollcommand "tixScrolledListBox:YView $w"
+
+ $data(w:hsb) config -command "$data(w:listbox) xview"
+ $data(w:vsb) config -command "$data(w:listbox) yview"
+
+ bind $w <Configure> "+tixScrolledListBox:Configure $w"
+ bind $w <FocusIn> "focus $data(w:listbox)"
+
+ bindtags $data(w:listbox) \
+ "$data(w:listbox) TixListboxState Listbox TixListbox [winfo toplevel $data(w:listbox)] all"
+ tixSetMegaWidget $data(w:listbox) $w
+}
+
+proc tixScrolledListBoxBind {} {
+ tixBind TixListboxState <1> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <1> {
+ if {[string is true -strict [%W cget -takefocus]]} {
+ focus %W
+ }
+ tixScrolledListBox:Browse [tixGetMegaWidget %W]
+ }
+
+ tixBind TixListboxState <B1-Motion> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <B1-Motion> {
+ tixScrolledListBox:Browse [tixGetMegaWidget %W]
+ }
+
+ tixBind TixListboxState <Up> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <Up> {
+ tixScrolledListBox:KeyBrowse [tixGetMegaWidget %W]
+ }
+
+ tixBind TixListboxState <Down> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <Down> {
+ tixScrolledListBox:KeyBrowse [tixGetMegaWidget %W]
+ }
+
+ tixBind TixListboxState <Return> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <Return> {
+ tixScrolledListBox:KeyInvoke [tixGetMegaWidget %W]
+ }
+
+
+ tixBind TixListboxState <Double-1> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <Double-1> {
+ tixScrolledListBox:Invoke [tixGetMegaWidget %W]
+ }
+
+ tixBind TixListboxState <ButtonRelease-1> {
+ if {[set [tixGetMegaWidget %W](-state)] eq "disabled"} {
+ break
+ }
+ }
+ tixBind TixListbox <ButtonRelease-1> {
+ tixScrolledListBox:Browse [tixGetMegaWidget %W]
+ }
+}
+
+proc tixScrolledListBox:Browse {w} {
+ upvar #0 $w data
+
+ if {$data(-browsecmd) != ""} {
+ set bind(specs) {%V}
+ set bind(%V) [$data(w:listbox) get \
+ [$data(w:listbox) nearest [tixEvent flag y]]]
+ tixEvalCmdBinding $w $data(-browsecmd) bind
+ }
+}
+
+proc tixScrolledListBox:KeyBrowse {w} {
+ upvar #0 $w data
+
+ if {$data(-browsecmd) != ""} {
+ set bind(specs) {%V}
+ set bind(%V) [$data(w:listbox) get active]
+ tixEvalCmdBinding $w $data(-browsecmd) bind
+ }
+}
+
+# tixScrolledListBox:Invoke --
+#
+# The user has invoked the listbox by pressing either the <Returh>
+# key or double-clicking. Call the user-supplied -command function.
+#
+# For both -browsecmd and -command, it is the responsibility of the
+# user-supplied function to determine the current selection of the listbox
+#
+proc tixScrolledListBox:Invoke {w} {
+ upvar #0 $w data
+
+ if {$data(-command) != ""} {
+ set bind(specs) {%V}
+ set bind(%V) [$data(w:listbox) get \
+ [$data(w:listbox) nearest [tixEvent flag y]]]
+ tixEvalCmdBinding $w $data(-command) bind
+ }
+}
+
+proc tixScrolledListBox:KeyInvoke {w} {
+ upvar #0 $w data
+
+ if {$data(-command) != ""} {
+ set bind(specs) {%V}
+ set bind(%V) [$data(w:listbox) get active]
+ tixEvalCmdBinding $w $data(-command) bind
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+proc tixScrolledListBox:config-takefocus {w value} {
+ upvar #0 $w data
+ $data(w:listbox) config -takefocus $value
+}
+
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+proc tixScrolledListBox:XView {w first last} {
+ upvar #0 $w data
+
+ set data(x-first) $first
+ set data(x-last) $last
+
+ $data(w:hsb) set $first $last
+ tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+
+
+}
+
+proc tixScrolledListBox:YView {w first last} {
+ upvar #0 $w data
+
+ set data(y-first) $first
+ set data(y-last) $last
+
+ $data(w:vsb) set $first $last
+ tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+
+ # Somehow an update here must be used to advoid osscilation
+ #
+ update idletasks
+}
+
+#
+#----------------------------------------------------------------------
+# virtual functions to query the client window's scroll requirement
+#----------------------------------------------------------------------
+proc tixScrolledListBox:GeometryInfo {w mW mH} {
+ upvar #0 $w data
+
+ return [list \
+ [list $data(x-first) $data(x-last)]\
+ [list $data(y-first) $data(y-last)]]
+}
+
+proc tixScrolledListBox:Configure {w} {
+ upvar #0 $w data
+
+ tixWidgetDoWhenIdle tixScrolledListBox:TrickScrollbar $w
+
+ if {$data(-anchor) eq "e"} {
+ $data(w:listbox) xview 100000
+ }
+}
+
+# This procedure is necessary because listbox does not call x,y scroll command
+# when its size is changed
+#
+proc tixScrolledListBox:TrickScrollbar {w} {
+ upvar #0 $w data
+
+ set inc [$data(w:listbox) select include 0]
+
+ $data(w:listbox) select set 0
+ if {!$inc} {
+ $data(w:listbox) select clear 0
+ }
+}
Added: external/tix-8.4.2.x/library/STList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/STList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,93 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: STList.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
+#
+# STList.tcl --
+#
+# This file implements Scrolled TList widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixScrolledTList {
+ -classname TixScrolledTList
+ -superclass tixScrolledWidget
+ -method {
+ }
+ -flag {
+ }
+ -configspec {
+ }
+ -default {
+ {.scrollbar auto}
+ {*borderWidth 1}
+ {*tlist.background #c3c3c3}
+ {*tlist.highlightBackground #d9d9d9}
+ {*tlist.relief sunken}
+ {*tlist.takeFocus 1}
+ {*Scrollbar.takeFocus 0}
+ }
+}
+
+proc tixScrolledTList:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:tlist) \
+ [tixTList $w.tlist]
+ set data(w:hsb) \
+ [scrollbar $w.hsb -orient horizontal]
+ set data(w:vsb) \
+ [scrollbar $w.vsb -orient vertical ]
+
+ set data(pw:client) $data(w:tlist)
+}
+
+proc tixScrolledTList:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:tlist) config \
+ -xscrollcommand "$data(w:hsb) set"\
+ -yscrollcommand "$data(w:vsb) set"\
+ -sizecmd [list tixScrolledWidget:Configure $w]
+
+ $data(w:hsb) config -command "$data(w:tlist) xview"
+ $data(w:vsb) config -command "$data(w:tlist) yview"
+}
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+proc tixScrolledTList:config-takefocus {w value} {
+ upvar #0 $w data
+
+ $data(w:tlist) config -takefocus $value
+}
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+# virtual functions to query the client window's scroll requirement
+#----------------------------------------------------------------------
+proc tixScrolledTList:GeometryInfo {w mW mH} {
+ upvar #0 $w data
+
+ return [$data(w:tlist) geometryinfo $mW $mH]
+}
Added: external/tix-8.4.2.x/library/SText.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SText.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,134 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SText.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
+#
+# SText.tcl --
+#
+# This file implements Scrolled Text widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+
+tixWidgetClass tixScrolledText {
+ -classname TixScrolledText
+ -superclass tixScrolledWidget
+ -method {
+ }
+ -flag {
+ }
+ -static {
+ }
+ -configspec {
+ }
+ -default {
+ {.scrollbar both}
+ {*Scrollbar.takeFocus 0}
+ }
+ -forcecall {
+ -scrollbar
+ }
+}
+
+proc tixScrolledText:ConstructWidget {w} {
+ upvar #0 $w data
+ global tcl_platform
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:text) \
+ [text $w.text]
+ set data(w:hsb) \
+ [scrollbar $w.hsb -orient horizontal]
+ set data(w:vsb) \
+ [scrollbar $w.vsb -orient vertical]
+
+ if {$data(-sizebox) && $tcl_platform(platform) == "windows"} {
+# set data(w:sizebox) [ide_sizebox $w.sizebox]
+ }
+
+ set data(pw:client) $data(w:text)
+}
+
+proc tixScrolledText:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:text) config \
+ -xscrollcommand "tixScrolledText:XScroll $w"\
+ -yscrollcommand "tixScrolledText:YScroll $w"
+
+ $data(w:hsb) config -command "$data(w:text) xview"
+ $data(w:vsb) config -command "$data(w:text) yview"
+}
+
+#----------------------------------------------------------------------
+#
+# option configs
+#----------------------------------------------------------------------
+proc tixScrolledText:config-takefocus {w value} {
+ upvar #0 $w data
+
+ $data(w:text) config -takefocus $value
+}
+
+proc tixScrolledText:config-scrollbar {w value} {
+ upvar #0 $w data
+
+ if {[string match "auto*" $value]} {
+ set value "both"
+ }
+ set data(-scrollbar) $value
+
+ tixChainMethod $w config-scrollbar $value
+
+ return $value
+}
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#----------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+# virtual functions to query the client window's scroll requirement
+#----------------------------------------------------------------------
+proc tixScrolledText:GeometryInfo {w mW mH} {
+ upvar #0 $w data
+
+ return [list "$data(x,first) $data(x,last)" "$data(y,first) $data(y,last)"]
+}
+
+proc tixScrolledText:XScroll {w first last} {
+ upvar #0 $w data
+
+ set data(x,first) $first
+ set data(x,last) $last
+
+ $data(w:hsb) set $first $last
+
+ tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+}
+
+proc tixScrolledText:YScroll {w first last} {
+ upvar #0 $w data
+
+ set data(y,first) $first
+ set data(y,last) $last
+
+ $data(w:vsb) set $first $last
+
+ tixWidgetDoWhenIdle tixScrolledWidget:Configure $w
+}
Added: external/tix-8.4.2.x/library/SWidget.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SWidget.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,465 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SWidget.tcl,v 1.5 2002/01/24 09:13:58 idiscovery Exp $
+#
+# SWidget.tcl --
+#
+# tixScrolledWidget: virtual base class. Do not instantiate
+# This is the core class for all scrolled widgets.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixScrolledWidget {
+ -virtual true
+ -classname TixScrolledWidget
+ -superclass tixPrimitive
+ -method {
+ }
+ -flag {
+ -scrollbar -scrollbarspace
+ }
+ -configspec {
+ {-scrollbar scrollbar Scrollbar both}
+ {-scrollbarspace scrollbarSpace ScrollbarSpace {both}}
+ {-sizebox sizeBox SizeBox 0}
+ }
+}
+
+proc tixScrolledWidget:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(x,first) 0
+ set data(x,last) 0
+
+ set data(y,first) 0
+ set data(y,last) 0
+
+ set data(lastSpec) ""
+ set data(lastMW) ""
+ set data(lastMH) ""
+ set data(lastScbW) ""
+ set data(lastScbH) ""
+
+ set data(repack) 0
+ set data(counter) 0
+
+ set data(vsbPadY) 0
+ set data(hsbPadX) 0
+}
+
+proc tixScrolledWidget:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ tixManageGeometry $data(pw:client) "tixScrolledWidget:ClientGeomProc $w"
+ bind $data(pw:client) <Configure> \
+ [list tixScrolledWidget:ClientGeomProc $w "" $data(pw:client)]
+
+ tixManageGeometry $data(w:hsb) "tixScrolledWidget:ClientGeomProc $w"
+ bind $data(w:hsb) <Configure> \
+ [list tixScrolledWidget:ClientGeomProc $w "" $data(w:hsb)]
+
+ tixManageGeometry $data(w:vsb) "tixScrolledWidget:ClientGeomProc $w"
+ bind $data(w:vsb) <Configure> \
+ [list tixScrolledWidget:ClientGeomProc $w "" $data(w:vsb)]
+
+ bind $w <Configure> "tixScrolledWidget:MasterGeomProc $w"
+
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ set data(repack) 1
+}
+
+proc tixScrolledWidget:config-scrollbar {w value} {
+ upvar #0 $w data
+ global tcl_platform
+
+ if {[lindex $value 0] == "auto"} {
+ foreach xspec [lrange $value 1 end] {
+ case $xspec {
+ {+x -x +y -y} {}
+ default {
+ error "bad -scrollbar value \"$value\""
+ }
+ }
+ }
+ } else {
+ case $value in {
+ {none x y both} {}
+ default {
+ error "bad -scrollbar value \"$value\""
+ }
+ }
+ }
+
+ if {$data(-sizebox) && $tcl_platform(platform) == "windows"} {
+ set data(-scrollbar) both
+ }
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ }
+}
+
+proc tixScrolledWidget:config-scrollbarspace {w value} {
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ }
+}
+
+proc tixScrolledWidget:config-sizebox {w value} {
+ error "unimplemented"
+}
+
+
+#----------------------------------------------------------------------
+#
+# Scrollbar calculations
+#
+#----------------------------------------------------------------------
+proc tixScrolledWidget:ClientGeomProc {w type client} {
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ }
+}
+
+proc tixScrolledWidget:MasterGeomProc {w} {
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ }
+}
+
+proc tixScrolledWidget:Configure {w} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ }
+}
+
+proc tixScrolledWidget:ScrollCmd {w scrollbar axis first last} {
+ upvar #0 $w data
+
+ $scrollbar set $first $last
+}
+
+# Show or hide the scrollbars as required.
+#
+# spec: 00 = need none
+# spec: 01 = need y
+# spec: 10 = need x
+# spec: 11 = need xy
+#
+proc tixScrolledWidget:Repack {w} {
+ tixCallMethod $w RepackHook
+}
+
+proc tixScrolledWidget:RepackHook {w} {
+ upvar #0 $w data
+ global tcl_platform
+
+ if {![winfo exists $w]} {
+ # This was generated by the <Destroy> event
+ #
+ return
+ }
+
+ set client $data(pw:client)
+
+ # Calculate the size of the master
+ #
+ set mreqw [winfo reqwidth $w]
+ set mreqh [winfo reqheight $w]
+ set creqw [winfo reqwidth $client]
+ set creqh [winfo reqheight $client]
+
+ set scbW [winfo reqwidth $w.vsb]
+ set scbH [winfo reqheight $w.hsb]
+
+ case $data(-scrollbarspace) {
+ "x" {
+ incr creqh $scbH
+ }
+ "y" {
+ incr creqw $scbW
+ }
+ "both" {
+ incr creqw $scbW
+ incr creqh $scbH
+ }
+ }
+
+ if {$data(-width) != 0} {
+ set creqw $data(-width)
+ }
+ if {$data(-height) != 0} {
+ set creqh $data(-height)
+ }
+
+ if {$mreqw != $creqw || $mreqh != $creqh } {
+ if {![info exists data(counter)]} {
+ set data(counter) 0
+ }
+ if {$data(counter) < 50} {
+ incr data(counter)
+ tixGeometryRequest $w $creqw $creqh
+ tixWidgetDoWhenIdle tixScrolledWidget:Repack $w
+ set data(repack) 1
+ return
+ }
+ }
+
+ set data(counter) 0
+ set mw [winfo width $w]
+ set mh [winfo height $w]
+
+ set cw [expr $mw - $scbW]
+ set ch [expr $mh - $scbH]
+
+ set scbx [expr $mw - $scbW]
+ set scby [expr $mh - $scbH]
+
+ # Check the validity of the sizes: if window was not mapped then
+ # sizes will be below 1x1
+ if {$cw < 1} {
+ set cw 1
+ }
+ if {$ch < 1} {
+ set ch 1
+ }
+ if {$scbx < 1} {
+ set scbx 1
+ }
+ if {$scby < 1} {
+ set scby 1
+ }
+
+ if {[lindex $data(-scrollbar) 0] == "auto"} {
+ # Find out how we are going to pack the scrollbars
+ #
+ set spec [tixScrolledWidget:CheckScrollbars $w $scbW $scbH]
+
+ foreach xspec [lrange $data(-scrollbar) 1 end] {
+ case $xspec {
+ +x {
+ set spec [expr $spec | 10]
+ }
+ -x {
+ set spec [expr $spec & 01]
+ }
+ +y {
+ set spec [expr $spec | 01]
+ }
+ -y {
+ set spec [expr $spec & 10]
+ }
+ }
+ }
+ if {$spec == 0} {
+ set spec 00
+ }
+ if {$spec == 1} {
+ set spec 01
+ }
+ } else {
+ case $data(-scrollbar) in {
+ none {
+ set spec 00
+ }
+ x {
+ set spec 10
+ }
+ y {
+ set spec 01
+ }
+ both {
+ set spec 11
+ }
+ }
+ }
+
+
+ if {$data(lastSpec)==$spec && $data(lastMW)==$mw && $data(lastMH)==$mh} {
+ if {$data(lastScbW) == $scbW && $data(lastScbH) == $scbH} {
+ tixCallMethod $w PlaceWindow
+ set data(repack) 0
+ return
+ }
+ }
+
+ set vsbH [expr $mh - $data(vsbPadY)]
+ set hsbW [expr $mw - $data(hsbPadX)]
+
+ if {$vsbH < 1} {
+ set vsbH 1
+ }
+ if {$hsbW < 1} {
+ set hsbW 1
+ }
+
+ case $spec in {
+ "00" {
+ tixMoveResizeWindow $client 0 0 $mw $mh
+
+ tixMapWindow $client
+ tixUnmapWindow $data(w:hsb)
+ tixUnmapWindow $data(w:vsb)
+ }
+ "01" {
+ tixMoveResizeWindow $client 0 0 $cw $mh
+ tixMoveResizeWindow $data(w:vsb) $scbx $data(vsbPadY) $scbW $vsbH
+
+ tixMapWindow $client
+ tixUnmapWindow $data(w:hsb)
+ tixMapWindow $data(w:vsb)
+ }
+ "10" {
+ tixMoveResizeWindow $client 0 0 $mw $ch
+ tixMoveResizeWindow $data(w:hsb) $data(hsbPadX) $scby $hsbW $scbH
+
+ tixMapWindow $client
+ tixMapWindow $data(w:hsb)
+ tixUnmapWindow $data(w:vsb)
+ }
+ "11" {
+ set vsbH [expr $ch - $data(vsbPadY)]
+ set hsbW [expr $cw - $data(hsbPadX)]
+ if {$vsbH < 1} {
+ set vsbH 1
+ }
+ if {$hsbW < 1} {
+ set hsbW 1
+ }
+
+ tixMoveResizeWindow $client 0 0 $cw $ch
+ tixMoveResizeWindow $data(w:vsb) $scbx $data(vsbPadY) $scbW $vsbH
+ tixMoveResizeWindow $data(w:hsb) $data(hsbPadX) $scby $hsbW $scbH
+ if {$data(-sizebox) && $tcl_platform(platform) == "windows"} {
+ tixMoveResizeWindow $data(w:sizebox) $scbx $scby $scbW $scbH
+ }
+
+ tixMapWindow $client
+ tixMapWindow $data(w:hsb)
+ tixMapWindow $data(w:vsb)
+ if {$data(-sizebox) && $tcl_platform(platform) == "windows"} {
+ tixMapWindow $data(w:sizebox)
+ }
+ }
+ }
+
+ set data(lastSpec) $spec
+ set data(lastMW) $mw
+ set data(lastMH) $mh
+ set data(lastScbW) $scbW
+ set data(lastScbH) $scbH
+
+ tixCallMethod $w PlaceWindow
+ set data(repack) 0
+}
+
+proc tixScrolledWidget:PlaceWindow {w} {
+ # virtual base function
+}
+
+#
+# Helper function
+#
+proc tixScrolledWidget:NeedScrollbar {w axis} {
+ upvar #0 $w data
+
+ if {$data($axis,first) > 0.0} {
+ return 1
+ }
+
+ if {$data($axis,last) < 1.0} {
+ return 1
+ }
+
+ return 0
+}
+
+# Return whether H and V needs scrollbars in a list of two booleans
+#
+#
+proc tixScrolledWidget:CheckScrollbars {w scbW scbH} {
+ upvar #0 $w data
+
+ set mW [winfo width $w]
+ set mH [winfo height $w]
+
+ set info [tixCallMethod $w GeometryInfo $mW $mH]
+
+ if {$info != ""} {
+ set xSpec [lindex $info 0]
+ set ySpec [lindex $info 1]
+
+ set data(x,first) [lindex $xSpec 0]
+ set data(x,last) [lindex $xSpec 1]
+
+ set data(y,first) [lindex $ySpec 0]
+ set data(y,last) [lindex $ySpec 1]
+ }
+
+ set needX [tixScrolledWidget:NeedScrollbar $w x]
+ set needY [tixScrolledWidget:NeedScrollbar $w y]
+
+ if {[winfo ismapped $w]==0} {
+ return "$needX$needY"
+ }
+
+ if {$needX && $needY} {
+ return 11
+ }
+
+ if {$needX == 0 && $needY == 0} {
+ return 00
+ }
+
+ if {$needX} {
+ set mH [expr $mH - $scbH]
+ }
+ if {$needY} {
+ set mW [expr $mW - $scbW]
+ }
+
+ set info [tixCallMethod $w GeometryInfo $mW $mH]
+ if {$info != ""} {
+ set xSpec [lindex $info 0]
+ set ySpec [lindex $info 1]
+
+ set data(x,first) [lindex $xSpec 0]
+ set data(x,last) [lindex $xSpec 1]
+
+ set data(y,first) [lindex $ySpec 0]
+ set data(y,last) [lindex $ySpec 1]
+ }
+
+ set needX [tixScrolledWidget:NeedScrollbar $w x]
+ set needY [tixScrolledWidget:NeedScrollbar $w y]
+
+ return "$needX$needY"
+}
+
Added: external/tix-8.4.2.x/library/SWindow.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SWindow.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,274 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SWindow.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
+#
+# SWindow.tcl --
+#
+# This file implements Scrolled Window widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+#
+#
+# Example:
+#
+# tixScrolledWindow .w
+# set window [.w subwidget window]
+# # Now you can put a whole widget hierachy inside $window.
+# #
+# button $window.b
+# pack $window.b
+#
+# Author's note
+#
+# Note, the current implementation does not allow the child window
+# to be outside of the parent window when the parent's size is larger
+# than the child's size. This is fine for normal operations. However,
+# it is not suitable for an MDI master window. Therefore, you will notice
+# that the MDI master window is not a subclass of ScrolledWidget at all.
+#
+#
+
+tixWidgetClass tixScrolledWindow {
+ -classname TixScrolledWindow
+ -superclass tixScrolledWidget
+ -method {
+ }
+ -flag {
+ -expandmode -shrink -xscrollincrement -yscrollincrement
+ }
+ -static {
+ }
+ -configspec {
+ {-expandmode expandMode ExpandMode expand}
+ {-shrink shrink Shrink ""}
+ {-xscrollincrement xScrollIncrement ScrollIncrement ""}
+ {-yscrollincrement yScrollIncrement ScrollIncrement ""}
+
+ {-scrollbarspace scrollbarSpace ScrollbarSpace {both}}
+ }
+ -default {
+ {.scrollbar auto}
+ {*window.borderWidth 1}
+ {*f1.borderWidth 1}
+ {*Scrollbar.borderWidth 1}
+ {*Scrollbar.takeFocus 0}
+ }
+}
+
+proc tixScrolledWindow:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(dx) 0
+ set data(dy) 0
+}
+
+proc tixScrolledWindow:ConstructWidget {w} {
+ upvar #0 $w data
+ global tcl_platform
+
+ tixChainMethod $w ConstructWidget
+
+ set data(pw:f1) \
+ [frame $w.f1 -relief sunken]
+ set data(pw:f2) \
+ [frame $w.f2 -bd 0]
+ set data(w:window) \
+ [frame $w.f2.window -bd 0]
+ pack $data(pw:f2) -in $data(pw:f1) -expand yes -fill both
+
+ set data(w:hsb) \
+ [scrollbar $w.hsb -orient horizontal -takefocus 0]
+ set data(w:vsb) \
+ [scrollbar $w.vsb -orient vertical -takefocus 0]
+# set data(w:pann) \
+# [frame $w.pann -bd 2 -relief groove]
+
+ $data(pw:f1) config -highlightthickness \
+ [$data(w:hsb) cget -highlightthickness]
+
+ set data(pw:client) $data(pw:f1)
+}
+
+proc tixScrolledWindow:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:hsb) config -command "tixScrolledWindow:ScrollBarCB $w x"
+ $data(w:vsb) config -command "tixScrolledWindow:ScrollBarCB $w y"
+
+ tixManageGeometry $data(w:window) "tixScrolledWindow:WindowGeomProc $w"
+}
+
+# This guy just keeps asking for a same size as the w:window
+#
+proc tixScrolledWindow:WindowGeomProc {w args} {
+ upvar #0 $w data
+
+ set rw [winfo reqwidth $data(w:window)]
+ set rh [winfo reqheight $data(w:window)]
+
+ if {$rw != [winfo reqwidth $data(pw:f2)] ||
+ $rh != [winfo reqheight $data(pw:f2)]} {
+ tixGeometryRequest $data(pw:f2) $rw $rh
+ }
+}
+
+proc tixScrolledWindow:Scroll {w axis total window first args} {
+ upvar #0 $w data
+
+ case [lindex $args 0] {
+ "scroll" {
+ set amt [lindex $args 1]
+ set unit [lindex $args 2]
+
+ case $unit {
+ "units" {
+ set incr $axis\scrollincrement
+ if {$data(-$incr) != ""} {
+ set by $data(-$incr)
+ } else {
+ set by [expr $window / 16]
+ }
+ set first [expr $first + $amt * $by]
+ }
+ "pages" {
+ set first [expr $first + $amt * $window]
+ }
+ }
+ }
+ "moveto" {
+ set to [lindex $args 1]
+ set first [expr int($to * $total)]
+ }
+ }
+
+ if {[expr $first + $window] > $total} {
+ set first [expr $total - $window]
+ }
+ if {$first < 0} {
+ set first 0
+ }
+
+ return $first
+}
+
+proc tixScrolledWindow:ScrollBarCB {w axis args} {
+ upvar #0 $w data
+
+ set bd \
+ [expr [$data(pw:f1) cget -bd] + [$data(pw:f1) cget -highlightthickness]]
+ set fw [expr [winfo width $data(pw:f1)] - 2*$bd]
+ set fh [expr [winfo height $data(pw:f1)] - 2*$bd]
+ set ww [winfo reqwidth $data(w:window)]
+ set wh [winfo reqheight $data(w:window)]
+
+ if {$axis == "x"} {
+ set data(dx) \
+ [eval tixScrolledWindow:Scroll $w $axis $ww $fw $data(dx) $args]
+ } else {
+ set data(dy) \
+ [eval tixScrolledWindow:Scroll $w $axis $wh $fh $data(dy) $args]
+ }
+
+ tixWidgetDoWhenIdle tixScrolledWindow:PlaceWindow $w
+}
+
+proc tixScrolledWindow:PlaceWindow {w} {
+ upvar #0 $w data
+
+ set bd \
+ [expr [$data(pw:f1) cget -bd] + [$data(pw:f1) cget -highlightthickness]]
+ set fw [expr [winfo width $data(pw:f1)] - 2*$bd]
+ set fh [expr [winfo height $data(pw:f1)] - 2*$bd]
+ set ww [winfo reqwidth $data(w:window)]
+ set wh [winfo reqheight $data(w:window)]
+
+ tixMapWindow $data(w:window)
+
+ if {$data(-expandmode) == "expand"} {
+ if {$ww < $fw} {
+ set ww $fw
+ }
+ if {$wh < $fh} {
+ set wh $fh
+ }
+ }
+ if {$data(-shrink) == "x"} {
+ if {$fw < $ww} {
+ set ww $fw
+ }
+ }
+
+ tixMoveResizeWindow $data(w:window) -$data(dx) -$data(dy) $ww $wh
+
+ set first [expr $data(dx).0 / $ww.0]
+ set last [expr $first + ($fw.0 / $ww.0)]
+ $data(w:hsb) set $first $last
+
+ set first [expr $data(dy).0 / $wh.0]
+ set last [expr $first + ($fh.0 / $wh.0)]
+ $data(w:vsb) set $first $last
+}
+
+#----------------------------------------------------------------------
+# virtual functions to query the client window's scroll requirement
+#
+# When this function is called, the scrolled window is going to be
+# mapped, if it is still unmapped. Also, it is going to change its
+# size. Therefore, it is a good time to check whether the w:window needs
+# to be re-positioned due to the new parent window size.
+#----------------------------------------------------------------------
+proc tixScrolledWindow:GeometryInfo {w mW mH} {
+ upvar #0 $w data
+
+ set bd \
+ [expr [$data(pw:f1) cget -bd] + [$data(pw:f1) cget -highlightthickness]]
+ set fw [expr $mW -2*$bd]
+ set fh [expr $mH -2*$bd]
+ set ww [winfo reqwidth $data(w:window)]
+ set wh [winfo reqheight $data(w:window)]
+
+ # Calculate the X info
+ #
+ if {$fw >= $ww} {
+ if {$data(dx) > 0} {
+ set data(dx) 0
+ }
+ set xinfo [list 0.0 1.0]
+ } else {
+ set maxdx [expr $ww - $fw]
+ if {$data(dx) > $maxdx} {
+ set data(dx) $maxdx
+ }
+ set first [expr $data(dx).0 / $ww.0]
+ set last [expr $first + ($fw.0 / $ww.0)]
+ set xinfo [list $first $last]
+ }
+ # Calculate the Y info
+ #
+ if {$fh >= $wh} {
+ if {$data(dy) > 0} {
+ set data(dy) 0
+ }
+ set yinfo [list 0.0 1.0]
+ } else {
+ set maxdy [expr $wh - $fh]
+ if {$data(dy) > $maxdy} {
+ set data(dy) $maxdy
+ }
+ set first [expr $data(dy).0 / $wh.0]
+ set last [expr $first + ($fh.0 / $wh.0)]
+ set yinfo [list $first $last]
+ }
+
+ return [list $xinfo $yinfo]
+}
Added: external/tix-8.4.2.x/library/Select.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Select.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,300 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Select.tcl,v 1.3 2001/12/09 05:04:02 idiscovery Exp $
+#
+# Select.tcl --
+#
+# Implement the tixSelect widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixSelect {
+ -superclass tixLabelWidget
+ -classname TixSelect
+ -method {
+ add button invoke
+ }
+ -flag {
+ -allowzero -buttontype -command -disablecallback -orientation
+ -orient -padx -pady -radio -selectedbg -state -validatecmd
+ -value -variable
+ }
+ -forcecall {
+ -variable -state
+ }
+ -static {
+ -allowzero -orientation -padx -pady -radio
+ }
+ -configspec {
+ {-allowzero allowZero AllowZero 0 tixVerifyBoolean}
+ {-buttontype buttonType ButtonType button}
+ {-command command Command ""}
+ {-disablecallback disableCallback DisableCallback 0 tixVerifyBoolean}
+ {-orientation orientation Orientation horizontal}
+ {-padx padx Pad 0}
+ {-pady pady Pad 0}
+ {-radio radio Radio 0 tixVerifyBoolean}
+ {-selectedbg selectedBg SelectedBg gray}
+ {-state state State normal}
+ {-validatecmd validateCmd ValidateCmd ""}
+ {-value value Value ""}
+ {-variable variable Variable ""}
+ }
+ -alias {
+ {-orient -orientation}
+ }
+ -default {
+ {*frame.borderWidth 1}
+ {*frame.relief sunken}
+ {*Button.borderWidth 2}
+ {*Button.highlightThickness 0}
+ }
+}
+
+proc tixSelect:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+ set data(items) ""
+ set data(buttonbg) ""
+ set data(varInited) 0
+}
+
+#----------------------------------------------------------------------
+# CONFIG OPTIONS
+#----------------------------------------------------------------------
+proc tixSelect:config-state {w arg} {
+ upvar #0 $w data
+
+ if {$arg == "disabled"} {
+ foreach item $data(items) {
+ $data(w:$item) config -state disabled -relief raised \
+ -bg $data(buttonbg)
+ }
+ if {![info exists data(labelFg)]} {
+ set data(labelFg) [$data(w:label) cget -foreground]
+ catch {
+ $data(w:label) config -fg [tix option get disabled_fg]
+ }
+ }
+ } else {
+ foreach item $data(items) {
+ if {[lsearch $data(-value) $item] != -1} {
+ # This button is selected
+ #
+ $data(w:$item) config -relief sunken -bg $data(-selectedbg) \
+ -state normal
+ } else {
+ $data(w:$item) config -relief raised -bg $data(buttonbg) \
+ -command "$w invoke $item" -state normal
+ }
+ }
+ if {[info exists data(labelFg)]} {
+ catch {
+ $data(w:label) config -fg $data(labelFg)
+ }
+ unset data(labelFg)
+ }
+ }
+
+ return ""
+}
+
+proc tixSelect:config-variable {w arg} {
+ upvar #0 $w data
+
+ set oldValue $data(-value)
+
+ if {[tixVariable:ConfigVariable $w $arg]} {
+ # The value of data(-value) is changed if tixVariable:ConfigVariable
+ # returns true
+ set newValue $data(-value)
+ set data(-value) $oldValue
+ tixSelect:config-value $w $newValue
+ }
+ catch {
+ unset data(varInited)
+ }
+ set data(-variable) $arg
+}
+
+proc tixSelect:config-value {w value} {
+ upvar #0 $w data
+
+ # sanity checking
+ #
+ foreach item $value {
+ if {[lsearch $data(items) $item] == "-1"} {
+ error "subwidget \"$item\" does not exist"
+ }
+ }
+
+ tixSelect:SetValue $w $value
+}
+
+#----------------------------------------------------------------------
+# WIDGET COMMANDS
+#----------------------------------------------------------------------
+proc tixSelect:add {w name args} {
+ upvar #0 $w data
+
+ set data(w:$name) [eval $data(-buttontype) $data(w:frame).$name -command \
+ [list "$w invoke $name"] -takefocus 0 $args]
+
+ if {$data(-orientation) == "horizontal"} {
+ pack $data(w:$name) -side left -expand yes -fill y\
+ -padx $data(-padx) -pady $data(-pady)
+ } else {
+ pack $data(w:$name) -side top -expand yes -fill x\
+ -padx $data(-padx) -pady $data(-pady)
+ }
+
+ if {$data(-state) == "disabled"} {
+ $data(w:$name) config -relief raised -state disabled
+ }
+
+ # find out the background of the buttons
+ #
+ if {$data(buttonbg) == ""} {
+ set data(buttonbg) [lindex [$data(w:$name) config -background] 4]
+
+ }
+
+ lappend data(items) $name
+}
+
+# Obsolete command
+#
+proc tixSelect:button {w name args} {
+ upvar #0 $w data
+
+ if {$args != ""} {
+ return [eval $data(w:$name) $args]
+ } else {
+ return $w.$name
+ }
+}
+
+# This is called when a button is invoked
+#
+proc tixSelect:invoke {w button} {
+ upvar #0 $w data
+
+ if {$data(-state) != "normal"} {
+ return
+ }
+
+ set newValue $data(-value)
+
+ if {[lsearch $data(-value) $button] != -1} {
+ # This button was selected
+ #
+ if {[llength $data(-value)] > 1 || [tixGetBoolean $data(-allowzero)]} {
+
+ # Take the button from the selected list
+ #
+ set newValue ""
+ foreach item $data(-value) {
+ if {$item != $button} {
+ lappend newValue $item
+ }
+ }
+ }
+ } else {
+ # This button was not selected
+ #
+ if {[tixGetBoolean $data(-radio)]} {
+ # The button become the sole item in the list
+ #
+ set newValue [list $button]
+ } else {
+ # Add this button into the list
+ #
+ lappend newValue $button
+ }
+ }
+
+ if {$newValue != $data(-value)} {
+ tixSelect:SetValue $w $newValue
+ }
+}
+
+#----------------------------------------------------------------------
+# Private functions
+#----------------------------------------------------------------------
+proc tixSelect:SetValue {w newValue {noUpdate 0}} {
+ upvar #0 $w data
+
+ set oldValue $data(-value)
+
+ if {$data(-validatecmd) != ""} {
+ set data(-value) [tixEvalCmdBinding $w $data(-validatecmd) "" $newValue]
+ } else {
+ if {[tixGetBoolean $data(-radio)] && [llength $newValue] > 1} {
+ error "cannot choose more than one items in a radio box"
+ }
+
+ if {![tixGetBoolean $data(-allowzero)] && [llength $newValue] == 0} {
+ error "empty selection not allowed"
+ }
+
+ set data(-value) $newValue
+ }
+
+ if {! $noUpdate} {
+ tixVariable:UpdateVariable $w
+ }
+
+ # Reset all to be unselected
+ #
+ foreach item $data(items) {
+ if {[lsearch $data(-value) $item] == -1} {
+ # Is unselected
+ #
+ if {[lsearch $oldValue $item] != -1} {
+ # was selected
+ # -> popup the button, call command
+ #
+ $data(w:$item) config -relief raised -bg $data(buttonbg)
+ tixSelect:CallCommand $w $item 0
+ }
+ } else {
+ # Is selected
+ #
+ if {[lsearch $oldValue $item] == -1} {
+ # was unselected
+ # -> push down the button, call command
+ #
+ $data(w:$item) config -relief sunken -bg $data(-selectedbg)
+ tixSelect:CallCommand $w $item 1
+ }
+ }
+ }
+}
+
+proc tixSelect:CallCommand {w name value} {
+ upvar #0 $w data
+
+ if {!$data(-disablecallback) && $data(-command) != ""} {
+ if {![info exists data(varInited)]} {
+ set bind(specs) "name value"
+ set bind(name) $name
+ set bind(value) $value
+ tixEvalCmdBinding $w $data(-command) bind $name $value
+ }
+ }
+}
+
+proc tixSelect:Destructor {w} {
+
+ tixVariable:DeleteVariable $w
+
+ # Chain this to the superclass
+ #
+ tixChainMethod $w Destructor
+}
Added: external/tix-8.4.2.x/library/Shell.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Shell.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Shell.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# Shell.tcl --
+#
+# This is the base class to all shell widget
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+#
+# type : normal, transient, overrideredirect
+#
+tixWidgetClass tixShell {
+ -superclass tixPrimitive
+ -classname TixShell
+ -flag {
+ -title
+ }
+ -configspec {
+ {-title title Title ""}
+ }
+ -forcecall {
+ -title
+ }
+}
+
+#----------------------------------------------------------------------
+# ClassInitialization:
+#----------------------------------------------------------------------
+proc tixShell:CreateRootWidget {w args} {
+ upvar #0 $w data
+ upvar #0 $data(className) classRec
+
+ toplevel $w -class $data(ClassName)
+ wm transient $w ""
+ wm withdraw $w
+}
+
+proc tixShell:config-title {w value} {
+ wm title $w $value
+}
Added: external/tix-8.4.2.x/library/SimpDlg.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/SimpDlg.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: SimpDlg.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# SimpDlg.tcl --
+#
+# This file implements Simple Dialog widgets
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixSimpleDialog {
+ -classname TixSimpleDialog
+ -superclass tixDialogShell
+ -method {}
+ -flag {
+ -buttons -message -type
+ }
+ -configspec {
+ {-buttons buttons Buttons ""}
+ {-message message Message ""}
+ {-type type Type info}
+ }
+}
+
+proc tixSimpleDialog:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ frame $w.top
+
+ label $w.top.icon -image [tix getimage $data(-type)]
+ label $w.top.message -text $data(-message)
+
+ pack $w.top.icon -side left -padx 20 -pady 50 -anchor c
+ pack $w.top.message -side left -padx 10 -pady 50 -anchor c
+
+ frame $w.bot
+
+ pack $w.bot -side bottom -fill x
+ pack $w.top -side top -expand yes -fill both
+}
Added: external/tix-8.4.2.x/library/StackWin.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/StackWin.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,84 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: StackWin.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
+#
+# StackWin.tcl --
+#
+# Similar to NoteBook but uses a Select widget to represent the pages.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixStackWindow {
+ -classname TixStackWindow
+ -superclass tixVStack
+ -method {
+ }
+ -flag {
+ }
+ -configspec {
+ }
+}
+
+proc tixStackWindow:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(w:tabs) [tixSelect $w.tabs]
+
+ # We can't use the packer because it will conflict with the
+ # geometry management of the VStack widget.
+ #
+ tixManageGeometry $data(w:tabs) [list tixVStack:ClientGeomProc $w]
+}
+
+proc tixStackWindow:add {w child args} {
+ upvar #0 $w data
+
+ set ret [eval [list tixChainMethod $w add $child] $args]
+
+ # Find out the -label option
+ #
+ foreach {flag value} $args {
+ if {$flag eq "-label"} {
+ set label $value
+ }
+ }
+
+ $data(w:tabs) add $child -command [list $w raise $child] -text $label
+
+ return $ret
+}
+
+proc tixStackWindow:raise {w child} {
+ upvar #0 $w data
+
+ $data(w:tabs) config -value $child
+
+ tixChainMethod $w raise $child
+}
+
+proc tixStackWindow:Resize {w} {
+ upvar #0 $w data
+
+ # We have to take care of the size of the tabs so that
+ #
+ set tW [winfo reqwidth $data(w:tabs)]
+ set tH [winfo reqheight $data(w:tabs)]
+
+ tixMoveResizeWindow $data(w:tabs) $data(-ipadx) $data(-ipady) $tW $tH
+ tixMapWindow $data(w:tabs)
+
+ set data(pad-y1) [expr $tH + $data(-ipadx)]
+ set data(minW) [expr $tW + 2 * $data(-ipadx)]
+ set data(minH) [expr $tH + 2 * $data(-ipady)]
+
+ # Now that we know data(pad-y1), we can chain the call
+ #
+ tixChainMethod $w Resize
+}
Added: external/tix-8.4.2.x/library/StatBar.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/StatBar.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,56 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: StatBar.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# StatBar.tcl --
+#
+# The StatusBar of an application.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixStatusBar {
+ -classname TixStatusBar
+ -superclass tixPrimitive
+ -method {
+ }
+ -flag {
+ -fields
+ }
+ -static {
+ -fields
+ }
+ -configspec {
+ {-fields fields Fields ""}
+ }
+}
+
+#--------------------------
+# Create Widget
+#--------------------------
+proc tixStatusBar:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ foreach field $data(-fields) {
+ set name [lindex $field 0]
+ set width [lindex $field 1]
+
+ set data(w:width) [label $w.$name -width $width]
+ }
+}
+
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+
+
+#----------------------------------------------------------------------
+# Internal commands
+#----------------------------------------------------------------------
Added: external/tix-8.4.2.x/library/StdBBox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/StdBBox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,71 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: StdBBox.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# StdBBox.tcl --
+#
+# Standard Button Box, used in standard dialog boxes
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+
+tixWidgetClass tixStdButtonBox {
+ -classname TixStdButtonBox
+ -superclass tixButtonBox
+ -flag {
+ -applycmd -cancelcmd -helpcmd -okcmd
+ }
+ -configspec {
+ {-applycmd applyCmd ApplyCmd ""}
+ {-cancelcmd cancelCmd CancelCmd ""}
+ {-helpcmd helpCmd HelpCmd ""}
+ {-okcmd okCmd OkCmd ""}
+ }
+ -default {
+ {.borderWidth 1}
+ {.relief raised}
+ {.padX 5}
+ {.padY 10}
+ {*Button.anchor c}
+ {*Button.padX 5}
+ }
+}
+
+proc tixStdButtonBox:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ $w add ok -text OK -under 0 -width 6 -command $data(-okcmd)
+ $w add apply -text Apply -under 0 -width 6 -command $data(-applycmd)
+ $w add cancel -text Cancel -under 0 -width 6 -command $data(-cancelcmd)
+ $w add help -text Help -under 0 -width 6 -command $data(-helpcmd)
+}
+
+proc tixStdButtonBox:config {w flag value} {
+ upvar #0 $w data
+
+ case $flag {
+ -okcmd {
+ $data(w:ok) config -command $value
+ }
+ -applycmd {
+ $data(w:apply) config -command $value
+ }
+ -cancelcmd {
+ $data(w:cancel) config -command $value
+ }
+ -helpcmd {
+ $data(w:help) config -command $value
+ }
+ default {
+ tixChainMethod $w config $flag $value
+ }
+ }
+}
Added: external/tix-8.4.2.x/library/StdShell.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/StdShell.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: StdShell.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# StdShell.tcl --
+#
+# Standard Dialog Shell.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixStdDialogShell {
+ -classname TixStdDialogShell
+ -superclass tixDialogShell
+ -method {}
+ -flag {
+ -cached
+ }
+ -configspec {
+ {-cached cached Cached ""}
+ }
+}
+
+proc tixStdDialogShell:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+ set data(w:btns) [tixStdButtonBox $w.btns]
+ set data(w_tframe) [frame $w.tframe]
+
+ pack $data(w_tframe) -side top -expand yes -fill both
+ pack $data(w:btns) -side bottom -fill both
+
+ tixCallMethod $w ConstructTopFrame $data(w_tframe)
+}
+
+
+# Subclasses of StdDialogShell should override this method instead of
+# ConstructWidget.
+#
+# Override : always
+# chain : before
+proc tixStdDialogShell:ConstructTopFrame {w frame} {
+ # Do nothing
+}
Added: external/tix-8.4.2.x/library/TList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/TList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,953 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: TList.tcl,v 1.6 2002/01/24 09:13:58 idiscovery Exp $
+#
+# TList.tcl --
+#
+# This file defines the default bindings for Tix Tabular Listbox
+# widgets.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+global tkPriv
+if {![llength [info globals tkPriv]]} {
+ tk::unsupported::ExposePrivateVariable tkPriv
+}
+
+#--------------------------------------------------------------------------
+# tkPriv elements used in this file:
+#
+# afterId - Token returned by "after" for autoscanning.
+# fakeRelease - Cancel the ButtonRelease-1 after the user double click
+#--------------------------------------------------------------------------
+#
+proc tixTListBind {} {
+ tixBind TixTList <ButtonPress-1> {
+ tixTList:Button-1 %W %x %y
+ }
+ tixBind TixTList <Shift-ButtonPress-1> {
+ tixTList:Shift-Button-1 %W %x %y
+ }
+ tixBind TixTList <Control-ButtonPress-1> {
+ tixTList:Control-Button-1 %W %x %y
+ }
+ tixBind TixTList <ButtonRelease-1> {
+ tixTList:ButtonRelease-1 %W %x %y
+ }
+ tixBind TixTList <Double-ButtonPress-1> {
+ tixTList:Double-1 %W %x %y
+ }
+ tixBind TixTList <B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixTList:B1-Motion %W %x %y
+ }
+ tixBind TixTList <Control-B1-Motion> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixTList:Control-B1-Motion %W %x %y
+ }
+ tixBind TixTList <B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixTList:B1-Leave %W
+ }
+ tixBind TixTList <B1-Enter> {
+ tixTList:B1-Enter %W %x %y
+ }
+ tixBind TixTList <Control-B1-Leave> {
+ set tkPriv(x) %x
+ set tkPriv(y) %y
+ set tkPriv(X) %X
+ set tkPriv(Y) %Y
+
+ tixTList:Control-B1-Leave %W
+ }
+ tixBind TixTList <Control-B1-Enter> {
+ tixTList:Control-B1-Enter %W %x %y
+ }
+
+ # Keyboard bindings
+ #
+ tixBind TixTList <Up> {
+ tixTList:DirKey %W up
+ }
+ tixBind TixTList <Down> {
+ tixTList:DirKey %W down
+ }
+ tixBind TixTList <Left> {
+ tixTList:DirKey %W left
+ }
+ tixBind TixTList <Right> {
+ tixTList:DirKey %W right
+ }
+ tixBind TixTList <Prior> {
+ %W yview scroll -1 pages
+ }
+ tixBind TixTList <Next> {
+ %W yview scroll 1 pages
+ }
+ tixBind TixTList <Return> {
+ tixTList:Return %W
+ }
+ tixBind TixTList <space> {
+ tixTList:Space %W
+ }
+ #
+ # Don't use tixBind because %A causes Tk 8.3.2 to crash
+ #
+ bind TixTList <MouseWheel> {
+ if {"[%W cget -orient]" == "vertical"} {
+ %W xview scroll [expr {- (%D / 120) * 4}] units
+ } else {
+ %W yview scroll [expr {- (%D / 120) * 2}] units
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Mouse bindings
+#
+#
+#----------------------------------------------------------------------
+
+proc tixTList:Button-1 {w x y} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ if {[$w cget -takefocus]} {
+ focus $w
+ }
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s1 $w $x $y
+ }
+ {b0} {
+ tixTList:GoState b1 $w $x $y
+ }
+ {m0} {
+ tixTList:GoState m1 $w $x $y
+ }
+ {e0} {
+ tixTList:GoState e1 $w $x $y
+ }
+ }
+}
+
+proc tixTList:Shift-Button-1 {w x y} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ if {[$w cget -takefocus]} {
+ focus $w
+ }
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s1 $w $x $y
+ }
+ {b0} {
+ tixTList:GoState b1 $w $x $y
+ }
+ {m0} {
+ tixTList:GoState m7 $w $x $y
+ }
+ {e0} {
+ tixTList:GoState e7 $w $x $y
+ }
+ }
+}
+
+proc tixTList:Control-Button-1 {w x y} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ if {[$w cget -takefocus]} {
+ focus $w
+ }
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s1 $w $x $y
+ }
+ {b0} {
+ tixTList:GoState b1 $w $x $y
+ }
+ {m0} {
+ tixTList:GoState m1 $w $x $y
+ }
+ {e0} {
+ tixTList:GoState e10 $w $x $y
+ }
+ }
+}
+
+proc tixTList:ButtonRelease-1 {w x y} {
+ case [tixTList:GetState $w] {
+ {s2 s4 s5 s6} {
+ tixTList:GoState s3 $w
+ }
+ {b2 b4 b5 b6} {
+ tixTList:GoState b3 $w
+ }
+ {m2} {
+ tixTList:GoState m3 $w
+ }
+ {m5} {
+ tixTList:GoState m6 $w $x $y
+ }
+ {m9} {
+ tixTList:GoState m0 $w
+ }
+ {e2} {
+ tixTList:GoState e3 $w
+ }
+ {e5} {
+ tixTList:GoState e6 $w $x $y
+ }
+ {e9} {
+ tixTList:GoState e0 $w
+ }
+ }
+}
+
+proc tixTList:B1-Motion {w x y} {
+ case [tixTList:GetState $w] {
+ {s2 s4} {
+ tixTList:GoState s4 $w $x $y
+ }
+ {b2 b4} {
+ tixTList:GoState b4 $w $x $y
+ }
+ {m2 m5} {
+ tixTList:GoState m4 $w $x $y
+ }
+ {e2 e5} {
+ tixTList:GoState e4 $w $x $y
+ }
+ }
+}
+
+proc tixTList:Control-B1-Motion {w x y} {
+ case [tixTList:GetState $w] {
+ {s2 s4} {
+ tixTList:GoState s4 $w $x $y
+ }
+ {b2 b4} {
+ tixTList:GoState b4 $w $x $y
+ }
+ {m2 m5} {
+ tixTList:GoState m4 $w $x $y
+ }
+ }
+}
+
+proc tixTList:Double-1 {w x y} {
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s7 $w $x $y
+ }
+ {b0} {
+ tixTList:GoState b7 $w $x $y
+ }
+ }
+}
+
+proc tixTList:B1-Leave {w} {
+ case [tixTList:GetState $w] {
+ {s2 s4} {
+ tixTList:GoState s5 $w
+ }
+ {b2 b4} {
+ tixTList:GoState b5 $w
+ }
+ {m2 m5} {
+ tixTList:GoState m8 $w
+ }
+ {e2 e5} {
+ tixTList:GoState e8 $w
+ }
+ }
+}
+
+proc tixTList:B1-Enter {w x y} {
+ case [tixTList:GetState $w] {
+ {s5 s6} {
+ tixTList:GoState s4 $w $x $y
+ }
+ {b5 b6} {
+ tixTList:GoState b4 $w $x $y
+ }
+ {m8 m9} {
+ tixTList:GoState m4 $w $x $y
+ }
+ {e8 e9} {
+ tixTList:GoState e4 $w $x $y
+ }
+ }
+}
+
+proc tixTList:Control-B1-Leave {w} {
+ case [tixTList:GetState $w] {
+ {s2 s4} {
+ tixTList:GoState s5 $w
+ }
+ {b2 b4} {
+ tixTList:GoState b5 $w
+ }
+ {m2 m5} {
+ tixTList:GoState m8 $w
+ }
+ }
+}
+
+proc tixTList:Control-B1-Enter {w x y} {
+ case [tixTList:GetState $w] {
+ {s5 s6} {
+ tixTList:GoState s4 $w $x $y
+ }
+ {b5 b6} {
+ tixTList:GoState b4 $w $x $y
+ }
+ {m8 m9} {
+ tixTList:GoState m4 $w $x $y
+ }
+ }
+}
+
+proc tixTList:AutoScan {w} {
+ case [tixTList:GetState $w] {
+ {s5 s6} {
+ tixTList:GoState s6 $w
+ }
+ {b5 b6} {
+ tixTList:GoState b6 $w
+ }
+ {m8 m9} {
+ tixTList:GoState m9 $w
+ }
+ {e8 e9} {
+ tixTList:GoState e9 $w
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+#
+# Key bindings
+#
+#
+#----------------------------------------------------------------------
+proc tixTList:DirKey {w key} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s8 $w $key
+ }
+ {b0} {
+ tixTList:GoState b8 $w $key
+ }
+ }
+}
+
+proc tixTList:Return {w} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s9 $w
+ }
+ {b0} {
+ tixTList:GoState b9 $w
+ }
+ }
+}
+
+proc tixTList:Space {w} {
+ if {[$w cget -state] == "disabled"} {
+ return
+ }
+ case [tixTList:GetState $w] {
+ {s0} {
+ tixTList:GoState s10 $w
+ }
+ {b0} {
+ tixTList:GoState b10 $w
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# STATE MANIPULATION
+#
+#
+#----------------------------------------------------------------------
+proc tixTList:GetState {w} {
+ global $w:priv:state
+
+ if {[info exists $w:priv:state]} {
+ #
+ # If the app has changed the selectmode, reset the state to the
+ # original state.
+ #
+ set type [string index [$w cget -selectmode] 0]
+ if {"[string index [set $w:priv:state] 0]" != "$type"} {
+ unset $w:priv:state
+ }
+ }
+
+ if {![info exists $w:priv:state]} {
+ case [$w cget -selectmode] {
+ single {
+ set $w:priv:state s0
+ }
+ browse {
+ set $w:priv:state b0
+ }
+ multiple {
+ set $w:priv:state m0
+ }
+ extended {
+ set $w:priv:state e0
+ }
+ default {
+ set $w:priv:state unknown
+ }
+ }
+ }
+ return [set $w:priv:state]
+}
+
+proc tixTList:SetState {w n} {
+ global $w:priv:state
+
+ set $w:priv:state $n
+}
+
+proc tixTList:GoState {n w args} {
+
+# puts "going from [tixTList:GetState $w] --> $n"
+
+ tixTList:SetState $w $n
+ eval tixTList:GoState-$n $w $args
+}
+
+#----------------------------------------------------------------------
+# States
+#----------------------------------------------------------------------
+
+#----------------------------------------------------------------------
+# SINGLE SELECTION
+#----------------------------------------------------------------------
+proc tixTList:GoState-s0 {w} {
+}
+
+proc tixTList:GoState-s1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w see $ent
+ }
+ tixTList:GoState s2 $w
+}
+
+proc tixTList:GoState-s2 {w} {
+}
+
+proc tixTList:GoState-s3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState s0 $w
+}
+
+proc tixTList:GoState-s4 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w see $ent
+ }
+}
+
+proc tixTList:GoState-s5 {w} {
+ tixTList:StartScan $w
+}
+
+proc tixTList:GoState-s6 {w} {
+ global tkPriv
+
+ tixTList:DoScan $w
+}
+
+proc tixTList:GoState-s7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallCommand $w $ent
+ }
+ tixTList:GoState s0 $w
+}
+
+proc tixTList: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
+ tixTList:GoState s0 $w
+}
+
+proc tixTList:GoState-s9 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixTList:CallCommand $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixTList:GoState s0 $w
+}
+
+proc tixTList:GoState-s10 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixTList:CallBrowseCmd $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixTList:GoState s0 $w
+}
+
+#----------------------------------------------------------------------
+# BROWSE SELECTION
+#----------------------------------------------------------------------
+proc tixTList:GoState-b0 {w} {
+}
+
+proc tixTList:GoState-b1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w see $ent
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState b2 $w
+}
+
+proc tixTList:GoState-b2 {w} {
+}
+
+proc tixTList:GoState-b3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState b0 $w
+}
+
+proc tixTList:GoState-b4 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w see $ent
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallBrowseCmd $w $ent
+ }
+}
+
+proc tixTList:GoState-b5 {w} {
+ tixTList:StartScan $w
+}
+
+proc tixTList:GoState-b6 {w} {
+ global tkPriv
+
+ tixTList:DoScan $w
+}
+
+proc tixTList:GoState-b7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallCommand $w $ent
+ }
+ tixTList:GoState b0 $w
+}
+
+proc tixTList:GoState-b8 {w key} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ } else {
+ set anchor [$w info $key $anchor]
+ }
+
+ $w anchor set $anchor
+ $w selection clear
+ $w selection set $anchor
+ $w see $anchor
+
+ tixTList:CallBrowseCmd $w $anchor
+ tixTList:GoState b0 $w
+}
+
+proc tixTList:GoState-b9 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixTList:CallCommand $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixTList:GoState b0 $w
+}
+
+proc tixTList:GoState-b10 {w} {
+ set anchor [$w info anchor]
+
+ if {$anchor == ""} {
+ set anchor 0
+ $w anchor set $anchor
+ $w see $anchor
+ }
+
+ if {[$w info anchor] != ""} {
+ # ! may not have any elements
+ #
+ tixTList:CallBrowseCmd $w [$w info anchor]
+ $w selection clear
+ $w selection set $anchor
+ }
+
+ tixTList:GoState b0 $w
+}
+
+#----------------------------------------------------------------------
+# MULTIPLE SELECTION
+#----------------------------------------------------------------------
+proc tixTList:GoState-m0 {w} {
+}
+
+proc tixTList:GoState-m1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w see $ent
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState m2 $w
+}
+
+proc tixTList:GoState-m2 {w} {
+}
+
+proc tixTList:GoState-m3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState m0 $w
+}
+
+proc tixTList:GoState-m4 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixTList:CallBrowseCmd $w $to
+ }
+ tixTList:GoState m5 $w
+}
+
+proc tixTList:GoState-m5 {w} {
+}
+
+proc tixTList:GoState-m6 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState m0 $w
+}
+
+proc tixTList:GoState-m7 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$from == ""} {
+ set from $to
+ $w anchor set $from
+ $w see $from
+ }
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixTList:CallBrowseCmd $w $to
+ }
+ tixTList:GoState m5 $w
+}
+
+
+proc tixTList:GoState-m8 {w} {
+ tixTList:StartScan $w
+}
+
+proc tixTList:GoState-m9 {w} {
+ tixTList:DoScan $w
+}
+
+proc tixTList:GoState-xm7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallCommand $w $ent
+ }
+ tixTList:GoState m0 $w
+}
+
+#----------------------------------------------------------------------
+# EXTENDED SELECTION
+#----------------------------------------------------------------------
+proc tixTList:GoState-e0 {w} {
+}
+
+proc tixTList:GoState-e1 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ $w anchor set $ent
+ $w see $ent
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState e2 $w
+}
+
+proc tixTList:GoState-e2 {w} {
+}
+
+proc tixTList:GoState-e3 {w} {
+ set ent [$w info anchor]
+ if {$ent != ""} {
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState e0 $w
+}
+
+proc tixTList:GoState-e4 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixTList:CallBrowseCmd $w $to
+ }
+ tixTList:GoState e5 $w
+}
+
+proc tixTList:GoState-e5 {w} {
+}
+
+proc tixTList:GoState-e6 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState e0 $w
+}
+
+proc tixTList:GoState-e7 {w x y} {
+ set from [$w info anchor]
+ set to [$w nearest $x $y]
+ if {$from == ""} {
+ set from $to
+ $w anchor set $from
+ $w see $from
+ }
+ if {$to != ""} {
+ $w selection clear
+ $w selection set $from $to
+ tixTList:CallBrowseCmd $w $to
+ }
+ tixTList:GoState e5 $w
+}
+
+
+proc tixTList:GoState-e8 {w} {
+ tixTList:StartScan $w
+}
+
+proc tixTList:GoState-e9 {w} {
+ tixTList:DoScan $w
+}
+
+proc tixTList:GoState-e10 {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != ""} {
+ if {[$w info anchor] == ""} {
+ $w anchor set $ent
+ $w see $ent
+ }
+ if {[$w selection includes $ent]} {
+ $w selection clear $ent
+ } else {
+ $w selection set $ent
+ }
+ tixTList:CallBrowseCmd $w $ent
+ }
+ tixTList:GoState e2 $w
+}
+
+proc tixTList:GoState-xm7 {w x y} {
+ set ent [$w nearest $x $y]
+
+ if {$ent != ""} {
+ $w selection clear
+ $w selection set $ent
+ tixTList:CallCommand $w $ent
+ }
+ tixTList:GoState e0 $w
+}
+
+#----------------------------------------------------------------------
+# callback actions
+#----------------------------------------------------------------------
+proc tixTList:SetAnchor {w x y} {
+ set ent [$w nearest $x $y]
+ if {$ent != "" && [$w entrycget $ent -state] != "disabled"} {
+ $w anchor set $ent
+ $w see $ent
+ return $ent
+ }
+
+ return ""
+}
+
+proc tixTList:Select {w ent} {
+ $w selection clear
+ $w select set $ent
+}
+
+proc tixTList:StartScan {w} {
+ global tkPriv
+ set tkPriv(afterId) [after 50 tixTList:AutoScan $w]
+}
+
+proc tixTList:DoScan {w} {
+ global tkPriv
+ set x $tkPriv(x)
+ set y $tkPriv(y)
+ set X $tkPriv(X)
+ set Y $tkPriv(Y)
+
+ set out 0
+ if {$y >= [winfo height $w]} {
+ $w yview scroll 1 units
+ set out 1
+ }
+ if {$y < 0} {
+ $w yview scroll -1 units
+ set out 1
+ }
+ if {$x >= [winfo width $w]} {
+ $w xview scroll 2 units
+ set out 1
+ }
+ if {$x < 0} {
+ $w xview scroll -2 units
+ set out 1
+ }
+
+ if {$out} {
+ set tkPriv(afterId) [after 50 tixTList:AutoScan $w]
+ }
+}
+
+proc tixTList:CallBrowseCmd {w ent} {
+ set browsecmd [$w cget -browsecmd]
+ if {$browsecmd != ""} {
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $browsecmd bind $ent
+ }
+}
+
+proc tixTList:CallCommand {w ent} {
+ set command [$w cget -command]
+ if {$command != ""} {
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $command bind $ent
+ }
+}
Added: external/tix-8.4.2.x/library/Tix.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Tix.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,398 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Tix.tcl,v 1.13 2004/12/24 01:27:54 hobbs Exp $
+#
+# Tix.tcl --
+#
+# This file implements the Tix application context class
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixClass tixAppContext {
+ -superclass {}
+ -classname TixAppContext
+ -method {
+ cget configure addbitmapdir filedialog getbitmap getimage
+ option platform resetoptions setbitmap initstyle
+ }
+ -flag {
+ -binding -debug -extracmdargs -filedialog -fontset -grabmode
+ -haspixmap -libdir -scheme -schemepriority -percentsubst
+ }
+ -readonly {
+ -haspixmap
+ }
+ -configspec {
+ {-binding TK}
+ {-debug 0}
+ {-extracmdargs 1}
+ {-filedialog ""}
+ {-fontset WmDefault}
+ {-grabmode global}
+ {-haspixmap 0}
+ {-libdir ""}
+ {-percentsubst 0}
+ {-scheme WmDefault}
+ {-schemepriority 21}
+ }
+ -alias {
+ }
+}
+
+proc tixAppContext:Constructor {w} {
+ upvar #0 $w data
+ global tix_priv tix_library tixOption
+
+ if {[info exists data(initialized)]} {
+ error "tixAppContext has already be initialized"
+ } else {
+ set data(initialized) 1
+ }
+
+ set data(et) [string equal $tix_library ""]
+ set data(image) 0
+
+ # These options were set when Tix was loaded
+ #
+ set data(-binding) $tix_priv(-binding)
+ set data(-debug) $tix_priv(-debug)
+ set data(-fontset) $tix_priv(-fontset)
+ set data(-scheme) $tix_priv(-scheme)
+ set data(-schemepriority) $tix_priv(-schemepriority)
+
+ if {![info exists tix_priv(isSafe)]} {
+ set data(-libdir) [file normalize $tix_library]
+ }
+ set tixOption(prioLevel) $tix_priv(-schemepriority)
+
+ # Compatibility stuff: the obsolete name courier_font has been changed to
+ # fixed_font
+ set tixOption(fixed_font) Courier
+ set tixOption(courier_font) $tixOption(fixed_font)
+
+ # Enable/Disable Intrinsics debugging
+ #
+ set tix_priv(debug) [string is true -strict $data(-debug)]
+
+ tixAppContext:BitmapInit $w
+ tixAppContext:FileDialogInit $w
+
+ # Clean up any error message generated by the above loop
+ set ::errorInfo ""
+}
+
+proc tixAppContext:initstyle {w} {
+ # Do the init stuff here that affects styles
+
+ upvar #0 $w data
+ global tix_priv
+
+ if {![info exists tix_priv(isSafe)]} {
+ tixAppContext:config-fontset $w $data(-fontset)
+ tixAppContext:config-scheme $w $data(-scheme)
+ }
+
+ tixAppContext:BitmapInit $w
+ tixAppContext:FileDialogInit $w
+
+ # Force the "." window to accept the new Tix options
+ #
+ set noconfig [list -class -colormap -container -menu -screen -use -visual]
+ set noconfig [lsort $noconfig]
+ foreach spec [. configure] {
+ set flag [lindex $spec 0]
+ if {[llength $spec] != 5
+ || [lsearch -exact -sorted $noconfig $flag] != -1} {
+ continue
+ }
+ set name [lindex $spec 1]
+ set class [lindex $spec 2]
+ set value [option get . $name $class]
+ catch {. configure $flag $value}
+ }
+}
+
+#----------------------------------------------------------------------
+# Configurations
+#
+#----------------------------------------------------------------------
+proc tixAppContext:resetoptions {w scheme fontset {schemePrio ""}} {
+ upvar #0 $w data
+
+ if {! $data(et)} {
+ global tixOption
+ option clear
+
+ if {$schemePrio != ""} {
+ set tixOption(prioLevel) $schemePrio
+ }
+ tixAppContext:config-scheme $w $scheme
+ tixAppContext:config-fontset $w $fontset
+ }
+}
+proc tixAppContext:StartupError {args} {
+ bgerror [join $args "\n"]
+}
+
+proc tixAppContext:config-fontset {w value} {
+ upvar #0 $w data
+ global tix_priv tixOption
+
+ set data(-fontset) $value
+
+ #-----------------------------------
+ # Initialization of options database
+ #-----------------------------------
+ # Load the fontset
+ #
+ if {!$data(et)} {
+ set prefDir [file join $data(-libdir) pref]
+ set fontSetFile [file join $prefDir $data(-fontset).fsc]
+ if {[file exists $fontSetFile]} {
+ source $fontSetFile
+ tixPref:InitFontSet:$data(-fontset)
+ tixPref:SetFontSet:$data(-fontset)
+ } else {
+ tixAppContext:StartupError \
+ " Error: cannot use fontset \"$data(-fontset)\"" \
+ " Using default fontset "
+ tixSetDefaultFontset
+ }
+ } else {
+ if [catch {
+ tixPref:InitFontSet:$data(-fontset)
+ tixPref:SetFontSet:$data(-fontset)
+ }] {
+ # User chose non-existent fontset
+ #
+ tixAppContext:StartupError \
+ " Error: cannot use fontset \"$data(-fontset)\"" \
+ " Using default fontset "
+ tixSetDefaultFontset
+ }
+ }
+}
+
+proc tixAppContext:config-scheme {w value} {
+ upvar #0 $w data
+ global tix_priv
+
+ set data(-scheme) $value
+
+ # Load the color scheme
+ #
+ if {!$data(et)} {
+ set schemeName [file join [file join $data(-libdir) pref] \
+ $data(-scheme).csc]
+ if {[file exists $schemeName]} {
+ source $schemeName
+ tixPref:SetScheme-Color:$data(-scheme)
+ } else {
+ tixAppContext:StartupError \
+ " Error: cannot use color scheme \"$data(-scheme)\"" \
+ " Using default color scheme"
+ tixSetDefaultScheme-Color
+ }
+ } else {
+ if [catch {tixPref:SetScheme-Color:$data(-scheme)}] {
+ # User chose non-existent color scheme
+ #
+ tixAppContext:StartupError \
+ " Error: cannot use color scheme \"$data(-scheme)\"" \
+ " Using default color scheme"
+ tixSetDefaultScheme-Color
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+# Private methods
+#
+#----------------------------------------------------------------------
+proc tixAppContext:BitmapInit {w} {
+ upvar #0 $w data
+
+ # See whether we have pixmap extension
+ #
+ set data(-haspixmap) true
+
+ # Dynamically set the bitmap directory
+ #
+ if {! $data(et)} {
+ set data(bitmapdirs) [list [file join $data(-libdir) bitmaps]]
+ } else {
+ set data(bitmapdirs) ""
+ }
+}
+
+proc tixAppContext:FileDialogInit {w} {
+ upvar #0 $w data
+
+ if {$data(-filedialog) == ""} {
+ set data(-filedialog) [option get . fileDialog FileDialog]
+ }
+ if {$data(-filedialog) == ""} {
+ set data(-filedialog) tixFileSelectDialog
+ }
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+proc tixAppContext:addbitmapdir {w bmpdir} {
+ upvar #0 $w data
+
+ if {[lsearch $data(bitmapdirs) $bmpdir] == -1} {
+ lappend data(bitmapdirs) $bmpdir
+ }
+}
+
+proc tixAppContext:getimage {w name} {
+ upvar #0 $w data
+ global tix_priv
+
+ if {[info exists data(img:$name)]} {
+ return $data(img:$name)
+ }
+
+ if {![info exists tix_priv(isSafe)]} {
+ foreach dir $data(bitmapdirs) {
+ foreach {ext type} {
+ xpm pixmap
+ gif photo
+ ppm photo
+ xbm bitmap
+ "" bitmap
+ } {
+ set file [file join $dir $name.$ext]
+ if {[file exists $file]
+ && ![catch {
+ set img tiximage$data(image)
+ set data(img:$name) \
+ [image create $type $img -file $file]
+ }]} {
+ incr data(image)
+ break
+ }
+ }
+ if {[info exists data(img:$name)]} {
+ return $data(img:$name)
+ }
+ }
+ }
+
+ if {![info exists data(img:$name)]} {
+ catch {
+ set img tiximage$data(image)
+ # This is for compiled-in images
+ set data(img:$name) [image create pixmap $img -id $name]
+ } err
+ if {[string match internal* $err]} {
+ error $err
+ } else {
+ incr data(image)
+ }
+ }
+
+ if {[info exists data(img:$name)]} {
+ return $data(img:$name)
+ } else {
+ error "image file \"$name\" cannot be found"
+ }
+}
+
+
+proc tixAppContext:getbitmap {w bitmapname} {
+ upvar #0 $w data
+ global tix_priv
+
+ if {[info exists data(bmp:$bitmapname)]} {
+ return $data(bmp:$bitmapname)
+ } else {
+ set ext [file extension $bitmapname]
+ if {$ext == ""} {
+ set ext .xbm
+ }
+
+ # This is the fallback value. If we can't find the bitmap in
+ # the bitmap directories, then use the name of the bitmap
+ # as the default value.
+ #
+ set data(bmp:$bitmapname) $bitmapname
+
+ if {[info exists tix_priv(isSafe)]} {
+ return $data(bmp:$bitmapname)
+ }
+
+ foreach dir $data(bitmapdirs) {
+ if {$ext eq ".xbm" &&
+ [file exists [file join $dir $bitmapname.xbm]]} {
+ set data(bmp:$bitmapname) \
+ @[file join $dir $bitmapname.xbm]
+ break
+ }
+ if {[file exists [file join $dir $bitmapname]]} {
+ set data(bmp:$bitmapname) @[file join $dir $bitmapname]
+ break
+ }
+ }
+
+ return $data(bmp:$bitmapname)
+ }
+}
+
+proc tixAppContext:filedialog {w {type tixFileSelectDialog}} {
+ upvar #0 $w data
+
+ if {$type == ""} {
+ set type $data(-filedialog)
+ }
+ if {![info exists data(filedialog,$type)]} {
+ set data(filedialog,$type) ""
+ }
+
+ if {$data(filedialog,$type) == "" || \
+ ![winfo exists $data(filedialog,$type)]} {
+ set data(filedialog,$type) [$type .tixapp_filedialog_$type]
+ }
+
+ return $data(filedialog,$type)
+}
+
+proc tixAppContext:option {w action {option ""} {value ""}} {
+ global tixOption
+
+ if {$action eq "get"} {
+ if {$option == ""} {return [lsort [array names tixOption]]}
+ return $tixOption($option)
+ }
+}
+
+proc tixAppContext:platform {w} {
+ return $::tcl_platform(platform)
+}
+
+proc tixDebug {message {level "1"}} {
+ set debug [tix cget -debug]
+ if {![string is true -strict $debug]} { return }
+
+ if {$debug > 0} {
+ # use $level here
+ if {[catch {fconfigure stderr}]} {
+ # This will happen under PYTHONW.EXE or frozen Windows apps
+ proc tixDebug args {}
+ } else {
+ puts stderr $message
+ }
+ }
+}
+
+if {![llength [info commands toplevel]]} {
+ interp alias {} toplevel {} frame
+}
Added: external/tix-8.4.2.x/library/Tree.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Tree.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,211 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Tree.tcl,v 1.7 2004/04/09 21:39:12 hobbs Exp $
+#
+# Tree.tcl --
+#
+# This file implements the TixTree widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+tixWidgetClass tixTree {
+ -classname TixTree
+ -superclass tixVTree
+ -method {
+ autosetmode close getmode open setmode
+
+ addchild anchor column delete entrycget
+ entryconfigure header hide indicator info
+ item nearest see selection show
+ }
+ -flag {
+ -browsecmd -command -opencmd -closecmd
+ }
+ -configspec {
+ {-browsecmd browseCmd BrowseCmd ""}
+ {-command command Command ""}
+ {-closecmd closeCmd CloseCmd ""}
+ {-opencmd openCmd OpenCmd ""}
+ }
+ -default {
+ {.scrollbar auto}
+ {*Scrollbar.takeFocus 0}
+ {*borderWidth 1}
+ {*hlist.background #c3c3c3}
+ {*hlist.drawBranch 1}
+ {*hlist.height 10}
+ {*hlist.highlightBackground #d9d9d9}
+ {*hlist.indicator 1}
+ {*hlist.indent 20}
+ {*hlist.itemType imagetext}
+ {*hlist.padX 2}
+ {*hlist.padY 2}
+ {*hlist.relief sunken}
+ {*hlist.takeFocus 1}
+ {*hlist.wideSelection 0}
+ {*hlist.width 20}
+ }
+}
+
+proc tixTree:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+}
+
+proc tixTree:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+}
+
+proc tixTree:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+}
+
+#----------------------------------------------------------------------
+#
+# Widget commands
+#
+#----------------------------------------------------------------------
+proc tixTree:autosetmode {w} {
+ tixTree:SetModes $w ""
+}
+
+proc tixTree:close {w ent} {
+ upvar #0 $w data
+
+ set type [tixVTree:GetType $w $ent]
+ if {$type == "close"} {
+ tixCallMethod $w Activate $ent $type
+ }
+}
+
+proc tixTree:open {w ent} {
+ upvar #0 $w data
+
+ set type [tixVTree:GetType $w $ent]
+ if {$type == "open"} {
+ tixCallMethod $w Activate $ent $type
+ }
+}
+
+proc tixTree:getmode {w ent} {
+ tixVTree:GetType $w $ent
+}
+
+proc tixTree:setmode {w ent mode} {
+ tixVTree:SetMode $w $ent $mode
+}
+
+foreach cmd {
+ addchild anchor column delete entrycget
+ entryconfigure header hide indicator info
+ item nearest see selection show
+} {
+ proc tixTree:$cmd {w args} {
+ # These are hlist passthrough methods to work around
+ # Tix' ignorant inheritance model.
+ upvar #0 $w data
+ set cmd [lindex [split [lindex [info level 0] 0] :] end]
+ uplevel 1 [linsert $args 0 $data(w:hlist) $cmd]
+ }
+}
+unset cmd
+
+#----------------------------------------------------------------------
+#
+# Private Methods
+#
+#----------------------------------------------------------------------
+proc tixTree:SetModes {w ent} {
+ upvar #0 $w data
+
+ set mode none
+
+ if {$ent == ""} {
+ set children [$data(w:hlist) info children]
+ } else {
+ set children [$data(w:hlist) info children $ent]
+ }
+
+ if {$children != ""} {
+ set mode close
+
+ foreach c $children {
+ if {[$data(w:hlist) info hidden $c]} {
+ set mode open
+ }
+ tixTree:SetModes $w $c
+ }
+ }
+
+ if {$ent != ""} {
+ tixVTree:SetMode $w $ent $mode
+ }
+}
+#----------------------------------------------------------------------
+#
+# Virtual Methods
+#
+#----------------------------------------------------------------------
+proc tixTree:OpenCmd {w ent} {
+ upvar #0 $w data
+
+ if {$data(-opencmd) != ""} {
+ tixTree:CallSwitchCmd $w $data(-opencmd) $ent
+ } else {
+ tixChainMethod $w OpenCmd $ent
+
+ }
+}
+
+proc tixTree:CloseCmd {w ent} {
+ upvar #0 $w data
+
+ if {$data(-closecmd) != ""} {
+ tixTree:CallSwitchCmd $w $data(-closecmd) $ent
+ } else {
+ tixChainMethod $w CloseCmd $ent
+ }
+}
+
+# Call the opencmd or closecmd, depending on the mode ($cmd argument)
+#
+proc tixTree:CallSwitchCmd {w cmd ent} {
+ upvar #0 $w data
+
+ set bind(specs) {%V}
+ set bind(%V) $ent
+
+ tixEvalCmdBinding $w $cmd bind $ent
+}
+
+proc tixTree:Command {w B} {
+ upvar #0 $w data
+ upvar $B bind
+
+ tixChainMethod $w Command $B
+
+ set ent [tixEvent flag V]
+ if {$data(-command) != ""} {
+ tixEvalCmdBinding $w $data(-command) bind $ent
+ }
+}
+
+proc tixTree:BrowseCmd {w B} {
+ upvar #0 $w data
+
+ set ent [tixEvent flag V]
+ if {$data(-browsecmd) != ""} {
+ tixEvalCmdBinding $w $data(-browsecmd) "" $ent
+ }
+}
Added: external/tix-8.4.2.x/library/Utils.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Utils.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,442 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Utils.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# Util.tcl --
+#
+# The Tix utility commands. Some of these commands are
+# replacement of or extensions to the existing TK
+# commands. Occasionaly, you have to use the commands inside
+# this file instead of thestandard TK commands to make your
+# applicatiion work better with Tix. Please read the
+# documentations (programmer's guide, man pages) for information
+# about these utility commands.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+#
+# kludge: should be able to handle all kinds of flags
+# now only handles "-flag value" pairs.
+#
+proc tixHandleArgv {p_argv p_options validFlags} {
+ upvar $p_options opt
+ upvar $p_argv argv
+
+ set old_argv $argv
+ set argv ""
+
+ foreac {flag value} $old_argv {
+ if {[lsearch $validFlags $flag] != -1} {
+ # The caller will handle this option exclusively
+ # It won't be added back to the original arglist
+ #
+ eval $opt($flag,action) $value
+ } else {
+ # The caller does not handle this option
+ #
+ lappend argv $flag
+ lappend argv $value
+ }
+ }
+}
+
+#-----------------------------------------------------------------------
+# tixDisableAll -
+#
+# Disable all members in a sub widget tree
+#
+proc tixDisableAll {w} {
+ foreach x [tixDescendants $w] {
+ catch {$x config -state disabled}
+ }
+}
+
+#----------------------------------------------------------------------
+# tixEnableAll -
+#
+# enable all members in a sub widget tree
+#
+proc tixEnableAll {w} {
+ foreach x [tixDescendants $w] {
+ catch {$x config -state normal}
+ }
+}
+
+#----------------------------------------------------------------------
+# tixDescendants -
+#
+# Return a list of all the member of a widget subtree, including
+# the tree's root widget.
+#
+proc tixDescendants {parent} {
+ set des ""
+ lappend des $parent
+
+ foreach w [winfo children $parent] {
+ foreach x [tixDescendants $w] {
+ lappend des $x
+ }
+ }
+ return $des
+}
+
+#----------------------------------------------------------------------
+# tixTopLevel -
+#
+# Create a toplevel widget and unmap it immediately. This will ensure
+# that this toplevel widgets will not be popped up prematurely when you
+# create Tix widgets inside it.
+#
+# "tixTopLevel" also provide options for you to specify the appearance
+# and behavior of this toplevel.
+#
+#
+#
+proc tixTopLevel {w args} {
+ set opt (-geometry) ""
+ set opt (-minsize) ""
+ set opt (-maxsize) ""
+ set opt (-width) ""
+ set opt (-height) ""
+
+ eval [linsert $args 0 toplevel $w]
+ wm withdraw $w
+}
+
+# This is a big kludge
+#
+# Substitutes all [...] and $.. in the string in $args
+#
+proc tixInt_Expand {args} {
+ return $args
+}
+
+# Print out all the config options of a widget
+#
+proc tixPConfig {w} {
+ puts [join [lsort [$w config]] \n]
+}
+
+proc tixAppendBindTag {w tag} {
+ bindtags $w [concat [bindtags $w] $tag]
+}
+
+proc tixAddBindTag {w tag} {
+ bindtags $w [concat $tag [bindtags $w] ]
+}
+
+proc tixSubwidgetRef {sub} {
+ return $::tixSRef($sub)
+}
+
+proc tixSubwidgetRetCreate {sub ref} {
+ set ::tixSRef($sub) $ref
+}
+
+proc tixSubwidgetRetDelete {sub} {
+ catch {unset ::tixSRef($sub)}
+}
+
+proc tixListboxGetCurrent {listbox} {
+ return [tixEvent flag V]
+}
+
+
+# tixSetMegaWidget --
+#
+# Associate a subwidget with its mega widget "owner". This is mainly
+# used when we add a new bindtag to a subwidget and we need to find out
+# the name of the mega widget inside the binding.
+#
+proc tixSetMegaWidget {w mega {type any}} {
+ set ::tixMega($type,$w) $mega
+}
+
+proc tixGetMegaWidget {w {type any}} {
+ return $::tixMega($type,$w)
+}
+
+proc tixUnsetMegaWidget {w} {
+ if {[info exists ::tixMega($w)]} { unset ::tixMega($w) }
+}
+
+# tixBusy : display busy cursors on a window
+#
+#
+# Should flush the event queue (but not do any idle tasks) before blocking
+# the target window (I am not sure if it is aready doing so )
+#
+# ToDo: should take some additional windows to raise
+#
+proc tixBusy {w flag {focuswin ""}} {
+
+ if {[info command tixInputOnly] == ""} {
+ return
+ }
+
+ global tixBusy
+ set toplevel [winfo toplevel $w]
+
+ if {![info exists tixBusy(cursor)]} {
+ set tixBusy(cursor) watch
+# set tixBusy(cursor) "[tix getbitmap hourglass] \
+# [string range [tix getbitmap hourglass.mask] 1 end]\
+# black white"
+ }
+
+ if {$toplevel eq "."} {
+ set inputonly0 .__tix__busy0
+ set inputonly1 .__tix__busy1
+ set inputonly2 .__tix__busy2
+ set inputonly3 .__tix__busy3
+ } else {
+ set inputonly0 $toplevel.__tix__busy0
+ set inputonly1 $toplevel.__tix__busy1
+ set inputonly2 $toplevel.__tix__busy2
+ set inputonly3 $toplevel.__tix__busy3
+ }
+
+ if {![winfo exists $inputonly0]} {
+ for {set i 0} {$i < 4} {incr i} {
+ tixInputOnly [set inputonly$i] -cursor $tixBusy(cursor)
+ }
+ }
+
+ if {$flag eq "on"} {
+ if {$focuswin != "" && [winfo id $focuswin] != 0} {
+ if {[info exists tixBusy($focuswin,oldcursor)]} {
+ return
+ }
+ set tixBusy($focuswin,oldcursor) [$focuswin cget -cursor]
+ $focuswin config -cursor $tixBusy(cursor)
+
+ set x1 [expr {[winfo rootx $focuswin]-[winfo rootx $toplevel]}]
+ set y1 [expr {[winfo rooty $focuswin]-[winfo rooty $toplevel]}]
+
+ set W [winfo width $focuswin]
+ set H [winfo height $focuswin]
+ set x2 [expr {$x1 + $W}]
+ set y2 [expr {$y1 + $H}]
+
+
+ if {$y1 > 0} {
+ tixMoveResizeWindow $inputonly0 0 0 10000 $y1
+ }
+ if {$x1 > 0} {
+ tixMoveResizeWindow $inputonly1 0 0 $x1 10000
+ }
+ tixMoveResizeWindow $inputonly2 0 $y2 10000 10000
+ tixMoveResizeWindow $inputonly3 $x2 0 10000 10000
+
+ for {set i 0} {$i < 4} {incr i} {
+ tixMapWindow [set inputonly$i]
+ tixRaiseWindow [set inputonly$i]
+ }
+ tixFlushX $w
+ } else {
+ tixMoveResizeWindow $inputonly0 0 0 10000 10000
+ tixMapWindow $inputonly0
+ tixRaiseWindow $inputonly0
+ }
+ } else {
+ tixUnmapWindow $inputonly0
+ tixUnmapWindow $inputonly1
+ tixUnmapWindow $inputonly2
+ tixUnmapWindow $inputonly3
+
+ if {$focuswin != "" && [winfo id $focuswin] != 0} {
+ if {[info exists tixBusy($focuswin,oldcursor)]} {
+ $focuswin config -cursor $tixBusy($focuswin,oldcursor)
+ if {[info exists tixBusy($focuswin,oldcursor)]} {
+ unset tixBusy($focuswin,oldcursor)
+ }
+ }
+ }
+ }
+}
+
+proc tixOptionName {w} {
+ return [string range $w 1 end]
+}
+
+proc tixSetSilent {chooser value} {
+ $chooser config -disablecallback true
+ $chooser config -value $value
+ $chooser config -disablecallback false
+}
+
+# This command is useful if you want to ingore the arguments
+# passed by the -command or -browsecmd options of the Tix widgets. E.g
+#
+# tixFileSelectDialog .c -command "puts foo; tixBreak"
+#
+#
+proc tixBreak {args} {}
+
+#----------------------------------------------------------------------
+# tixDestroy -- deletes a Tix class object (not widget classes)
+#----------------------------------------------------------------------
+proc tixDestroy {w} {
+ upvar #0 $w data
+
+ set destructor ""
+ if {[info exists data(className)]} {
+ catch {
+ set destructor [tixGetMethod $w $data(className) Destructor]
+ }
+ }
+ if {$destructor != ""} {
+ $destructor $w
+ }
+ catch {rename $w ""}
+ catch {unset data}
+ return ""
+}
+
+proc tixPushGrab {args} {
+ global tix_priv
+
+ if {![info exists tix_priv(grab-list)]} {
+ set tix_priv(grab-list) ""
+ set tix_priv(grab-mode) ""
+ set tix_priv(grab-nopush) ""
+ }
+
+ set len [llength $args]
+ if {$len == 1} {
+ set opt ""
+ set w [lindex $args 0]
+ } elseif {$len == 2} {
+ set opt [lindex $args 0]
+ set w [lindex $args 1]
+ } else {
+ error "wrong # of arguments: tixPushGrab ?-global? window"
+ }
+
+ # Not everyone will call tixPushGrab. If someone else has a grab already
+ # save that one as well, so that we can restore that later
+ #
+ set last [lindex $tix_priv(grab-list) end]
+ set current [grab current $w]
+
+ if {$current ne "" && $current ne $last} {
+ # Someone called "grab" directly
+ #
+ lappend tix_priv(grab-list) $current
+ lappend tix_priv(grab-mode) [grab status $current]
+ lappend tix_priv(grab-nopush) 1
+ }
+
+ # Now push myself into the stack
+ #
+ lappend tix_priv(grab-list) $w
+ lappend tix_priv(grab-mode) $opt
+ lappend tix_priv(grab-nopush) 0
+
+ if {$opt eq "-global"} {
+ grab -global $w
+ } else {
+ grab $w
+ }
+}
+
+proc tixPopGrab {} {
+ global tix_priv
+
+ if {![info exists tix_priv(grab-list)]} {
+ set tix_priv(grab-list) ""
+ set tix_priv(grab-mode) ""
+ set tix_priv(grab-nopush) ""
+ }
+
+ set len [llength $tix_priv(grab-list)]
+ if {$len <= 0} {
+ error "no window is grabbed by tixGrab"
+ }
+
+ set w [lindex $tix_priv(grab-list) end]
+ grab release $w
+
+ if {$len > 1} {
+ set tix_priv(grab-list) [lrange $tix_priv(grab-list) 0 end-1]
+ set tix_priv(grab-mode) [lrange $tix_priv(grab-mode) 0 end-1]
+ set tix_priv(grab-nopush) [lrange $tix_priv(grab-nopush) 0 end-1]
+
+ set w [lindex $tix_priv(grab-list) end]
+ set m [lindex $tix_priv(grab-list) end]
+ set np [lindex $tix_priv(grab-nopush) end]
+
+ if {$np == 1} {
+ # We have a grab set by "grab"
+ #
+ set len [llength $tix_priv(grab-list)]
+
+ if {$len > 1} {
+ set tix_priv(grab-list) [lrange $tix_priv(grab-list) 0 end-1]
+ set tix_priv(grab-mode) [lrange $tix_priv(grab-mode) 0 end-1]
+ set tix_priv(grab-nopush) \
+ [lrange $tix_priv(grab-nopush) 0 end-1]
+ } else {
+ set tix_priv(grab-list) ""
+ set tix_priv(grab-mode) ""
+ set tix_priv(grab-nopush) ""
+ }
+ }
+
+ if {$m == "-global"} {
+ grab -global $w
+ } else {
+ grab $w
+ }
+ } else {
+ set tix_priv(grab-list) ""
+ set tix_priv(grab-mode) ""
+ set tix_priv(grab-nopush) ""
+ }
+}
+
+proc tixWithinWindow {wid rootX rootY} {
+ set wc [winfo containing $rootX $rootY]
+ if {$wid eq $wc} { return 1 }
+
+ # no see if it is an enclosing parent
+ set rx1 [winfo rootx $wid]
+ set ry1 [winfo rooty $wid]
+ set rw [winfo width $wid]
+ set rh [winfo height $wid]
+ set rx2 [expr {$rx1+$rw}]
+ set ry2 [expr {$ry1+$rh}]
+
+ if {$rootX >= $rx1 && $rootX < $rx2 && $rootY >= $ry1 && $rootY < $ry2} {
+ return 1
+ } else {
+ return 0
+ }
+}
+
+proc tixWinWidth {w} {
+ set W [winfo width $w]
+ set bd [expr {[$w cget -bd] + [$w cget -highlightthickness]}]
+
+ return [expr {$W - 2*$bd}]
+}
+
+proc tixWinHeight {w} {
+ set H [winfo height $w]
+ set bd [expr {[$w cget -bd] + [$w cget -highlightthickness]}]
+
+ return [expr {$H - 2*$bd}]
+}
+
+# junk?
+#
+proc tixWinCmd {w} {
+ return [winfo command $w]
+}
Added: external/tix-8.4.2.x/library/VResize.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/VResize.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,211 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: VResize.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
+#
+# VResize.tcl --
+#
+# tixVResize:
+# Virtual base class for all classes that provide resize capability,
+# such as the resize handle and the MDI client window.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixVResize {
+ -virtual true
+ -classname TixVResize
+ -superclass tixPrimitive
+ -method {
+ drag dragend dragstart
+ }
+ -flag {
+ -gridded -gridx -gridy -minwidth -minheight
+ }
+ -configspec {
+ {-gridded gridded Gridded false}
+ {-gridx gridX Grid 10}
+ {-gridy gridY Grid 10}
+ {-minwidth minWidth MinWidth 0}
+ {-minheight minHeight MinHeight 0}
+ }
+}
+
+
+proc tixVResize:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(movePending) 0
+ set data(aborted) 0
+ set data(depress) 0
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+# Start dragging a window
+#
+proc tixVResize:dragstart {w win depress rootx rooty wrect mrect} {
+ upvar #0 $w data
+
+ set data(rootx) $rootx
+ set data(rooty) $rooty
+
+ set data(mx) [lindex $mrect 0]
+ set data(my) [lindex $mrect 1]
+ set data(mw) [lindex $mrect 2]
+ set data(mh) [lindex $mrect 3]
+
+ set data(fx) [lindex $wrect 0]
+ set data(fy) [lindex $wrect 1]
+ set data(fw) [lindex $wrect 2]
+ set data(fh) [lindex $wrect 3]
+
+ set data(old_x) [lindex $wrect 0]
+ set data(old_y) [lindex $wrect 1]
+ set data(old_w) [lindex $wrect 2]
+ set data(old_h) [lindex $wrect 3]
+
+ if {$data(mw) < 0} {
+ set data(maxx) [expr {$data(fx) + $data(old_w) - $data(-minwidth)}]
+ } else {
+ set data(maxx) 32000
+ }
+ if {$data(mh) < 0} {
+ set data(maxy) [expr {$data(fy) + $data(old_h) - $data(-minheight)}]
+ } else {
+ set data(maxy) 32000
+ }
+
+ set data(aborted) 0
+
+ tixCallMethod $w ShowHintFrame
+ tixCallMethod $w SetHintFrame $data(fx) $data(fy) $data(fw) $data(fh)
+
+ # Grab so that all button events are captured
+ #
+ grab $win
+ focus $win
+
+ set data(depress) $depress
+ if {$depress} {
+ set data(oldRelief) [$win cget -relief]
+ $win config -relief sunken
+ }
+}
+
+
+proc tixVResize:drag {w rootx rooty} {
+ upvar #0 $w data
+
+ if {$data(aborted) == 0} {
+ set data(newrootx) $rootx
+ set data(newrooty) $rooty
+
+ if {$data(movePending) == 0} {
+ set data(movePending) 1
+ after 2 tixVResize:DragCompressed $w
+ }
+ }
+}
+
+proc tixVResize:dragend {w win isAbort rootx rooty} {
+ upvar #0 $w data
+
+ if {$data(aborted)} {
+ if {$isAbort == 0} {
+ grab release $win
+ }
+ return
+ }
+
+ # Just in case some draggings are not applied.
+ #
+ update
+
+ tixCallMethod $w HideHintFrame
+
+ if {$isAbort} {
+ set data(aborted) 1
+ } else {
+ # Apply the changes
+ #
+ tixCallMethod $w UpdateSize $data(fx) $data(fy) $data(fw) $data(fh)
+
+ # Release the grab
+ #
+ grab release $win
+ }
+
+ if {$data(depress)} {
+ $win config -relief $data(oldRelief)
+ }
+}
+
+#----------------------------------------------------------------------
+# Internal methods
+#----------------------------------------------------------------------
+
+proc tixVResize:DragCompressed {w} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ if {$data(aborted) == 1 || $data(movePending) == 0} {
+ return
+ }
+
+ set dx [expr {$data(newrootx) - $data(rootx)}]
+ set dy [expr {$data(newrooty) - $data(rooty)}]
+
+ set data(fx) [expr {$data(old_x) + ($dx * $data(mx))}]
+ set data(fy) [expr {$data(old_y) + ($dy * $data(my))}]
+ set data(fw) [expr {$data(old_w) + ($dx * $data(mw))}]
+ set data(fh) [expr {$data(old_h) + ($dy * $data(mh))}]
+
+ if {$data(fw) < $data(-minwidth)} {
+ set data(fw) $data(-minwidth)
+ }
+ if {$data(fh) < $data(-minheight)} {
+ set data(fh) $data(-minheight)
+ }
+
+ if {$data(fx) > $data(maxx)} {
+ set data(fx) $data(maxx)
+ }
+ if {$data(fy) > $data(maxy)} {
+ set data(fy) $data(maxy)
+ }
+
+ # If we need grid, set x,y,w,h to fit the grid
+ #
+ # *note* grid overrides minwidth and maxwidth ...
+ #
+ if {$data(-gridded)} {
+ set data(fx) [expr {round(double($data(fx))/$data(-gridx)) * $data(-gridx)}]
+ set data(fy) [expr {round(double($data(fy))/$data(-gridy)) * $data(-gridy)}]
+
+ set fx2 [expr {$data(fx) + $data(fw) - 2}]
+ set fy2 [expr {$data(fy) + $data(fh) - 2}]
+
+ set fx2 [expr {round(double($fx2)/$data(-gridx)) * $data(-gridx)}]
+ set fy2 [expr {round(double($fy2)/$data(-gridy)) * $data(-gridy)}]
+
+ set data(fw) [expr {$fx2 - $data(fx) + 1}]
+ set data(fh) [expr {$fy2 - $data(fy) + 1}]
+ }
+
+ tixCallMethod $w SetHintFrame $data(fx) $data(fy) $data(fw) $data(fh)
+
+ update idletasks
+
+ set data(movePending) 0
+}
Added: external/tix-8.4.2.x/library/VStack.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/VStack.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,430 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: VStack.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# VStack.tcl --
+#
+# Virtual base class, do not instantiate! This is the core
+# class for all NoteBook style widgets. Stack maintains a list
+# of windows. It provides methods to create, delete windows as
+# well as stepping through them.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+#
+
+
+tixWidgetClass tixVStack {
+ -virtual true
+ -classname TixVStack
+ -superclass tixPrimitive
+ -method {
+ add delete pageconfigure pagecget pages raise raised
+ }
+ -flag {
+ -dynamicgeometry -ipadx -ipady
+ }
+ -configspec {
+ {-dynamicgeometry dynamicGeometry DynamicGeometry 0 tixVerifyBoolean}
+ {-ipadx ipadX Pad 0}
+ {-ipady ipadY Pad 0}
+ }
+}
+
+proc tixVStack:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+
+ set data(pad-x1) 0
+ set data(pad-x2) 0
+ set data(pad-y1) 0
+ set data(pad-y2) 0
+
+ set data(windows) ""
+ set data(nWindows) 0
+ set data(topchild) ""
+
+ set data(minW) 1
+ set data(minH) 1
+
+ set data(w:top) $w
+ set data(counter) 0
+ set data(repack) 0
+}
+
+proc tixVStack:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+ tixCallMethod $w InitGeometryManager
+}
+
+#----------------------------------------------------------------------
+# Public methods
+#----------------------------------------------------------------------
+proc tixVStack:add {w child args} {
+ upvar #0 $w data
+
+ set validOptions {-createcmd -raisecmd}
+
+ set opt(-createcmd) ""
+ set opt(-raisecmd) ""
+
+ tixHandleOptions -nounknown opt $validOptions $args
+
+ set data($child,raisecmd) $opt(-raisecmd)
+ set data($child,createcmd) $opt(-createcmd)
+
+ set data(w:$child) [tixCallMethod $w CreateChildFrame $child]
+
+ lappend data(windows) $child
+ incr data(nWindows) 1
+
+ return $data(w:$child)
+}
+
+proc tixVStack:delete {w child} {
+ upvar #0 $w data
+
+ if {[info exists data($child,createcmd)]} {
+ if {[winfo exists $data(w:$child)]} {
+ bind $data(w:$child) <Destroy> {;}
+ destroy $data(w:$child)
+ }
+ catch {unset data($child,createcmd)}
+ catch {unset data($child,raisecmd)}
+ catch {unset data(w:$child)}
+
+ set index [lsearch $data(windows) $child]
+ if {$index >= 0} {
+ set data(windows) [lreplace $data(windows) $index $index]
+ incr data(nWindows) -1
+ }
+
+ if {[string equal $data(topchild) $child]} {
+ set data(topchild) ""
+ foreach page $data(windows) {
+ if {$page ne $child} {
+ $w raise $page
+ set data(topchild) $page
+ break
+ }
+ }
+ }
+ } else {
+ error "page $child does not exist"
+ }
+}
+
+proc tixVStack:pagecget {w child option} {
+ upvar #0 $w data
+
+ if {![info exists data($child,createcmd)]} {
+ error "page \"$child\" does not exist in $w"
+ }
+
+ case $option {
+ -createcmd {
+ return "$data($child,createcmd)"
+ }
+ -raisecmd {
+ return "$data($child,raisecmd)"
+ }
+ default {
+ if {$data(w:top) ne $w} {
+ return [$data(w:top) pagecget $child $option]
+ } else {
+ error "unknown option \"$option\""
+ }
+ }
+ }
+}
+
+proc tixVStack:pageconfigure {w child args} {
+ upvar #0 $w data
+
+ if {![info exists data($child,createcmd)]} {
+ error "page \"$child\" does not exist in $w"
+ }
+
+ set len [llength $args]
+
+ if {$len == 0} {
+ set value [$data(w:top) pageconfigure $child]
+ lappend value [list -createcmd "" "" "" $data($child,createcmd)]
+ lappend value [list -raisecmd "" "" "" $data($child,raisecmd)]
+ return $value
+ }
+
+ if {$len == 1} {
+ case [lindex $args 0] {
+ -createcmd {
+ return [list -createcmd "" "" "" $data($child,createcmd)]
+ }
+ -raisecmd {
+ return [list -raisecmd "" "" "" $data($child,raisecmd)]
+ }
+ default {
+ return [$data(w:top) pageconfigure $child [lindex $args 0]]
+ }
+ }
+ }
+
+ # By default handle each of the options
+ #
+ set opt(-createcmd) $data($child,createcmd)
+ set opt(-raisecmd) $data($child,raisecmd)
+
+ tixHandleOptions -nounknown opt {-createcmd -raisecmd} $args
+
+ #
+ # the widget options
+ set new_args ""
+ foreach {flag value} $args {
+ if {$flag ne "-createcmd" && $flag ne "-raisecmd"} {
+ lappend new_args $flag
+ lappend new_args $value
+ }
+ }
+
+ if {[llength $new_args] >= 2} {
+ eval $data(w:top) pageconfig $child $new_args
+ }
+
+ #
+ # The add-on options
+ set data($child,raisecmd) $opt(-raisecmd)
+ set data($child,createcmd) $opt(-createcmd)
+
+ return ""
+}
+
+proc tixVStack:pages {w} {
+ upvar #0 $w data
+
+ return $data(windows)
+}
+
+proc tixVStack:raise {w child} {
+ upvar #0 $w data
+
+ if {![info exists data($child,createcmd)]} {
+ error "page $child does not exist"
+ }
+
+ if {[llength $data($child,createcmd)]} {
+ uplevel #0 $data($child,createcmd)
+ set data($child,createcmd) ""
+ }
+
+ tixCallMethod $w RaiseChildFrame $child
+
+ set oldTopChild $data(topchild)
+ set data(topchild) $child
+
+ if {$oldTopChild ne $child} {
+ if {[llength $data($child,raisecmd)]} {
+ uplevel #0 $data($child,raisecmd)
+ }
+ }
+}
+
+proc tixVStack:raised {w} {
+ upvar #0 $w data
+
+ return $data(topchild)
+}
+
+#----------------------------------------------------------------------
+# Virtual Methods
+#----------------------------------------------------------------------
+proc tixVStack:InitGeometryManager {w} {
+ upvar #0 $w data
+
+ bind $w <Configure> "tixVStack:MasterGeomProc $w"
+ bind $data(w:top) <Destroy> "+tixVStack:DestroyTop $w"
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixCallMethod $w Resize
+ }
+}
+
+proc tixVStack:CreateChildFrame {w child} {
+ upvar #0 $w data
+
+ set f [frame $data(w:top).$child]
+
+ tixManageGeometry $f "tixVStack:ClientGeomProc $w"
+ bind $f <Configure> "tixVStack:ClientGeomProc $w -configure $f"
+ bind $f <Destroy> "$w delete $child"
+
+ return $f
+}
+
+proc tixVStack:RaiseChildFrame {w child} {
+ upvar #0 $w data
+
+ # Hide the original visible window
+ if {$data(topchild) ne "" && $data(topchild) ne $child} {
+ tixUnmapWindow $data(w:$data(topchild))
+ }
+
+ set myW [winfo width $w]
+ set myH [winfo height $w]
+
+ set cW [expr {$myW - $data(pad-x1) - $data(pad-x2) - 2*$data(-ipadx)}]
+ set cH [expr {$myH - $data(pad-y1) - $data(pad-y2) - 2*$data(-ipady)}]
+ set cX [expr {$data(pad-x1) + $data(-ipadx)}]
+ set cY [expr {$data(pad-y1) + $data(-ipady)}]
+
+ if {$cW > 0 && $cH > 0} {
+ tixMoveResizeWindow $data(w:$child) $cX $cY $cW $cH
+ tixMapWindow $data(w:$child)
+ raise $data(w:$child)
+ }
+}
+
+
+
+#----------------------------------------------------------------------
+#
+# G E O M E T R Y M A N A G E M E N T
+#
+#----------------------------------------------------------------------
+proc tixVStack:DestroyTop {w} {
+ catch {
+ destroy $w
+ }
+}
+
+proc tixVStack:MasterGeomProc {w args} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixCallMethod $w Resize
+ }
+}
+
+proc tixVStack:ClientGeomProc {w flag client} {
+ if {![winfo exists $w]} {
+ return
+ }
+ upvar #0 $w data
+
+ if {$data(repack) == 0} {
+ set data(repack) 1
+ tixWidgetDoWhenIdle tixCallMethod $w Resize
+ }
+
+ if {$flag eq "-lostslave"} {
+ error "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"
+ }
+}
+
+proc tixVStack:Resize {w} {
+ if {![winfo exists $w]} {
+ return
+ }
+
+ upvar #0 $w data
+
+ if {$data(nWindows) == 0} {
+ set data(repack) 0
+ return
+ }
+
+ if {$data(-width) == 0 || $data(-height) == 0} {
+ if {!$data(-dynamicgeometry)} {
+ # Calculate my required width and height
+ #
+ set maxW 1
+ set maxH 1
+
+ foreach child $data(windows) {
+ set cW [winfo reqwidth $data(w:$child)]
+ set cH [winfo reqheight $data(w:$child)]
+
+ if {$maxW < $cW} {
+ set maxW $cW
+ }
+ if {$maxH < $cH} {
+ set maxH $cH
+ }
+ }
+ set reqW $maxW
+ set reqH $maxH
+ } else {
+ if {$data(topchild) ne ""} {
+ set reqW [winfo reqwidth $data(w:$data(topchild))]
+ set reqH [winfo reqheight $data(w:$data(topchild))]
+ } else {
+ set reqW 1
+ set reqH 1
+ }
+ }
+
+ incr reqW [expr {$data(pad-x1) + $data(pad-x2) + 2*$data(-ipadx)}]
+ incr reqH [expr {$data(pad-y1) + $data(pad-y2) + 2*$data(-ipady)}]
+
+ if {$reqW < $data(minW)} {
+ set reqW $data(minW)
+ }
+ if {$reqH < $data(minH)} {
+ set reqH $data(minH)
+ }
+ }
+ # These take higher precedence
+ #
+ if {$data(-width) != 0} {
+ set reqW $data(-width)
+ }
+ if {$data(-height) != 0} {
+ set reqH $data(-height)
+ }
+
+ if {[winfo reqwidth $w] != $reqW || [winfo reqheight $w] != $reqH} {
+ if {![info exists data(counter)]} {
+ set data(counter) 0
+ }
+ if {$data(counter) < 50} {
+ incr data(counter)
+ tixGeometryRequest $w $reqW $reqH
+ tixWidgetDoWhenIdle tixCallMethod $w Resize
+ set data(repack) 1
+ return
+ }
+ }
+ set data(counter) 0
+
+ if {$data(w:top) ne $w} {
+ tixMoveResizeWindow $data(w:top) 0 0 [winfo width $w] [winfo height $w]
+ tixMapWindow $data(w:top)
+ }
+
+ if {[string equal $data(topchild) ""]} {
+ set top [lindex $data(windows) 0]
+ } else {
+ set top $data(topchild)
+ }
+
+ if {$top ne ""} {
+ tixCallMethod $w raise $top
+ }
+
+ set data(repack) 0
+}
Added: external/tix-8.4.2.x/library/VTree.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/VTree.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,195 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: VTree.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+#
+# VTree.tcl --
+#
+# Virtual base class for Tree widgets.
+#
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+# Copyright (c) 2004 ActiveState
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+tixWidgetClass tixVTree {
+ -virtual true
+ -classname TixVTree
+ -superclass tixScrolledHList
+ -method {
+ }
+ -flag {
+ -ignoreinvoke
+ }
+ -configspec {
+ {-ignoreinvoke ignoreInvoke IgnoreInvoke false tixVerifyBoolean}
+ }
+ -default {
+ }
+}
+
+proc tixVTree:InitWidgetRec {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w InitWidgetRec
+}
+
+proc tixVTree:ConstructWidget {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w ConstructWidget
+
+ set data(indStyle) \
+ [tixDisplayStyle image -refwindow $data(w:hlist) -padx 0 -pady 0]
+}
+
+proc tixVTree:SetBindings {w} {
+ upvar #0 $w data
+
+ tixChainMethod $w SetBindings
+
+ $data(w:hlist) config \
+ -indicatorcmd [list tixVTree:IndicatorCmd $w] \
+ -browsecmd [list tixVTree:BrowseCmdHook $w] \
+ -command [list tixVTree:CommandHook $w]
+}
+
+proc tixVTree:IndicatorCmd {w args} {
+ upvar #0 $w data
+
+ set event [tixEvent type]
+ set ent [tixEvent flag V]
+
+ set type [tixVTree:GetType $w $ent]
+ set plus [tix getimage plus]
+ set plusarm [tix getimage plusarm]
+ set minus [tix getimage minus]
+ set minusarm [tix getimage minusarm]
+
+ if {![$data(w:hlist) info exists $ent]} {return}
+ switch -exact -- $event {
+ <Arm> {
+ if {![$data(w:hlist) indicator exists $ent]} {return}
+ $data(w:hlist) indicator config $ent \
+ -image [expr {$type eq "open" ? $plusarm : $minusarm}]
+ }
+ <Disarm> {
+ if {![$data(w:hlist) indicator exists $ent]} {return}
+ $data(w:hlist) indicator config $ent \
+ -image [expr {$type eq "open" ? $plus : $minus}]
+ }
+ <Activate> {
+ upvar bind bind
+ tixCallMethod $w Activate $ent $type
+ set bind(%V) $ent
+ tixVTree:BrowseCmdHook $w
+ }
+ }
+}
+
+proc tixVTree:GetType {w ent} {
+ upvar #0 $w data
+
+ if {![$data(w:hlist) indicator exists $ent]} {
+ return none
+ }
+
+ set img [$data(w:hlist) indicator cget $ent -image]
+ if {$img eq [tix getimage plus] || $img eq [tix getimage plusarm]} {
+ return open
+ }
+ return close
+}
+
+proc tixVTree:Activate {w ent type} {
+ upvar #0 $w data
+
+ if {$type eq "open"} {
+ tixCallMethod $w OpenCmd $ent
+ $data(w:hlist) indicator config $ent -image [tix getimage minus]
+ } else {
+ tixCallMethod $w CloseCmd $ent
+ $data(w:hlist) indicator config $ent -image [tix getimage plus]
+ }
+}
+
+proc tixVTree:CommandHook {w args} {
+ upvar #0 $w data
+ upvar bind bind
+
+ tixCallMethod $w Command bind
+}
+
+proc tixVTree:BrowseCmdHook {w args} {
+ upvar #0 $w data
+ upvar bind bind
+
+ tixCallMethod $w BrowseCmd bind
+}
+
+proc tixVTree:SetMode {w ent mode} {
+ upvar #0 $w data
+
+ switch -exact -- $mode {
+ open {
+ $data(w:hlist) indicator create $ent -itemtype image \
+ -image [tix getimage plus] -style $data(indStyle)
+ }
+ close {
+ $data(w:hlist) indicator create $ent -itemtype image \
+ -image [tix getimage minus] -style $data(indStyle)
+ }
+ none {
+ if {[$data(w:hlist) indicator exist $ent]} {
+ $data(w:hlist) indicator delete $ent
+ }
+ }
+ }
+}
+
+#----------------------------------------------------------------------
+#
+# Virtual Methods
+#
+#----------------------------------------------------------------------
+proc tixVTree:OpenCmd {w ent} {
+ upvar #0 $w data
+
+ # The default action
+ foreach kid [$data(w:hlist) info children $ent] {
+ $data(w:hlist) show entry $kid
+ }
+}
+
+proc tixVTree:CloseCmd {w ent} {
+ upvar #0 $w data
+
+ # The default action
+ foreach kid [$data(w:hlist) info children $ent] {
+ $data(w:hlist) hide entry $kid
+ }
+}
+
+proc tixVTree:Command {w B} {
+ upvar #0 $w data
+ upvar $B bind
+
+ if {$data(-ignoreinvoke)} {
+ return
+ }
+ set ent [tixEvent flag V]
+ if {[$data(w:hlist) indicator exist $ent]} {
+ tixVTree:Activate $w $ent [tixVTree:GetType $w $ent]
+ }
+}
+
+proc tixVTree:BrowseCmd {w B} {
+}
+#----------------------------------------------------------------------
+#
+# Widget commands
+#
+#----------------------------------------------------------------------
Added: external/tix-8.4.2.x/library/Variable.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/Variable.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,101 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Variable.tcl,v 1.4 2001/12/09 05:04:02 idiscovery Exp $
+#
+# Variable.tcl --
+#
+# Routines in this file are used to set up and operate variables
+# for classes that support the -variable option
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+
+
+# tixVariable:ConfigVariable --
+#
+# Set up the -variable option for the object $w
+#
+# Side effects:
+#
+# data(-variable) is changed to the name of the global variable
+# if the global variable exists, data(-value) takes the value of this
+# variable.
+# if the global variable does not exist, it is created with the
+# current data(-value)
+#
+# Return value:
+#
+# true is data(-value) is changed, indicating that data(-command)
+# should be invoked.
+#
+proc tixVariable:ConfigVariable {w arg} {
+ upvar #0 $w data
+
+ set changed 0
+
+ if {$data(-variable) != ""} {
+ uplevel #0 \
+ [list trace vdelete $data(-variable) w "tixVariable:TraceProc $w"]
+ }
+
+ if {$arg != ""} {
+ if {[uplevel #0 info exists [list $arg]]} {
+ # This global variable exists, we use its value
+ #
+ set data(-value) [uplevel #0 set [list $arg]]
+ set changed 1
+ } else {
+ # This global variable does not exist; let's set it
+ #
+ uplevel #0 [list set $arg $data(-value)]
+ }
+ uplevel #0 \
+ [list trace variable $arg w "tixVariable:TraceProc $w"]
+ }
+
+ return $changed
+}
+
+proc tixVariable:UpdateVariable {w} {
+ upvar #0 $w data
+
+ if {$data(-variable) != ""} {
+ uplevel #0 \
+ [list trace vdelete $data(-variable) w "tixVariable:TraceProc $w"]
+ uplevel #0 \
+ [list set $data(-variable) $data(-value)]
+ uplevel #0 \
+ [list trace variable $data(-variable) w "tixVariable:TraceProc $w"]
+
+ # just in case someone has another trace and restricted my change
+ #
+ set data(-value) [uplevel #0 set [list $data(-variable)]]
+ }
+}
+
+proc tixVariable:TraceProc {w name1 name2 op} {
+ upvar #0 $w data
+ set varname $data(-variable)
+
+ if {[catch {$w config -value [uplevel #0 [list set $varname]]} err]} {
+ uplevel #0 [list set $varname [list [$w cget -value]]]
+ error $err
+ }
+ return
+}
+
+proc tixVariable:DeleteVariable {w} {
+ upvar #0 $w data
+
+ # Must delete the trace command of the -variable
+ #
+ if {$data(-variable) != ""} {
+ uplevel #0 \
+ [list trace vdelete $data(-variable) w "tixVariable:TraceProc $w"]
+ }
+}
Added: external/tix-8.4.2.x/library/WInfo.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/WInfo.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,40 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: WInfo.tcl,v 1.2 2001/12/09 05:04:02 idiscovery Exp $
+#
+# WInfo.tcl --
+#
+# This file implements the command tixWInfo, which return various
+# information about a Tix widget.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+
+proc tixWInfo {option w} {
+ upvar #0 $w data
+
+ case $option {
+ tix {
+ # Is this a Tix widget?
+ #
+ return [info exists data(className)]
+ }
+ compound {
+ # Is this a compound widget?
+ # Currently this is the same as "tixWinfo tix" because only
+ # Tix compilant compound widgets are supported
+ return [info exists data(className)]
+ }
+ class {
+ if {[info exists data(className)]} {
+ return $data(className)
+ } else {
+ return ""
+ }
+ }
+ }
+}
Added: external/tix-8.4.2.x/library/bitmaps/act_fold.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/act_fold.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/act_fold.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/act_fold.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/act_fold.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,22 @@
+/* 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.. ",
+"............. "};
Added: external/tix-8.4.2.x/library/bitmaps/balarrow.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/balarrow.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,4 @@
+#define balarrow_width 6
+#define balarrow_height 6
+static char balarrow_bits[] = {
+ 0x1f, 0x07, 0x07, 0x09, 0x11, 0x20};
Added: external/tix-8.4.2.x/library/bitmaps/cbxarrow.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/cbxarrow.xbm Tue Mar 18 19:38:59 2008
@@ -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};
Added: external/tix-8.4.2.x/library/bitmaps/ck_def.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/ck_def.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/ck_off.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/ck_off.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/ck_on.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/ck_on.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/cross.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/cross.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define cross_width 14
+#define cross_height 14
+static 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};
Added: external/tix-8.4.2.x/library/bitmaps/decr.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/decr.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,4 @@
+#define decr_width 7
+#define decr_height 4
+static char decr_bits[] = {
+ 0x7f, 0x3e, 0x1c, 0x08};
Added: external/tix-8.4.2.x/library/bitmaps/drop.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/drop.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,8 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/file.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/file.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/file.xbm Tue Mar 18 19:38:59 2008
@@ -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};
Added: external/tix-8.4.2.x/library/bitmaps/file.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/file.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,18 @@
+/* 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. ",
+" .......... "};
Added: external/tix-8.4.2.x/library/bitmaps/folder.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/folder.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/folder.xbm Tue Mar 18 19:38:59 2008
@@ -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};
Added: external/tix-8.4.2.x/library/bitmaps/folder.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/folder.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,21 @@
+/* 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. ",
+"............. "};
Added: external/tix-8.4.2.x/library/bitmaps/harddisk.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/harddisk.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/hourglas.mask
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/hourglas.mask Tue Mar 18 19:38:59 2008
@@ -0,0 +1,16 @@
+#define hourglass_mask_width 32
+#define hourglass_mask_height 32
+#define hourglass_mask_x_hot 16
+#define hourglass_mask_y_hot 15
+static char hourglass_mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0x7f,
+ 0x58, 0x00, 0x00, 0x34, 0x58, 0x00, 0x00, 0x34, 0x58, 0x00, 0x00, 0x34,
+ 0x98, 0x00, 0x00, 0x32, 0x98, 0x00, 0x00, 0x32, 0x98, 0x00, 0x00, 0x32,
+ 0x18, 0x01, 0x00, 0x31, 0x18, 0xfd, 0x7e, 0x31, 0x18, 0xfa, 0xbf, 0x30,
+ 0x18, 0xe4, 0x4f, 0x30, 0x18, 0xd8, 0x37, 0x30, 0x18, 0x20, 0x09, 0x30,
+ 0x18, 0x40, 0x05, 0x30, 0x18, 0x20, 0x08, 0x30, 0x18, 0x18, 0x31, 0x30,
+ 0x18, 0x04, 0x41, 0x30, 0x18, 0x02, 0x80, 0x30, 0x18, 0x01, 0x00, 0x31,
+ 0x18, 0x01, 0x00, 0x31, 0x98, 0x00, 0x01, 0x32, 0x98, 0x00, 0x01, 0x32,
+ 0x98, 0x80, 0x03, 0x32, 0x58, 0xc0, 0x07, 0x34, 0x58, 0xf0, 0x1f, 0x34,
+ 0x58, 0xfe, 0xff, 0x34, 0xf8, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x7f,
+ 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
Added: external/tix-8.4.2.x/library/bitmaps/hourglas.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/hourglas.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,16 @@
+#define hourglass_width 32
+#define hourglas_height 32
+#define hourglas_x_hot 16
+#define hourglas_y_hot 15
+static 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};
Added: external/tix-8.4.2.x/library/bitmaps/incr.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/incr.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,4 @@
+#define incr_width 7
+#define incr_height 4
+static char incr_bits[] = {
+ 0x08, 0x1c, 0x3e, 0x7f};
Added: external/tix-8.4.2.x/library/bitmaps/info.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/info.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/info.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+/* 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... ",
+" ......... "};
Added: external/tix-8.4.2.x/library/bitmaps/maximize.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/maximize.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/minimize.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/minimize.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/minus.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/minus.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/minus.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/minus.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/minus.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+/* XPM */
+static char * minus_xpm[] = {
+"9 9 2 1",
+". s None c None",
+" c black",
+" ",
+" ....... ",
+" ....... ",
+" ....... ",
+" . . ",
+" ....... ",
+" ....... ",
+" ....... ",
+" "};
Added: external/tix-8.4.2.x/library/bitmaps/minusarm.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/minusarm.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/minusarm.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/minusarm.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/minusarm.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,15 @@
+/* XPM */
+static char * minusarm_xpm[] = {
+"9 9 3 1",
+" c black",
+". c yellow",
+"X c #808080808080",
+" ",
+" ....... ",
+" ....... ",
+" .XXXXX. ",
+" .X X. ",
+" .XXXXX. ",
+" ....... ",
+" ....... ",
+" "};
Added: external/tix-8.4.2.x/library/bitmaps/mktransgif.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/mktransgif.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#
+# $Id: mktransgif.tcl,v 1.1.1.1 2000/05/17 11:08:46 idiscovery Exp $
+#
+#!/usr/local/bin/tclsh
+
+set dont(plusarm.gif) 1
+set dont(minusarm.gif) 1
+
+foreach file [glob *.gif] {
+ if ![info exists dont($file)] {
+ puts "giftool -1 -B $file"
+ }
+}
+
Added: external/tix-8.4.2.x/library/bitmaps/network.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/network.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/no_entry.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/no_entry.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/no_entry.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+/* 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... ",
+" ......... "};
Added: external/tix-8.4.2.x/library/bitmaps/openfile.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/openfile.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/openfold.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/openfold.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/openfold.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/openfold.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/openfold.xpm Tue Mar 18 19:38:59 2008
@@ -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.. ",
+"............. "};
Added: external/tix-8.4.2.x/library/bitmaps/plus.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/plus.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/plus.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/plus.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/plus.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+/* XPM */
+static char * plus_xpm[] = {
+"9 9 2 1",
+". s None c None",
+" c black",
+" ",
+" ....... ",
+" ... ... ",
+" ... ... ",
+" . . ",
+" ... ... ",
+" ... ... ",
+" ....... ",
+" "};
Added: external/tix-8.4.2.x/library/bitmaps/plusarm.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/plusarm.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/plusarm.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/plusarm.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/plusarm.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,15 @@
+/* XPM */
+static char * plusarm_xpm[] = {
+"9 9 3 1",
+" c black",
+". c yellow",
+"X c gray40",
+" ",
+" ....... ",
+" ... ... ",
+" ..X X.. ",
+" . X . ",
+" ..X X.. ",
+" ... ... ",
+" ....... ",
+" "};
Added: external/tix-8.4.2.x/library/bitmaps/resize1.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/resize1.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,8 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/resize2.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/resize2.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,8 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/restore.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/restore.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/srcfile.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/srcfile.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/srcfile.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/srcfile.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/srcfile.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,18 @@
+/* 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. ",
+" .......... "};
Added: external/tix-8.4.2.x/library/bitmaps/system.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/system.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/textfile.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/textfile.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/textfile.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+#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};
Added: external/tix-8.4.2.x/library/bitmaps/textfile.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/textfile.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,18 @@
+/* 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. ",
+" .......... "};
Added: external/tix-8.4.2.x/library/bitmaps/tick.xbm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/tick.xbm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+#define tick_width 14
+#define tick_height 14
+static 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};
Added: external/tix-8.4.2.x/library/bitmaps/warning.gif
==============================================================================
Binary file. No diff available.
Added: external/tix-8.4.2.x/library/bitmaps/warning.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/bitmaps/warning.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+/* 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... ",
+" ......... "};
Added: external/tix-8.4.2.x/library/fs.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/fs.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,170 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: fs.tcl,v 1.6 2004/03/28 02:44:57 hobbs Exp $
+#
+# File system routines to handle some file system variations
+# and how that interoperates with the Tix widgets (mainly HList).
+#
+# Copyright (c) 2004 ActiveState
+
+##
+## Cross-platform
+##
+
+proc tixFSSep {} { return "/" }
+
+proc tixFSNormalize {path} {
+ # possibly use tixFSTilde ?
+ return [file normalize $path]
+}
+
+proc tixFSVolumes {} {
+ return [file volumes]
+}
+
+proc tixFSAncestors {path} {
+ return [file split [file normalize $path]]
+}
+
+# how a filename should be displayed
+proc tixFSDisplayFileName {path} {
+ if {$path eq [file dirname $path]} {
+ return $path
+ } else {
+ return [file tail $path]
+ }
+}
+
+# dir: Make a listing of this directory
+# showSubDir: Want to list the subdirectories?
+# showFile: Want to list the non-directory files in this directory?
+# showPrevDir: Want to list ".." as well?
+# showHidden: Want to list the hidden files?
+#
+# return value: a list of files and/or subdirectories
+#
+proc tixFSListDir {dir showSubDir showFile showPrevDir \
+ showHidden {pattern ""}} {
+
+ if {$pattern eq ""} { set pattern [list "*"] }
+ if {$::tcl_platform(platform) eq "unix"
+ && $showHidden && $pattern eq "*"} { lappend pattern ".*" }
+
+ if {[catch {eval [list glob -nocomplain -directory $dir] \
+ $pattern} files]} {
+ # The user has entered an invalid or unreadable directory
+ # %% todo: prompt error, go back to last succeed directory
+ return ""
+ }
+ set list ""
+ foreach f [lsort -dictionary $files] {
+ set tail [file tail $f]
+ # file tail handles this automatically
+ #if {[string match ~* $tail]} { set tail ./$tail }
+ if {[file isdirectory $f]} {
+ if {$tail eq "."} { continue }
+ if {$showSubDir} {
+ if {$tail eq ".." && !$showPrevDir} { continue }
+ lappend list $tail
+ }
+ } else {
+ if {$showFile} { lappend list $tail }
+ }
+ }
+ return $list
+}
+
+# in: internal name
+# out: native name
+proc tixFSNativeNorm {path} {
+ return [tixFSNative [tixFSNormalize $path]]
+}
+
+# tixFSDisplayName --
+#
+# Returns the name of a normalized path which is usually displayed by
+# the OS
+#
+proc tixFSDisplayName {path} {
+ return [tixFSNative $path]
+}
+
+proc tixFSTilde {path} {
+ # verify that paths with leading ~ are files or real users
+ if {[string match ~* $path]} {
+ # The following will report if the user doesn't exist
+ if {![file isdirectory $path]} {
+ set path ./$path
+ } else {
+ set path [file normalize $path]
+ }
+ }
+ return $path
+}
+
+proc tixFSJoin {dir sub} {
+ return [tixFSNative [file join $dir [tixFSTilde $sub]]]
+}
+
+proc tixFSNative {path} {
+ return $path
+}
+
+if {$::tcl_platform(platform) eq "windows"} {
+
+ ##
+ ## WINDOWS
+ ##
+
+ # is an absoulte path only if it starts with a baclskash
+ # or starts with "<drive letter>:"
+ #
+ # in: nativeName
+ #
+ proc tixFSIsAbsPath {nativeName} {
+ set ptype [file pathtype $nativename]
+ return [expr {$ptype eq "absolute" || $ptype eq "volumerelative"}]
+ }
+
+ # tixFSIsValid --
+ #
+ # Checks whether a native pathname contains invalid characters.
+ #
+ proc tixFSIsValid {path} {
+ #if {$::tcl_platform(platform) eq "windows"} {set bad "\\/:*?\"<>|\0"}
+ return 1
+ }
+
+ proc tixFSExternal {path} {
+ # Avoid normalization on root adding unwanted volumerelative pwd
+ if {[string match -nocase {[A-Z]:} $path]} {
+ return $path/
+ }
+ return [file normalize $path]
+ }
+
+ proc tixFSInternal {path} {
+ # Only need to watch for ^[A-Z]:/$, but this does the trick
+ return [string trimright [file normalize $path] /]
+ }
+
+} else {
+
+ ##
+ ## UNIX
+ ##
+
+ proc tixFSIsAbsPath {path} {
+ return [string match {[~/]*} $path]
+ }
+
+ # tixFSIsValid --
+ #
+ # Checks whether a native pathname contains invalid characters.
+ #
+ proc tixFSIsValid {path} { return 1 }
+
+ proc tixFSExternal {path} { return $path }
+ proc tixFSInternal {path} { return $path }
+
+}
Added: external/tix-8.4.2.x/library/pref/10Point.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/10Point.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,23 @@
+#
+# $Id: 10Point.fs,v 1.2 2002/01/24 09:17:02 idiscovery Exp $
+#
+
+proc tixSetFontset {} {
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ # This should be Tahoma for Win2000/XP
+ set font "MS Sans Sherif"
+ set fixedfont "Courier New"
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ }
+
+ set tixOption(font) [list $font -10]
+ set tixOption(bold_font) [list $font -10 bold]
+ set tixOption(menu_font) [list $font -10]
+ set tixOption(italic_font) [list $font -10 bold italic]
+ set tixOption(fixed_font) [list $fixedfont -10]
+ set tixOption(border1) 1
+}
Added: external/tix-8.4.2.x/library/pref/10Point.fsc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/10Point.fsc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+#
+# $Id: 10Point.fsc,v 1.2 2002/01/24 09:17:02 idiscovery Exp $
+#
+proc tixPref:InitFontSet:10Point {} {
+
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ # This should be Tahoma for Win2000/XP
+ set font "MS Sans Sherif"
+ set fixedfont "Courier New"
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ }
+
+ set tixOption(font) [list $font -10]
+ set tixOption(bold_font) [list $font -10 bold]
+ set tixOption(menu_font) [list $font -10]
+ set tixOption(italic_font) [list $font -10 bold italic]
+ set tixOption(fixed_font) [list $fixedfont -10]
+ set tixOption(border1) 1
+
+}
+proc tixPref:SetFontSet:10Point {} {
+global tixOption
+option add *Font $tixOption(font) $tixOption(prioLevel)
+option add *font $tixOption(font) $tixOption(prioLevel)
+option add *Menu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixMenu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Menubutton.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *Scale.font $tixOption(italic_font) $tixOption(prioLevel)
+option add *TixBalloon*Label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixBitmapButton*label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixControl*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelEntry*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelFrame*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixMwmClient*title.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixOptionMenu*menubutton.font $tixOption(font) $tixOption(prioLevel)
+option add *TixComboBox*Entry.font $tixOption(font) $tixOption(prioLevel)
+option add *TixFileSelectBox*Label.font $tixOption(bold_font) $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/12Point.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/12Point.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,23 @@
+#
+# $Id: 12Point.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+proc tixSetFontset {} {
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ # This should be Tahoma for Win2000/XP
+ set font "MS Sans Serif"
+ set fixedfont "Courier New"
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ }
+
+ set tixOption(font) [list $font -12]
+ set tixOption(bold_font) [list $font -12 bold]
+ set tixOption(menu_font) [list $font -12]
+ set tixOption(italic_font) [list $font -12 bold italic]
+ set tixOption(fixed_font) [list $fixedfont -12]
+ set tixOption(border1) 1
+}
Added: external/tix-8.4.2.x/library/pref/12Point.fsc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/12Point.fsc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+#
+# $Id: 12Point.fsc,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+proc tixPref:InitFontSet:12Point {} {
+
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ # This should be Tahoma for Win2000/XP
+ set font "MS Sans Serif"
+ set fixedfont "Courier New"
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ }
+
+ set tixOption(font) [list $font -12]
+ set tixOption(bold_font) [list $font -12 bold]
+ set tixOption(menu_font) [list $font -12]
+ set tixOption(italic_font) [list $font -12 bold italic]
+ set tixOption(fixed_font) [list $fixedfont -12]
+ set tixOption(border1) 1
+
+}
+proc tixPref:SetFontSet:12Point {} {
+global tixOption
+option add *Font $tixOption(font) $tixOption(prioLevel)
+option add *font $tixOption(font) $tixOption(prioLevel)
+option add *Menu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixMenu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Menubutton.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *Scale.font $tixOption(italic_font) $tixOption(prioLevel)
+option add *TixBalloon*Label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixBitmapButton*label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixControl*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelEntry*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelFrame*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixMwmClient*title.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixOptionMenu*menubutton.font $tixOption(font) $tixOption(prioLevel)
+option add *TixComboBox*Entry.font $tixOption(font) $tixOption(prioLevel)
+option add *TixFileSelectBox*Label.font $tixOption(bold_font) $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/14Point.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/14Point.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,22 @@
+#
+# $Id: 14Point.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+proc tixSetFontset {} {
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ # This should be Tahoma for Win2000/XP
+ set font "MS Sans Serif"
+ set fixedfont "Courier New"
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ }
+
+ set tixOption(font) [list $font -14]
+ set tixOption(bold_font) [list $font -14 bold]
+ set tixOption(menu_font) [list $font -14]
+ set tixOption(italic_font) [list $font -14 bold italic]
+ set tixOption(fixed_font) [list $fixedfont -14]
+ set tixOption(border1) 1
+}
Added: external/tix-8.4.2.x/library/pref/14Point.fsc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/14Point.fsc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+#
+# $Id: 14Point.fsc,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+proc tixPref:InitFontSet:14Point {} {
+
+
+ global tixOption tcl_platform
+
+ switch -- $tcl_platform(platform) "windows" {
+ if {$tcl_platform(osVersion) < 5} {
+ set font "MS Sans Serif"
+ } else {
+ set font "Tahoma"
+ }
+ set fixedfont "Courier New"
+ set bd 1
+ } unix {
+ set font "helvetica"
+ set fixedfont "courier"
+ set bd 2
+ }
+
+ set tixOption(font) [list $font -14]
+ set tixOption(bold_font) [list $font -14 bold]
+ set tixOption(menu_font) [list $font -14]
+ set tixOption(italic_font) [list $font -14 bold italic]
+ set tixOption(fixed_font) [list $fixedfont -14]
+ set tixOption(border1) $bd
+
+}
+proc tixPref:SetFontSet:14Point {} {
+global tixOption
+option add *Font $tixOption(font) $tixOption(prioLevel)
+option add *font $tixOption(font) $tixOption(prioLevel)
+option add *Menu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixMenu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Menubutton.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *Scale.font $tixOption(italic_font) $tixOption(prioLevel)
+option add *TixBalloon*Label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixBitmapButton*label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixControl*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelEntry*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelFrame*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixMwmClient*title.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixOptionMenu*menubutton.font $tixOption(font) $tixOption(prioLevel)
+option add *TixComboBox*Entry.font $tixOption(font) $tixOption(prioLevel)
+option add *TixFileSelectBox*Label.font $tixOption(bold_font) $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/Bisque.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Bisque.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+#
+# $Id: Bisque.cs,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+ global tixOption
+
+ set tixOption(bg) bisque1
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) bisque2
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) bisque3
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) bisque3
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) bisque1
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) bisque1
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) bisque2
+ set tixOption(input2_bg) bisque2
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) bisque2
+
+ set tixOption(selector) #b03060
+}
Added: external/tix-8.4.2.x/library/pref/Bisque.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Bisque.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,338 @@
+#
+# $Id: Bisque.csc,v 1.2 2000/10/12 01:59:13 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:Bisque {} {
+
+ global tixOption
+
+ set tixOption(bg) bisque1
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) bisque2
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) bisque3
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) bisque3
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) bisque1
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) bisque1
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) bisque2
+ set tixOption(input2_bg) bisque2
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) bisque2
+
+ set tixOption(selector) #b03060
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
+proc tixPref:SetScheme-Mono:Bisque {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/Blue.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Blue.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+#
+# $Id: Blue.cs,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+ global tixOption
+
+ set tixOption(bg) #9090f0
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) #8080d0
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) #7070c0
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) #8080da
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) #a8a8ff
+ set tixOption(light1_fg) black
+ set tixOption(light2_bg) #c0c0ff
+ set tixOption(light2_fg) black
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray25
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) yellow
+}
Added: external/tix-8.4.2.x/library/pref/Blue.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Blue.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,338 @@
+#
+# $Id: Blue.csc,v 1.2 2000/10/12 01:59:28 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:Blue {} {
+
+ global tixOption
+
+ set tixOption(bg) #9090f0
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) #8080d0
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) #7070c0
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) #8080da
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) #a8a8ff
+ set tixOption(light1_fg) black
+ set tixOption(light2_bg) #c0c0ff
+ set tixOption(light2_fg) black
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray25
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) yellow
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
+proc tixPref:SetScheme-Mono:Blue {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/Gray.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Gray.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,36 @@
+#
+# $Id: Gray.cs,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray50
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) gray50
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(dark1_bg)
+ set tixOption(input2_bg) $tixOption(bg)
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) lightblue
+
+ set tixOption(selector) yellow
+}
Added: external/tix-8.4.2.x/library/pref/Gray.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Gray.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,339 @@
+#
+# $Id: Gray.csc,v 1.2 2000/10/12 01:59:44 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:Gray {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray50
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) gray50
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(dark1_bg)
+ set tixOption(input2_bg) $tixOption(bg)
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) lightblue
+
+ set tixOption(selector) yellow
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
+proc tixPref:SetScheme-Mono:Gray {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/Makefile
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Makefile Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+#
+# $Id: Makefile,v 1.2 2000/10/12 01:45:23 idiscovery Exp $
+#
+# WARNING
+#
+# This Makefile is NOT for installation purposes. Please read the file
+# docs/Install.html for information about installing Tix.
+#
+#
+#
+#
+#
+#
+# fs = font scheme source
+# cs = color scheme source
+#
+# fsc = font scheme compiled
+# csc = color scheme compiled
+#
+
+
+.SUFFIXES: .fs .cs .csc .fsc
+
+all:: FONT_PREF COLOR_PREF
+
+FONT_SRC = 14Point.fs 12Point.fs TK.fs TkWin.fs
+
+FONT_PREF:: ${FONT_SRC:.fs=.fsc}
+
+COLOR_SRC = Bisque.cs Blue.cs Gray.cs SGIGray.cs TixGray.cs TK.cs TkWin.cs
+
+COLOR_PREF:: ${COLOR_SRC:.cs=.csc}
+
+fresh::
+ -rm -f ${COLOR_SRC:.cs=.csc} FONT_PREF:: ${FONT_SRC:.fs=.fsc}
+ make
+
+.cs.csc:
+ tixmkpref -color $< > $@
+
+.fs.fsc:
+ tixmkpref -font $< > $@
+
+distclean:
+ - rm -f *.a *.o core errs *~ \#* TAGS *.E a.out errors \
+ *.ps
+
+clean:: distclean
Added: external/tix-8.4.2.x/library/pref/Old12Pt.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Old12Pt.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,14 @@
+#
+# $Id: Old12Pt.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+proc tixSetFontset:12Point {} {
+ global tixOption
+
+ set tixOption(font) -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*
+ set tixOption(bold_font) -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-*-*
+ set tixOption(menu_font) -*-helvetica-bold-o-normal-*-12-*-*-*-*-*-*-*
+ set tixOption(italic_font) -*-helvetica-bold-o-normal-*-12-*-*-*-*-*-*-*
+ set tixOption(fixed_font) -*-courier-medium-r-*-*-12-*-*-*-*-*-*-*
+ set tixOption(border1) 1
+}
Added: external/tix-8.4.2.x/library/pref/Old14Pt.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/Old14Pt.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,13 @@
+#
+# $Id: Old14Pt.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+proc tixSetFontset {} {
+
+ global tixOption
+
+ set tixOption(font) -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*
+ set tixOption(bold_font) -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-*-*
+ set tixOption(menu_font) -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*
+ set tixOption(italic_font) -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-*-*
+ set tixOption(fixed_font) -*-courier-medium-r-*-*-14-*-*-*-*-*-*-*
+}
Added: external/tix-8.4.2.x/library/pref/SGIGray.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/SGIGray.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+#
+# $Id: SGIGray.cs,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray50
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) gray50
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray35
+
+ set tixOption(input1_bg) rosybrown
+ set tixOption(input2_bg) rosybrown
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) lightblue
+
+ set tixOption(selector) yellow
+}
+
+
Added: external/tix-8.4.2.x/library/pref/SGIGray.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/SGIGray.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,339 @@
+#
+# $Id: SGIGray.csc,v 1.2 2000/10/12 02:00:00 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:SGIGray {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray50
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) gray50
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray35
+
+ set tixOption(input1_bg) rosybrown
+ set tixOption(input2_bg) rosybrown
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) lightblue
+
+ set tixOption(selector) yellow
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
+proc tixPref:SetScheme-Mono:SGIGray {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/TK.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TK.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+#
+# $Id: TK.cs,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+ global tixOption
+
+ set tixOption(bg) #d9d9d9
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) #c3c3c3
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) #a3a3a3
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) #a3a3a3
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) #ececec
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) #fcfcfc
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) #d9d9d9
+ set tixOption(input2_bg) #d9d9d9
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) #c3c3c3
+
+ set tixOption(selector) #b03060
+}
Added: external/tix-8.4.2.x/library/pref/TK.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TK.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,72 @@
+#
+# $Id: TK.csc,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:TK {} {
+
+ global tixOption
+
+ set tixOption(bg) #d9d9d9
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) #c3c3c3
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) #a3a3a3
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) #a3a3a3
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) #ececec
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) #fcfcfc
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) #d9d9d9
+ set tixOption(input2_bg) #d9d9d9
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) #c3c3c3
+
+ set tixOption(selector) #b03060
+
+}
+proc tixPref:SetScheme-Mono:TK {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+}
Added: external/tix-8.4.2.x/library/pref/TK.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TK.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,16 @@
+#
+# $Id: TK.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+proc tixSetFontset {} {
+
+ global tixOption
+
+ set tixOption(font) -Adobe-Helvetica-Medium-R-Normal--*-120-*
+ set tixOption(bold_font) -Adobe-Helvetica-Bold-R-Normal--*-120-*
+ set tixOption(menu_font) -Adobe-Helvetica-Bold-R-Normal--*-120-*
+ set tixOption(italic_font) -Adobe-Helvetica-Bold-O-Normal--*-120-*
+ set tixOption(fixed_font) -*-courier-medium-r-*-*-14-*-*-*-*-*-*-*
+ set tixOption(border1) 1
+}
+
Added: external/tix-8.4.2.x/library/pref/TK.fsc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TK.fsc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,19 @@
+#
+# $Id: TK.fsc,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+proc tixPref:InitFontSet:TK {} {
+
+
+ global tixOption
+
+ set tixOption(font) -Adobe-Helvetica-Medium-R-Normal--*-120-*
+ set tixOption(bold_font) -Adobe-Helvetica-Bold-R-Normal--*-120-*
+ set tixOption(menu_font) -Adobe-Helvetica-Bold-R-Normal--*-120-*
+ set tixOption(italic_font) -Adobe-Helvetica-Bold-O-Normal--*-120-*
+ set tixOption(fixed_font) -*-courier-medium-r-*-*-14-*-*-*-*-*-*-*
+ set tixOption(border1) 1
+
+}
+proc tixPref:SetFontSet:TK {} {
+global tixOption
+}
Added: external/tix-8.4.2.x/library/pref/TixGray.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TixGray.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,36 @@
+#
+# $Id: TixGray.cs,v 1.1.1.1 2000/05/17 11:08:47 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray86
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray77
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) gray77
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray92
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) gray95
+ set tixOption(input2_bg) gray95
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) lightblue
+
+ set tixOption(selector) yellow
+}
Added: external/tix-8.4.2.x/library/pref/TixGray.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TixGray.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,339 @@
+#
+# $Id: TixGray.csc,v 1.2 2000/10/12 02:00:25 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:TixGray {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray86
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray77
+ set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) gray77
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray92
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) gray95
+ set tixOption(input2_bg) gray95
+ set tixOption(output1_bg) $tixOption(dark1_bg)
+ set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) black
+ set tixOption(select_bg) lightblue
+
+ set tixOption(selector) yellow
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
+proc tixPref:SetScheme-Mono:TixGray {} {
+
+
+ global tixOption
+
+ set tixOption(bg) lightgray
+ set tixOption(fg) black
+
+ set tixOption(dark1_bg) gray70
+ set tixOption(dark1_fg) black
+ set tixOption(dark2_bg) gray60
+ set tixOption(dark2_fg) white
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+ set tixOption(light2_bg) gray95
+ set tixOption(light2_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(input1_bg) $tixOption(light1_bg)
+ set tixOption(input2_bg) $tixOption(light1_bg)
+ set tixOption(output1_bg) $tixOption(light1_bg)
+ set tixOption(output2_bg) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+option add *background $tixOption(bg) 10
+option add *Background $tixOption(bg) $tixOption(prioLevel)
+option add *background $tixOption(bg) $tixOption(prioLevel)
+option add *Foreground $tixOption(fg) $tixOption(prioLevel)
+option add *foreground $tixOption(fg) $tixOption(prioLevel)
+option add *activeBackground $tixOption(active_bg) $tixOption(prioLevel)
+option add *activeForeground $tixOption(active_fg) $tixOption(prioLevel)
+option add *HighlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *selectBorderWidth 0 $tixOption(prioLevel)
+option add *Menu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *TixMenu.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Checkbutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Radiobutton.selectColor $tixOption(selector) $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+option add *TixBalloon*background #ffff60 $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.seperatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground black $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground black $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/TkWin.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TkWin.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,68 @@
+#
+# $Id: TkWin.cs,v 1.1 2000/10/12 01:41:04 idiscovery Exp $
+#
+proc tixSetScheme-Color {} {
+ global tixOption
+
+ set tixOption(bg) SystemButtonFace
+ set tixOption(fg) SystemButtonText
+
+ set tixOption(dark1_bg) SystemScrollbar
+ set tixOption(dark1_fg) SystemButtonText
+# set tixOption(dark2_bg) SystemDisabledText
+# set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) SystemButtonFace
+ set tixOption(inactive_fg) SystemButtonText
+
+ set tixOption(light1_bg) SystemButtonFace
+# set tixOption(light1_fg) white
+# set tixOption(light2_bg) #fcfcfc
+# set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) SystemDisabledText
+
+ set tixOption(input1_bg) SystemWindow
+# set tixOption(input2_bg)
+# set tixOption(output1_bg) $tixOption(dark1_bg)
+# set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) SystemHighlightText
+ set tixOption(select_bg) SystemHighlight
+
+ set tixOption(selector) SystemHighlight
+}
+
+proc tixSetScheme-Mono {} {
+ global tixOption
+
+ set tixOption(bg) SystemButtonFace
+ set tixOption(fg) SystemButtonText
+
+ set tixOption(dark1_bg) SystemScrollbar
+ set tixOption(dark1_fg) SystemButtonText
+# set tixOption(dark2_bg) SystemDisabledText
+# set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) SystemButtonFace
+ set tixOption(inactive_fg) SystemButtonText
+
+ set tixOption(light1_bg) SystemButtonFace
+# set tixOption(light1_fg) white
+# set tixOption(light2_bg) #fcfcfc
+# set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) SystemDisabledText
+
+ set tixOption(input1_bg) white
+# set tixOption(input2_bg)
+# set tixOption(output1_bg) $tixOption(dark1_bg)
+# set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) SystemHighlightText
+ set tixOption(select_bg) SystemHighlight
+
+ set tixOption(selector) SystemHighlight
+}
Added: external/tix-8.4.2.x/library/pref/TkWin.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TkWin.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,333 @@
+#
+# $Id: TkWin.csc,v 1.2 2002/01/24 09:16:22 idiscovery Exp $
+#
+proc tixPref:SetScheme-Color:TkWin {} {
+ global tixOption
+
+ set tixOption(bg) SystemButtonFace
+ set tixOption(fg) SystemButtonText
+
+ set tixOption(dark1_bg) SystemScrollbar
+ set tixOption(dark1_fg) SystemButtonText
+# set tixOption(dark2_bg) SystemDisabledText
+# set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) SystemButtonFace
+ set tixOption(inactive_fg) SystemButtonText
+
+ set tixOption(light1_bg) SystemButtonFace
+# set tixOption(light1_fg) white
+# set tixOption(light2_bg) #fcfcfc
+# set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) SystemDisabledText
+
+ set tixOption(input1_bg) SystemWindow
+# set tixOption(input2_bg)
+# set tixOption(output1_bg) $tixOption(dark1_bg)
+# set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) SystemHighlightText
+ set tixOption(select_bg) SystemHighlight
+
+ set tixOption(selector) SystemHighlight
+
+option add *TixBalloon*background "#ffff60" $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.separatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground SystemWindowText $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground SystemWindowText $tixOption(prioLevel)
+option add *TixComboBox*Entry.selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *TixComboBox*TixScrolledListBox.selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *TixComboBox*TixScrolledListBox.selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+}
+
+# Leave the standard widgets alone
+if {0} {
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+}
+
+proc tixPref:SetScheme-Mono:TkWin {} {
+
+ global tixOption
+
+ set tixOption(bg) SystemButtonFace
+ set tixOption(fg) SystemButtonText
+
+ set tixOption(dark1_bg) SystemScrollbar
+ set tixOption(dark1_fg) SystemButtonText
+# set tixOption(dark2_bg) SystemDisabledText
+# set tixOption(dark2_fg) black
+ set tixOption(inactive_bg) SystemButtonFace
+ set tixOption(inactive_fg) SystemButtonText
+
+ set tixOption(light1_bg) SystemButtonFace
+# set tixOption(light1_fg) white
+# set tixOption(light2_bg) #fcfcfc
+# set tixOption(light2_fg) white
+
+ set tixOption(active_bg) $tixOption(dark1_bg)
+ set tixOption(active_fg) $tixOption(fg)
+ set tixOption(disabled_fg) SystemDisabledText
+
+ set tixOption(input1_bg) white
+# set tixOption(input2_bg)
+# set tixOption(output1_bg) $tixOption(dark1_bg)
+# set tixOption(output2_bg) $tixOption(bg)
+
+ set tixOption(select_fg) SystemHighlightText
+ set tixOption(select_bg) SystemHighlight
+
+ set tixOption(selector) SystemHighlight
+
+
+option add *TixBalloon*background "#ffff60" $tixOption(prioLevel)
+option add *TixBalloon*foreground black $tixOption(prioLevel)
+option add *TixBalloon.background black $tixOption(prioLevel)
+option add *TixBalloon*Label.anchor w $tixOption(prioLevel)
+option add *TixControl*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixControl*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixControl*entry.foreground black $tixOption(prioLevel)
+option add *TixControl*entry.insertBackground black $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirTree*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirList*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixDirList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixDirList*f1.relief sunken $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixScrolledHList*f1.relief sunken $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.activeBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.disabledBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixTree*f1.borderWidth 1 $tixOption(prioLevel)
+option add *TixTree*f1.relief sunken $tixOption(prioLevel)
+option add *TixFileEntry*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixHList.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.activeBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixHList.disabledBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixLabelEntry*entry.foreground black $tixOption(prioLevel)
+option add *TixLabelEntry*entry.insertBackground black $tixOption(prioLevel)
+option add *TixMultiList*Listbox.borderWidth 0 $tixOption(prioLevel)
+option add *TixMultiList*Listbox.highlightThickness 0 $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*Scrollbar.width 15 $tixOption(prioLevel)
+option add *TixMultiList*f1.borderWidth 2 $tixOption(prioLevel)
+option add *TixMultiList*f1.relief sunken $tixOption(prioLevel)
+option add *TixMultiList*f1.highlightThickness 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.relief raised $tixOption(prioLevel)
+option add *TixMDIMenuBar*menubar.borderWidth 2 $tixOption(prioLevel)
+option add *TixMDIMenuBar*Menubutton.padY 2 $tixOption(prioLevel)
+option add *TixNoteBook.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.Background $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.backPageColor $tixOption(bg) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $tixOption(prioLevel)
+option add *TixPanedWindow.separatorBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPanedWindow.handleBg $tixOption(bg) $tixOption(prioLevel)
+option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledListBox*listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledText.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledText*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixScrolledWindow*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *TixTree*hlist.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *TixTree*hlist.borderWidth 1 $tixOption(prioLevel)
+option add *TixComboBox*Entry.highlightBackground $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.foreground SystemWindowText $tixOption(prioLevel)
+option add *TixComboBox*Entry.insertBackground SystemWindowText $tixOption(prioLevel)
+option add *TixComboBox*Entry.selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *TixComboBox*Entry.selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+option add *TixComboBox*TixScrolledListBox.selectBackground $tixOption(select_bg) $tixOption(prioLevel)
+option add *TixComboBox*TixScrolledListBox.selectForeground $tixOption(select_fg) $tixOption(prioLevel)
+}
+
+# Leave the standard widgets alone
+if {0} {
+option add *Menubutton.padY 5 $tixOption(prioLevel)
+option add *Button.borderWidth 2 $tixOption(prioLevel)
+option add *Button.anchor c $tixOption(prioLevel)
+option add *Entry.relief sunken $tixOption(prioLevel)
+option add *Entry.highlightBackground $tixOption(bg) $tixOption(prioLevel)
+option add *Entry.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Entry.foreground black $tixOption(prioLevel)
+option add *Entry.insertBackground black $tixOption(prioLevel)
+option add *Label.anchor w $tixOption(prioLevel)
+option add *Label.borderWidth 0 $tixOption(prioLevel)
+option add *Listbox.background $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Listbox.relief sunken $tixOption(prioLevel)
+option add *Scale.foreground $tixOption(fg) $tixOption(prioLevel)
+option add *Scale.activeForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderForeground $tixOption(bg) $tixOption(prioLevel)
+option add *Scale.sliderBackground $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.background $tixOption(bg) $tixOption(prioLevel)
+option add *Scrollbar.troughColor $tixOption(light1_bg) $tixOption(prioLevel)
+option add *Scrollbar.relief sunken $tixOption(prioLevel)
+option add *Scrollbar.borderWidth 1 $tixOption(prioLevel)
+option add *Scrollbar.width 15 $tixOption(prioLevel)
+option add *Text.background $tixOption(input1_bg) $tixOption(prioLevel)
+option add *Text.relief sunken $tixOption(prioLevel)
+}
+
Added: external/tix-8.4.2.x/library/pref/TkWin.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TkWin.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,16 @@
+#
+# $Id: TkWin.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+proc tixSetFontset {} {
+
+ global tixOption
+
+ set tixOption(font) "windows-message"
+ set tixOption(bold_font) "windows-status"
+ set tixOption(menu_font) "windows-menu"
+ set tixOption(italic_font) "windows-message"
+ set tixOption(fixed_font) "systemfixed"
+ set tixOption(border1) 1
+}
+
Added: external/tix-8.4.2.x/library/pref/TkWin.fsc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/TkWin.fsc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,34 @@
+#
+# $Id: TkWin.fsc,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+proc tixPref:InitFontSet:TkWin {} {
+
+
+ global tixOption
+
+ set tixOption(font) "windows-message"
+ set tixOption(bold_font) "windows-status"
+ set tixOption(menu_font) "windows-menu"
+ set tixOption(italic_font) "windows-message"
+ set tixOption(fixed_font) "systemfixed"
+ set tixOption(border1) 1
+
+}
+proc tixPref:SetFontSet:TkWin {} {
+global tixOption
+option add *Menu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixMenu.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Menubutton.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *Label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *Scale.font $tixOption(italic_font) $tixOption(prioLevel)
+option add *TixBalloon*Label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixBitmapButton*label.font $tixOption(font) $tixOption(prioLevel)
+option add *TixControl*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelEntry*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixLabelFrame*label.font $tixOption(bold_font) $tixOption(prioLevel)
+option add *TixMwmClient*title.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixNoteBook.nbframe.font $tixOption(menu_font) $tixOption(prioLevel)
+option add *TixOptionMenu*menubutton.font $tixOption(font) $tixOption(prioLevel)
+option add *TixComboBox*Entry.font $tixOption(font) $tixOption(prioLevel)
+option add *TixFileSelectBox*Label.font $tixOption(bold_font) $tixOption(prioLevel)
+}
Added: external/tix-8.4.2.x/library/pref/WmDefault.cs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.cs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,45 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: WmDefault.cs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+proc tixSetScheme-Color {} {
+ global tixOption
+
+ package require wm_default
+ if {![info exists ::wm_default::wm]} {
+ wm_default::setup
+ wm_default::addoptions
+ }
+
+ set tixOption(bg) $::wm_default::background
+ set tixOption(fg) $::wm_default::foreground
+
+ set tixOption(dark1_bg) #808080
+
+ set tixOption(inactive_bg) $::wm_default::disabledbackground
+ set tixOption(inactive_fg) black; # unused
+
+ # light1 was used for listbox widgets and trough colors
+ set tixOption(light1_bg) $::wm_default::scrollbars
+ set tixOption(light1_fg) white; # unused
+
+ # text is now used for listbox widgets
+ set tixOption(list_bg) $::wm_default::textbackground
+
+ set tixOption(active_bg) $::wm_default::activebackground
+ set tixOption(active_fg) $::wm_default::activeforeground
+
+ set tixOption(disabled_fg) $::wm_default::disabledforeground
+ # new
+ set tixOption(disabled_bg) $::wm_default::disabledtextbackground
+
+ set tixOption(input1_bg) $::wm_default::textbackground
+ set tixOption(input1_fg) $::wm_default::textforeground
+
+ set tixOption(select_fg) $::wm_default::selectforeground
+ set tixOption(select_bg) $::wm_default::selectbackground
+
+ set tixOption(selector) $::wm_default::selectcolor
+
+}
Added: external/tix-8.4.2.x/library/pref/WmDefault.csc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.csc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,316 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: WmDefault.csc,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+#
+
+proc tixPref:SetScheme-Color:WmDefault {args} {
+ global tixOption
+
+ package require wm_default
+ if {![info exists ::wm_default::wm]} {
+ wm_default::setup
+ wm_default::addoptions
+ }
+
+ set tixOption(bg) $::wm_default::background
+ set tixOption(fg) $::wm_default::foreground
+
+ # was "#808080"
+ set tixOption(dark1_bg) $::wm_default::disabledbackground
+
+ set tixOption(inactive_bg) $::wm_default::disabledbackground
+ set tixOption(inactive_fg) black; # unused
+
+ # light1 was used for listbox widgets and trough colors
+ set tixOption(light1_bg) $::wm_default::scrollbars
+ set tixOption(light1_fg) white; #unused
+
+ # text is now used for listbox widgets
+ set tixOption(list_bg) $::wm_default::textbackground
+
+ set tixOption(active_bg) $::wm_default::activebackground
+ set tixOption(active_fg) $::wm_default::activeforeground
+
+ set tixOption(disabled_fg) $::wm_default::disabledforeground
+ # new
+ set tixOption(disabled_bg) $::wm_default::disabledtextbackground
+
+ set tixOption(textbackground) $::wm_default::textbackground
+ set tixOption(input1_fg) $::wm_default::textforeground
+
+ set tixOption(select_fg) $::wm_default::selectforeground
+ set tixOption(select_bg) $::wm_default::selectbackground
+
+ set tixOption(selector) $::wm_default::selectcolor
+
+ set pri $tixOption(prioLevel)
+
+ # Try to give the subwidget (hlist) the highlightThickness
+ foreach pref {*TixDirTree *TixDirList *TixTree \
+ *TixScrolledListBox \
+ *TixScrolledTList *TixScrolledText} {
+ option add $pref.highlightThickness 0 $pri
+ }
+
+
+ # necessary:
+ option add *TixBalloon*background white $pri
+ option add *TixBalloon*foreground black $pri
+ option add *TixBalloon.background black $pri
+
+ # necessary: but should be restricted
+ # was - option add *Label.anchor w $pri
+ option add *TixBalloon*Label.anchor w $pri
+ option add *TixComboBox*Label.anchor w $pri
+ option add *TixFileEntry*Label.anchor w $pri
+ option add *TixLabelEntry*Label.anchor w $pri
+ option add *TixOptionMenu*Label.anchor w $pri
+
+ option add *TixComboBox*background $tixOption(background) $pri
+ option add *TixFileEntry*Entry.borderWidth 0 $pri
+ option add *TixFileEntry.frame.background $tixOption(textbackground) $pri
+
+ option add *TixFileEntry*Entry.highlightBackground $::wm_default::highlightbackground $pri
+
+ option add *TixOptionMenu*menubutton.relief raised $pri
+ option add *TixOptionMenu*menubutton.borderWidth $::wm_default::borderwidth $pri
+ option add *TixResizeHandle*background $tixOption(disabledbackground) $pri
+
+ option add *handleActiveBg $::wm_default::selectbackground $pri
+
+
+ # These may already have been covered by wm_default
+
+ option add *TixControl*entry.insertBackground $tixOption(textforeground) $pri
+
+ option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $pri
+ option add *TixDirTree*hlist.disabledBackground $tixOption(disabled_bg) $pri
+ option add *TixDirTree*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixDirTree*f1.relief sunken $pri
+
+ option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $pri
+ option add *TixDirList*hlist.disabledBackground $tixOption(disabled_bg) $pri
+ option add *TixDirList*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixDirList*f1.relief sunken $pri
+
+ option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $pri
+ option add *TixScrolledHList*hlist.disabledBackground $tixOption(disabled_bg) $pri
+ option add *TixScrolledHList*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixScrolledHList*f1.relief sunken $pri
+
+ option add *TixTree*hlist.background $tixOption(textbackground) $pri
+ option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $pri
+ option add *TixTree*hlist.disabledBackground $tixOption(disabled_bg) $pri
+ option add *TixTree*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixTree*f1.relief sunken $pri
+
+ option add *TixFileEntry.background $tixOption(background) $pri
+
+ option add *TixHList.activeBackground $tixOption(light1_bg) $pri
+ option add *TixHList.disabledBackground $tixOption(disabled_bg) $pri
+
+ option add *TixLabelEntry*entry.background $tixOption(textbackground) $pri
+ option add *TixLabelEntry*entry.foreground $tixOption(textforeground) $pri
+ option add *TixLabelEntry*entry.insertBackground $tixOption(textforeground) $pri
+
+ option add *TixMultiView*Listbox.borderWidth 0 $pri
+ option add *TixMultiView*Listbox.highlightThickness 0 $pri
+ option add *TixMultiView*Scrollbar.relief sunken $pri
+ option add *TixMultiView*Scrollbar.width 15 $pri
+ option add *TixMultiView*f1.borderWidth 2 $pri
+ option add *TixMultiView*f1.relief sunken $pri
+ option add *TixMultiView*f1.highlightThickness 2 $pri
+
+ option add *TixNoteBook.Background $tixOption(background) $pri
+ option add *TixNoteBook.nbframe.Background $tixOption(background) $pri
+ option add *TixNoteBook.nbframe.backPageColor $tixOption(background) $pri
+ option add *TixNoteBook.nbframe.inactiveBackground $tixOption(disabledbackground) $pri
+ option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $pri
+# option add *TixPanedWindow.seperatorBg $tixOption(disabledbackground) $pri
+# option add *TixPanedWindow.handleBg $tixOption(disabledbackground) $pri
+
+ option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $pri
+
+ option add *TixScrolledTList*tlist.background $tixOption(textbackground) $pri
+
+ option add *TixScrolledListBox*listbox.background $tixOption(textbackground) $pri
+
+ option add *TixScrolledWindow.frame.background $tixOption(list_bg) $pri
+
+ option add *TixTree*hlist.highlightBackground $tixOption(background) $pri
+ option add *TixTree*hlist.background $tixOption(textbackground) $pri
+ option add *TixTree*hlist.borderWidth $::wm_default::borderwidth $pri
+
+ option add *TixComboBox*Entry.highlightBackground $tixOption(background) $pri
+ option add *TixComboBox*Entry.background $tixOption(textbackground) $pri
+ option add *TixComboBox*Entry.foreground $tixOption(textforeground) $pri
+ option add *TixComboBox*Entry.insertBackground $tixOption(textforeground) $pri
+}
+
+proc tixPref:SetScheme-Mono:Gray {} {
+ global tixOption
+
+ package require wm_default
+ if {![info exists ::wm_default::wm]} {
+ wm_default::setup
+ wm_default::addoptions
+ }
+
+ set tixOption(background) lightgray
+ set tixOption(foreground) black
+
+ set tixOption(dark1_bg) gray70
+
+ set tixOption(inactive_bg) lightgray
+ set tixOption(inactive_fg) black
+
+ set tixOption(light1_bg) gray90
+ set tixOption(light1_fg) white
+
+ set tixOption(active_bg) gray90
+ set tixOption(active_fg) $tixOption(foreground)
+ set tixOption(disabled_fg) gray55
+
+ set tixOption(textbackground) $tixOption(light1_bg)
+
+ set tixOption(select_fg) white
+ set tixOption(select_bg) black
+
+ set tixOption(selector) black
+
+ set pri $tixOption(prioLevel)
+
+ # Override what you want with optional arguments to wm_default::adoptions
+
+ # necessary:
+ option add *TixBalloon*background white $pri
+ option add *TixBalloon*foreground black $pri
+ option add *TixBalloon.background black $pri
+
+ # necessary: but should be restricted
+ # was - option add *Label.anchor w $pri
+ option add *TixBalloon*Label.anchor w $pri
+ option add *TixComboBox*Label.anchor w $pri
+ option add *TixFileEntry*Label.anchor w $pri
+ option add *TixLabelEntry*Label.anchor w $pri
+
+# option add *TixDirTree*hlist.highlightBackground $tixOption(background) $pri
+# option add *TixDirTree*hlist.background $tixOption(light1_bg) $pri
+# option add *TixDirTree*hlist.activeBackground $tixOption(light1_bg) $pri
+# option add *TixDirTree*hlist.disabledBackground $tixOption(disabled_bg) $pri
+# option add *TixDirTree*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixDirTree*f1.relief sunken $pri
+# option add *TixDirList*hlist.highlightBackground $tixOption(background) $pri
+# option add *TixDirList*hlist.background $tixOption(light1_bg) $pri
+# option add *TixDirList*hlist.activeBackground $tixOption(light1_bg) $pri
+# option add *TixDirList*hlist.disabledBackground $tixOption(disabled_bg) $pri
+# option add *TixDirList*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixDirList*f1.relief sunken $pri
+# option add *TixScrolledHList*hlist.highlightBackground $tixOption(background) $pri
+# option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $pri
+# option add *TixScrolledHList*hlist.activeBackground $tixOption(light1_bg) $pri
+# option add *TixScrolledHList*hlist.disabledBackground $tixOption(disabled_bg) $pri
+# option add *TixScrolledHList*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixScrolledHList*f1.relief sunken $pri
+# option add *TixTree*hlist.highlightBackground $tixOption(background) $pri
+# option add *TixTree*hlist.background $tixOption(light1_bg) $pri
+# option add *TixTree*hlist.activeBackground $tixOption(light1_bg) $pri
+# option add *TixTree*hlist.disabledBackground $tixOption(disabled_bg) $pri
+# option add *TixTree*f1.borderWidth $::wm_default::borderwidth $pri
+ option add *TixTree*f1.relief sunken $pri
+# option add *TixHList.background $tixOption(light1_bg) $pri
+# option add *TixHList.activeBackground $tixOption(light1_bg) $pri
+# option add *TixHList.disabledBackground $tixOption(light1_bg) $pri
+# option add *TixMultiView*Listbox.borderWidth 0 $pri
+# option add *TixMultiView*Listbox.highlightThickness 0 $pri
+ option add *TixMultiView*Scrollbar.relief sunken $pri
+# option add *TixMultiView*f1.borderWidth 2 $pri
+ option add *TixMultiView*f1.relief sunken $pri
+# option add *TixMultiView*f1.highlightThickness 2 $pri
+# option add *TixMDIMenuBar*menubar.relief raised $pri
+# option add *TixMDIMenuBar*menubar.borderWidth 2 $pri
+# option add *TixMDIMenuBar*Menubutton.padY 2 $pri
+# option add *TixNoteBook.Background $tixOption(background) $pri
+# option add *TixNoteBook.nbframe.Background $tixOption(background) $pri
+# option add *TixNoteBook.nbframe.backPageColor $tixOption(background) $pri
+# option add *TixNoteBook.nbframe.inactiveBackground $tixOption(inactive_bg) $pri
+# option add *TixPanedWindow.handleActiveBg $tixOption(active_bg) $pri
+# option add *TixPanedWindow.seperatorBg $tixOption(disabledbackground) $pri
+# option add *TixPanedWindow.handleBg $tixOption(disabledbackground) $pri
+# option add *TixPopupMenu*menubutton.background $tixOption(dark1_bg) $pri
+# option add *TixScrolledHList*hlist.highlightBackground $tixOption(background) $pri
+# option add *TixScrolledHList*hlist.background $tixOption(light1_bg) $pri
+# option add *TixScrolledTList*tlist.highlightBackground $tixOption(background) $pri
+# option add *TixScrolledTList*tlist.background $tixOption(light1_bg) $pri
+# option add *TixScrolledListBox*listbox.highlightBackground $tixOption(background) $pri
+# option add *TixScrolledWindow.frame.background $tixOption(light1_bg) $pri
+# option add *TixTree*hlist.highlightBackground $tixOption(background) $pri
+# option add *TixTree*hlist.background $tixOption(light1_bg) $pri
+# option add *TixTree*hlist.borderWidth $::wm_default::borderwidth $pri
+
+ # These were missing
+
+# option add *TixMenu*Menu.selectColor $NIMLook(foreground) $pri
+
+# option add *TixMDIMenuBar*Menubutton.padY 2 $pri
+# option add *TixMDIMenuBar*menubar.borderWidth 2 $pri
+# option add *TixMDIMenuBar*menubar.relief raised $pri
+
+# option add *TixMultiView*Listbox.borderWidth 0 $pri
+# option add *TixMultiView*Listbox.highlightThickness 0 $pri
+# option add *TixMultiView*Scrollbar.relief sunken $pri
+# option add *TixMultiView*f1.borderWidth 2 $pri
+# option add *TixMultiView*f1.highlightThickness 2 $pri
+ option add *TixMultiView*f1.relief sunken $pri
+
+}
+
+# Leave the standard widgets alone
+if {0} {
+ option add *Background $tixOption(background) $pri
+ option add *background $tixOption(background) $pri
+ option add *Foreground $tixOption(foreground) $pri
+ option add *foreground $tixOption(foreground) $pri
+ option add *activeBackground $tixOption(active_bg) $pri
+ option add *activeForeground $tixOption(active_fg) $pri
+ option add *HighlightBackground $tixOption(background) $pri
+
+ option add *selectBackground $tixOption(select_bg) $pri
+ option add *selectForeground $tixOption(select_fg) $pri
+ option add *selectBorderWidth 0 $pri
+
+ option add *Menu.selectColor $tixOption(foreground) $pri
+ option add *TixMenu.selectColor $tixOption(foreground) $pri
+ option add *Menubutton.padY 5 $pri
+
+ option add *Button.borderWidth 2 $pri
+ option add *Button.anchor c $pri
+
+ option add *Checkbutton.selectColor $tixOption(selector) $pri
+ option add *Radiobutton.selectColor $tixOption(selector) $pri
+ option add *Entry.relief sunken $pri
+ option add *Entry.highlightBackground $tixOption(background) $pri
+ option add *Entry.background $tixOption(textbackground) $pri
+ option add *Entry.foreground $tixOption(textforeground) $pri
+ option add *Entry.insertBackground $tixOption(textforeground) $pri
+ option add *Label.anchor w $pri
+ option add *Label.borderWidth 0 $pri
+
+ option add *Listbox.background $tixOption(textbackground) $pri
+ option add *Listbox.relief sunken $pri
+
+ option add *Scale.foreground $tixOption(foreground) $pri
+ option add *Scale.activeForeground $tixOption(background) $pri
+ option add *Scale.background $tixOption(background) $pri
+ option add *Scale.sliderForeground $tixOption(background) $pri
+ option add *Scale.sliderBackground $tixOption(light1_bg) $pri
+
+ option add *Scrollbar.relief sunken $pri
+ option add *Scrollbar.borderWidth $::wm_default::borderwidth $pri
+ option add *Scrollbar.width 15 $pri
+
+ option add *Text.background $tixOption(textbackground) $pri
+ option add *Text.relief sunken $pri
+
+}
Added: external/tix-8.4.2.x/library/pref/WmDefault.fs
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.fs Tue Mar 18 19:38:59 2008
@@ -0,0 +1,23 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: WmDefault.fs,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+proc tixSetFontset {} {
+ global tixOption
+
+ package require wm_default
+ if {![info exists ::wm_default::wm]} {
+ wm_default::setup
+ wm_default::addoptions
+ }
+
+ set tixOption(font) $::wm_default::system_font
+ set tixOption(bold_font) [concat $::wm_default::system_font bold]
+ set tixOption(menu_font) $::wm_default::menu_font
+ set tixOption(italic_font) [concat $::wm_default::system_font italic]
+ set tixOption(fixed_font) $::wm_default::fixed_font
+ set tixOption(text_font) $::wm_default::text_font
+ set tixOption(border1) $::wm_default::borderwidth
+
+}
Added: external/tix-8.4.2.x/library/pref/WmDefault.fsc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.fsc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,57 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: WmDefault.fsc,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+#
+
+proc tixPref:InitFontSet:WmDefault {} {
+ global tixOption
+
+ package require wm_default
+ if {1 || ![info exists ::wm_default::wm]} {
+ wm_default::setup
+ wm_default::addoptions
+ }
+
+ set tixOption(font) $::wm_default::system_font
+ set tixOption(bold_font) [concat $::wm_default::system_font bold]
+ set tixOption(menu_font) $::wm_default::menu_font
+ set tixOption(italic_font) [concat $::wm_default::system_font italic]
+ set tixOption(fixed_font) $::wm_default::fixed_font
+ set tixOption(border1) $::wm_default::borderwidth
+
+}
+
+proc tixPref:SetFontSet:WmDefault {} {
+ global tixOption
+
+ package require wm_default
+ if {1 || ![info exists ::wm_default::wm]} {
+ wm_default::setup
+ wm_default::addoptions
+ }
+
+ set pri $tixOption(prioLevel)
+
+ set tixOption(font) $::wm_default::system_font
+ set tixOption(bold_font) [concat $::wm_default::system_font bold]
+ set tixOption(menu_font) $::wm_default::menu_font
+ set tixOption(italic_font) [concat $::wm_default::system_font italic]
+ set tixOption(fixed_font) $::wm_default::fixed_font
+ set tixOption(text_font) $::wm_default::text_font
+ set tixOption(border1) $::wm_default::borderwidth
+
+ option add *TixBalloon*Label.font $tixOption(font) $pri
+ option add *TixBitmapButton*label.font $tixOption(font) $pri
+ option add *TixControl*label.font $tixOption(font) $pri
+ option add *TixLabelEntry*label.font $tixOption(font) $pri
+ option add *TixLabelFrame*label.font $tixOption(font) $pri
+ option add *TixMenu.font $tixOption(menu_font) $pri
+ option add *TixMwmClient*title.font $tixOption(font) $pri
+ option add *TixNoteBook.nbframe.font $tixOption(font) $pri
+ # Although its a menubutton, it's more like a button than a menu IMHO
+ option add *TixOptionMenu*menubutton.font $tixOption(font) $pri
+ option add *TixComboBox*Entry.font $tixOption(font) $pri
+ option add *TixFileSelectBox*Label.font $tixOption(font) $pri
+
+}
Added: external/tix-8.4.2.x/library/pref/WmDefault.py
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.py Tue Mar 18 19:38:59 2008
@@ -0,0 +1,96 @@
+# -*- mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: WmDefault.py,v 1.2 2001/12/09 05:03:09 idiscovery Exp $
+#
+
+
+"""One of the bad things about Tk/Tkinter is that it does not pick up
+the current color and font scheme from the prevailing CDE/KDE/GNOME/Windows
+window manager scheme.
+
+One of the good things about Tk/Tkinter is that it is not tied to one
+particular widget set so it could pick up the current color and font scheme
+from the prevailing CDE/KDE/GNOME/Windows window manager scheme.
+
+The WmDefault package is for making Tk/Tkinter applications use the
+prevailing CDE/KDE/GNOME/Windows scheme. It tries to find the files
+and/or settings that the current window manager is using, and then
+sets the Tk options database accordingly.
+
+Download the latest version of wm_default from http://tix.sourceforge.net
+either as a part of the standard Tix distribution, or as a part of the
+Tix Applications: http://tix.sourceforge.net/Tide. wm_default does not
+require Tix, but is Tix enabled.
+"""
+
+import os, sys, traceback, string
+import tkMessageBox
+
+def setup(root, wm=''):
+ """1) find the files and/or settings (::wm_default::setup).
+ Takes one optional argument: wm, the name of the window manager
+ as a string, if known. One of: windows gnome kde1 kde2 cde kde.
+ """
+ try:
+ try:
+ # Make sure Tcl/Tk knows wm_default is installed
+ root.tk.eval("package require wm_default")
+ except:
+ # Try again with this directory on the Tcl/Tk path
+ dir = os.path.dirname (self.__file__)
+ root.tk.eval('global auto_path; lappend auto_path {%s}' % dir)
+ root.tk.eval("package require wm_default")
+ except:
+ t, v, tb = sys.exc_info()
+ text = "Error loading WmDefault\n"
+ for line in traceback.format_exception(t,v,tb): text = text + line + '\n'
+ try:
+ tkMessageBox.showerror ('WmDefault Error', text)
+ except:
+ sys.stderr.write( text )
+
+ return root.tk.call('::wm_default::setup', wm)
+
+def addoptions(root, cnf=None, **kw):
+ """2) Setting the Tk options database (::wm_default::addoptions).
+ You can override the settings in 1) by adding your values to the
+ call to addoptions().
+ """
+ if cnf is None:
+ return root.tk.splitlist(root.tk.call('::wm_default::addoptions'))
+ return root.tk.splitlist(
+ apply(root.tk.call,
+ ('::wm_default::addoptions',) + root._options(cnf,kw)))
+
+def getoptions(root):
+ """Returns the current settings, as a dictionary.
+ """
+ words = root.tk.splitlist(root.tk.call('::wm_default::getoptions'))
+ dict = {}
+ for i in range(0, len(words), 2):
+ key = words[i]
+ value = words[i+1]
+ dict[key] = value
+ return dict
+
+def parray(root):
+ """Returns a string of the current settings, one value-pair per line.
+ """
+ return root.tk.call('::wm_default::parray')
+
+if __name__ == "__main__":
+ dir = ""
+ if len(sys.argv) > 0:
+ # Assume the name of the file containing the tixinspect Tcl source
+ # is the same as argument on the command line with .tcl
+ dir = os.path.dirname(sys.argv[0])
+ if not dir or not os.path.isdir(dir) or not os.path.isabs(dir):
+ # Or, assume it's in the same directory as this one:
+ dir = os.getcwd()
+ import Tkinter
+ root = Tkinter.Tk()
+ setup(root)
+ addoptions(root, {'foreground': 'red'})
+ retval = getoptions(root)
+ print retval
+
Added: external/tix-8.4.2.x/library/pref/WmDefault.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1098 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+#
+# $Id: WmDefault.tcl,v 1.5 2004/04/09 21:36:11 hobbs Exp $
+#
+# Description: Package for making Tk apps use the CDE/KDE/Gnome/Windows scheme
+# Prefix: wm_default::
+# Url: http://tix.sourceforge.net/Tixapps/
+#
+# Usage:
+# It should be sufficient at the beginning of a wish app to simply:
+#
+# package require wm_default
+# wm_default::setup
+# wm_default::addoptions
+#
+# wm_default::setup takes an optional argument - the scheme if already
+# known, one of: windows gnome kde1 kde2 cde kde
+# wm_default::addoptions takes optional arguments - pairs of variables
+# and values to override the kde settings. e.g.
+# wm_default::addoptions -background blue
+#
+# Description:
+# package for making Tk apps look nice under CDE or KDE or Windows
+#
+# The stuff below attempts to use the options database and the
+# various files under ~/.dt, $DTHOME, and /usr/dt to figure out
+# the user's current font and color set. It then uses tk's
+# palette routines to set sensible defaults, and then override
+# some of the options to try to make them look like CDE.
+#
+# There really *must* be an easier way to get text background
+# colors and the radiobutton highlight colors out of the
+# options database or winfo atom... Unfortunately, I can't
+# figure out how...
+
+# This package is based on the cde package by D. J. Hagberg, Jr.:
+# dhagberg at glatmos.com
+
+########################################################################
+#
+#
+ # Copyright 1998 D. J. Hagberg, Jr. and Global Atmospherics, Inc.
+ #
+ # 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.
+ # D. J. Hagberg, Jr. and Global Atmospherics, Inc. make no representations
+ # about the suitability of this software for any It is provided "as is"
+ # without express or implied warranty. By use of this software the user
+ # agrees to indemnify and hold harmless D. J. Hagberg, Jr. and Global
+ # Atmospherics, Inc. from any claims or liability for loss arising out
+ # of such use.
+########################################################################
+
+package require Tk
+
+proc tixDetermineWM {} {
+ # Returns one of cde kde1 kde2 gnome windows or ""
+ global tcl_platform env
+
+ set type ""
+ if {$tcl_platform(platform) eq "windows"} {
+ set type windows
+ } else {
+ # The most definitive way is to check the X atoms
+ # I'm not sure if we can determine this using regular Tk wm calls
+ # I don't want to intern these symbols if they're not there.
+ if {![catch {exec xlsatoms} xatoms]} {
+ if {[string match *GNOME_SESSION_CORBA_COOKIE* $xatoms]} {
+ set type gnome
+ } elseif {[string match *KDEChangeStyle* $xatoms]} {
+ set type kde1
+ } elseif {[string match *KDE_DESKTOP_WINDOW* $xatoms]} {
+ set type kde2
+ }
+ }
+ if {$type != ""} {
+ # drop through
+ } elseif {[info exists env(KDEDIR)] && [file isdir $env(KDEDIR)]} {
+ # one or two?
+ set type kde2
+ } elseif {[info exists env(DTHOME)] && [file isdir $env(DTHOME)]} {
+ set type cde
+ } else {
+ # Maybe look for other Unix window managers?
+ # if {[file isfile $env(HOME)/.fwm2rc]} {}
+ # if {[file isfile $env(HOME)/.fwmrc]} {}
+ # if {[file isfile $env(HOME)/.twmrc]} {}
+ # But twm and fwm don't color applications; mwm maybe?
+ # Hope someone comes up with the code for openlook :-)
+ return ""
+ }
+ }
+ return $type
+}
+
+namespace eval ::wm_default {
+ global tcl_platform env
+
+ set _usetix [llength [info commands "tix"]]
+
+ variable wm ""
+
+ variable _frame_widgets {*Frame *Toplevel}
+ #what about tixGrid?
+ if {$_usetix} {
+ lappend _frame_widgets *TixLabelFrame *TixButtonBox *TixCObjView \
+ *TixListNoteBook *TixPanedWindow *TixStdButtonBox \
+ *TixExFileSelectBox
+ }
+ variable _menu_font_widgets {*Menu *Menubutton}
+ if {$_usetix} {lappend _menu_font_widgets *TixMenu}
+ variable _button_font_widgets {*Button}
+
+ variable _system_font_widgets {*Label \
+ *Message \
+ *Scale *Radiobutton *Checkbutton
+ }
+ if {$_usetix} {
+ lappend _system_font_widgets \
+ *TixBalloon*message *TixLabelFrame*Label \
+ *TixControl*label *TixControl*Label \
+ *TixLabelEntry*label *TixNoteBook.nbframe \
+ *TixFileEntry*label *TixComboBox*label \
+ *TixOptionMenu*menubutton *TixBitmapButton*label \
+ *TixMwmClient*title *TixFileSelectBox*Label
+ }
+ variable _text_type_widgets {*Canvas *Entry *Listbox *Text}
+ if {$_usetix} {
+ lappend _text_type_widgets \
+ *TixComboBox*Entry *TixControl*entry *TixScrolledHList*hlist \
+ *TixDirTree*hlist *TixDirList*hlist *TixTree*hlist \
+ *TixMultiList*Listbox *TixScrolledListBox*listbox \
+ *TixFileEntry*Entry *TixLabelEntry*Entry \
+ *TixFileEntry*entry *TixLabelEntry*entry \
+ *TixScrolledTList*tlist *TixScrolledText*text \
+ *TixHList *TixCheckList*hlist
+ # These arent working yet
+ lappend _text_type_widgets \
+ *TixDirTree*f1 *TixDirList*f1 \
+ *TixFileSelectBox*file*listbox \
+ *TixFileSelectBox*directory*listbox \
+ *TixExFileSelectBox*filelist*listbox
+ }
+
+ variable _insert_type_widgets {*Entry *Text}
+ if {$_usetix} {
+ lappend _insert_type_widgets \
+ *TixControl*entry *TixComboBox*Entry
+ }
+
+ variable _select_type_widgets {*Checkbutton \
+ *Radiobutton \
+ *Menu}
+ variable _active_borderwidth_widgets {*Button *Radiobutton *Checkbutton}
+
+ # Other Widgets that are given a borderwidth of $wm_default::borderwidth
+ variable _nonzero_borderwidth_widgets {}
+
+ # Widgets that are given a borderwidth of 0
+ # must not be *Entry
+ variable _null_borderwidth_widgets {*Menubutton *Label}
+
+ variable _scrollbar_widgets {}
+ variable _scrollbar_widgets {*Scrollbar}
+ if {$_usetix} {
+ lappend _scrollbar_widgets \
+ *TixTree*Scrollbar *TixDirTree*Scrollbar *TixDirList*Scrollbar \
+ *TixScrolledTList*Scrollbar *TixScrolledListBox*Scrollbar \
+ *TixScrolledHList*Scrollbar *TixMultiView*Scrollbar \
+ *TixScrolledText*Scrollbar *TixScrolledWindow*Scrollbar \
+ *TixCObjView*Scrollbar
+ }
+
+ proc debug {str} {
+ if {[llength [info commands "tix"]] &&
+ [string is true -strict [tix cget -debug]]} {
+ puts $str
+ }
+ }
+
+ # Return the array of what we have deduced
+ proc getoptions {} {
+ set retval {}
+ set len [string length "::wm_default::"]
+ foreach variable [lsort [info vars ::wm_default::*]] {
+ if {[string match ::wm_default::_* $variable]} {continue}
+ set key [string range $variable $len end]
+ lappend retval $key [set $variable]
+ }
+ return $retval
+ }
+
+ # Print out the array of what we have deduced
+ proc parray {} {
+ set retval ""
+ foreach {key val} [::wm_default::getoptions] {
+ append retval [join [list $key $val]] "\n"
+ }
+ debug $retval
+ return $retval
+ }
+
+ # Pick a default borderwidth in pixels
+ set _bd 2
+ # Pick a default font size in pixels
+ set _screenheight [winfo screenheight .]
+ if {$_screenheight < 500} {
+ # for 800x600 or smaller
+ set _pixel 10
+ set _point 8
+ # Pick a default borderwidth which smaller
+ set _bd 1
+ } elseif {$_screenheight < 800} {
+ # for 1024x768
+ set _pixel 12
+ set _point 8
+ } elseif {$_screenheight < 1100} {
+ # for 1200x1000
+ set _pixel 12
+ set _point 8
+ } else {
+ set _pixel 12
+ set _point 10
+ }
+
+ # setup defaults depending on the OS and Window Manager
+ # Really should do another version for mono
+ if {$tcl_platform(platform) eq "windows"} {
+
+ if {$tcl_platform(osVersion) < 5} {
+ set _prop_default "MS Sans Serif"
+ } else {
+ set _prop_default "Tahoma"
+ }
+
+ # make sure this font is installed
+ set _allowed [string tolow [font families]]
+ foreach font [list $_prop_default "MS Sans Serif" Tahoma Arial System] {
+ if {[lsearch -exact $_allowed [string tolow $font]] > -1} {
+ set _prop_default $font
+ break
+ }
+ }
+
+ set _fixed_default {Courier New}
+ # make sure this font is installed
+ foreach font [list $_fixed_default Courier System] {
+ if {[lsearch -exact $_allowed [string tolow $font]] > -1} {
+ set _fixed_default $font
+ break
+ }
+ }
+
+ # Windows colors:
+ # "3dDarkShadow", COLOR_3DDKSHADOW,
+ # "3dLight", COLOR_3DLIGHT,
+ # "ActiveBorder", COLOR_ACTIVEBORDER,
+ # "ActiveCaption", COLOR_ACTIVECAPTION,
+ # "AppWorkspace", COLOR_APPWORKSPACE,
+ # "Background", COLOR_BACKGROUND,
+ # "ButtonFace", COLOR_BTNFACE,
+ # "ButtonHighlight", COLOR_BTNHIGHLIGHT,
+ # "ButtonShadow", COLOR_BTNSHADOW,
+ # "ButtonText", COLOR_BTNTEXT,
+ # "CaptionText", COLOR_CAPTIONTEXT,
+ # "DisabledText", COLOR_GRAYTEXT,
+ # "GrayText", COLOR_GRAYTEXT,
+ # "Highlight", COLOR_HIGHLIGHT,
+ # "HighlightText", COLOR_HIGHLIGHTTEXT,
+ # "InactiveBorder", COLOR_INACTIVEBORDER,
+ # "InactiveCaption", COLOR_INACTIVECAPTION,
+ # "InactiveCaptionText", COLOR_INACTIVECAPTIONTEXT,
+ # "InfoBackground", COLOR_INFOBK,
+ # "InfoText", COLOR_INFOTEXT,
+ # "Menu", COLOR_MENU,
+ # "MenuText", COLOR_MENUTEXT,
+ # "Scrollbar", COLOR_SCROLLBAR,
+ # "Window", COLOR_WINDOW,
+ # "WindowFrame", COLOR_WINDOWFRAME,
+ # "WindowText", COLOR_WINDOWTEXT,
+
+ variable \
+ background "SystemButtonFace" \
+ foreground "SystemButtonText" \
+ disabledforeground "SystemDisabledText" \
+ disabledbackground "SystemButtonShadow" \
+ textfamily $_prop_default \
+ systemfamily $_prop_default \
+ menufamily $_prop_default \
+ fixedfamily $_fixed_default \
+ fontsize $_point \
+ textbackground "SystemWindow" \
+ textforeground "SystemWindowText" \
+ disabledtextbackground "SystemDisabledText" \
+ selectbackground "SystemHighlight" \
+ selectforeground "SystemHighlightText" \
+ selectcolor "SystemWindow" \
+ highlightcolor "SystemWindowFrame" \
+ highlightbackground "SystemButtonFace" \
+ scrollbars "SystemScrollbar" \
+ borderwidth $_bd \
+ menubackground "SystemMenu" \
+ menuforeground "SystemMenuText"
+
+ variable highlightthickness 1
+
+ # Windows does not have an activebackground, but Tk does
+ variable activebackground $background
+ variable activeforeground $foreground
+ } else {
+ # intended for Unix
+
+ # Tk uses the following defaults:
+
+ #define NORMAL_BG "#d9d9d9"
+ #define ACTIVE_BG "#ececec"
+ #define SELECT_BG "#c3c3c3"
+ #define TROUGH "#c3c3c3"
+ #define INDICATOR "#b03060"
+ #define DISABLED "#a3a3a3"
+
+ # We know . exists and it has a background
+ # This should be "#d9d9d9" under default Tk
+ set _bg [. cget -background]
+
+ set _prop_default helvetica
+ # make sure this font is installed
+ set _allowed [string tolow [font families]]
+ foreach font [list $_prop_default times fixed] {
+ if {[lsearch -exact $_allowed [string tolow $font]] > -1} {
+ set _prop_default $font
+ break
+ }
+ }
+ set _fixed_default courier
+ # make sure this font is installed
+ foreach font [list $_fixed_default fixed] {
+ if {[lsearch -exact $_allowed [string tolow $font]] > -1} {
+ set _fixed_default $font
+ break
+ }
+ }
+
+ variable \
+ background $_bg \
+ foreground Black \
+ disabledforeground #808080 \
+ disabledbackground #a3a3a3 \
+ textfamily $_prop_default \
+ systemfamily $_prop_default \
+ menufamily $_prop_default \
+ fixedfamily $_fixed_default \
+ fontsize $_pixel \
+ textbackground white \
+ textforeground Black \
+ disabledtextbackground $_bg \
+ selectbackground #000080 \
+ selectforeground white \
+ selectcolor yellow \
+ highlightcolor Black \
+ highlightbackground $_bg \
+ scrollbars "#c3c3c3" \
+ borderwidth $_bd \
+ menubackground $_bg \
+ menuforeground Black
+
+ variable highlightthickness 1
+
+ # Windows does not have an activebackground, but Tk does
+ variable activebackground "#ececec"
+ variable activeforeground $foreground
+ }
+
+ # priority should be userDefault?
+ if {$_usetix} {
+ variable priority [tix cget -schemepriority]
+ } else {
+ variable priority 75
+ }
+
+ # variables that will be derived during addoptions - set to null for now
+ variable system_font {}
+ variable menu_font {}
+ variable fixed_font {}
+ variable text_font {}
+
+ # Different desktops have different visible regions
+ # This is not working properly yet.
+ variable geometry 0+0+[winfo screenwidth .]+$_screenheight
+
+ # Different desktops have different focusmodels: clicktofocus or
+ # followsmouse This is not working properly yet
+ variable focusmodel clicktofocus
+
+ # Some desktops have standardized link colors
+ # This is not working properly yet
+ variable linkcolor "#0000ff" vlinkcolor "#800000" alinkcolor "#800080"
+
+ proc default {args} {
+ # Override the defaults with any optional arguments
+ foreach {var val} $args {
+ set $var $val
+ }
+ }
+
+ proc setup {{type ""}} {
+ # type is one of the recognized window managers
+ # one of: cde kde win
+ global tcl_platform env
+
+ if {$type == ""} {
+ if {[set type [::tixDetermineWM]] == ""} {
+ set ::wm_default::wm ""
+ # Generic unix
+ return
+ }
+ }
+ setup-$type
+ set ::wm_default::wm $type
+ # todo - make the menubutton enter and leave events more compatible
+ }
+
+ proc setup-windows {args} {
+ # Already done by Tk above.
+ # Should find out the useable window region
+ }
+
+ proc setup-gnome {args} {
+ # GNOME is still barely supported because of the difficulty
+ # of finding and parsing sawfish definition files.
+ # First you have to find what window manager, then what theme,
+ # then find the files, then parse them according to each Wm's syntax.
+ global env
+
+ set bg $wm_default::background
+ set fg $wm_default::foreground
+ set txtFont $wm_default::textfamily
+ set btnFont $wm_default::systemfamily
+
+ debug "Setting up Gnome environment"
+
+ set file ~/.gnome/theme-switcher-capplet
+ if {![file exists $file] || \
+ [catch {open $file} fd] || $fd == ""} {
+ debug "Skipping $file"
+ } else {
+ debug "Reading $file"
+ set contents [read $fd]
+ catch {close $fd}
+
+ if {![regexp -- "use_theme_font=true" $contents]} {
+ # not activated
+ } elseif {[regexp -- "\nfont=(\[-a-zA-Z0-9,\]+)" $contents \
+ foo font]} {
+ set_unix_font $font
+ }
+ }
+
+ }
+
+ proc set_unix_font {font} {
+
+ set list [split $font "-"]
+ set font [lindex $list 2]
+ set font [string tolow $font]
+ if {$font != "" && [lsearch -exact [font families] $font] > -1} {
+ set wm_default::textfamily $font
+ debug "Setting textfamily to $font"
+ set wm_default::systemfamily $font
+ set wm_default::menufamily $font
+ } else {
+ debug "Unable to set font: '$list'"
+ }
+
+ if {[set size [lindex $list 7]] != "" && \
+ [string is int $size]} {
+ debug "Setting fontsize to '$size'"
+ set wm_default::fontsize $size
+ } elseif {[set size [lindex $list 8]] != "" && \
+ [string is int $size]} {
+ if {$size > 100} {set size [expr $size / 10]}
+ debug "Setting fontsize to '$size'"
+ set wm_default::fontsize $size
+ } else {
+ debug "Unable to set fontsize: '$list'"
+ }
+ }
+
+ # Common to KDE1 and KDE2
+ proc setup-kde {args} {
+ global env
+
+ set file ~/.kderc
+ if {![file exists $file] || \
+ [catch {open $file} fd] || $fd == ""} {
+ debug "Skipping $file"
+ } else {
+ debug "Reading $file"
+ set contents [read $fd]
+ catch {close $fd}
+
+ if {[regexp -- "\nfixedfamily=(\[-a-zA-Z0-9,\]+)" $contents \
+ foo font]} {
+ set list [split $font ","]
+ set font [lindex $list 0]
+ set wm_default::fixedfamily $font
+ debug "Setting fixedfamily to $font"
+ }
+ if {[regexp -- "\nfont=(\[-a-zA-Z0-9,\]+)" $contents \
+ foo font]} {
+ set list [split $font ","]
+ set font [lindex $list 0]
+ set wm_default::textfamily $font
+ debug "Setting textfamily to $font"
+ set wm_default::systemfamily $font
+ set wm_default::menufamily $font
+ }
+ }
+
+ }
+
+ proc setup-kde1 {args} {
+ # Shortcut for the moment
+ return [eval setup-kde $args]
+ }
+
+ proc set-kde2-color {str contents var} {
+ if {[regexp -- "\n${str}=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set ::wm_default::$var $color
+ debug "setting $var to $color"
+ }
+ }
+
+ proc setup-kde2 {args} {
+ global env
+
+ set bg $wm_default::background
+ set fg $wm_default::foreground
+ set txtFont $wm_default::textfamily
+ set btnFont $wm_default::systemfamily
+
+ debug "Setting up KDE environment"
+
+ # Look for system the user settings
+ set dirs ~/.kde
+ if {[info exists env(KDEDIR)] && [file isdir $env(KDEDIR)]} {
+ lappend dirs $env(KDEDIR)
+ }
+ # read them sequentially and overwrite the previous values
+ foreach dir $dirs {
+
+ set file $dir/share/config/kdeglobals
+ if {![file exists $file] || \
+ [catch {open $file} fd] || $fd == ""} {
+ debug "Skipping $file"
+ } else {
+ debug "Reading $file"
+ set contents [read $fd]
+ catch {close $fd}
+ set-kde2-color background $contents background
+ if {[regexp -- "\nselectBackground=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::selectbackground $color
+ debug "setting selectbackground to $color"
+ }
+ if {[regexp -- "\nselectForeground=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::selectforeground $color
+ debug "setting selectforeground to $color"
+ }
+ if {[regexp -- "\nforeground=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::foreground $color
+ debug "setting foreground to $color"
+ }
+ if {[regexp -- "\nbackground=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::background $color
+ debug "setting background to $color"
+ }
+ if {[regexp -- "\nwindowBackground=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::textbackground $color
+ debug "setting textbackground to $color"
+ }
+ if {[regexp -- "\nvisitedLinkColor=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::vlinkcolor $color
+ debug "setting vlinkcolor to $color"
+ }
+ if {[regexp -- "\nlinkColor=(\[0-9,\]+)" $contents \
+ foo color]} {
+ set color [eval format "#%02x%02x%02x" [split $color ","]]
+ set wm_default::linkcolor $color
+ debug "setting linkcolor to $color"
+ }
+ if {[regexp -- "\nactiveFont=(\[-a-zA-Z0-9,\]+)" $contents \
+ foo font]} {
+ set list [split $font ","]
+ set font [lindex $list 0]
+ set wm_default::textfamily $font
+ set size [lindex $list 1]
+ if {[string is integer -strict $size]} {
+ set wm_default::fontsize $size
+ }
+ debug "Setting textfamily to $font"
+ set wm_default::systemfamily $font
+ set wm_default::menufamily $font
+ }
+ }
+
+ # should pick up visitedLinkColor
+
+ set file $dir/share/config/kwmrc
+ if {![file exists $file] || \
+ [catch {open $file} fd] || $fd == ""} {
+ debug "Skipping $file"
+ } else {
+ debug "Reading $file"
+ set contents [read $fd]
+ catch {close $fd}
+ if {[regexp -- "\nDesktop1Region=(\[0-9+\]+)" $contents \
+ foo region]} {
+ set wm_default::geometry $region
+ debug "Setting geometry to $region"
+ }
+
+ if {[regexp -- "\nFocusPolicy=ClickToFocus" $contents \
+ foo region]} {
+ set wm_default::focusmodel clicktofocus
+ debug "Setting focusmodel to clicktofocus"
+ } else {
+ # followsmouse
+ }
+ }
+ }
+
+ return [eval setup-kde $args]
+ }
+
+ proc setup-cde {args} {
+ namespace import wm_default::*
+
+ set bg $wm_default::background
+ set fg $wm_default::foreground
+ set txtFont $wm_default::textfamily
+ set sysFont $wm_default::systemfamily
+
+ debug "Setting up CDE environment"
+
+ # if any of these options are missing, we must not be under CDE
+ set txtFont [option get . textfamilyList textfamilyList]
+ set sysFont [option get . systemfamilyList systemfamilyList]
+ if {[string length $txtFont] > 0 && [string length $sysFont] > 0} {
+ set txtFont [lindex [split $txtFont :] 0]
+ set sysFont [lindex [split $sysFont :] 0]
+ if {$txtFont != ""} {set textfamily $txtFont}
+ if {$sysFont != ""} {set systemfamily $sysFont}
+ #
+ # If we can find the user's dt.resources file, we can find out the
+ # palette and text background/foreground colors
+ #
+ set txtBg $bg
+ set txtFg $fg
+ set selFg $selectforeground
+ set selBg $selectbackground
+ set selCol $selectcolor
+ set fh ""
+ set palf ""
+ set cur_rsrc ~/.dt/sessions/current/dt.resources
+ set hom_rsrc ~/.dt/sessions/home/dt.resources
+ if {[file readable $cur_rsrc] && [file readable $hom_rsrc]} {
+ if {[file mtime $cur_rsrc] > [file mtime $hom_rsrc]} {
+ if {[catch {open $cur_rsrc r} fh]} {set fh ""}
+ } else {
+ if {[catch {open $hom_rsrc r} fh]} {set fh ""}
+ }
+ } elseif {[file readable $cur_rsrc]} {
+ if {[catch {open $cur_rsrc r} fh]} {set fh ""}
+ } elseif {[file readable $hom_rsrc]} {
+ if {[catch {open $hom_rsrc r} fh]} {set fh ""}
+ }
+ if {[string length $fh] > 0} {
+ while {[gets $fh ln] != -1} {
+ regexp -- "^\\*0\\*ColorPalette:\[ \t]*(.*)\$" $ln nil palf
+ regexp -- "^Window.Color.Background:\[ \t]*(.*)\$" $ln nil txtBg
+ regexp -- "^Window.Color.Foreground:\[ \t]*(.*)\$" $ln nil txtFg
+ }
+ catch {close $fh}
+ if {[string compare $txtBg $bg] != 0} {
+ set selBg $txtFg
+ set selFg $txtBg
+ }
+ }
+ #
+ # If the *0*ColorPalette setting was found above, try to find the
+ # indicated file in ~/.dt, $DTHOME, or /usr/dt. The 3rd line in the
+ # file will be the radiobutton/checkbutton selectColor.
+ #
+ if {[string length $palf]} {
+ set dtdir /usr/dt
+ if [info exists env(DTHOME)] {
+ set dtdir $env(DTHOME)
+ }
+ if {[file readable ~/.dt/palettes/$palf]} {
+ set palf ~/.dt/palettes/$palf
+ } elseif {[file readable $dtdir/palettes/$palf]} {
+ set palf $dtdir/palettes/$palf
+ } else {
+ set palf ""
+ }
+ if {[string length $palf]} {
+ if {![catch {open $palf r} fh]} {
+ # selectColor will be the 3rd line in the file --
+ set ln ""; catch {gets $fh; gets $fh; gets $fh ln}
+ set ln [string trim $ln]
+ if {[string length $ln]} {set selCol $ln}
+ close $fh
+ }
+ }
+ }
+ set wm_default::background $bg
+ set wm_default::foreground $fg
+ set wm_default::textfamily $txtFont
+ set wm_default::systemfamily $sysFont
+ set wm_default::menufamily $sysFont
+ set wm_default::textbackground $txtBg
+ set wm_default::textforeground $txtFg
+ set wm_default::selectbackground $selBg
+ set wm_default::selectforeground $selFg
+ set wm_default::selectcolor $selCol
+ }
+ }
+
+ proc derivefonts {} {
+ global tcl_platform env
+
+ # variables that will be derived
+ variable system_font
+ variable menu_font
+ variable fixed_font
+ variable text_font
+
+ #
+ # Set default fonts
+ #
+
+ global tcl_platform env
+ switch -exact -- $tcl_platform(platform) windows {
+ set system_font [list $::wm_default::systemfamily $::wm_default::fontsize]
+ set menu_font [list $::wm_default::menufamily $::wm_default::fontsize]
+ set text_font [list $::wm_default::textfamily $::wm_default::fontsize]
+ set fixed_font [list $::wm_default::fixedfamily $::wm_default::fontsize]
+ } default {
+ set system_font [list $::wm_default::systemfamily -$::wm_default::fontsize]
+ if {[set type $::wm_default::wm] == ""} {
+ # Generic unix
+ # some Unix Wms seem to make Menu fonts bold - ugly IMHO
+ set menu_font [list $::wm_default::menufamily -$::wm_default::fontsize bold]
+ } else {
+ # gnome kde1 kde2 cde kde don't
+ set menu_font [list $::wm_default::menufamily -$::wm_default::fontsize]
+ }
+ set text_font [list $::wm_default::textfamily -$::wm_default::fontsize]
+ set fixed_font [list $::wm_default::fixedfamily -$::wm_default::fontsize]
+ }
+ }
+
+ proc addoptions {args} {
+ global tcl_platform env tix_version
+
+ # variables that will be derived
+ variable system_font
+ variable menu_font
+ variable fixed_font
+ variable text_font
+
+ if {[info commands "tix"] != ""} {set _usetix 1} {set _usetix 0}
+
+ # Override what you have found with any optional arguments
+ foreach {var val} $args {
+ set var [string trimleft $var "-"]
+ set ::wm_default::$var $val
+ }
+
+ set pri $::wm_default::priority
+ # If you are running under Tix, set the colorscheme now
+ # The options below will then override the Tix settings
+ if {$_usetix} {
+
+ # Tix's focus model is very non-standard
+ bind TixComboBox <FocusIn> ""
+ bind TixComboBox <FocusOut> ""
+
+ if {$tix_version < "8.2"} {
+ # works??
+ option add *TixNoteBook.nbframe.inactiveBackground \
+ $::wm_default::disabledbackground $pri
+ } else {
+ # works??
+ option add *TixNoteBook.nbframe.inactiveBackground \
+ $::wm_default::background $pri
+ }
+
+ # works??
+ option add *TixPanedWindow.seperatorBg \
+ $::wm_default::disabledbackground $pri
+ option add *TixPanedWindow.handleBg \
+ $::wm_default::disabledbackground $pri
+
+ # works??
+ option add *TixPanedWindow.separatorActiveBg \
+ $::wm_default::activebackground $pri
+ option add *TixPanedWindow.handleActiveBg \
+ $::wm_default::activebackground $pri
+ option add *TixPanedWindow.Background \
+ $::wm_default::disabledbackground $pri
+
+ # works??
+ option add *TixResizeHandle*background \
+ $::wm_default::disabledbackground $pri
+
+ }
+ foreach pref $wm_default::_frame_widgets {
+ option add $pref.background $::wm_default::background $pri
+ }
+ option add *Background $::wm_default::background $pri
+
+ derivefonts
+
+ # Set the global defaults to the system font
+ foreach pref [list *Font *font] {
+ option add $pref $system_font $pri
+ }
+
+ # Set the "system" type defaults to the system font
+ foreach pref $wm_default::_menu_font_widgets {
+ option add $pref.font $menu_font $pri
+ }
+ foreach pref $wm_default::_button_font_widgets {
+ option add $pref.font $system_font $pri
+ option add $pref.disabledForeground $::wm_default::disabledforeground $pri
+ option add $pref.background $::wm_default::background $pri
+ option add $pref.foreground $::wm_default::foreground $pri
+ option add $pref.highlightBackground $::wm_default::highlightbackground $pri
+ }
+ foreach pref $wm_default::_system_font_widgets {
+ option add $pref.font $system_font $pri
+ option add $pref.background $::wm_default::background $pri
+ option add $pref.foreground $::wm_default::foreground $pri
+ option add $pref.highlightBackground $::wm_default::highlightbackground $pri
+ }
+
+ foreach pref $wm_default::_text_type_widgets {
+ option add $pref.font $text_font $pri
+ option add $pref.relief sunken $pri
+ option add $pref.borderWidth $::wm_default::borderwidth $pri
+
+ option add $pref.background $::wm_default::textbackground $pri
+ option add $pref.foreground $::wm_default::textforeground $pri
+ option add $pref.selectBackground $::wm_default::selectbackground $pri
+ option add $pref.selectForeground $::wm_default::selectforeground $pri
+ option add $pref.highlightThickness $::wm_default::highlightthickness $pri
+ option add $pref.disabledBackground $::wm_default::disabledtextbackground $pri
+ }
+ foreach pref $wm_default::_insert_type_widgets {
+ option add $pref.relief sunken $pri
+ option add $pref.insertBackground $::wm_default::textforeground $pri
+ option add $pref.highlightThickness $::wm_default::highlightthickness $pri
+ }
+ #
+ # Set the Selector color for radiobuttons, checkbuttons, et. al
+ #
+ foreach pref $wm_default::_select_type_widgets {
+ option add $pref.selectColor $::wm_default::selectcolor $pri
+ option add $pref.background $::wm_default::background $pri
+ option add $pref.foreground $::wm_default::foreground $pri
+
+ option add $pref.activeBackground $::wm_default::activebackground $pri
+ option add $pref.activeForeground $::wm_default::activeforeground $pri
+ }
+
+ # Set the "active" defaults - this could be controversial
+ foreach pref $wm_default::_menu_font_widgets {
+ option add $pref.activeBackground $::wm_default::activebackground $pri
+ option add $pref.activeForeground $::wm_default::activeforeground $pri
+ option add $pref.background $::wm_default::background $pri
+ option add $pref.foreground $::wm_default::foreground $pri
+ option add $pref.disabledForeground $::wm_default::disabledforeground $pri
+ option add $pref.highlightThickness $::wm_default::highlightthickness $pri
+ }
+
+ switch -exact -- $tcl_platform(platform) windows {
+ # Make sure this is set to foreground - check marks on menus
+ set _menu_select_color $::wm_default::foreground
+ } default {
+ # On unix there are recessed check boxes not check marks
+ set _menu_select_color $::wm_default::selectcolor
+ }
+ option add *Menu.selectColor $_menu_select_color $pri
+ if {$_usetix} {
+ option add *TixMenu.selectColor $_menu_select_color $pri
+ option add *TixBalloon*message.background $::wm_default::textbackground $pri
+
+ }
+
+ # Windows does not have an activebackground, but Tk does
+ foreach pref $wm_default::_button_font_widgets {
+ option add $pref.activeBackground $::wm_default::activebackground $pri
+ option add $pref.activeForeground $::wm_default::activeforeground $pri
+ }
+
+ #
+ # Set the default *button borderwidth
+ #
+ # option add *.borderWidth $::wm_default::borderwidth $pri
+
+ foreach pref $wm_default::_active_borderwidth_widgets {
+ option add $pref.activeBorderWidth $::wm_default::borderwidth $pri
+ option add $pref.borderWidth $::wm_default::borderwidth $pri
+ }
+ foreach pref $wm_default::_nonzero_borderwidth_widgets {
+ option add $pref.borderWidth $::wm_default::borderwidth $pri
+ }
+ foreach pref $wm_default::_null_borderwidth_widgets {
+ option add $pref.borderWidth 0 $pri
+ }
+
+ if {$_usetix} {
+ if {$tix_version < "8.2"} {
+ option add *TixNoteBook.nbframe.inactiveBackground \
+ $::wm_default::disabledbackground $pri
+ option add *TixNoteBook*nbframe.inactiveBackground \
+ $::wm_default::disabledbackground $pri
+ } else {
+ option add *TixNoteBook.nbframe.inactiveBackground \
+ $::wm_default::background $pri
+ option add *TixNoteBook*nbframe.inactiveBackground \
+ $::wm_default::background $pri
+ }
+ }
+
+ foreach pref $wm_default::_scrollbar_widgets {
+ option add $pref.background $::wm_default::background $pri
+ option add $pref.foreground $::wm_default::foreground $pri
+ # Tix 8.1.1 had these wrong
+ option add $pref.troughColor $::wm_default::scrollbars $pri
+ option add $pref.borderWidth $::wm_default::borderwidth $pri
+ }
+ option add *Scale.borderWidth $::wm_default::borderwidth $pri
+ option add *Scale.troughColor $::wm_default::scrollbars $pri
+
+ option add *highlightColor $::wm_default::highlightcolor $pri
+ option add *highlightBackground $::wm_default::highlightbackground $pri
+ option add *HighlightBackground $::wm_default::highlightbackground $pri
+
+ # not _system_font_widgets
+ set _focus_widgets [concat \
+ $::wm_default::_frame_widgets \
+ $::wm_default::_menu_font_widgets \
+ $::wm_default::_text_type_widgets \
+ $::wm_default::_insert_type_widgets \
+ $::wm_default::_select_type_widgets \
+ $::wm_default::_active_borderwidth_widgets \
+ $::wm_default::_nonzero_borderwidth_widgets \
+ $::wm_default::_null_borderwidth_widgets ]
+
+ if {$_usetix} {
+ set _tix_hl_widgets [list *TixBitmapButton*label \
+ *TixComboBox*Entry \
+ *TixControl*entry \
+ *TixDirList*hlist \
+ *TixDirTree*hlist \
+ *TixFileEntry*Entry \
+ *TixFileEntry*entry \
+ *TixMultiList*Listbox \
+ *TixNoteBook.nbframe \
+ *TixOptionMenu*menubutton \
+ *TixScrolledHList*hlist \
+ *TixScrolledListBox*listbox\
+ *TixScrolledTList*tlist \
+ *TixTree*hlist]
+ eval lappend _focus_widgets $_tix_hl_widgets
+ }
+
+ foreach pref [lsort -uniq $_focus_widgets] {
+ option add $pref.highlightBackground $::wm_default::highlightbackground $pri
+ }
+
+ # Now for some things to make it look more like the WM
+
+ # todo - look for and call
+ if {$::wm_default::focusmodel == "followsmouse"} {
+ tk_focusFollowsMouse
+ }
+
+ if {$_usetix} {
+ tixSetDefaultOptions
+
+ if {[lsearch -exact {windows kde1 kde2} $::wm_default::wm] > -1} {
+ # Fix the way Button boxes are packed
+ if {[info procs ::tixButtonBox:add] == ""} {
+ uplevel #0 auto_load tixButtonBox
+ }
+ proc ::tixButtonBox:add {w name args} {
+ upvar #0 $w data
+ eval button $w.$name $args
+
+ if {![info exists data(-padx)]} {set data(-padx) 5}
+ if {![info exists data(-pady)]} {set data(-pady) 10}
+
+ if {$data(-orientation) == "horizontal"} {
+ # Push the Buttons to the right
+ if {[info commands $w.pad] == ""} {
+ label $w.pad
+ pack $w.pad -side left -expand yes -fill both
+ }
+ pack $w.$name -side left \
+ -expand no \
+ -padx $data(-padx) -pady $data(-pady)
+ } else {
+ pack $w.$name -side top \
+ -expand no -fill x \
+ -padx $data(-padx) -pady $data(-pady)
+ }
+ lappend data(g:buttons) $name
+ set data(w:$name) $w.$name
+ return $w.$name
+ }
+ option add *TixButtonBox.relief flat $::wm_default::priority
+ option add *TixButtonBox.borderwidth 2 $::wm_default::priority
+ }
+ }
+ return [getoptions]
+ }
+
+ namespace export setup addoptions getoptions parray
+}
+
+package provide wm_default 1.0
+
+
+proc tixSetDefaultOptions {} {
+ # Returns one of cde kde1 kde2 gnome windows or ""
+ global tcl_platform env tixOption
+
+ # There is no overlap between the wm_default variable names and
+ # the old style tixOption names. So we can add the wm_default variable
+ # names to the array tixOption, and allow people to upgrade in time.
+
+ foreach variable {
+ wm
+ linkcolor
+ vlinkcolor
+ alinkcolor
+ background
+ foreground
+ disabledforeground
+ disabledbackground
+ textfamily
+ systemfamily
+ menufamily
+ fixedfamily
+ fontsize
+ textbackground
+ textforeground
+ disabledtextbackground
+ selectbackground
+ selectforeground
+ selectcolor
+ highlightcolor
+ highlightbackground
+ scrollbars
+ borderwidth
+ priority
+ menubackground
+ menuforeground
+ activebackground
+ activeforeground
+ system_font
+ menu_font
+ fixed_font
+ text_font
+ } {
+ set tixOption($variable) [set ::wm_default::$variable]
+ }
+
+}
Added: external/tix-8.4.2.x/library/pref/WmDefault.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/WmDefault.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,142 @@
+One of the bad things about Tk/Tkinter is that it does not pick up
+the current color and font scheme from the prevailing CDE/KDE/GNOME/Windows
+window manager scheme.
+
+One of the good things about Tk/Tkinter is that it is not tied to one
+particular widget set so it could pick up the current color and font scheme
+from the prevailing CDE/KDE/GNOME/Windows window manager scheme.
+
+The WmDefault package is for making Tk/Tkinter applications use the
+prevailing CDE/KDE/GNOME/Windows scheme. It tries to find the files
+and/or settings that the current window manager is using, and then
+sets the Tk options database accordingly (plus a few other things as well).
+
+
+DOWNLOAD
+--------
+
+Download the latest version of wm_default from http://tix.sourceforge.net
+either as a part of the standard Tix distribution, or as a part of the
+Tix Applications: http://tix.sourceforge.net/Tide. wm_default does not
+require Tix, but is Tix enabled.
+
+
+USAGE:
+------
+
+For Tix versions 8.1.2 and above from http://tix.sourceforge.net,
+WmDefault is the default Tix scheme, so there is nothing else to do.
+
+For Tk applications, it should be sufficent at the beginning of a wish
+app to simply:
+
+ package require wm_default
+ wm_default::setup
+ wm_default::addoptions
+
+The process is divided into 2 steps:
+
+1) find the files and/or settings (::wm_default::setup).
+ This is complete for Windows, pretty good for KDE and CDE, and
+ still barely supported for GNOME because of the difficulty
+ of finding and parsing sawfish definition files.
+ setup takes one optional argument: wm, the name of the window manager
+ as a string, if known. One of: windows gnome kde1 kde2 cde.
+
+2) Setting the Tk options database (::wm_default::addoptions).
+You can override the settings in 1) by adding your values to the call
+to addoptions:
+ ::wm_default::addoptions -foreground red -background blue
+
+You can examine the settings with
+ ::wm_default::getoptions
+which returns a Tcl array of the current settings, and
+ ::wm_default::parray
+which returns a string of the current settings, one value-pair per line.
+
+There are a number of assumptions built into the heuristics of addoptions,
+that may need fine tuning. Post patches to http://tix.sourceforge.net.
+
+
+PYTHON
+______
+
+If you are using Tix versions 8.1.2 and above from http://tix.sourceforge.net
+with Python 2.1 and above, WmDefault is the default Tix scheme,
+so there is nothing else you need to do.
+
+The easiest way to install WmDefault for Tkinter is to copy the WmDefault.*
+AND THE FILE pkgIndex.tcl from lib/tix8.1/pref to a directory on your
+PYTHONPATH. Then the following should work:
+
+ import Tkinter
+ root = Tkinter.Tk()
+ import WmDefault
+ WmDefault.setup(root)
+ WmDefault.addoptions(root, {'foreground': 'red'})
+ print WmDefault.getoptions(root)
+
+
+SETTINGS
+--------
+
+Here is a list of all the settings controlled by WmDefault:
+ wm - one of windows gnome kde1 kde2 cde kde
+ background
+ foreground
+ disabledforeground
+ disabledbackground
+ textfamily
+ systemfamily
+ menufamily
+ fixedfamily
+ fontsize - in pixels under Unix, in points under Windows
+ textbackground
+ textforeground
+ disabledtextbackground
+ selectbackground
+ selectforeground
+ selectcolor
+ highlightcolor
+ highlightbackground
+ scrollbars - scrollbar trough color
+ borderwidth
+ priority
+ menubackground
+ menuforeground
+ activebackground
+ activeforeground
+ system_font - a Tcl font spec, a list of family size weight
+ menu_font
+ fixed_font
+ text_font
+ linkcolor - not working completely yet
+ vlinkcolor
+ alinkcolor
+
+
+
+TO MAKE A PREVIOUS TIX USE THIS AS THE DEFAULT SCHEME:
+------------------------------------------------------
+
+1) Compile Tix with
+ -DTIX_DEF_SCHEME "WmDefault"
+ -DTIX_DEF_FONTSET "WmDefault"
+or change the defines in generic/tixInit.c
+
+#define TIX_DEF_SCHEME "WmDefault"
+#define TIX_DEF_FONTSET "WmDefault"
+
+2) Edit the installed lib/8.1/Tix.tcl and change the -configspec
+in tixClass tixAppContext with the following
+ {-fontset WmDefault}
+ {-scheme WmDefault}
+
+3) Copy the files WmDefault.* AND pkgIndex.tcl to the installed
+ lib/tix8.1/pref
+
+4) Make or edit the file lib/tix8.1/pkgIndex.tcl and add the lines
+
+package ifneeded wm_default 1.0 \
+ [list source [file join $dir pref WmDefault.tcl]]
+
Added: external/tix-8.4.2.x/library/pref/pkgIndex.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/pkgIndex.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,9 @@
+# -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# Tcl package index file, version 1.0
+#
+# $Id: pkgIndex.tcl,v 1.2 2002/01/24 09:17:02 idiscovery Exp $
+#
+
+package ifneeded wm_default 1.0 [list source [file join $dir WmDefault.tcl]]
+
Added: external/tix-8.4.2.x/library/pref/tixmkpref
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/library/pref/tixmkpref Tue Mar 18 19:38:59 2008
@@ -0,0 +1,381 @@
+#!/usr/local/bin/tclsh
+# Undocumented program. Don't use it.
+#
+# Usage:
+#
+# tixmkpref option name.src > name.tcl
+#
+
+proc tixDefOption {classes specs {level \$tixOption(prioLevel)}} {
+ global isFont tixOption
+
+ foreach class $classes {
+ foreach spec $specs {
+ if [regexp (Font)|(font) $spec] {
+ if {$isFont} {
+ puts "option add *$class$spec $level"
+ }
+ } else {
+ if {!$isFont} {
+ set aspec [subst $spec]
+ puts "option add *$class$spec $level"
+ }
+ }
+ }
+ }
+}
+
+proc option {classes specs {level \$tixOption(prioLevel)}} {
+ tixDefOption $classes $specs $level
+}
+
+proc tixInitOptionDatabase {strictTK} {
+ global tixOption isFont
+
+ # general stuff, everything gets these defaults unless otherwise specified
+ #-------------------------------------------------------------------------
+ tixDefOption {""} {{Font $tixOption(font)}}
+ tixDefOption {""} {{font $tixOption(font)}}
+
+ tixDefOption {""} {{background $tixOption(bg)}} 10
+ tixDefOption {""} {{Background $tixOption(bg)}}
+ tixDefOption {""} {{background $tixOption(bg)}}
+ tixDefOption {""} {{Foreground $tixOption(fg)}}
+ tixDefOption {""} {{foreground $tixOption(fg)}}
+ tixDefOption {""} {{activeBackground $tixOption(active_bg)}}
+ tixDefOption {""} {{activeForeground $tixOption(active_fg)}}
+ tixDefOption {""} {{HighlightBackground $tixOption(bg)}}
+ tixDefOption {""} {{selectBackground $tixOption(select_bg)}}
+ tixDefOption {""} {{selectForeground $tixOption(select_fg)}}
+ tixDefOption {""} {{selectBorderWidth 0}}
+
+ #----------------------------------------
+ # Standard TK Widget Options
+ #
+ # We set up the options for the TK widgets only if
+ # the strictTK option is not selected.
+ #----------------------------------------
+
+ tixDefOption {Menu TixMenu} {
+ {.font $tixOption(menu_font)}
+ {.selectColor $tixOption(selector)}
+ }
+
+ tixDefOption {Menubutton} {
+ {.font $tixOption(menu_font)}
+ {.padY 5}
+ }
+
+ tixDefOption {Button} {
+ {.borderWidth 2}
+ {.anchor c}
+ }
+
+ tixDefOption {Checkbutton Radiobutton} {
+ {.selectColor $tixOption(selector)}
+ }
+
+ tixDefOption {Entry} {
+ {.relief sunken}
+ {.highlightBacground $tixOption(bg)}
+ {.background $tixOption(input1_bg)}
+ {.foreground black}
+ {.insertBackground black}
+ }
+
+ tixDefOption {Label} {
+ {.anchor w}
+ {.borderWidth 0}
+ {.font $tixOption(bold_font)}
+ }
+
+ tixDefOption {Listbox} {
+ {.background $tixOption(light1_bg)}
+ {.relief sunken}
+ }
+
+ tixDefOption {Scale} {
+ {.foreground $tixOption(fg)}
+ {.activeForeground $tixOption(bg)}
+ {.background $tixOption(bg)}
+ {.sliderForeground $tixOption(bg)}
+ {.sliderBackground $tixOption(light1_bg)}
+ {.font $tixOption(italic_font)}
+ }
+
+ tixDefOption {Scrollbar} {
+ {.background $tixOption(bg)}
+ {.troughColor $tixOption(light1_bg)}
+ {.relief sunken}
+ {.borderWidth 1}
+ {.width 15}
+ }
+
+ tixDefOption {Text} {
+ {.background $tixOption(input1_bg)}
+ {.relief sunken}
+ }
+
+ #----------------------------------------------------------------------
+ # TIX WIDGETS
+ #----------------------------------------------------------------------
+
+ tixDefOption {TixBalloon} {
+ {*background #ffff60}
+ {*foreground black}
+ {.background black}
+ {*Label.font $tixOption(font)}
+ {*Label.anchor w}
+ }
+
+ tixDefOption {TixBitmapButton} {
+ {*label.font $tixOption(font)}
+ }
+
+ tixDefOption {TixControl} {
+ {*entry.highlightBacground $tixOption(bg)}
+ {*entry.background $tixOption(input1_bg)}
+ {*entry.foreground black}
+ {*entry.insertBackground black}
+ {*label.font $tixOption(bold_font)}
+ }
+
+ # DLG_BTNS
+ #
+ tixDefOption {TixStdButtonBox} {
+ }
+
+ # DIR_LIST
+ #
+ tixDefOption {TixDirTree TixDirList TixScrolledHList TixTree} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {*hlist.highlightBacground $tixOption(bg)}
+ {*hlist.background $tixOption(light1_bg)}
+ {*hlist.activeBackground $tixOption(light1_bg)}
+ {*hlist.disabledBackground $tixOption(light1_bg)}
+ {*f1.borderWidth 1}
+ {*f1.relief sunken}
+ }
+
+ tixDefOption {TixFileEntry} {
+ {*Entry.background $tixOption(input1_bg)}
+ }
+
+ tixDefOption {TixHList} {
+ {.background $tixOption(light1_bg)}
+ {.activeBackground $tixOption(light1_bg)}
+ {.disabledBackground $tixOption(light1_bg)}
+ }
+
+ tixDefOption {TixLabelEntry} {
+ {*entry.highlightBacground $tixOption(bg)}
+ {*entry.background $tixOption(input1_bg)}
+ {*entry.foreground black}
+ {*entry.insertBackground black}
+ {*label.font $tixOption(bold_font)}
+ }
+
+ tixDefOption {TixLabelFrame} {
+ {*label.font $tixOption(bold_font)}
+ }
+
+ tixDefOption {TixMultiList} {
+ {*Listbox.borderWidth 0}
+ {*Listbox.highlightThickness 0}
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {*Scrollbar.relief sunken}
+ {*Scrollbar.width 15}
+ {*f1.borderWidth 2}
+ {*f1.relief sunken}
+ {*f1.highlightThickness 2}
+ }
+
+ # MwmClient
+ #
+ tixDefOption {TixMwmClient} {
+ {*title.font $tixOption(menu_font)}
+ }
+
+ tixDefOption {TixMDIMenuBar} {
+ {*menubar.relief raised}
+ {*menubar.borderWidth 2}
+ {*Menubutton.padY 2}
+ }
+
+ # NoteBook
+ #
+ tixDefOption {TixNoteBook} {
+ {.Background $tixOption(bg)}
+ {.nbframe.Background $tixOption(bg)}
+ {.nbframe.font $tixOption(menu_font)}
+ {.nbframe.backPageColor $tixOption(bg)}
+ {.nbframe.inactiveBackground $tixOption(inactive_bg)}
+ }
+
+ # OPTION_MENU
+ #
+ tixDefOption {TixOptionMenu} {
+ {*menubutton.font $tixOption(font)}
+ }
+
+ # PANED_WINDOW
+ #
+ tixDefOption {TixPanedWindow} {
+ {.handleActiveBg $tixOption(active_bg)}
+ {.seperatorBg $tixOption(bg)}
+ {.handleBg $tixOption(dark1_bg)}
+ }
+
+ # POPUP MENU
+ #
+ tixDefOption {TixPopupMenu} {
+ {*menubutton.background $tixOption(dark1_bg)}
+ }
+
+ # SCROLLED_HLIST
+ #
+ tixDefOption {TixScrolledHList} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {*hlist.highlightBacground $tixOption(bg)}
+ {*hlist.background $tixOption(light1_bg)}
+ }
+
+ tixDefOption {TixScrolledTList} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {*tlist.highlightBacground $tixOption(bg)}
+ {*tlist.background $tixOption(light1_bg)}
+ }
+
+ # SCROLLED_LISTBOX, .. ETC
+ #
+ tixDefOption {TixScrolledListBox} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {*listbox.highlightBacground $tixOption(bg)}
+ {*listbox.background $tixOption(light1_bg)}
+ }
+
+ tixDefOption {TixScrolledText} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ }
+
+
+ # SCROLLED_WINDOW
+ #
+ tixDefOption {TixScrolledWindow} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {.frame.background $tixOption(light1_bg)}
+ }
+
+
+ # SELECT
+ #
+ tixDefOption {TixSelect} {
+ }
+
+ tixDefOption {TixTree} {
+ {*Scrollbar.background $tixOption(bg)}
+ {*Scrollbar.troughColor $tixOption(light1_bg)}
+ {*hlist.highlightBacground $tixOption(bg)}
+ {*hlist.background $tixOption(light1_bg)}
+ {*hlist.borderWidth 1}
+ }
+ # NON ALPHABETICAL ORDER WIDGETS
+
+ # Since TK's option database follows the order-of-declaration rule, not
+ # specific-vs-general rule, the options of the widgets below depends on
+ # the options of the widget above, so their options must be defined here
+
+ # COMBOBOX
+ tixDefOption {TixComboBox} {
+ {*Entry.font $tixOption(font)}
+ {*Entry.highlightBacground $tixOption(bg)}
+ {*Entry.background $tixOption(input1_bg)}
+ {*Entry.foreground black}
+ {*Entry.insertBackground black}
+ }
+
+ # FILE_SELECT_BOX
+ #
+ tixDefOption {TixFileSelectBox} {
+ {*Label.font $tixOption(bold_font)}
+ }
+
+ tixDefOption {TixExFileSelectBox} {
+ }
+}
+
+#----------------------------------------------------------------------
+# The default fontset and schemes
+#
+#----------------------------------------------------------------------
+
+source ../DefSchm.tcl
+rename tixSetDefaultFontset tixSetFontset
+rename tixSetDefaultScheme-Color tixSetScheme-Color
+rename tixSetDefaultScheme-Mono tixSetScheme-Mono
+
+#----------------------------------------------------------------------
+# Action:
+#----------------------------------------------------------------------
+if [string match TK* [lindex $argv 1]] {
+ set isTK 1
+} else {
+ set isTK 0
+}
+set schemeName [lindex [split [lindex $argv 1] "."] 0]
+source [lindex $argv 1]
+
+
+tixSetFontset
+
+if {[lindex $argv 0] == "-font"} {
+
+ set isFont 1
+
+ # FontSets will be set in two steps.
+ # (1) init fontsets
+ # ... tix checks the validity of the fonts ...
+ # (2) add the fontsets into the option database.
+ #
+ puts "proc tixPref:InitFontSet:$schemeName {} { "
+ puts [info body tixSetFontset]
+ puts "}"
+
+ puts "proc tixPref:SetFontSet:$schemeName {} { "
+ puts "global tixOption"
+ if {! $isTK} {
+ tixInitOptionDatabase 0
+ }
+ puts "}"
+
+
+} else {
+ set isFont 0
+
+ # Do the Color First
+ #
+ puts "proc tixPref:SetScheme-Color:$schemeName {} {"
+ puts [info body tixSetScheme-Color]
+ if {! $isTK} {
+ tixSetScheme-Color
+ tixInitOptionDatabase 0
+ }
+ puts "}"
+
+ # Now Do the Mono
+ #
+ puts "proc tixPref:SetScheme-Mono:$schemeName {} {"
+ puts [info body tixSetScheme-Mono]
+ if {! $isTK} {
+ tixSetScheme-Mono
+ tixInitOptionDatabase 0
+ }
+ puts "}"
+}
Added: external/tix-8.4.2.x/license.terms
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/license.terms Tue Mar 18 19:38:59 2008
@@ -0,0 +1,54 @@
+Copyright (c) 1993-1999 Ioi Kim Lam.
+Copyright (c) 2000-2001 Tix Project Group.
+Copyright (c) 2004 ActiveState
+
+This software is copyrighted by the above entities
+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.
+
+----------------------------------------------------------------------
+
+Parts of this software are based on the Tcl/Tk software copyrighted by
+the Regents of the University of California, Sun Microsystems, Inc.,
+and other parties. The original license terms of the Tcl/Tk software
+distribution is included in the file docs/license.tcltk.
+
+Parts of this software are based on the HTML Library software
+copyrighted by Sun Microsystems, Inc. The original license terms of
+the HTML Library software distribution is included in the file
+docs/license.html_lib.
Added: external/tix-8.4.2.x/man/GNUmakefile
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/GNUmakefile Tue Mar 18 19:38:59 2008
@@ -0,0 +1,42 @@
+# GNUmakefile --
+#
+# This GNUmakefile requires GNU make. It builds the HTML version
+# of the Tix man pages. You normally do not need to use this
+# GNUmakefile, as all the HTML man pages are already included in
+# the Tix source distribution.
+#
+# You need to use this file when you are create a Tix source
+# distribution from the Tix CVS tree. See
+# ../docs/MakeSrcDist.txt for more information.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and
+# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: GNUmakefile,v 1.1 2001/01/22 08:01:22 ioilam Exp $
+
+TCLSH = tclsh
+MAN2HTML = ../tools/tix-man2html.tcl
+UPDATEIDX = ../tools/man2html-fixindex.tcl
+NROFF_SRCS = $(shell echo *.n *.1)
+
+all: html/contents.htm
+
+html/contents.htm: ${NROFF_SRCS} ${MAN2HTML} ${UPDATEIDX} GNUmakefile
+ ${TCLSH} ${MAN2HTML} --htmldir=html --srcdir=../..
+ ${TCLSH} ${UPDATEIDX} html
+
+distclean:
+ -cd html; rm -rf *.htm *~ Keywords UserCmd
+ -cd html; rm -rf TclCmd TclLib
+ -cd html; rm -rf TkCmd TkLib
+ -cd html; rm -rf TixCmd TixLib
+
+test:
+ env TEST_ONLY=true $(MAKE) all
+
+full:
+ env WITH_TCL_TK=true $(MAKE) all
+
+
Added: external/tix-8.4.2.x/man/Makefile
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/Makefile Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+# GNUmakefile --
+#
+# This Makefile builds the HTML version
+# of the Tix man pages. You normally do not need to use this
+# Makefile, as all the HTML man pages are already included in
+# the Tix source distribution.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and
+# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: Makefile,v 1.2 2001/12/09 03:25:15 idiscovery Exp $
+
+TCLSH = tclsh
+MAN2HTML = ../tools/tix-man2html.tcl
+UPDATEIDX = ../tools/man2html-fixindex.tcl
+NROFF_SRCS = \
+ TixIntro.n compound.n pixmap.n tix.n tixBalloon.n tixButtonBox.n \
+ tixCheckList.n tixComboBox.n tixControl.n tixDestroy.n tixDirList.n \
+ tixDirSelectDialog.n tixDirTree.n tixDisplayStyle.n \
+ tixExFileSelectBox.n tixExFileSelectDialog.n tixFileEntry.n \
+ tixFileSelectBox.n tixFileSelectDialog.n tixForm.n tixGetBoolean.n \
+ tixGetInt.n tixGrid.n tixHList.n tixInputOnly.n \
+ tixLabelEntry.n tixLabelFrame.n tixListNoteBook.n \
+ tixMeter.n tixMwm.n tixNBFrame.n tixNoteBook.n tixOptionMenu.n \
+ tixPanedWindow.n tixPopupMenu.n tixScrolledHList.n tixScrolledListBox.n \
+ tixScrolledText.n tixScrolledWindow.n tixSelect.n tixStdButtonBox.n \
+ tixTList.n tixTree.n tixUtils.n tixwish.1
+
+all: html/contents.htm
+
+html/contents.htm: ${NROFF_SRCS} ${MAN2HTML} ${UPDATEIDX} GNUmakefile
+ ${TCLSH} ${MAN2HTML} --htmldir=html --srcdir=../..
+ ${TCLSH} ${UPDATEIDX} html
+
+distclean:
+ -cd html; rm -rf *.htm *~ Keywords UserCmd
+ -cd html; rm -rf TclCmd TclLib
+ -cd html; rm -rf TkCmd TkLib
+ -cd html; rm -rf TixCmd TixLib
+
+test:
+ env TEST_ONLY=true $(MAKE) all
+
+full:
+ env WITH_TCL_TK=true $(MAKE) all
Added: external/tix-8.4.2.x/man/TixIntro.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/TixIntro.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,261 @@
+'\"
+'\" $Id: TixIntro.n,v 1.4 2001/01/22 07:59:48 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH TixIntro n 8.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+TixIntro \- Introduction to the Tix library
+.BE
+'\"
+'\"
+.SH DESCRIPTION
+'\"
+Tix, which stands for Tk Interface Extension, is an extension library
+for Tcl/Tk. Tix adds many new widgets, image types and other commands that
+allows you to create compelling Tcl/Tk-based GUI applications.
+.PP
+One advantage of Tix over other Tk widget libraries is many of the Tix
+standard widgets are implemented in native code. This enhances
+performance and provides native look-and-feel for your applications.
+.PP
+This version of Tix works with Tcl/Tk version 8.0 or above.
+If Tix has been installed properly on your system, you can load the
+package into any Tk script by invoking the command
+.CS
+package require Tix
+.CE
+After this command has successfully returned, you can start using the
+functionalities of the Tix library. See the \fBEXAMPLES\fR section
+below for example scripts that use Tix.
+.PP
+If the "package require Tix" command fails, you
+probably need to install a new copy of Tix on your system. You can
+download the latest version of Tix from the web site
+http://tix.sourceforge.net/.
+.PP
+'\"
+.SH STANDARD WIDGETS
+Tix includes the following standard widgets which, like their counterparts in
+Tk, are implemented in native code to achieve high performance and
+native look-and-feel.
+.TP
+\fBtixGrid\fR
+The \fBtixGrid\fR widget displays items in a spread-sheet format.
+.TP
+\fBtixHList\fR
+Hierarchical listbox widget. This widget display entries in a
+tree-like format.
+.TP
+\fBtixInputOnly\fR
+A transparent window that can be used to cover another widget so as to
+disable mouse input.
+.TP
+\fBtixNBFrame\fR
+The \fBtixNBFrame\fR widget is used internally by the
+\fBtixNoteBook\fR widget to display choices among a set of overlapping
+pages.
+.TP
+\fBtixTList\fR
+Tabular listbox widget. This widget is similar to the built-in Tk
+\fBlistbox\fR widget but provides more flexibility in displaying the
+list entries.
+.SH MEGA WIDGETS
+Tix provides many new types of \fImega widgets\fR: these are widgets
+that are composed of built-in Tk widgets and the Tix standard widgets
+mentioned above.
+.TP
+\fBtixBalloon\fR
+The \fBtixBalloon\fR widget provides context-sensitive on-screen
+help.
+.TP
+\fBtixButtonBox\fR
+A convenience class for creating a box of \fBbutton\fR widgets.
+.TP
+\fBtixCheckList\fR
+A subclass of \fBtixTree\fR that presents single- or multiple
+choices to the user in a tree-like format.
+.TP
+\fBtixComboBox\fR
+A combination of the \fBlistbox\fR and \fBentry\fR widgets that allows
+the user to input an item by typing or by selecting from a list of
+items.
+.TP
+\fBtixControl\fR
+The \fBtixControl\fR widget allows the user to adjust a value using
+arrow buttons.
+.TP
+\fBtixDirList\fR
+A directory selection widget that displays the file system as a
+cascading list.
+.TP
+\fBtixDirSelectDialog\fR
+A dialog for selecting a directory. \fIThis widget is
+deprecated.\fR Use \fBtk_chooseDirectory\fR instead.
+.TP
+\fBtixDirTree\fR
+A directory selection widget that displays the file system in a tree
+format.
+.TP
+\fBtixExFileSelectBox\fR
+A widget for selecting a file. \fIThis widget is
+deprecated.\fR Use \fBtk_getOpenFile\fR instead.
+.TP
+\fBtixExFileSelectDialog\fR
+A dialog for selecting a file. \fIThis widget is
+deprecated.\fR Use \fBtk_getOpenFile\fR instead.
+.TP
+\fBtixFileEntry\fR
+A special entry widget that allows the user to choose a file by typing
+in its name or by selecting from a file dialog.
+.TP
+\fBtixFileSelectBox\fR
+A widget for selecting a file. \fIThis widget is
+deprecated.\fR Use \fBtk_getOpenFile\fR instead.
+.TP
+\fBtixFileSelectDialog\fR
+A dialog for selecting a file. \fIThis widget is
+deprecated.\fR Use \fBtk_getOpenFile\fR instead.
+.TP
+\fBtixLabelEntry\fR
+A convenience class for creating an \fBentry\fR with an associated
+\fBlabel\fR widget.
+.TP
+\fBtixLabelFrame\fR
+A labelled \fBframe\fR widget for grouping together a set of related
+widgets.
+.TP
+\fBtixListNoteBook\fR
+The \fBtixListNoteBook\fR widget allows the user to choose from a
+set of over-lapping pages by selecting from a list box.
+.TP
+\fBtixMeter\fR
+The \fBtixMeter\fR widget displays a bar graph to indicate progress.
+.TP
+\fBtixNoteBook\fR
+The \fBtixNoteBook\fR widget allows the user to choose from a
+set of over-lapping pages with a tabbed notebook metaphore.
+.TP
+\fBtixOptionMenu\fR
+The \fBtixOptionMenu\fR widget allows the user to choose a value from
+a pop-up menu.
+.TP
+\fBtixPanedWindow\fR
+The \fBtixPanedWindow\fR widgets allows the user to adjust the
+visible size of several \fBframe\fR widgets with handle bars.
+.TP
+\fBtixPopupMenu\fR
+The \fBtixPopupMenu\fR widget can be used to implement
+context-sensitive pop-up menu.
+.TP
+\fBtixScrolledHList\fR
+A \fBtixHList\fR widget with smart scrollbars. Like other Tix scrolled
+widgets, the scroll bars can be displayed on an as-needed basis.
+.TP
+\fBtixScrolledListBox\fR
+A Tk \fBlistbox\fR widget with smart scrollbars.
+.TP
+\fBtixScrolledText\fR
+A Tk \fBtext\fR widget with smart scrollbars.
+.TP
+\fBtixScrolledWindow\fR
+A Tk \fBframe\fR widget with smart scrollbars.
+.TP
+\fBtixSelect\fR
+The \fBtixSelect\fR widget uses a set of buttons to present
+single- or multiple selection options to the user.
+.TP
+\fBtixStdButtonBox\fR
+A subclass of \fBtixButtonBox\fR that provides four standard
+buttons (OK, Apply, Cancel Help) for Motif(TM)-like dialog boxes.
+.TP
+\fBtixTree\fR
+A subclass of \fBtixScrolledHList\fR that supports expanding and collapsing
+of entries in a hierarchical list.
+.SH DISPLAY ITEMS
+Three Tix standard widgets \fBtixGrid\fR, \fBtixHList\fR and
+\fBtixTList\fR support the \fIDisplay Items\fR mechanism. Display
+items are created by the widget command of these standard widgets. You can
+customize the items using \fIstyles\fR objects.
+.TP
+\fBtixDisplayStyle\fR
+Create style objects to customize display items.
+.SH IMAGE TYPES
+Tix provides two additional image types to the Tk \fBimage\fR
+framework.
+.TP
+\fBcompound\fR
+The \fBcompound\fR image type allows you to combine images, widgets,
+and text strings into a single Tk \fBimage\fR object.
+.TP
+\fBpixmap\fR
+The \fBpixmap\fR image type supports the XPM format.
+.SH OTHER COMMANDS
+The following Tcl command are also included in the Tix library to
+perform various functions.
+.TP
+\fBtixDestroy\fR
+Destroy Tix objects instances of classes defined by \fBtixClass\fR construct.
+.TP
+\fBtixForm\fR
+A geometry manager based on attachment rules. \fIThis geometry manager
+is deprecated\fR. Use the Tk \fBgrid\fR geometry manager instead.
+.TP
+\fBtixMwm\fR
+A command to communicate with the Mwm, the Motif(TM) Window
+Manager. Works on Unix only.
+.TP
+\fBtix\fR
+The \fBtix\fR command controls the Tix application context.
+.TP
+\fBtixGetBoolean\fR
+The \fBtixGetBoolean\fR command converts a string to a boolean value.
+.TP
+\fBtixGetInt\fR
+The \fBtixGetInt\fR command converts a string to a integer value.
+.TP
+\fBtixUtils\fR
+The \fBtixUtils\fR manual page describes some utility Tix commands.
+.SH EXECUTABLE PROGRAM
+.TP
+\fBtixwish\fR
+The \fBtixwish\fR program can be used to execute Tix-based
+applications. \fBtixwish\fR \fIis deprecated\fR. You shuld use the
+standard wish program from Tk and access Tix via the "package require
+Tix" command.
+.SH EXAMPLES
+The following is an example script that uses a \fBtixTree\fR widget.
+.PP
+.CS
+set tree [tixTree .t]
+pack $tree -expand yes -fill both
+for {set i 0} {$i < 2} {incr i} {
+ $tree subwidget hlist add $i -itemtype imagetext \\
+ -text "Folder $i" -image [tix getimage folder]
+ for {set j 0} {$j < 5} {incr j} {
+ $tree subwidget hlist add $i.$j -itemtype imagetext \\
+ -text "File $i.$j" -image [tix getimage textfile]
+ }
+}
+$tree autosetmode
+.CE
+.SH KEYWORDS
+'\"
+Tix, mega widgets
+
+
+
Added: external/tix-8.4.2.x/man/compound.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/compound.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,334 @@
+'\"
+'\" $Id: compound.n,v 1.3 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH compound n 4.0 Tix "Tix Built-In Commands"
+.BS
+.SH NAME
+compound \- multi-line compound image type.
+.SH SYNOPSIS
+\fBimage create compound \fR?\fIname\fR? ?\fIoptions\fR?
+.BE
+'\"
+.SH DESCRIPTION
+.PP
+'\"
+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 \fB\-image\fR 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 \fBbutton(n)\fR widget.
+'\"
+.SH "CREATING COMPOUND IMAGES"
+.PP
+Like all images, compound images are created using the \fBimage create\fR
+command. Compound images support the following \fIoptions\fR:
+.TP
+\fB\-background \fIcolor\fR
+'\"
+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.
+'\"
+.TP
+\fB\-borderwidth \fIpixels\fR
+'\"
+Specifies a non-negative value indicating the width of the 3-D border
+drawn around the compound image.
+'\"
+.TP
+\fB\-font \fIfont\fR
+'\"
+Specifies the default font for the text items in the compound image.
+'\"
+.TP
+\fB\-foreground \fIcolor\fR
+'\"
+Specifies the default foreground color for the bitmap and text items
+in the compound image.
+'\"
+.TP
+\fB\-padx \fIvalue\fR
+'\"
+Specifies a non-negative value indicating how much extra space to
+request for the compound image in the X-direction. The \fIvalue\fR may
+have any of the forms acceptable to \fBTk_GetPixels(3)\fR.
+'\"
+.TP
+\fB\-pady \fIvalue\fR
+'\"
+Specifies a non-negative value indicating how much extra space to
+request for the compound image in the Y-direction.
+.TP
+\fB\-relief \fIvalue\fR
+'\"
+Specifies the 3-D effect desired for the background of the compound
+image. Acceptable values are \fBraised\fR, \fBsunken\fR, \fBflat\fR,
+\fBridge\fR, and \fBgroove\fR.
+'\"
+.TP
+\fB\-showbackground \fIvalue\fR
+'\"
+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.
+'\"
+.TP
+\fB\-window \fIpathName\fR
+'\"
+Specifies the window in which the compound image is displayed. One
+compound image can be displayed in only one window. When that window
+is destroyed, the compound image is automatically destroyed as well.
+This option must be specified when calling the \fBimage create
+compound\fR command and cannot be changed by the \fBconfigure\fR image
+command.
+'\"
+.SH "IMAGE COMMAND"
+.PP
+When a compound image is created, Tk also creates a new command whose
+name is the same as the image. This command may be used to invoke
+various operations on the image. It has the following general form:
+.RS
+.CS
+\fIimageName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+\fIOption\fR and the \fIarg\fRs
+'\"
+determine the exact behavior of the command. The following
+commands are possible for compound images:
+'\"
+'\"
+.TP
+\fIimageName \fBadd line\fR ?\fIoption value ...\fR?
+'\"
+Creates a new line at the bottom of the compound image. Lines support
+the following \fIoptions\fR:
+.RS
+.TP
+\fB\-anchor\fR value
+'\"
+Specifies how the line should be aligned along the horizontal axis.
+When the values are \fBw\fR, \fBsw\fR or \fBnw\fR, the line is aligned
+to the left. When the values are \fBc\fR, \fBs\fR or \fBn\fR, the line
+is aligned to the middle. When the values are \fBe\fR, \fBse\fR or
+\fBne\fR, the line is aligned to the right.
+'\"
+.TP
+\fB\-padx \fIvalue\fR
+'\"
+Specifies a non-negative value indicating how much extra space to
+request for this line in the X-direction.
+.RE
+'\"
+.TP
+\fIimageName \fBadd \fIitem-type\fR ?\fIoption value ...\fR?
+'\"
+Creates a new item of the type \fIitem-type\fR at the end of the last
+line of the compound image. All types of items support
+these following common \fIoptions\fR:
+.RS
+.TP
+\fB-anchor\fR value
+'\"
+Specifies how the item should be aligned along the vertical axis. When
+the values are \fBn\fR, \fBnw\fR or \fBne\fR, the item is aligned to
+the top of the line. When the values are \fBc\fR, \fBw\fR or \fBe\fR,
+the item is aligned to the middle of the line. When the values are
+\fBs\fR, \fBse\fR or \fBsw\fR, the item is aligned to the bottom of
+the line.
+'\"
+.TP
+\fB\-padx \fIvalue\fR
+'\"
+Specifies a non-negative value indicating how much extra space to
+request for this item in the X-direction.
+'\"
+.TP
+\fB\-pady \fIvalue\fR
+'\"
+Specifies a non-negative value indicating how much extra space to
+request for this item in the Y-direction.
+'\"
+.TP
+\fIitem-type\fR can be any of the following:
+.RE
+'\"
+'\"----------------------------------------
+.TP
+\fIimageName \fBadd bitmap\fR ?\fIoption value ...\fR?
+'\"
+Creates a new bitmap item of at the end of the last
+line of the compound image. Additional \fIoptions\fR accepted by the
+bitmap type are:
+'\"
+.RS
+.TP
+\fB\-background \fIcolor\fR
+'\"
+Specifies the background color of the bitmap item.
+'\"
+'\"
+.TP
+\fB\-bitmap \fIname\fR
+'\"
+Specifies a bitmap to display in this item, in any of the forms
+acceptable to \fBTk_GetBitmap(3)\fR.
+'\"
+.TP
+\fB\-foreground \fIcolor\fR
+'\"
+Specifies the foreground color of the bitmap item.
+'\"
+.RE
+'\"----------------------------------------
+.TP
+\fIimageName \fBadd image\fR ?\fIoption value ...\fR?
+'\"
+Creates a new image item of at the end of the last
+line of the compound image. Additional \fIoptions\fR accepted by the
+image type are:
+'\"
+.RS
+.TP
+\fB\-image \fIname\fR
+Specifies an image to display in this item. \fIname\fR
+must have been created with the \fBimage create\fR command.
+'\"
+.RE
+'\"----------------------------------------
+.TP
+\fIimageName \fBadd space\fR ?\fIoption value ...\fR?
+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 \fIoptions\fR accepted by the image type
+are:
+'\"
+.RS
+.TP
+\fB\-width \fIvalue\fR
+Specifies the width of this space. The \fIvalue\fR may have any of the
+forms acceptable to \fBTk_GetPixels(3)\fR.
+'\"
+.TP
+\fB\-height \fIvalue\fR
+Specifies the height of this space. The \fIvalue\fR may have any of
+the forms acceptable to \fBTk_GetPixels(3)\fR.
+'\"
+.RE
+'\"----------------------------------------
+.TP
+\fIimageName \fBadd text\fR ?\fIoption value ...\fR?
+Creates a new text item of at the end of the last line of the compound
+image. Additional \fIoptions\fR accepted by the text type are:
+'\"
+.RS
+.TP
+\fB\-background \fIcolor\fR
+Specifies the background color of the text item.
+.TP
+\fB\-font \fIname\fR
+Specifies the font to be used for this text item.
+.TP
+\fB\-foreground \fIcolor\fR
+'\"
+Specifies the foreground color of the text item.
+'\"
+.TP
+\fB\-justify\fR \fIvalue\fR
+'\"
+When there are multiple lines of text displayed in a text item, this
+option determines how the lines line up with each other. \fIvalue\fR
+must be one of \fBleft\fR, \fBcenter\fR, or \fBright\fR. \fBLeft\fR
+means that the lines' left edges all line up, \fBcenter\fR means that
+the lines' centers are aligned, and \fBright\fR means that the lines'
+right edges line up.
+'\"
+.TP
+\fB\-text \fIstring\fR
+'\"
+Specifies a text string to display in this text item.
+'\"
+.TP
+\fB\-underline\fR \fIvalue\fR
+'\"
+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.
+'\"
+.TP
+\fB\-wraplength\fR \fIvalue\fR
+'\"
+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.
+'\"
+.RE
+'\"----------------------------------------
+'\"
+.TP
+\fIimageName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBimage create compound\fR command.
+'\"
+.TP
+\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+'\"
+Query or modify the configuration options for the image. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIimageName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the
+values accepted by the \fBimage create compound\fR command, except the
+\fB\-window\fR option
+'\".
+'\"----------------------------------------
+'\"
+.SH EXAMPLE
+'\"
+The following example creates a compound image with a bitmap and a
+text string and places this image into a Tk \fBbitton(n)\fR
+widget. Notice that the image must be created after the creation of
+the window that it resides in.
+.PP
+.CS
+set btn [button .b]
+set img [image create compound -window $btn]
+$img add line
+$img add bitmap -bitmap warning
+$img add space -width 8
+$img add text -text "Warning" -underline 0
+$btn config -image $img
+pack $btn
+.CE
+'\"
+.SH KEYWORDS
+image(n), Tix(n)
+
+
Added: external/tix-8.4.2.x/man/html/.cvsignore
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/html/.cvsignore Tue Mar 18 19:38:59 2008
@@ -0,0 +1,8 @@
+contents.htm
+TclCmd
+TkCmd
+TixCmd
+Keywords
+UserCmd
+TclLib
+TkLib
Added: external/tix-8.4.2.x/man/html/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/html/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,10 @@
+RCS $Id: README.txt,v 1.1 2001/01/22 00:36:05 ioilam Exp $
+
+This directory contains HTML version of the Tix manual pages. All the
+HTML files are auto-generated, so do not edit them directly. If you
+need to make a change, edit the Nroff sources in the parent directory.
+
+If there are no other files in this directory except this README.txt
+file, you probably have a checked-out copy of the Tix CVS tree. See
+the file ../GNUmakefile about how to generate the HTML files.
+
Added: external/tix-8.4.2.x/man/index.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/index.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,73 @@
+<HTML>
+<HEAD>
+<TITLE>Tix Manual Index</TITLE>
+<!-- $Id: index.html,v 1.4 2005/03/25 20:15:53 hobbs Exp $ -->
+</HEAD>
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">
+
+<Center><H2>Tix Manual Index</H2></Center>
+
+<h3> General Documents </h3>
+
+<ul>
+
+ <li> <b><a href="../ABOUT.html">ABOUT.html</a></b><br>
+ A brief descriptions of Tix.
+ <p>
+
+ <li> <b><a href="../docs/Release.html">Release Notes</a></b><br>
+ Important release notes about this version of Tix.
+ <p>
+
+
+ <li> <b><a href="../license.terms">license.terms</a></b><br>
+ Licensing terms and a <b><i>disclaimer of all
+ liabilities</i></b>. You should use Tix only if you agree to
+ <i><b>all</b></i> of its licensing terms. <p>
+
+ <li> <b><a href="../Roadmap.html">Roadmap.html</a></b><br>
+ Planned future changes to Tix.
+ <p>
+
+</ul>
+
+<h3> Programming with Tix </h3>
+
+<ul>
+
+ <li> <b><a href="../docs/html/TixUser/TixUser.html">
+ /docs/html/TixUser/TixUser.html</a></b><br>
+
+ Tix Users's Guide. An introduction to Tix under Python or Tcl.<BR>
+ Also available in <A HREF="docs/pdf/TixUser.pdf">PDF</A>.
+ <p>
+
+
+ <li> <b><a href="../docs/tix-book/tix.book.html">
+ /docs/tix-book/tix.book.html</a></b><br>
+
+ Tix Programmer's Guide. It was written for Tix 4.0, but most
+ of its contents are still relevant for this version of Tix.
+ <p>
+
+ <li> <b><a href="../man/html/contents.htm">/man/html/contents.htm</a></b><br>
+ Tix Manual Pages.
+ <p>
+
+ <li> <b><a href="../docs/FAQ.html">/docs/FAQ.html</a></b><br>
+ Frequent Asked Questions about Tix.
+ <p>
+
+ <li> <b><a href="../tools/README.html">/tools/README.html</a></b><br>
+ Useful development tools included in this package
+ <p>
+
+</ul>
+
+<hr>
+
+<a href="http://tix.sourceforge.net">Tix Home Page</a><br>
+</FONT>
+</BODY>
+</HTML>
Added: external/tix-8.4.2.x/man/man.macros
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/man.macros Tue Mar 18 19:38:59 2008
@@ -0,0 +1,236 @@
+'\" The definitions below are for supplemental macros used in Tcl/Tk
+'\" manual entries.
+'\"
+'\" .AP type name in/out ?indent?
+'\" Start paragraph describing an argument to a library procedure.
+'\" type is type of argument (int, etc.), in/out is either "in", "out",
+'\" or "in/out" to describe whether procedure reads or modifies arg,
+'\" and indent is equivalent to second arg of .IP (shouldn't ever be
+'\" needed; use .AS below instead)
+'\"
+'\" .AS ?type? ?name?
+'\" Give maximum sizes of arguments for setting tab stops. Type and
+'\" name are examples of largest possible arguments that will be passed
+'\" to .AP later. If args are omitted, default tab stops are used.
+'\"
+'\" .BS
+'\" Start box enclosure. From here until next .BE, everything will be
+'\" enclosed in one large box.
+'\"
+'\" .BE
+'\" End of box enclosure.
+'\"
+'\" .CS
+'\" Begin code excerpt.
+'\"
+'\" .CE
+'\" End code excerpt.
+'\"
+'\" .VS ?version? ?br?
+'\" Begin vertical sidebar, for use in marking newly-changed parts
+'\" of man pages. The first argument is ignored and used for recording
+'\" the version when the .VS was added, so that the sidebars can be
+'\" found and removed when they reach a certain age. If another argument
+'\" is present, then a line break is forced before starting the sidebar.
+'\"
+'\" .VE
+'\" End of vertical sidebar.
+'\"
+'\" .DS
+'\" Begin an indented unfilled display.
+'\"
+'\" .DE
+'\" End of indented unfilled display.
+'\"
+'\" .SO
+'\" Start of list of standard options for a Tk widget. The
+'\" options follow on successive lines, in four columns separated
+'\" by tabs.
+'\"
+'\" .SE
+'\" End of list of standard options for a Tk widget.
+'\"
+'\" .OP cmdName dbName dbClass
+'\" Start of description of a specific option. cmdName gives the
+'\" option's name as specified in the class command, dbName gives
+'\" the option's name in the option database, and dbClass gives
+'\" the option's class in the option database.
+'\"
+'\" .UL arg1 arg2
+'\" Print arg1 underlined, then print arg2 normally.
+'\"
+'\" RCS: @(#) $Id: man.macros,v 1.2 2001/01/22 00:32:09 ioilam Exp $
+'\"
+'\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
+.if t .wh -1.3i ^B
+.nr ^l \n(.l
+.ad b
+'\" # Start an argument description
+.de AP
+.ie !"\\$4"" .TP \\$4
+.el \{\
+. ie !"\\$2"" .TP \\n()Cu
+. el .TP 15
+.\}
+.ta \\n()Au \\n()Bu
+.ie !"\\$3"" \{\
+\&\\$1 \\fI\\$2\\fP (\\$3)
+.\".b
+.\}
+.el \{\
+.br
+.ie !"\\$2"" \{\
+\&\\$1 \\fI\\$2\\fP
+.\}
+.el \{\
+\&\\fI\\$1\\fP
+.\}
+.\}
+..
+'\" # define tabbing values for .AP
+.de AS
+.nr )A 10n
+.if !"\\$1"" .nr )A \\w'\\$1'u+3n
+.nr )B \\n()Au+15n
+.\"
+.if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
+.nr )C \\n()Bu+\\w'(in/out)'u+2n
+..
+.AS Tcl_Interp Tcl_CreateInterp in/out
+'\" # BS - start boxed text
+'\" # ^y = starting y location
+'\" # ^b = 1
+.de BS
+.br
+.mk ^y
+.nr ^b 1u
+.if n .nf
+.if n .ti 0
+.if n \l'\\n(.lu\(ul'
+.if n .fi
+..
+'\" # BE - end boxed text (draw box now)
+.de BE
+.nf
+.ti 0
+.mk ^t
+.ie n \l'\\n(^lu\(ul'
+.el \{\
+.\" Draw four-sided box normally, but don't draw top of
+.\" box if the box started on an earlier page.
+.ie !\\n(^b-1 \{\
+\h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
+.\}
+.el \}\
+\h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
+.\}
+.\}
+.fi
+.br
+.nr ^b 0
+..
+'\" # VS - start vertical sidebar
+'\" # ^Y = starting y location
+'\" # ^v = 1 (for troff; for nroff this doesn't matter)
+.de VS
+.if !"\\$2"" .br
+.mk ^Y
+.ie n 'mc \s12\(br\s0
+.el .nr ^v 1u
+..
+'\" # VE - end of vertical sidebar
+.de VE
+.ie n 'mc
+.el \{\
+.ev 2
+.nf
+.ti 0
+.mk ^t
+\h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
+.sp -1
+.fi
+.ev
+.\}
+.nr ^v 0
+..
+'\" # Special macro to handle page bottom: finish off current
+'\" # box/sidebar if in box/sidebar mode, then invoked standard
+'\" # page bottom macro.
+.de ^B
+.ev 2
+'ti 0
+'nf
+.mk ^t
+.if \\n(^b \{\
+.\" Draw three-sided box if this is the box's first page,
+.\" draw two sides but no top otherwise.
+.ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
+.el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
+.\}
+.if \\n(^v \{\
+.nr ^x \\n(^tu+1v-\\n(^Yu
+\kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
+.\}
+.bp
+'fi
+.ev
+.if \\n(^b \{\
+.mk ^y
+.nr ^b 2
+.\}
+.if \\n(^v \{\
+.mk ^Y
+.\}
+..
+'\" # DS - begin display
+.de DS
+.RS
+.nf
+.sp
+..
+'\" # DE - end display
+.de DE
+.fi
+.RE
+.sp
+..
+'\" # SO - start of list of standard options
+.de SO
+.SH "STANDARD OPTIONS"
+.LP
+.nf
+.ta 4c 8c 12c
+.ft B
+..
+'\" # SE - end of list of standard options
+.de SE
+.fi
+.ft R
+.LP
+See the \\fBoptions\\fR manual entry for details on the standard options.
+..
+'\" # OP - start of full description for a single option
+.de OP
+.LP
+.nf
+.ta 4c
+Command-Line Name: \\fB\\$1\\fR
+Database Name: \\fB\\$2\\fR
+Database Class: \\fB\\$3\\fR
+.fi
+.IP
+..
+'\" # CS - begin code excerpt
+.de CS
+.RS
+.nf
+.ta .25i .5i .75i 1i
+..
+'\" # CE - end code excerpt
+.de CE
+.fi
+.RE
+..
+.de UL
+\\$1\l'|0\(ul'\\$2
+..
Added: external/tix-8.4.2.x/man/pixmap.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/pixmap.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,92 @@
+'\"
+'\" $Id: pixmap.n,v 1.3 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH pixmap n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\" Note: do not modify the .SH NAME line immediately below!
+.SH NAME
+pixmap \- image type for the XPM file format.
+.SH SYNOPSIS
+\fBimage create pixmap \fR?\fIname\fR? ?\fIoptions\fR?
+.BE
+
+.SH DESCRIPTION
+.PP
+XPM is a popular X Window image file format for storing color icons.
+The \fBpixmap\fR image type defined by the \fBTix(n)\fR library can be
+used to create color images using XPM files.
+
+.SH "CREATING PIXMAPS"
+.PP
+Like all images, pixmaps are created using the \fBimage create\fR
+command. Pixmaps support the following \fIoptions\fR:
+.TP
+\fB\-data \fIstring\fR
+'\"
+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
+\fBpixmap(1)\fR program). If both the \fB\-data\fR and \fB\-file\fR
+options are specified, the \fB\-data\fR option takes precedence.
+Please note that the XPM file parsing code in the xpm library is
+extremely fragile. The first line of the string must be "\fB/* XPM
+*/\fR" or otherwise a segmatation fault will be caused.
+'\"
+.TP
+\fB\-file \fIname\fR
+'\"
+\fIname\fR 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 \fBpixmap(1)\fR program).
+'\"
+.SH "IMAGE COMMAND"
+.PP
+When a pixmap image is created, Tk also creates a new command whose
+name is the same as the image. This command may be used to invoke
+various operations on the image. It has the following general form:
+.RS
+.CS
+\fIimageName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+\fIOption\fR and the \fIarg\fRs
+'\"
+determine the exact behavior of the command. The following
+commands are possible for pixmap images:
+.TP
+\fIimageName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBimage create pixmap\fR command.
+.TP
+\fIimageName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+'\"
+Query or modify the configuration options for the image. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIimageName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the
+values accepted by the \fBimage create pixmap\fR command.
+
+.SH KEYWORDS
+pixmap(1), image(n), Tix(n)
+
+
Added: external/tix-8.4.2.x/man/tix.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tix.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,252 @@
+'\"
+'\" $Id: tix.n,v 1.5 2004/12/24 00:38:31 hobbs Exp $
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH tix n 8.4 Tix "Tix Built-In Commands"
+.BS
+'\"
+.SH NAME
+tix \- Manipulate internal states of the Tix library
+'\"
+.SH SYNOPSIS
+\fBtix\fR \fIoption \fR?\fIarg arg ...\fR?
+'\"
+'\"----------------------------------------------------------------------
+.SH "CONFIGURATION OPTIONS"
+'\"
+This manual page descripts the \fBtix\fR command, which manipulates
+the internal states of the Tix library. If you're looking for a general
+introduction to the Tix library, please refer to the \fBTixIntro\fR
+manual page.
+.PP
+The Tix application context supports the following configuration
+options. Usually, these options are set using the X resource database,
+i.e., in the user's \fB\.Xdefault\fR file. For example, to choose a
+different color scheme for the Tix widgets, these two lines can be
+added to the user's \fB\.Xdefault\fR file:
+.RS
+.CS
+*TixScheme: Gray
+*TixFontSet: 14Point
+.CE
+.RE
+'\"
+'\"----------BEGIN
+.OP -binding binding Binding
+This is an obsolete option.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-debug debug Debug
+Specifies whether the Tix widgets should run in debug mode.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-fontset tixFontSet TixFontSet
+Specifies the fontset to use for the Tix widgets. Valid options are
+\fBWmDefault\fR,
+\fBTK\fR, \fBTkWin\fR, \fB12Point\fR and \fB14Point\fR. \fBTK\fR specifies that the
+standard TK fonts should be used. The default value is \fBWmDefault\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-scheme tixScheme TixScheme
+Specifies the color scheme to use for the Tix widgets. Valid options
+are \fBWmDefault\fR,
+\fBTK\fR, \fBTkWin\fR, \fBGray\fR, \fBBlue\fR, \fBBisque\fR, \fBSGIGray\fR and
+\fBTixGray\fR. If you want the
+standard TK color scheme, you can use the value \fBTK\fR.
+The default value is \fBWmDefault\fR.
+ '\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-schemepriority tixSchemePriority TixSchemePriority
+Specifies the priority level of the TK options set by th Tix
+schemes. Please refer to the TK \fBoption(n)\fR manual page for a
+discussion of the priority level of Tix options. The default value is
+79, which makes the Tix schemes at a higher priority than the
+settings in the .Xdefaults file. If you want to allow the Tix schemes
+to be overridden by the settings in the .Xdefaults file, you can set
+the following line in you .Xdefaults file:
+.CS
+*TixSchemePriority: 21
+.CE
+'\"----------END
+'\"
+.BE
+.SH DESCRIPTION
+.PP
+The \fBtix\fR command provides access to miscellaneous elements of
+Tix's internal state and the Tix \fBapplication context\fR. Most of
+the information manipulated by this command pertains to the
+application as a whole, or to a screen or display, rather than to a
+particular window. The command can take any of a number of different
+forms depending on the \fIoption\fR argument. The legal forms are:
+'\"
+.TP
+\fBtix addbitmapdir\fR \fIdirectory\fR
+'\"
+Tix maintains a list of directory under which which the \fBtix
+getimage\fR and \fBtix getbitmap\fR commands will search for image
+files. The standard bitmap directory is
+\fB$TIX_LIBRARY/bitmaps\fR. The \fBaddbitmapdir\fR command adds
+\fIdirectory\fR into this list. By using this command, the image files
+of an applications can also be located using the \fBtix getimage\fR ot
+\fBtix getbitmap\fR command.
+'\"
+.TP
+\fBtix cget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may be any of the options described in the
+\fBCONFIGURATION OPTIONS\fR section.
+'\"
+.TP
+\fBtix configure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the Tix application
+context. If no \fIoption\fR is specified, returns a list describing
+all of the available options (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may be any of the
+options described in the \fBCONFIGURATION OPTIONS\fR section.
+'\"
+'\"
+.TP
+\fBtix filedialog \fR?\fIclass\fR?
+'\"
+Returns the file selection dialog that may be shared among different
+modules of this application. This command will create a file selection
+dialog widget when it is called the first time. This dialog will be
+returned by all subsequent calls to \fBtix filedialog\fR. An optional
+\fIclass\fR parameter can be passed to specified what type of file
+selection dialog widget is desired. Possible options are
+\fBtixFileSelectDialog\fR or \fBtixExFileSelectDialog.\fR
+'\"
+.TP
+\fBtix getbitmap \fIname\fR
+'\"
+Locates a bitmap file of the name \fIname\fR.xpm or \fIname\fR in one
+of the bitmap directories (see the \fBaddbitmapdir\fR command
+above). By using \fBtix getbitmap\fR, you can advoid hard coding the
+pathnames of the bitmap files in your application. When successful, it
+returns the complete pathname of the bitmap file, prefixed with the
+character \fB@\fR. The returned value can be used to configure the
+\fB\-bitmap\fR option of the TK and Tix widgets.
+'\"
+.TP
+\fBtix getimage \fIname\fR
+'\"
+Locates an image file of the name \fIname\fR.xpm, \fIname\fR.xbm or
+\fIname\fR.ppm in one of the bitmap directories (see the
+\fBaddbitmapdir\fR command above). If more than one file with the same
+name (but different extensions) exist, then the image type is chosen
+according to the depth of the X display: xbm images are chosen on
+monochrome displays and color images are chosen on color displays. By
+using \fBtix getimage\fR, you can advoid hard coding the pathnames of
+the image files in your application. When successful, this command
+returns the name of the newly created image, which can be used to
+configure the \fB\-image\fR option of the TK and Tix widgets.
+'\"
+.TP
+\fBtix initstyle\fR
+'\"
+Init the style defaults for Tix. Prior to Tix 8.4 this was done by
+simply package requiring Tix, but this call is now required to
+explicitly use Tix style.
+'\"
+.TP
+\fBtix option\fR ?\fIargs ...\fR?
+'\"
+Manipulates the options manitained by the Tix scheme
+mechanism. Available options are:
+.CS
+active_bg active_fg bg
+bold_font dark1_bg dark1_fg
+dark2_bg dark2_fg disabled_fg
+fg fixed_font font
+inactive_bg inactive_fg input1_bg
+input2_bg italic_font light1_bg
+light1_fg light2_bg light2_fg
+menu_font output1_bg output2_bg
+select_bg select_fg selector
+.CE
+The arguments to the \fBtix option\fR command can take the
+following form(s):
+.RS
+.TP
+\fBtix option get\fR \fIoption\fR
+'\"
+Returns the current value of \fIoption\fR.
+.RE
+'\"
+'\"
+.TP
+\fBtix resetoptions\fR \fInewScheme newFontSet\fR ?\fInewScmPrio\fR?
+'\"
+'\"
+Resets the scheme and fontset of the Tix application to
+\fInewScheme\fR and \fInewFontSet\fR, respectively. This affects only
+those widgets created \fBafter\fR this call. Therefore, it is best to
+call the \fBresetoptions\fR command \fBbefore\fR the creation of any
+widgets in a Tix application.
+
+The optional parameter \fInewScmPrio\fR can be given to reset the
+priority level of the TK options set by the Tix schemes.
+'\"
+'\"
+.SH BUGS
+'\"
+.IP [1]
+In this release of Tix, the following configuration options have been
+disabled. Assigning values to them will cause no effect:
+.CS
+-binding
+-debug
+-fontset
+-scheme
+-schemepriority
+.CE
+In addition, the following options to the \fBtix\fR command have been
+disabled. Invoking the \fBtix\fR command with these options will cause
+no effect:
+.CS
+resetoptions
+.CE
+.IP [2]
+Because of the way TK handles the X option database, after tixwish has
+started up, it is not possible to reset the color schemes and font
+sets using the \fBtix config\fR command. Instead, the \fBtix
+resetoptions\fR command must be used.
+'\"
+.PP
+The tk_setPalette command does not work very well under Tix. To use
+it, one must follow these steps:
+.RS
+.CS
+tix resetoptions TK TK
+tk_setPalette lightblue
+.CE
+.RE
+'\"
+.SH KEYWORDS
+file selection dialog
+
Added: external/tix-8.4.2.x/man/tixBalloon.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixBalloon.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,225 @@
+'\"
+'\" $Id: tixBalloon.n,v 1.1 2001/01/22 00:37:59 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixBalloon n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixBalloon \- Create and manipulate tixBalloon widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixBalloon \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBtixBalloon\fR class is derived from the \fBTixShell\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The Balloon widget supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-initwait initWait InitWait
+In milliseconds. Specifies how long the balloon should wait before
+popping up in a widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the which help message to display when the mouse pointer
+enters a widget associated with this balloon. Valid options are
+\fBboth\fR: display both the balloon message and the status bar
+message, \fBballoon\fR: display only the balloon message,
+\fBstatus\fR: display only the status bar message and \fBnone\fR:
+display no messages.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-statusbar statusBar statusBar
+Specifies the widget to use as the status bar of this balloon. This
+widget must have a "-text" option. Usually a label widget is used.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlabel\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The label widget that shows the little arrow bitmap in the pop-up
+balloon window.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmessage\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The message widget that shows the descriptive message in the the pop-up
+balloon window.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixBalloon\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a Balloon widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+Balloon widget such as its cursor and relief.
+
+The Balloon widget can be used to show popped-up messages
+that describe the functions of the widgets in an application. A
+Balloon widget can be bound to a number of widgets. When the user
+moves the cursor inside a widget to which a Balloon widget has been
+bound, a small pop-up window with a descriptive message will be shown
+on the screen.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixBalloon\fR command creates a new Tcl command whose name is
+the same as the path name of the Balloon widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+Balloon widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for Balloon widgets:
+.TP
+\fIpathName \fBbind\fR widget ?\fIoption value ... \fR?
+'\"
+Binds the Balloon widget to the \fIwidget\fR. The messages to be
+shown can be passed as extra arguments to this command in \fIoption
+value\fR pairs. Possible options: \fB\-balloonmsg\fR specifies the
+string to show on the pop-up balloon window; \fB\-statusmsg\fR
+specifies the string to show on the status bar; \fB\-msg\fR specifies a
+string to show on both the balloon window and the stats bar window.
+When used together, the \fB\-msg\fR option has a lower precedence than
+the \fB\-balloonmsg\fR and \fB\-statusmsg\fR options.
+
+The \fBbind\fR command can also be used to change the messages after
+the initial bindings were set. Example:
+.PP
+.nf
+ button .b
+ tixBalloon .bal
+
+ # Add balloon binding
+ .bal bind .b -msg "This is a button"
+
+ ...
+
+ # Change the balloon binding
+ .bal bind .b -msg "This is a useful button"
+.fi
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixBalloon\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixBalloon\fR command.
+'\"
+'\"
+'\"
+.TP
+\fIpathName \fBunbind\fI widget\fR
+'\"
+Cancels the Balloon widget's binding with \fIwidget\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+After a widget has be bound to a Balloon widget, when the user moves
+the cursor into this widget, the Balloon widget is activated: if the
+\fB\-balloonmsg\fR option of this widget is set, the balloon window
+pops up; if the \fB\-statusmsg\fR option of this widget is set, the
+message will be displayed in the status bar widget.
+.PP
+When the user moves the cursor out of the widget, the Balloon widget
+is de-activated: the balloon window is withdrawn and the status-bar
+message removed.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixButtonBox.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixButtonBox.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,188 @@
+'\"
+'\" $Id: tixButtonBox.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixButtonBox n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixButtonBox \- Create and manipulate Tix ButtonBox widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixButtonBox \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-anchor \-background \-cursor
+\-relief \-borderWidth
+'\"
+.SE
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"
+'\"----------BEGIN
+.OP -orientation orientation Orientation
+\fBStatic Option\fR. Specifies the orientation of the button
+subwidgets. Only the values "horizontal" and "vertical" are recognized.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padx Pad
+Specifies the horizontal padding between two neighboring button
+subwidgets in the ButtonBox widget.
+'\"----------END
+
+'\"----------BEGIN
+.OP \-pady pady Pad
+Specifies the vertical padding between two neighboring button
+subwidgets in the ButtonBox widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the state of all the buttons inside the ButtonBox widget.
+
+\fINote\fR:
+Setting this option using the \fIconfig\fR widget command will enable
+or disable all the buttons subwidgets. Original states of the
+individual buttons are \fInot\fR saved. Only the values "normal" and
+"disabled" are recognized.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+.PP
+'\"
+All the button subwidgets created as a result of the \fBadd\fR command
+can be accessed by the \fBsubwidget\fR command. They are identified by
+the \fBbuttonName\fR parameter to the \fBadd\fR command. Here is an
+example:
+.PP
+.CS
+set bbox [tixButtonBox .bbox]
+pack $bbox
+$bbox add eat -text Eat
+$bbox add sleep -text Sleep
+$bbox subwidget eat config -fg green
+$bbox subwidget sleep config -fg red
+.CE
+.BE
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixButtonBox\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a ButtonBox
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+ButtonBox such as its cursor and relief.
+'\"
+.PP
+The ButtonBox widget can be used as a container widget to hold the
+``action'' buttons in a dialog box.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET COMMAND"
+.PP
+'\"
+The \fBtixButtonBox\fR command creates a new Tcl command whose name is
+the same as the path name of the ButtonBox's window. This command may
+be used to invoke various operations on the widget. It has the
+following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the ButtonBox widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for ButtonBox widgets:
+'\"
+.TP
+\fIpathName \fBadd \fIbuttonName \fR?\fIoption value ...\fR?
+'\"
+Add a new button subwidget with the name \fIbuttonName\fR into
+the ButtonBox widget. Additional configuration options can be given to
+configure the new button subwidget.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixButtonBox\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixButtonBox\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBinvoke \fIbuttonName\fR
+'\"
+Invoke the button subwidget with the name \fIbuttonName\fR.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no additional arguments are given, returns the pathname of the
+subwidget of the specified name.
+
+When no additional arguments are given, the widget command of the
+specified subwidget will be called with these parameters.
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+TixButtonBox widgets have no default bindings. The button subwidgets
+retain their default Tk bindings.
+'\"
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), Container Widgets
+
+
+
Added: external/tix-8.4.2.x/man/tixCheckList.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixCheckList.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,238 @@
+'\"
+'\" $Id: tixCheckList.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixCheckList n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixCheckList \- Create and manipulate tixCheckList widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixCheckList \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixCheckList\fR class is derived from the \fBTixTree\fR class
+and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixCheckList\fR supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browseCmd BrowseCmd
+Specifies a command to call whenever the user browses on an entry
+(usually by single-clicking on the entry). The command is called with
+one argument, the pathname of the entry.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies a command to call whenever the user activates an entry
+(usually by double-clicking on the entry). The command
+is called with one argument, the pathname of the entry.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-radio radio Radio
+A Boolean value. If set to true, the user can select at most one item
+at a time; if set to false, the user can select as many items as
+possible.
+'\"----------END
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhlist\fR
+Class: \fBTixHList\fR
+.fi
+.IP
+The hierarchical listbox that displays the CheckList.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixCheckList\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a CheckList widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the CheckList
+widget such as its cursor and relief.
+.PP
+The CheckList widget displays a list of items to be selected by the
+user. CheckList acts similarly to the Tk checkbutton or radiobutton
+widgets, except it is capable of handling many more items than
+checkbuttons or radiobuttons.
+.PP
+The items are contained in the \fBhlist\fR subwidget. Each item may
+be in one of the following status: \fBon\fR (indicated by a check
+bitmap), \fBoff\fR (indicated by a cross bitmap) \fBdefault\fR
+(indicated by a gray box bitmap) or \fBnone\fR, in which case the item
+will not be accompanied by a bitmap. The items whose status is
+\fBon\fR, \fBoff\fR or \fBdefault\fR are called the \fIselectable\fR
+items and can be checked or crossed by the user. All selectable
+entries must be of the type \fBimagetext\fR.
+.PP
+The items whose status is \fBnone\fR cannot be checked or crossed by
+the user; usually they are included in the \fBhlist\fR subwidget only
+for explanation purposes or as separators.
+.PP
+Initially, all the items have a \fInone\fR status. To make an item
+selectable, you can call the \fBsetstatus\fR command to change its
+status (see below).
+'\"
+.PP
+Notice that CheckList is a subclass of the TixTree widget and thus is
+is capable of displaying a hierachy of selectable entries. When
+necessary, you can call the \fBsetmode\fR method (see
+\fBTixTree(n)\fR) to define the hierachical structure of the
+selectable entries.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixCheckList\fR command creates a new Tcl command whose name is
+the same as the path name of the CheckList's window. This command may
+be used to invoke various operations on the widget. It has the
+following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+CheckList widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for CheckList widgets:
+'\"
+.TP
+\fIpathName \fBgetselection\fR ?\fIstatus\fR?
+'\"
+Returns a list of items whose status matches \fIstatus\fR. If
+\fIstatus\fR is not specified, the list of items in the "\fBon\fR"
+status will be returned.
+'\"
+.TP
+\fIpathName \fBgetstatus\fR \fIentryPath\fR
+'\"
+Returns the current status of \fIentryPath\fR.
+'\"
+.TP
+\fIpathName \fBsetstatus\fR \fIentryPath status\fR
+'\"
+Sets the status of \fIentryPath\fR to be \fIstatus\fR. A bitmap will
+be displayed next to the entry its status is \fBon\fR, \fBoff\fR or
+\fBdefault\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"----------------------------------------------------------------------
+.SH EXAMPLE
+'\"
+.PP
+This example creates several choices for the user to select.
+.PP
+.CS
+set c [tixCheckList .c]
+$c subwidget hlist add choice1 -itemtype imagetext -text Choice1
+$c subwidget hlist add choice2 -itemtype imagetext -text Choice2
+$c subwidget hlist add choice3 -itemtype imagetext -text Choice3
+$c setstatus choice1 on
+$c setstatus choice2 off
+$c setstatus choice3 off
+pack $c
+.CE
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+'\"
+The basic mouse and keyboard bindings of the CheckList widget are the
+same as the bindings of the TixTree widget.
+
+In addition, the status of the entries in the CheckList are toggled
+under the following conditions:
+'\"
+.IP [1]
+When the user press the mouse button over an entry.
+'\"
+.IP [2]
+When the user press the <space> key over an entry.
+'\"
+.IP [3]
+When the user press the <Return> key over an entry.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), tixHList(n), tixTree(n)
+
+
Added: external/tix-8.4.2.x/man/tixComboBox.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixComboBox.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,466 @@
+'\"
+'\" $Id: tixComboBox.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixComboBox n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixComboBox - Create and manipulate tixComboBox widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixComboBox \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixComboBox\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and subwidgets
+of its super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixComboBox\fR supports all the standard options of a frame widget.
+See the options(n) manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.PP
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"
+'\"
+'\"----------BEGIN
+.OP \-anchor anchor Anchor
+Specifies how the string inside the entry subwidget should be aligned.
+Only the values "w" or "e" are allowed. When set the "w", the entry is
+aligned to its beginning. When set to "e", it is aligned to its end.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-arrowbitmap arrowBitmap ArrowBitmap
+Specifies the bitmap to be used in the arrow button beside the entry
+widget. The default is an downward arrow bitmap in the file
+$tix_library/bitmaps/cbxarrow
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browseCmd BrowseCmd
+Specifies the command to be called when the user browses through the
+listbox. This command can be used to provide instant feedback when the
+user examines items in the listbox before committing a choice.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the ComboBox is invoked
+or when the \fB\-value\fR of the ComboBox is changed.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-crossbitmap crossBitmap CrossBitmap
+Specifies the bitmap to be used in the "cross" button to the left of
+the entry widget. The default is a bitmap in the file
+$tix_library/bitmaps/cross
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the ComboBox.
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disabledforeground disabledforeground DisabledForeground
+Specifies the foreground color to be used when the ComboBox is disabled.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dropdown dropdown Dropdown
+A Boolean value specifying the style of the ComboBox. When set to
+"true", the listbox is only displayed temporarily when the arrow
+button is pressed. When set to "false", the listbox is always
+displayed.
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-editable editable Editable
+Specifies whether the user is allowed to type into the entry subwidget of
+the ComboBox.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-fancy fancy Fancy
+A Boolean value specifying whether the cross and tick button
+subwidgets should be shown.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-grab grab Grab
+Specifies the pointer grabbing policy when the listbox is popped up.
+Only values "global", "local" or "none" are allowed. By default global
+grab is used. However, when you are developing your application, you
+may want to use only local grabbing so that in the event of errors,
+your X display won't be locked up.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhistoryLimit\fR
+Class: \fBhistoryLimit\fR
+Switch: \fB\-historylimit\fR
+Alias: \fB\-histlimit\fR
+.fi
+.IP
+Specifies how many previous user inputs can be stored in the history
+list.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-history history History
+A Boolean value specifying whether previous user inputs should be
+stored in the history list.
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this ComboBox widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the entry
+subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"'
+'\"----------BEGIN
+.OP \-listcmd listCmd listCmd
+Specifies a TCL command to be called every time when the listbox pops
+up. This option allows you to fill up the listbox on-demand. This
+option is ignored when the listbox is not in the \fBdropdown\fR style.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-listwidth listWidth listWidth
+If set, this option controls the width of the listbox subwidget when
+it is popped up. The option is ignored when the listbox is not in the
+\fBdropdown\fR style.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-prunehistory prunehistory PruneHistory
+Specifies whether duplicated previous user inputs should be pruned
+from the the history list. Only Boolean values are allowed.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selection selection Selection
+Contains the selection in the ComboBox (the string displayed in the
+entry subwidget). Depending on the \fB\-selectmode\fR, the selection
+of a ComboBox may be different than its \fB\-value\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selection selection Selection
+This option stores the temporary selection. When the user types in a
+text string inside the entry widget, that string is considered as a
+temporary input and is stored inside the \fB\-selection\fR option. The
+\fB\-value\fR option is updated only when the user presses the return
+key.
+'\"
+'\"----------BEGIN
+.OP \-selectmode selectMode SelectMode
+Specifies the how the combobox responds to the mouse button events in
+the listbox subwidget; can eithet be \fB"browse"\fR or
+\fB"immediate"\fR. The default \fB\-selectmode\fR is "browse". See the
+\fBBINDINGS\fR section below.
+'\"----------END
+'\"----------BEGIN
+.OP \-state state State
+Specifies the whether the ComboBox is normal or disabled.
+Only the values "normal" and "disabled" are recognized.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-tickbitmap tickBitmap tickBitmap
+Specifies the bitmap to be used in the "tick" button to the left of
+the entry widget. The default is a bitmap in the file
+$tix_library/bitmaps/tick
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-validatecmd validateCmd ValidateCmd
+Specifies a TCL command to be called when the \fB\-value\fR of the
+ComboBox is about to change. This command is called with one parameter
+-- the new \fB\-value\fR entered by the user. This command is to
+validate this new value by returning a value it deems valid.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-value value Value
+Specifies the string to be displayed in the entry subwidget of the
+ComboBox. When queried, the returned value is the last value
+selected by the user. When the \fB\-value\fR option is changed as a
+result of the \fBconfig -value\fR widget command, the TCL command
+specified by the \fB\-command\fR option is called.
+'\"----------END
+'\"
+'\"
+'\"
+'\"----------BEGIN
+.OP \-variable variable Variable
+Specifies the global variable in which the value of the
+ComboBox should be stored. The value of the ComboBox
+will be automatically updated when this variable is changed.
+'\"
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBarrow\fR
+Class: \fBButton\fR
+.fi
+.IP
+The down arrow button.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBcross\fR
+Class: \fBButton\fR
+.fi
+.IP
+The cross button. Available only when \fB\-fancy\fR is set.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBentry\fR
+Class: \fBEntry\fR
+.fi
+.IP
+The entry that shows the value of this \fBtixControl\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlabel\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The label subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlistbox\fR
+Class: \fBListbox\fR
+.fi
+.IP
+The listbox that holds all the list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBslistbox\fR
+Class: \fBTixScrolledListBox\fR
+.fi
+.IP
+The scrolled-listbox that provides the scrollbars.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBtick\fR
+Class: \fBButton\fR
+.fi
+.IP
+The tick button. Available only when \fB\-fancy\fR is set.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixComboBox\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a \fBtixComboBox\fR widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+ComboBox such as its cursor and relief.
+
+The Tix ComboBox widget is similar to the combo box control in
+MS Windows. The user can select a choice by either typing in the entry
+subwdget or selecting from the listbox subwidget.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixComboBox\fR command creates a new Tcl command whose name is the
+same as the path name of the ComboBox's window. This command
+may be used to invoke various operations on the widget. It has the
+following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+ComboBox widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for ComboBox widgets:
+'\"
+.TP
+\fIpathName \fBaddhistory\fI string \fR
+'\"
+Add the string to the beinning of the listbox.
+'\"
+.TP
+\fIpathName \fBappendhistory\fI string \fR
+Append the string to the end of the listbox.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixComboBox\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixComboBox\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBflash \fIindex string\fR
+'\"
+Flashes the ComboBox. \fBflash\fR is usually called by a
+\fI\-command\fR procedure to acknowledge to the user that he has
+selected a value for the ComboBox.
+'\"
+'\"
+.TP
+\fIpathName \fBinsert \fIindex string\fR
+Insert the \fI string\fR into the listbox at the specified index.
+\fIindex\fR must be a valid listbox index.
+'\"
+'\"
+.TP
+\fIpathName \fBpick \fIindex\fR
+Set the (\fIindex\fR)th item in the listbox to be the current value of
+the ComboBox. As a result, the \fIvalue\fR of the ComboBox is changed
+and the TCL command sepcified by the \fI\-command\fR option will be
+called.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+When no options are given, returns the pathname of the subwidget of
+the specified name.
+
+When options are given, the widget command of the specified subwidget will
+be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.PP
+.SH BINDINGS
+.PP
+.IP [1]
+If the \fB\-selectmode\fR is "immediate", when the user enters a
+keystroke, clicks on an item or drags the mouse pointer in the
+listbox, the \fB\-value\fR of the ComboBox will be immediately set to
+this item and the \fB\-command\fR procedure will be called.
+'\"
+'\"
+.IP [2]
+If the \fB\-selectmode\fR is "browse", when the user enters a
+keystroke, clicks on an item or drags the mouse pointer in the
+listbox, the \fB\-selection\fR of the ComboBox will be immediately set
+to the new content of the entry subwidget; also the \fB\-browsecmd\fR
+procedure will be called. The \fB\-value\fR option will be changed
+only when the user invokes the ComboBox (see [3] below). If the user
+presses the <Escape> key at any time, any new \fB\-selection\fR will
+be ignored and the text inside the entry subwidget will be restored to
+the current \fB\-value\fR of the ComboBox.
+'\"
+.IP [3]
+If the \fB\-dropdown\fR option is true, the user can invoke the
+ComboBox by releasing the left mouse button over the desired item in
+the listbox. If the \fB\-dropdown\fR option is false, the user can
+invoke the ComboBox by double-clicking over the desired item in the
+listbox. In both cases, the user can also invoke the listbox by
+pressing the <Return> or <Tab> key inside the entry subwidget, or
+switching the input focus to another widget inside the same toplevel
+widget
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.PP
+.SH BUGS
+.PP
+Starting from Tix vetsion 4.0, the default \fB\-value\fR of the
+ComboBox is the empty string. If you want the ComboBox to show a
+string by default, you must configure its \fB\-value\fR option
+explicitly.
+'\"
+'\"----------------------------------------------------------------------
+.PP
+.SH KEYWORDS
+Tix(n), ComboBox(n), listbox(n)
+
+
Added: external/tix-8.4.2.x/man/tixControl.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixControl.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,375 @@
+'\"
+'\" $Id: tixControl.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixControl n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixControl \- Create and manipulate tixControl widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixControl \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixControl\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The Control widget supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-allowempty allowEmpty AllowEmpty
+Specifies whether the Control widget should allow the empty string
+as a valid input.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-autorepeat autorepeat AutoRepeat
+Specifies whether the Control widget should have autorepeat behavior.
+If set to be "true", the value of the Control widget will be
+automatically incremented or decremented when the user holds down the
+mouse button over the arrow buttons. Only values "true" and
+"false" will be recognized.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the \fB\-value\fR option of
+the Control widget is changed. The command will be called with one
+arguments -- the new value of the Control widget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-decrcmd decrCmd DecrCmd
+Specifies a TCL command to be called when the the user presses the
+down-arrow button subwidget. This command is called with one parameter
+-- the current \fB\-value\fR of this Control widget. This
+command is to decrement this value by one step, according to its own
+definition of "decrement", and return the decremented value, which
+will be stored in the \fB\-value\fR of this Control widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the Control widget
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disableforeground disableForeground DisableForeground
+The foreground color to use for of the entry subwidget when the
+Control widget is disabled.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-incrcmd incrCmd IncrCmd
+Specifies a TCL command to be called when the the user presses the
+up-arrow button subwidget. This command is called with one parameter
+-- the current \fB\-value\fR of this Control widget. This
+command is to increment this value by one step, according to its own
+definition of "increment", and return the incremented value, which
+will be stored in the \fB\-value\fR of this Control widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-initwait initwait Initwait
+Specifies how long the Control widget should wait initially before
+it starts to automatically increment or decrement its value in the
+autorepeat mode. In milliseconds.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-integer integer Integer
+A Boolean value specifying whether only integer numbers are accepted.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this Control widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the entry
+subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmax\fR
+Class: \fBMax\fR
+Switch: \fB\-max\fR
+Alias: \fB\-ulimit\fR
+.fi
+.IP
+Specifies the upper limit of the value of the Control widget. When set
+to empty string, the Control widget has no upper limit.
+'\"----------END
+'\"'
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmin\fR
+Class: \fBMin\fR
+Switch: \fB\-min\fR
+Alias: \fB\-llimit\fR
+.fi
+.IP
+Specifies the lower limit of the value of the Control widget.When set
+to empty string, the Control widget has no lower limit.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-repeatrate repeatRate RepeatRate
+Specifies how often the value of the Control widget should be
+incremented or decremented when it is in the autorepeat mode. In
+milliseconds.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectmode selectMode SelectMode
+Specifies how the Control widget should react to \fC<KeyPress>\fR
+events. When set to "immediate", any user keyboard inputs will
+immediately change the \fB\-value\fR option. When set to "normal", the
+user keyboard inputs will be copied to the \fB\-value\fR option only
+if the\fC <Return>\fR key is pressed or the keyboard focus is
+changed. The use of the immediate mode is discouraged. For effective
+use of the Control widget, one should use the normal mode together
+with the \fBupdate\fR widget command (see below).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the whether the Control widget is normal or
+disabled. Only the values "normal" and "disabled" are recognized.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-step step Step
+Specifies by how much the value of the Control widget should be
+incremented or decrmented when the user press the arrow buttons.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-validatecmd validateCmd ValidateCmd
+Specifies a TCL command to be called when the -value of the
+Control widget is about to change. This command is called
+with one parameter -- the new \fB\-value\fR entered by the user. This
+command is to validate this new value by returning a value it deems
+valid.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-value value Value
+Specifies the value of the Control widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-variable variable Variable
+Specifies the global variable in which the value of the
+Control widget should be stored. The value of the Control widget
+will be automatically updated when this variable is changed.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBdecr\fR
+Class: \fBButton\fR
+.fi
+.IP
+The down arrow button.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBentry\fR
+Class: \fBEntry\fR
+.fi
+.IP
+The entry that shows the value of this Control widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBincr\fR
+Class: \fBButton\fR
+.fi
+.IP
+The up arrow button.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlabel\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The label subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixControl\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a Control widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+Control widget such as its cursor and relief.
+
+The Control widget is also known as the \fBSpinBox\fR widget.
+It is generally used to control a value. The user can adjust the value
+by pressing the two arrow buttons or by entering the value directly
+into the entry. The new value will be checked against the user-defined
+upper and lower limits.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixControl\fR command creates a new Tcl command whose name is
+the same as the path name of the Control widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+Control widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for Control widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixControl\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixControl\fR command.
+'\"
+.TP
+\fIpathName \fBdecr\fR
+'\"
+Decrements the value of the Control widget by the step specified
+by the \fI\-step\fR option.
+'\"
+'\"
+.TP
+\fIpathName \fBincr\fR
+'\"
+Increments the value of the Control widget by the step
+specified by the \fI\-step\fR option.
+'\"
+'\"
+.TP
+\fIpathName \fBinvoke\fR
+'\"
+Causes the command specified by the \fI\-command\fR option to be
+invoked.
+'\"
+.TP
+\fIpathName \fBupdate\fR
+'\"
+If the user has modified the entry using keyboard inputs, the update
+command will \fBupdate\fR the \fB\-value\fR of this Control
+widget. When the Control widget's \fB\-selectmode\fR option is set to
+"normal", one should call the \fBupdate\fR command on this widget
+before examining its \fB\-value\fR option. This command has no effect
+in if the \fB\-selectmode\fR option is set to "immediate".
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+'\"
+When the user presses the up/down arrow buttons (or press the <Up> and
+<Down> arrow keys on the keyboard), the value of the tixControl widget
+is adjusted according to the \fB\-validatecmd\fR, \fB\-incrcmd\fR,
+\fB\-decrcmd\fR, \fB\-step\fR, \fB\-max\fR and \fB\-min\fR options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
Added: external/tix-8.4.2.x/man/tixDestroy.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixDestroy.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,37 @@
+'\"
+'\" $Id: tixDestroy.n,v 1.1 2001/01/22 00:37:59 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH tixDestroy n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+.SH NAME
+tixDestroy \- Destroy Tix Objects
+'\"
+.SH SYNOPSIS
+\fBtixDestroy\fR \fIobjectName\fR
+'\"
+.BE
+
+.SH DESCRIPTION
+.PP
+The \fBtixDestroy\fR destroys a Tix object whose class is declared by
+the \fBtixClass\fR keyword. When the object is destroyed, its
+\fBDestructor\fR function is called and the memory allocated for this
+object is freed.
+'\"
+.SH KEYWORDS
+Tix, Object
+
Added: external/tix-8.4.2.x/man/tixDirList.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixDirList.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,262 @@
+'\"
+'\" $Id: tixDirList.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixDirList n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixDirList \- Create and manipulate tixDirList widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixDirList \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixDirList\fR class is derived from the \fBTixScrolledHList\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixDirList\fR supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browseCmd BrowseCmd
+Specifies a command to call whenever the user browses on a directory
+(usually by single-clicking on the name of the directory). The command
+is called with one argument, the complete pathname of the directory.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user activates on a directory
+(usually by double-clicking on the name of the directory). The command
+is called with one argument, the complete pathname of the directory.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dircmd dircmd DirCmd
+Specifies the TCL command to be called when a directory listing is
+needed for a particular directory. If this option is not specified, by
+default the DirList 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
+\fB\-dircmd\fR option can be used. The specified command 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 command returns a list of names of the
+sub-directories of this directory. For example:
+.PP
+.CS
+proc read_dir {dir show_hidden} {
+ if {$dir == "C:\\"} {
+ return {DOS NORTON WINDOWS}
+ } else {
+ return {}
+ }
+}
+.CE
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the DirList widget
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+'\"
+.OP \-showhidden showHidden 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
+\fB\-dircmd\fR option.
+'\"----------END
+'\"
+'\"----------END
+'\"
+.OP \-root root Root
+'\"
+Specifies the name of the root directory. Usually this is \fB"/"\fR
+under Unix machines, but can be changed to \fB"C:\\"\fR in DOS environments.
+'\"----------END
+'\"
+'\"----------END
+'\"
+.OP \-rootname rootName RootNAme
+'\"
+Specifies a text string to display at the root directory. If
+unspecified, the text string will be the same as the string specified
+by \fB\-root\fR.
+'\"----------END
+'\"
+'\"----------END
+'\"
+.LP
+.nf
+Name: \fBvalue\fR
+Class: \fBValue\fR
+Switch: \fB\-value\fR
+Alias: \fB\-directory\fR
+.fi
+.IP
+Specifies the name of the current directory to be displayed in the
+DirList widget.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhlist\fR
+Class: \fBTixHList\fR
+.fi
+.IP
+The hierarchical listbox that displays the directory listing.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixDirList\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a DirList widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+DirList such as its cursor and relief.
+
+The DirList 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.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixDirList\fR command creates a new Tcl command whose name is
+the same as the path name of the DirList's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+DirList widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for DirList widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixDirList\fR command.
+'\"
+.TP
+\fIpathName \fBchdir\fR \fIdir\fR
+'\"
+Change the current directory to \fIdir\fR.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixDirList\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+'\"
+The mouse and keyboard bindings of the DirList widget are the same as
+the bindings of the HList widget.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
Added: external/tix-8.4.2.x/man/tixDirSelectDialog.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixDirSelectDialog.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,176 @@
+'\"
+'\" $Id: tixDirSelectDialog.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixDirSelectDialog n 4.1 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixDirSelectDialog \- Create and manipulate directory selection dialogs.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixDirSelectDialog \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixDirSelectDialog\fR supports all the standard options of a
+toplevel widget. See the \fBoptions(n)\fR manual entry for details on
+the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user selects a directory
+in the dialog box. The command is called with one extra argument, the
+complete pathname of the directory. If the user cancels the selection,
+this command is not called.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBdirbox\fR
+Class: \fBTixDirSelectBox\fR
+.fi
+.IP
+The DirSelectBox widget that consists of the main part of the dialog.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBcancel\fR
+Class: \fBButton\fR
+.fi
+.IP
+The "Cancel" button.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBok\fR
+Class: \fBButon\fR
+.fi
+.IP
+The "OK" button.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixDirSelectDialog\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a DirSelectDialog
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+DirSelectDialog such as its cursor and relief.
+
+The DirSelectDialog widget presents the directories in the file system
+in a dialog window. The user can use this dialog window to navigate
+through the file system to select the desired directory.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixDirSelectDialog\fR command creates a new Tcl command whose
+name is the same as the path name of the DirSelectDialog's window.
+This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+DirSelectDialog widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for DirSelectDialog widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixDirSelectDialog\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixDirSelectDialog\fR command.
+'\"
+.TP
+\fIpathName \fBpopup\fR
+'\"
+Pops up the DirSelectDialog widget on the screen.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+.SH EXAMPLE
+'\"
+.CS
+set dlg [tixDirSelectDialog .dlg -command SelectDir]
+$dlg popup
+
+proc SelectDir {dir} {
+ puts "You have selected \\"$dir\\""
+}
+.CE
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixDirTree.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixDirTree.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,243 @@
+'\"
+'\" $Id: tixDirTree.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixDirTree n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixDirTree \- Create and manipulate tixDirTree widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixDirTree \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixDirTree\fR class is derived from the \fBTixScrolledHList\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixDirTree\fR supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browseCmd BrowseCmd
+Specifies a command to call whenever the user browses on a directory
+(usually by single-clicking on the name of the directory). The command
+is called with one argument, the complete pathname of the directory.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user activates on a directory
+(usually by double-clicking on the name of the directory). The command
+is called with one argument, the complete pathname of the directory.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dircmd dircmd DirCmd
+Specifies the TCL command 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
+\fB\-dircmd\fR option can be used. The specified command 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 command returns a list of names of the
+sub-directories of this directory. For example:
+.CS
+proc read_dir {dir show_hidden} {
+ if {$dir == "C:\\"} {
+ return {DOS NORTON WINDOWS}
+ } else {
+ return {}
+ }
+}
+.CE
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the DirTree widget
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+'\"
+.OP \-showhidden showHidden 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
+\fB\-dircmd\fR option.
+'\"----------END
+'\"
+'\"----------END
+'\"
+.LP
+.nf
+Name: \fBvalue\fR
+Class: \fBValue\fR
+Switch: \fB\-value\fR
+Alias: \fB\-directory\fR
+.fi
+.IP
+Specifies the name of the current directory to be displayed in the
+DirTree widget.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhlist\fR
+Class: \fBTixHList\fR
+.fi
+.IP
+The hierarchical listbox that displays the directory listing.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixDirTree\fR command creates a new window (given by the
+\fIpathName\fR 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.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixDirTree\fR command creates a new Tcl command whose name is
+the same as the path name of the DirTree's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+DirTree widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for DirTree widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixDirTree\fR command.
+'\"
+.TP
+\fIpathName \fBchdir\fR \fIdir\fR
+'\"
+Change the current directory to \fIdir\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixDirTree\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+'\"
+The mouse and keyboard bindings of the DirTree widget are the same as
+the bindings of the HList widget.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
Added: external/tix-8.4.2.x/man/tixDisplayStyle.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixDisplayStyle.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,473 @@
+'\"
+'\" $Id: tixDisplayStyle.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixDisplayStyle n 8.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixDisplayStyle \- Create style object for Tix display items.
+'\"
+.SH SYNOPSIS
+\fBtixDisplayStyle \fIitemType\fR ?\fI\-stylename name\fR? ?\fI\-refwindow pathName\fR? ?\fIoptions value ...\fR?
+'\"
+.BE
+'\"
+.SH DESCRIPTION
+'\"
+The Tix \fBDisplay Items\fR mechanism is devised to
+solve a general problem: many Tix widgets (both existing and planned
+ones) display many items of many types simutaneously.
+'\"
+.PP
+'\"
+For example, a hierarchical listbox widget (HList) can display items
+of images, plain text and subwindows in the form of a
+hierarchy. Another widget, the tabular listbox, (TList, currently
+planned and will be released in Tix 4.1) also display items of the
+same types, although it arranges the items in a tabular form. Yet
+another widget, the spreadsheet widget, also displays similar types
+items, but in yet another format.
+'\"
+.PP
+'\"
+In these examples, the display items in different widgets are only
+different in how they are arranged by the \fBhost widget\fR. 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.
+'\"
+.PP
+'\"
+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.
+'\"
+.PP
+'\"
+The appearance of a display item is controlled by a set of
+\fIattributes\fR. It is observed that each the attributes usually fall
+into one of two categroies: "\fIindividual\fR" or
+"\fIcollective\fR". 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 \fBdisplay style\fR. 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.
+'\"
+.PP
+'\"
+The attributes of the a display item are thus stored in two places: it
+has a set of \fBitem options\fR to store its individual attributes. Each
+display item is also associated with a \fIdisplay style\fR, which specifies
+the collective attributes of all items associated with itself.
+'\"
+.PP
+'\"
+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 \fBdisplay
+styles\fR 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".
+'\"
+.SH DISPLAY ITEM TYPES AND OPTIONS
+'\"
+Currently there are four types of display items: \fBtext\fR,
+\fBimage\fR, \fBimagetext\fR and \fBwindow\fR. (TODO: need to document
+the "image" item)
+'\"
+'\"----------------------------------------------------------------------
+'\" ImageText
+'\"----------------------------------------------------------------------
+.SH IMAGETEXT ITEMS
+'\"
+Display items of the type \fBimagetext\fR are used to display an image
+together with a text string. Imagetext items support the following options:
+'\"
+.PP
+\fBITEM OPTIONS\fR
+.PP
+.RS
+'\"----------BEGIN
+.OP \-bitmap bitmap Bitmap
+Specifies the bitmap to display in the item.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-image image Image
+Specifies the image to display in the item. When both the
+\fB\-bitmap\fR and \fB\-image\fR options are specified, only the image
+will be displayed.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-style imageTextStyle ImageTextStyle
+Specifies the display style to use for this item. Must be the
+name of a \fBimagetext\fR display style that has already be created by
+the \fBtixDisplayStyle(n)\fR command.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-showimage showImage ShowImage
+A Boolean value that specifies whether the image/bitmap should be
+displayed.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-showtext showText ShowText
+A Boolean value that specifies whether the text string should be
+displayed.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-text text Text
+Specifies the text string to display in the item.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-underline underline 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.
+'\"----------END
+.RE
+'\"
+.PP
+\fBSTYLE OPTIONS\fR
+'\"
+.PP
+The style information of \fBimagetext\fR items are stored in the
+\fBimagetext\fR display style. The following options are supported:
+'\"
+.RS
+'\"
+.PP
+\fBSTANDARD OPTIONS\fR
+'\"
+.PP
+.ta 6c
+.nf
+activeBackground activeForeground
+anchor background
+disabledBackground disabledForeground
+foreground font
+justify padX
+padY selectBackground
+selectForeground wrapLength
+.fi
+.ta 4c
+.PP
+See the \fBoptions(n)\fR manual entry for details on the standard
+options.
+.PP
+'\"
+.PP
+\fBSTYLE-SPECIFIC OPTIONS\fR
+.PP
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBgap\fR
+Class: \fBGap\fR
+Switch: \fB\-gap\fR
+'\"
+.fi
+.IP
+Specifies the distance between the bitmap/image and the text string,
+in number of pixels.
+'\"----------END
+'\"
+.RE
+'\"
+'\"**********************************************************************
+'\"
+'\" text
+'\"
+'\"**********************************************************************
+.SH TEXT ITEMS
+'\"
+Display items of the type \fBtext\fR are used to display a text string
+in a widget. Text items support the following options:
+'\"
+.PP
+\fBITEM OPTIONS\fR
+.PP
+.RS
+'\"----------BEGIN
+.OP \-style textStyle TextStyle
+Specifies the display style to use for this text item. Must be the
+name of a \fBtext\fR display style that has already be created by the
+\fBtixDisplayStyle(n)\fR command.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-text text Text
+Specifies the text string to display in the item.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-underline underline 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.
+'\"----------END
+.RE
+'\"
+\fBSTYLE OPTIONS\fR
+.PP
+.RS
+.PP
+\fBSTANDARD OPTIONS\fR
+'\"
+.PP
+.ta 6c
+.nf
+activeBackground activeForeground
+anchor background
+disabledBackground disabledForeground
+foreground font
+justify padX
+padY selectBackground
+selectForeground wrapLength
+.fi
+.ta 4c
+.PP
+See the \fBoptions(n)\fR manual entry for details on the standard
+options.
+'\"
+'\"
+.PP
+.RE
+'\"**********************************************************************
+'\"
+'\" Window
+'\"
+'\"**********************************************************************
+.SH WINDOW ITEMS
+'\"
+Display items of the type \fBwindow\fR are used to display a
+sub-window in a widget. \fBWindow\fR items support the following
+options:
+'\"
+.PP
+\fBITEM OPTIONS\fR
+.PP
+.RS
+'\"----------BEGIN
+.OP \-style windowStyle WindowStyle
+Specifies the display style to use for this window item. Must be the
+name of a \fBwindow\fR display style that has already be created by
+the \fBtixDisplayStyle(n)\fR command.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBwindow\fR
+Class: \fBWindow\fR
+Switch: \fB\-window\fR
+Alias: \fB\-widget\fR
+.fi
+.IP
+Specifies the sub-window to display in the item.
+'\"----------END
+'\"
+.RE
+'\"
+\fBSTYLE OPTIONS\fR
+.PP
+.RS
+\fBSTANDARD OPTIONS\fR
+'\"
+.PP
+.ta 6c
+.nf
+anchor
+padX padY
+.PP
+.fi
+.ta 4c
+See the \fBoptions(n)\fR manual entry for details on the standard
+options.
+'\"
+.PP
+.RE
+'\"
+'\"**********************************************************************
+'\"
+.SH 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 widget commands of their "host" widgets. For
+example, the HList widgets has a command \fBitem\fR which can be used
+to create new display items. The following code creates a new imagetext
+item at the third column of the entry foo inside an HList widget:
+'\"
+.PP
+.nf
+ tixHList .h -columns 3
+ .h add foo
+ .h item create foo 2 \-itemtype imagetext \-text Hello \-image image1
+.fi
+.PP
+'\"
+The \fBitem create\fR command of the HList widget accepts a variable
+number of arguments. The special argument \fB\-itemtype\fR 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
+\fIoption\-value\fR pairs.
+'\"
+.PP
+'\"
+After the display item is created, they can then be configured or
+destroyed using the commands provided by the host widget. For example,
+the HList widget has the command \fBitem configure\fR, \fBitem cget\fR
+and \fBitem delete\fR for accessing the display items.
+'\"
+'\"**********************************************************************
+'\"
+.SH CREATING AND MANIPULATING DISPLAY STYLES
+'\"
+'\"
+Display styles are created by the command \fBtixDisplayStyle\fR:
+'\"
+'\"
+.PP
+\fIitemType\fR must be one of the existing display items types such as
+\fBtext\fR, \fBimagetext\fR, \fBwindow\fR or any new types added by
+the user. Additional arguments can be given in one or more
+\fIoption\-value\fR pairs. \fIoption\fR can be any of the valid option
+for this display style or any of the following:
+.PP
+.RS
+'\"
+.TP
+\fB\-stylename \fIname\fR
+'\"
+Specifies a name for this style. If unspecified, then a default name
+will be chosen for this style.
+'\"
+.TP
+\fB\-refwindow \fIpathName\fR
+'\"
+Specifies a window to use for determine the default values of the
+display type. If unspecified, the main window will be used. Default
+values for the display types can be set via the options database. The
+following example sets the \fB\-disablebackground\fR and
+\fB\-disabledforeground\fR options of a \fBtext\fR display style via
+the option database:
+.CS
+option add *table.list*disabledForeground blue
+option add *table.list*disabledBackground darkgray
+tixDisplayStyle text -refwindow .table.list -fg red
+.CE
+'\"
+.PP
+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 option(n) for a detailed description
+of the option database.
+.RE
+'\"
+.SH STYLE COMMAND
+.PP
+The \fBtixDisplayStyle\fR command creates a new Tcl command whose name is the
+same as the name of the newly created display style. This command
+may be used to invoke various operations on the display style. It has the
+following general form:
+'\"
+'\"
+.RS
+.CS
+'\"
+\fIstyleName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIstyleName\fR is the name of the command. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible:
+'\"
+.TP
+\fIstyleName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the valid options of this
+display style.
+'\"
+.TP
+\fIstyleName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the display style. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIstyleName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the
+valid options of this display style.
+'\"
+.TP
+\fIstyleName \fBdelete\fR
+'\"
+Destroy this display style object.
+'\"
+.SH 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 \fBtext\fR
+styles. Also, the anchor and font of the second column is chosen so
+that the income data is aligned properly.
+'\"
+.PP
+.CS
+set courier {courier 14}
+set h [tixHList .h -columns 2]; pack $h
+set red [tixDisplayStyle text -fg #800000]
+set blue [tixDisplayStyle text -fg #000080 \\
+ -anchor e -font $courier]
+
+foreach n {{Joe $10,000} {Peter $20,000} {Raj $90,000}} {
+ set entry [$h addchild {}]
+ $h item create $entry 0 -itemtype text \\
+ -text [lindex $n 0] -style $red
+ $h item create $entry 1 -itemtype text \\
+ -text [lindex $n 1] -style $blue
+}
+.CE
+.SH KEYWORDS
+display item, display style, imagetext
\ No newline at end of file
Added: external/tix-8.4.2.x/man/tixExFileSelectBox.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixExFileSelectBox.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,334 @@
+'\"
+'\" $Id: tixExFileSelectBox.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixExFileSelectBox n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixExFileSelectBox \- Create and manipulate tixExFileSelectBox widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixExFileSelectBox \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixExFileSelectBox\fR class does not have a super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixExFileSelectBox\fR supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browseCmd BrowseCmd
+Specifies a command to call whenever the user browses on a filename in
+the file listbox (usually by single-clicking on the filename). The command
+is called with one argument, the complete pathname of the file.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user chooses on a filename
+the file listbox (usually by double-clicking on the filename). The command
+is called with one argument, the complete pathname of the file.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dialog dialog Dialog
+Specifies a dialog box which contains this ExFileSelectBox widget. The
+dialog box must be a widget of the class TixShell or its
+descendant classes. \fIThis is an internal option and should not be used
+by application programmers.\fR
+'\"----------END
+'\"----------BEGIN
+.OP \-dircmd dircmd DirCmd
+Specifies the TCL command to be called when a file listing is needed
+for a particular directory. If this option is not specified, by
+default the ExFileSelectBox 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 files. In this case, the
+\fB\-dircmd\fR option can be used. The specified command accepts three
+arguments: the first is the name of the directory to be listed; the
+second is a list of file patterns, the third is a Boolean value
+indicating whether hidden files should be listed. This command returns
+a list of names of the files of this directory which match with the
+file patterns.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBdirectory\fR
+Class: \fBDirectory\fR
+Switch: \fB\-directory\fR
+Alias: \fB\-dir\fR
+.fi
+.IP
+Specifies the current directory whose files and sub-directories are
+displayed in the ExFileSelectBox.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the ExFileSelectBox
+widget changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+'\"
+.OP \-filetypes fileTypes FileTypes
+Specifies the file types that can be selected from the "List Files of
+Type:" ComboBox subwidget. The value of this option must be a TCL
+list; each item of this list must in turn be a list of two elements.
+The first element is a list of file patterns. The second element is a
+string that describe these file patterns. For example:
+.nf
+ tixExFileSelectBox .box -filetypes {
+ {{*} {All files}}
+ {{*.txt} {Text files}}
+ {{*.c *.h} {C source files}}
+ }
+.fi
+'\"----------END
+'\"
+'\"----------BEGIN
+'\"
+.OP \-showhidden showHidden ShowHidden
+Specifies whether hidden directories should be shown. By default, a
+directory name starting with a period "\." is considered as a hidden
+directory.
+'\"----------END
+'\"
+'\"----------BEGIN
+'\"
+.OP \-pattern pattern Pattern
+Specifies whether the file pattern(s) to match with the files in the
+current directory. One or more file patterns can be given at the same
+time. For example, {*\.c *\.h} will match all files that have either the
+".h" or ".c" extensions.
+'\"----------END
+'\"
+'\"
+'\"----------END
+'\"
+.LP
+.nf
+Name: \fBvalue\fR
+Class: \fBValue\fR
+Switch: \fB\-value\fR
+Alias: \fB\-selection\fR
+.fi
+.IP
+Specifies the name of the filename currently selected by the user.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBcancel\fR
+Class: \fBButton\fR
+.fi
+.IP
+The button widget with the "Cancel" label.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBdir\fR
+Class: \fBTixComboBox\fR
+.fi
+.IP
+The ComboBox subwidget under the "Directories" heading.
+'\"----------END
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBdirlist\fR
+Class: \fBTixDirList\fR
+.fi
+.IP
+The DirList subwidget that shows the hierarchical list of directories.
+'\"----------END
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBfile\fR
+Class: \fBTixComboBox\fR
+.fi
+.IP
+The ComboBox subwidget under the "Files" heading.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBfilelist\fR
+Class: \fBTixScrolledListBox\fR
+.fi
+.IP
+The ScrolledListBox subwidget that shows the list of filenames.
+'\"----------END
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhidden\fR
+Class: \fBCheckbutton\fR
+.fi
+.IP
+The checkbutton widget with the "Show Hidden Files" label.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBok\fR
+Class: \fBButton\fR
+.fi
+.IP
+The button widget with the "OK" label.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBtypes\fR
+Class: \fBTixComboBox\fR
+.fi
+.IP
+The ComboBox subwidget under the "List Files of Type" heading.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixExFileSelectBox\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a
+ExFileSelectBox widget. Additional options, described above,
+may be specified on the command line or in the option database to
+configure aspects of the ExFileSelectBox such as its cursor
+and relief.
+
+The ExFileSelectBox widget is usually embedded in a
+tixExFileSelectDialog widget. It provides an convenient method for the
+user to select files. The style of the ExFileSelectBox widget is very
+similar to the standard file dialog in MS Windows 3.1.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixExFileSelectBox\fR command creates a new Tcl command whose
+name is the same as the path name of the ExFileSelectBox's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+ExFileSelectBox widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for ExFileSelectBox widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixExFileSelectBox\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixExFileSelectBox\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBfilter\fR
+'\"
+Forces the ExFileSelectBox widget to re-filter all the filenames
+according to the \fB\-pattern\fR option.
+'\"
+.TP
+\fIpathName \fBinvoke\fR
+'\"
+Forces the ExFileSelectBox widget to perform actions as if the user
+has pressed the "OK" button.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixExFileSelectDialog.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixExFileSelectDialog.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,164 @@
+'\"
+'\" $Id: tixExFileSelectDialog.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixExFileSelectDialog n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixExFileSelectDialog \- Create and manipulate tixExFileSelectDialog widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixExFileSelectDialog \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixExFileSelectDialog\fR class does not have a super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixExFileSelectDialog\fR supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user chooses on a filename
+(usually by selecting the filename and clicking on the "OK" button").
+The command is called with one argument, the complete pathname of the
+file.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBfsbox\fR
+Class: \fBTixExFileSelectBox\fR
+.fi
+.IP
+The ExFileSelectBox subwidget embedded inside the ExFileSelectDialog.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixExFileSelectDialog\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a ExFileSelectDialog
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+ExFileSelectDialog such as its cursor and relief.
+
+The ExFileSelectDialog widget provides an convenient method for the
+user to select files. The style of the ExFileSelectDialog widget is
+very similar to the standard file dialog in MS Windows 3.1.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixExFileSelectDialog\fR command creates a new Tcl command whose
+name is the same as the path name of the ExFileSelectDialog's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+ExFileSelectDialog widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for ExFileSelectDialog widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixExFileSelectDialog\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixExFileSelectDialog\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBpopdown\fR
+'\"
+Withdraws the ExFileSelectDialog from the screen.
+'\"
+.TP
+\fIpathName \fBpopup\fR
+'\"
+Pops up the ExFileSelectDialog on the screen.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixFileEntry.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixFileEntry.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,274 @@
+'\"
+'\" $Id: tixFileEntry.n,v 1.3 2002/01/25 08:48:47 idiscovery Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixFileEntry n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixFileEntry \- Create and manipulate tixFileEntry widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixFileEntry \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixFileEntry\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and
+subwidgets of its super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The FileEntry widget supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-activatecmd activateCmd ActivateCmd
+Specifies the command to be called when the user activates the
+\fBbutton\fR subwidget. This command is called before the file dialog
+is popped up and can be used to customize the file dialog (which may
+be shared by several FileEnt widget).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the \fB\-value\fR option of
+the FileEntry is changed. This usually happens when the user inputs a
+filename into the entry subwidget and hits the <Return> key. The
+command will be called with one arguments -- the new value of the
+FileEntry widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dialogtype dialogType DialogType
+Specifies which type of file selection dialog should be popped up when
+the user invokes the \fBbutton\fR subwidget. Currently the following values
+are valid: \fBtixFileSelectDialog\fR, \fBtixExFileSelectDialog\fR,
+\fBtk_getOpenFile\fR, \fBtk_getSaveFile\fR or \fBtk_chooseDirectory\fR.
+'\"----------END
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the FileEntry widget
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disableforeground disableForeground DisableForeground
+The foreground color to use for of the entry subwidget when the
+FileEntry widget is disabled.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-filebitmap fileBitmap FileBitmap
+Specifies the bitmap to display in side the \fBbutton\fR subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this FileEntry widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the entry
+subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectmode selectMode SelectMode
+Specifies how the FileEntry widget should react to \fC<KeyPress>\fR
+events. When set to "immediate", any user keyboard inputs will
+immediately change the \fB\-value\fR option. When set to "normal", the
+user keyboard inputs will be copied to the \fB\-value\fR option only
+if the\fC <Return>\fR key is pressed or the keyboard focus is
+changed. The use of the immediate mode is discouraged. For effective
+use of the FileEntry widget, one should use the normal mode together
+with the \fBupdate\fR widget command (see below).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the whether the FileEntry widget is normal or disabled. Only
+the values "normal" and "disabled" are recognized.
+'\"----------END
+'\"'
+'\"----------BEGIN
+.OP \-validatecmd validateCmd ValidateCmd
+Specifies a TCL command to be called when the -value of the
+FileEntry widget is about to change. This command is called
+with one parameter -- the new \fB\-value\fR entered by the user. This
+command is to validate this new value by returning a value it deems
+valid.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-value value Value
+Specifies the value of the FileEntry.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-variable variable Variable
+Specifies the global variable in which the value of the FileEntry
+should be stored. The value of the FileEntry will be automatically
+updated when this variable is changed.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBbutton\fR
+Class: \fBButton\fR
+.fi
+.IP
+The button subwidget next to the entry subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBentry\fR
+Class: \fBEntry\fR
+.fi
+.IP
+The entry subwidget in which the user can type in a filename.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixFileEntry\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a FileEntry
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+FileEntry such as its cursor and relief.
+.PP
+The FileEntry widget can be used to input a filename. The user can
+type in the filename manually. Alternatively, the user can press the
+button widget that sits next to the entry, which will bring up a file
+selection dialog of the type specified by the \fB\-dialogtype\fR option.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixFileEntry\fR command creates a new Tcl command whose
+name is the same as the path name of the FileEntry's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+FileEntry widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for FileEntry widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixFileEntry\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixFileEntry\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBinvoke\fR
+'\"
+Forces the FileEntry widget to act as if the user has pressed the
+<return> key inside the entry subwidget.
+'\"
+.TP
+\fIpathName \fBfiledialog\fR \fI?args?\fR
+'\"
+When no additional arguments are given, this command returns the
+pathname of the file dialog box associated with this FileEnt
+widget. When additional arguments are given, the widget command of the
+file dialog will be called with these arguments.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name. When options are given, the widget
+command of the specified subwidget will be called with these options.
+'\"
+.TP
+\fIpathName \fBupdate\fR
+'\"
+If the user has modified the entry using keyboard inputs, the update
+command will \fBupdate\fR the \fB\-value\fR of this FileEntry
+widget. When the FileEntry widget's \fB\-selectmode\fR option is set
+to "normal", one should call the \fBupdate\fR command on this widget
+before examining its \fB\-value\fR option. This command has no effect
+in if the \fB\-selectmode\fR option is set to "immediate".
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixFileSelectBox.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixFileSelectBox.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,240 @@
+'\"
+'\" $Id: tixFileSelectBox.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixFileSelectBox n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+tixFileSelectBox \- Create and manipulate Tix FileSelectBox widgets
+'\"
+'\"
+'\"
+.SH SYNOPSIS
+\fBtixFileSelectBox \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The FileSelectBox widget supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the standard
+options.
+'\"
+'\"
+'\"
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"----------
+.OP \-browsecmd browsecmd browseCmd
+Specifies the command to execute when the user browses through the
+files. By default, if the \fB\-browsecmd\fR is specified, the browse
+command will be executed when the user clicks on a filename in the
+\fIFiles\fR listbox.
+'\"----------
+.OP \-command command Command
+Specifies the command to execute when the FileSelectBox is
+invoked. This command is executed with one parameter : the filename
+selected by the user.
+'\"----------
+.LP
+.nf
+Name: \fBdirectory\fR
+Class: \fBDirectory\fR
+Switch: \fB\-directory\fR
+Alias: \fB\-dir\fR
+.fi
+.IP
+Specifies the directory to look for files. By default this will be the
+current working directory of the program and will be changed as the
+user browses through the directories.
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the ExFileSelectBox
+widget changes.
+'\"----------END
+'\"----------
+.OP \-pattern pattern Pattern
+Specifies the matching pattern of the file names that should be listed in
+the \fIFiles\fR listbox. For example "*.c" matches all the filenames that
+end with ".c". If this option is set to the empty string, the default
+pattern "*" will be used.
+'\"----------
+.LP
+.nf
+Name: \fBvalue\fR
+Class: \fBValue\fR
+Switch: \fB\-value\fR
+Alias: \fB\-selection\fR
+.fi
+.IP
+Specifies the name of the filename currently selected by the user.
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBdirlist\fR
+Class: \fBTixScrolledListBox\fR
+.fi
+.IP
+The scrolled listbox that shows the directories.
+'\"----------END
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBfilelist\fR
+Class: \fBTixScrolledListBox\fR
+.fi
+.IP
+The scrolled listbox that shows the files.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBfilter\fR
+Class: \fBTixComboBox\fR
+.fi
+.IP
+The ComboBox listbox that shows the filter string.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBselection\fR
+Class: \fBTixComboBox\fR
+.fi
+.IP
+The ComboBox listbox that shows the file selection.
+'\"----------END
+'\"
+.BE
+'\"======================
+'\"
+'\"
+'\"
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixFileSelectBox\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a FileSelectBox widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+FileSelectBox such as its cursor and relief.
+.PP
+The FileSelectBox is similar to the standard Motif(TM) file-selection
+box. It is generally used for the user to choose a file. FileSelectBox
+stores the files mostly recently selected into a ComboBox widget so
+that they can be quickly selected again. The \fBtixFileSelectDialog\fR
+widget is a combination of the FileSelectBox widget and a dialog
+widget.
+'\"
+.SH "WIDGET COMMAND"
+.PP
+'\"
+The \fBtixFileSelectBox\fR command creates a new Tcl command whose
+name is the same as the path name of the FileSelectBox's window.
+This command may be used to invoke various operations on the widget.
+It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+FileSelectBox widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for FileSelectBox widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixFileSelectBox\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixFileSelectBox\fR command.
+'\"
+.TP
+\fIpathName \fBfilter\fR
+'\"
+Updates the files listed in the FileSelectBox according to the
+filtering pattern sepcified in the \fBfilter\fR subwidget.
+.TP
+\fIpathName \fBinvoke\fR
+Execute the command specified by the \fB\-command\fR option with the
+filename stored in the \fBselection\fR subwidget.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+.SH "DEFAULT BINDINGS"
+TIX automatically creates class bindings for FileSelectBoxes that give them
+the following default behavior:
+.IP [1]
+Mouse button 1 in the \fIDirectory\fR listbox will change the filter
+string to the selected directory.
+.IP [2]
+Mouse button 1 in the \fIFiles\fR listbox will change the filename
+that appears in the \fISelection\fR entry. It will also trigger the
+\fB\-browsecmd\fR if the option has been specified.
+.IP [3]
+The current directory will be changed by (1) double clicking the
+\fIDirectory\fR listbox or (2) invoking the \fIFilter\fR ComboBox.
+Please refer to the man page of \fBtixComboBox\fR for the default
+bindings of the ComboBoxes and how they can be invoked.
+.IP [4]
+The command specified by the option -command will be invoked by (1)
+double clicking the \fIFiles\fR listbox or (2) invoking
+\fISelection\fR ComboBox.
+'\"
+'\"
+.SH KEYWORDS
+tixFileSelectBox, tixComboBox, tixFileSelectDialog, Tix(n),
+
+
+
Added: external/tix-8.4.2.x/man/tixFileSelectDialog.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixFileSelectDialog.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,174 @@
+'\"
+'\" $Id: tixFileSelectDialog.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixFileSelectDialog n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixFileSelectDialog \- Create and manipulate tixFileSelectDialog widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixFileSelectDialog \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixFileSelectDialog\fR class does not have a super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixFileSelectDialog\fR supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user chooses on a filename
+(usually by selecting the filename and clicking on the "OK" button").
+The command is called with one argument, the complete pathname of the
+file.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBbtns\fR
+Class: \fBTixStdButtonBox\fR
+.fi
+.IP
+The StdButtonBox subwidget at the bottom of FileSelectDialog. It
+contains the "OK", "Filter, "Cancel" and "Help" buttons.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBfsbox\fR
+Class: \fBTixFileSelectBox\fR
+.fi
+.IP
+The FileSelectBox subwidget at the top of the FileSelectDialog.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixFileSelectDialog\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a FileSelectDialog
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+FileSelectDialog such as its cursor and relief.
+.PP
+The FileSelectDialog widget provides an convenient method for the user
+to select files. The FileSelectBox is similar to the standard
+Motif(TM) file-selection box.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixFileSelectDialog\fR command creates a new Tcl command whose
+name is the same as the path name of the FileSelectDialog's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+FileSelectDialog widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for FileSelectDialog widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixFileSelectDialog\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixFileSelectDialog\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBpopdown\fR
+'\"
+Withdraws the FileSelectDialog from the screen.
+'\"
+.TP
+\fIpathName \fBpopup\fR
+'\"
+Pops up the FileSelectDialog on the screen.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixForm.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixForm.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,462 @@
+'\"
+'\" $Id: tixForm.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixForm n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+tixForm \- Geometry manager based on attachment rules
+'\"
+'\"
+'\"
+.SH SYNOPSIS
+\fBtixForm\fI option arg ?arg ...?\fR
+.BE
+.SH DESCRIPTION
+.PP
+'\"
+The \fBtixForm\fR command is used to communicate with the
+\fBtixForm\fR Geometry Manager, a geometry manager that arranges the
+geometry of the children in a parent window according to attachment
+rules. The \fBtixForm\fR 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 \fBpack(n)\fR,
+\fBplace(n)\fR).
+'\"
+The \fBtixForm\fR command can have any of several forms,
+depending on the \fIoption\fR argument:
+'\"
+.TP
+\fBtixForm\fI slave \fR?\fIoptions\fR?
+'\"
+If the first argument to \fBtixForm\fR is a window name (any value
+starting with ``.''), then the command is processed in the same way as
+\fBtixForm configure\fR.
+'\"
+.TP
+\fBtixForm check \fImaster\fR
+'\"
+This command checks whether there is circular dependency in the
+attachments of the master's slaves (see the section \fBCIRCULAR
+DEPENDENCY\fR below). It returns the Boolean value \fBTRUE\fR if it
+discover circular dependency and \fBFALSE\fR otherwise.
+'\"
+.TP
+\fBtixForm configure\fI slave \fR?\fI\-option value ...\fR?
+'\"
+Sets or adjusts the attachment values of the slave window
+according to the \fI\-option value\fR argument pairs.
+'\"
+.RS
+'\"
+.TP
+\fB\-b\fR \fIattachment\fR
+'\"
+Abbreviation for the \fB\-bottom\fR option.
+'\"
+.TP
+\fB\-bottom\fR \fIattachment\fR
+'\"
+Specifies an attachment for the bottom edge of the slave window. The
+attachment must specied according to the section \fBSPECIFYING
+ATTACHMENTS\fR below.
+'\"
+.TP
+\fB\-bottomspring\fR \fIweight\fR
+'\"
+Specifies the weight of the spring at the bottom edge of the slave
+window. See the section \fBUSING SPRINGS\fR below.
+'\"
+.TP
+\fB\-bp\fR \fIvalue\fR
+'\"
+Abbreviation for the \fB\-padbottom\fR option.
+'\"
+.TP
+\fB\-bs\fR \fIweight\fR
+'\"
+Abbreviation for the \fB\-bottomspring\fR option.
+'\"
+'\"
+.TP
+\fB\-fill\fR \fImaster\fR
+'\"
+Specifies the fillings when springs are used for this widget. The
+value must be \fBx\fR, \fBy\fR, \fBboth\fR or \fBnone\fR.
+'\"
+.TP
+\fB\-in\fR \fImaster\fR
+'\"
+Places the slave window into the specified 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 \fB\-in\fR flag, when needed, must appear
+as the first flag after the name of the slave. Otherwise an error is
+generated.
+'\"
+.TP
+\fB\-l\fR \fIattachment\fR
+'\"
+Abbreviation for the \fB\-left\fR option.
+'\"
+.TP
+\fB\-left\fR \fIattachment\fR
+'\"
+Specifies an attachment for the left edge of the slave window. The
+attachment must specied according to the section \fBSPECIFYING
+ATTACHMENTS\fR below.
+'\"
+.TP
+\fB\-leftspring\fR \fIweight\fR
+'\"
+Specifies the weight of the spring at the left edge of the slave
+window. See the section \fBUSING SPRINGS\fR below.
+'\"
+.TP
+\fB\-lp\fR \fIvalue\fR
+'\"
+Abbreviation for the \fB\-padleft\fR option.
+'\"
+.TP
+\fB\-ls\fR \fIweight\fR
+'\"
+Abbreviation for the \fB\-leftspring\fR option.
+'\"
+'\"
+.TP
+\fB\-padbottom\fR \fIvalue\fR
+'\"
+Specifies the amount of external padding to leave on the bottom side
+of the slave. The \fIvalue\fR may have any of the forms acceptable to
+\fBTk_GetPixels(3)\fR.
+'\"
+'\"
+.TP
+\fB\-padleft\fR \fIvalue\fR
+'\"
+Specifies the amount of external padding to leave on the left side of
+the slave.
+'\"
+.TP
+\fB\-padright\fR \fIvalue\fR
+'\"
+Specifies the amount of external padding to leave on the right side of
+the slave.
+'\"
+.TP
+\fB\-padtop\fR \fIvalue\fR
+'\"
+Specifies the amount of external padding to leave on the top side of
+the slave.
+'\"
+.TP
+\fB\-padx\fR \fIvalue\fR
+'\"
+Specifies the amount of external padding to leave on both the left and
+the right sides of the slave.
+'\"
+.TP
+\fB\-pady\fR \fIvalue\fR
+'\"
+Specifies the amount of external padding to leave on both the top and
+the bottom sides of the slave.
+'\"
+'\"
+.TP
+\fB\-r\fR \fIattachment\fR
+'\"
+Abbreviation for the \fB\-right\fR option.
+'\"
+.TP
+\fB\-right\fR \fIattachment\fR
+'\"
+Specifies an attachment for the right edge of the slave window. The
+attachment must specied according to the section \fBSPECIFYING
+ATTACHMENTS\fR below.
+'\"
+.TP
+\fB\-rightspring\fR \fIweight\fR
+'\"
+Specifies the weight of the spring at the right edge of the slave
+window. See the section \fBUSING SPRINGS\fR below.
+'\"
+'\"
+.TP
+\fB\-rp\fR \fIvalue\fR
+'\"
+Abbreviation for the \fB\-padright\fR option.
+'\"
+.TP
+\fB\-rs\fR \fIweight\fR
+'\"
+Abbreviation for the \fB\-rightspring\fR option.
+'\"
+'\"
+.TP
+\fB\-t\fR \fIattachment\fR
+'\"
+Abbreviation for the \fB\-top\fR option.
+'\"
+.TP
+\fB\-top\fR \fIattachment\fR
+'\"
+Specifies an attachment for the top edge of the slave window. The
+attachment must specied according to the section \fBSPECIFYING
+ATTACHMENTS\fR below.
+'\"
+'\"
+.TP
+\fB\-topspring\fR \fIweight\fR
+'\"
+Specifies the weight of the spring at the top edge of the slave
+window. See the section \fBUSING SPRINGS\fR below.
+'\"
+'\"
+.TP
+\fB\-tp\fR \fIvalue\fR
+'\"
+Abbreviation for the \fB\-padtop\fR option.
+'\"
+.TP
+\fB\-ts\fR \fIweight\fR
+'\"
+Abbreviation for the \fB\-topspring\fR option.
+'\"
+.RE
+.TP
+\fBtixForm forget\fI slave \fR?\fIslave ...\fR?
+'\"
+Removes each of the slaves from its master and unmaps their windows.
+The slaves will no longer be managed by tixForm. All attachment values
+with respect to their master windows 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.
+'\"
+.TP
+\fBtixForm grid \fImaster \fR?\fIx_size y_size\fR?
+'\"
+When \fIx_size\fR and \fIy_size\fR are given, this command returns the
+number of grids of the master window in a pair of integers of the form
+{\fIx_size y_size\fR}. When both \fIx_size\fR and \fIy_size\fR are
+given, this command changes the number of horizontal and vertical
+grids on the master window.
+'\"
+.TP
+\fBtixForm info\fI slave\fR ?\fIoption\fR?
+'\"
+Queries the attachment options of a slave window. \fIoption\fR can be
+any of the options accepted by the \fBtixForm configure\fR command. If
+\fIoption\fR is given, only the value of that option is returned.
+Otherwise, this command returns a list whose elements are the current
+configuration state of the slave given in the same \fIoption\-value\fR form
+that might be specified to \fBtixForm configure\fR. The first two
+elements in this list list are "\fB\-in\fI master\fR" where
+\fImaster\fR is the slave's master window.
+'\"
+.TP
+\fBtixForm slaves \fImaster\fR
+'\"
+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.
+'\"
+.PP
+.SH SPECIFYING ATTACHMENTS
+'\"
+One can specify an attachment for each side of a slave window managed
+by tixForm. An attachment is specified in the the form "\-\fIside\fR
+{\fIanchor_point\fR \fIoffset\fR}". \-\fIside\fR can be one of
+\fB\-top\fR, \fB\-bottom\fR, \fB\-left\fR or \fB\-right\fR.
+.PP
+\fIOffset\fR is given in screen units (i.e. any of the forms
+acceptable to \fBTk_GetPixels\fR). 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.
+.PP
+\fIAnchor_point\fR can be given in one of the
+following forms:
+'\"
+.RS
+.TP
+\fBGrid Attachment\fR
+'\"
+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 \fBtixForm grid\fR command. A
+grid attachment anchor point is given by a \fB%\fR sign followed by an
+\fBinteger\fR value. For example, \fB%0\fR spceifies the first grid
+line (the top or left edge of the master window). \fB%100\fR spceifies
+the last grid line (the bottom or right edge of the master window).
+'\"
+.TP
+\fBOpposite Side Attachment\fR
+'\"
+Opposite attachment specifies an anchor point located on the
+\fBopposite\fR side of another slave widget, which must be managed by
+tixForm in the same master window. An opposite attachment anchor point
+is given by the name of another widget. For example, "tixForm .b \-top
+{.a 0}" attaches the \fBtop\fR side of the widget \fB\.b\fR to the
+\fBbottom\fR of the widget \fB\.a\fR.
+'\"
+.TP
+\fBParallel Side Attachment\fR
+'\"
+Opposite attachment specifies an anchor point located on the
+\fBsame\fR side of another slave widget, which must be managed by
+tixForm in the same master window. An parallel attachment anchor point
+is given by the sign \fB&\fR follwed by the name of another widget.
+For example, "tixForm .b \-top {&.a 0}" attaches the \fBtop\fR side of
+the widget \fB\.b\fR to the \fBtop\fR of the widget \fB\.a\fR, making
+the \fBtop\fR sides of these two widgets at the same vertical position
+in their parent window.
+'\"
+.TP
+\fBNo Attachment\fR
+'\"
+Specifies a side of the slave to be attached to nothing, indicated by
+the keyword \fBnone\fR. When the \fBnone\fR anchor point is given, the
+offser must be zero.
+
+When a side of a slave is attached to \fB{none 0}\fR, 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 \fBleft\fR side of a
+widget is attached to \fB{%0 100}\fR, its \fBright\fR side attached to
+\fB{none 0}\fR, and the natural size of the widget is \fB50\fR pixels,
+the \fBright\fR side of the widget will be positioned at pixel \fB{%0
+149}\fR.
+
+When both \fB\-top\fR and \fB\-bottom\fR are attached to \fBnone\fR,
+then by default \fB\-top\fR will be attached to \fB{%0 0}\fR. When both
+\fB\-left\fR and \fB\-right\fR are attached to none, then by default
+\fB\-left\fR will be attached to \fB{%0 0}\fR.
+'\"
+.RE
+.PP
+Shifting effects can be achieved by specifying a non-zero offset with
+an anchor point. In the following example, the \fBtop\fR side of
+widget \fB\.b\fR is attached to the \fBbottom\fR of \fB\.a\fR; hence \fB\.b\fR
+always appears below \fB\.a\fR. Also, the left edge of \fB\.b\fR
+is attached to the \fBleft\fR side of \fB\.a\fR with a 10
+pixel offest. Therefore, the \fBleft\fR edge of \fB\.b\fR is always
+shifted 10 pixels to the right of \fB\.a\fR's \fBleft\fR edge:
+.PP
+.CS
+tixForm .b \-left {.a 10} \-top {.a 0}
+.CE
+.PP
+\fBABBREVIATIONS:\fR Certain abbreviations can be made on the
+attachment specifications: First an offset of zero can be omitted.
+Thus, the following two lines are equivalent:
+.PP
+.CS
+tixForm .b \-top {.a 0} \-right {%100 0}
+tixForm .b \-top {.a} \-right {%100}
+.CE
+.PP
+Also, because of the way TCL handles lists, when you omit the offset,
+you can also leave out the braces. So you can further simplify the
+above to:
+.PP
+.CS
+tixForm .b \-top .a \-right %100
+.CE
+.PP
+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 \fB0\fR or positive, the default
+anchor point %0 is used; thus, "tixForm \.b \-top 15" attaches the top
+edge of \fB\.b\fR to a position 15 pixels below the top edge of the
+master window. If the anchor point is "\fB-0\fR" or negative, the
+default anchor point \fB%100\fR is used; thus, "tixForm \.a \-right
+\-2" attaches the right edge of \fB\.a\fR to a position 2 pixels to
+the left of the master window's \fBright\fR edge. An further example
+below shows a command with its equivalent abbreviation.
+'\"
+.CS
+tixForm .b \-top {%0 10} \-bottom {%100 0}
+tixForm .b \-top 10 \-bottom \-0
+.CE
+.PP
+.SH USING SPRINGS
+'\"
+To be written.
+'\"
+.PP
+.SH ALGORITHM OF TIXFORM
+'\"
+TixForm 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.
+.PP
+If the attachment of a side of the slave is grid attachment, the
+position of the side is readily determined.
+.PP
+If the attachment of this side is \fBnone\fR, then tixForm 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.
+.PP
+If the attachment is opposite or parallel widget attachments, then
+tixForm 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.
+.PP
+.SH CIRCULAR DEPENDENCY
+.PP
+The algorithm of tixForm will fail if a circular dependency exists in
+the attachments of the slaves. For example:
+.PP
+.CS
+tixForm .c \-left .b
+tixForm .b \-right .c
+.CE
+.PP
+In this example, the position of the left side of \fB.b\fR depends on
+the right side of \fB.c\fR, which in turn depends on the left side of \fB.b\fR.
+.PP
+When a circular dependency is discovered during the execution of the
+tixForm algorithm, tixForm will generate a background error and the
+geometry of the slaves are undefined (and will be arbitrary). Notice
+that tixForm 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, tixForm
+defines circular dependency as "\fIdependency in the same
+dimension\fR". 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 (\fB\.b\fR depends \fB.c\fR in the
+horizontal dimension and \fB.c\fR depends on \fB.b\fR in the vertical
+dimension):
+.PP
+.CS
+tixForm .b \-left .c
+tixForm .c \-top .b
+.CE
+.PP
+.SH BUGS
+'\"
+.PP
+Springs have not been fully implemented yet.
+'\"
+.SH KEYWORDS
+Tix(n), Form, Geometry Management
+
Added: external/tix-8.4.2.x/man/tixGetBoolean.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixGetBoolean.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,48 @@
+'\"
+'\" $Id: tixGetBoolean.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixGetBoolean n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+tixGetBoolean - Get the boolean value of a string.
+'\"
+'\"
+'\"
+.SH SYNOPSIS
+\fBtixGetBoolean\fI ?-nocomplain? string\fR
+.BE
+.SH DESCRIPTION
+.PP
+'\"
+'\"
+The command \fBtixGetBoolean\fR returns "0" if the string is a valid
+TCL string for the boolean value FALSE. It returns "1" if the string
+is a valid TCL string for the boolean value TRUE.
+.PP
+When the string is not a valid TCL boolean value and the
+\fB-nocomplain\fR option is specified, \fBtixGetBoolean\fR will return
+"0". Otherwise it will generate an error.
+'\"
+'\"
+'\"
+'\"
+.PP
+.SH KEYWORDS
+Tix(n)
+
Added: external/tix-8.4.2.x/man/tixGetInt.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixGetInt.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+'\"
+'\" $Id: tixGetInt.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixGetInt n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+tixGetInt - Get the integer value of a string.
+'\"
+'\"
+'\"
+.SH SYNOPSIS
+\fBtixGetInt\fI ?-nocomplain? ?-trunc? string\fR
+.BE
+.SH DESCRIPTION
+.PP
+'\"
+'\"
+The command \fBtixGetInt\fR converts any number into an integer
+number. By default, it will round the number to the nearest integer.
+When the \fB-trunc\fR option is specified, the number is truncated
+instead of rounded.
+.PP
+When the string is not a valid TCL numerical value and the
+\fB-nocomplain\fR option is specified, \fBtixGetInt\fR will return
+"0". Otherwise it will generate an error.
+'\"
+'\"
+'\"
+'\"
+.PP
+.SH KEYWORDS
+Tix(n)
+
Added: external/tix-8.4.2.x/man/tixGrid.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixGrid.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,222 @@
+'\"
+'\" $Id: tixGrid.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH tixGrid n 4.1 Tix "Tix Built-In Commands"
+.BS
+.SH NAME
+tixGrid \- Create and manipulate Tix Grid widgets
+.SO
+\-background \-borderWidth \-cursor
+\-font \-foreground \-height
+\-highlightColor \-highlightThickness \-relief
+\-selectBackground \-selectForeground \-width
+\-xScrollCommand \-yScrollCommand
+.SE
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+.OP -editdonecmd editDoneCmd EditDoneCmd
+If non-empty, gives a Tcl command to be executed when the user has
+edited grid cell. When this command is called, it is passed with two
+additional parameters: \fIx\fR \fIy\fR, where (\fIx\fR,\fIy\fR) is the
+location of the cell that has just been edited.
+'\"
+.OP -editnotifycmd editNotifyCmd EditNotifyCmd
+If non-empty, gives a Tcl command to be executed when the user tries to edit a grid cell. When this command is called, it is passed with two additional parameters: \fIx\fR \fIy\fR, where (\fIx\fR,\fIy\fR,) is the location of the cell. This command should return a boolean value: \fBtrue\fR indicates that the cells is editable and \fBfalse\fR otherwise.
+'\"
+.OP -formatcmd formatCmd FormatCmd
+If non-empty, gives a Tcl command to be executed when the grid cells
+need to be formatted on the screen. Normally, this command calls the
+\fBformat\fR widget command (see below). When this command is called,
+it is passed with five additional parameters: \fItype\fR \fIx1\fR
+\fIy1\fR \fIx2\fR \fIy2\fR. \fItype\fR gives the logical type of the
+region in the grid. It may be one of the following. \fBx-region\fR:
+the horizontal margin; \fBy-region\fR: the vertical margin;
+\fBs-region\fR, the area where the the horizontal and vertical margins
+are joined; \fBmain\fR: all the cells that do not fall into the above
+three types. \fIx1\fR \fIy1\fR \fIx2\fR \fIy2\fR gives the extent of
+the region that needs formatting.
+'\"
+.OP -leftmargin leftMargin LeftMargin
+In the number of cells, gives the width of vertical margin. A zero
+indicates that no vertical should be drawn.
+'\"
+.OP -selectmode selectMode 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 \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or
+\fBextended\fR; the default value is \fBsingle\fR.
+'\"
+.OP -selectunit selectUnit SelectUnit
+Specifies the selection unit. Valid values are \fBcell\fR,
+\fBcolumn\fR or \fBrow\fR.
+'\"
+.OP -topmargin topMargin TopMargin
+In the number of cells, gives the height of horizontal margin. A zero
+indicates that no horizontal should be drawn.
+.BE
+'\"
+.SH DESCRIPTION
+The \fBtixGrid\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a \fBtixGrid\fR widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+\fBtixGrid\fR widget such as its cursor and relief.
+.PP
+A Grid widget displays its contents in a two dimensional grid of
+cells. Each cell may contain one Tix \fBdisplay item\fR, which
+may be in text, graphics or other formats. See the
+\fBtixDisplayStyle\fR manual page for more information about Tix
+display items. Individual cells, or groups of cells, can be formatted
+with a wide range of attributes, such as its color, relief and border.
+'\"
+.SH "WIDGET COMMAND"
+.PP
+The \fBtixGrid\fR command creates a new Tcl command whose name is the
+same as the path name of the \fBtixGrid\fR widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+.RS
+.CS
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+\fIPathName\fR is the name of the command, which is the same as the
+\fBtixGrid\fR widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for \fBtixGrid\fR widgets:
+.TP
+\fIpathName \fBanchor \fIoption \fR?\fIargs ...\fR?
+Manipulates the \fBanchor cell\fR of the \fBtixGrid\fR widget. The
+anchor cell is the end of the selection that is fixed while the user
+is dragging out a selection with the mouse.
+.TP
+\fIpathName \fBbdtype\fR
+TODO place holder
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixGrid\fR command.
+.TP
+\fIpathName \fBconfigure \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo(n)\fR
+for information on the format of this list.) If \fIoption\fR is
+specified with no \fIvalue\fR, 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 \fIoption\fR is
+specified). If one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the values accepted by the
+\fBtixGrid\fR command.
+.TP
+\fIpathName \fBdelete\fR \fIdim\fR \fIfrom \fR?\fIto\fR?
+\fIDim\fR may be \fBrow\fR or \fBcolumn\fR. If \fIto\fR is not given,
+deletes a single row (or column) at the position \fIfrom\fR. If
+\fIto\fR is given, deletes the range of rows (or columns) from
+position \fIfrom\fR through \fIto\fR.
+.TP
+\fIpathName \fBedit apply\fR
+If any cell is being edited, de-highlight the cell and applies the
+changes.
+.TP
+\fIpathName \fBedit set\fR \fIx\fR \fIy\fR
+Highlights the cell at (\fIx\fR,\fIy\fR) for editing, if the
+\fB-editnotify\fR command returns true for this cell.
+.TP
+\fIpathName \fBentrycget\fR \fIx\fR \fIy\fR \fIoption\fR
+Returns the current value of the configuration option given by
+\fIoption\fR of the cell at (\fIx\fR,\fIy\fR). \fIOption\fR may have
+any of the values accepted by the \fBset\fR widget command.
+.TP
+\fIpathName \fBentryconfigure \fIx y \fR?\fIoption\fR? ?\fIvalue option value ...\fR?
+Query or modify the configuration options of the cell at
+(\fIx\fR,\fIy\fR). If no \fIoption\fR is specified, returns a list
+describing all of the available options for the cell (see
+\fBTk_ConfigureInfo(n)\fR for information on the format of this list.)
+If \fIoption\fR is specified with no \fIvalue\fR, 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
+\fIoption\fR is specified.) If one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the values accepted by the
+\fBset\fR widget command.
+.TP
+\fIpathName \fBformat\fR
+TODO place holder
+.TP
+\fIpathName \fBindex\fR
+TODO place holder
+.TP
+\fIpathName \fBmove\fR \fIdim\fR \fIfrom\fR \fIto\fR \fIoffset\fR
+\fIDim\fR may be \fBrow\fR or \fBcolumn\fR. Moves the the range of
+rows (or columns) from position \fIfrom\fR through \fIto\fR by the
+distance indicated by \fIoffset\fR. For example, \fBmove row
+2 4 1\fR moves the rows 2,3,4 to rows 3,4,5.
+.TP
+\fIpathName \fBset \fIx y \fR?-itemtype \fItype\fR? ?\fIoption value...\fR?
+Creates a new display item at the cell at (\fIx\fR,\fIy\fR). The
+optional \fB-itemtype\fR parameter gives the type of the display
+item. An additional list of \fIoption-value\fR pairs specify options
+of the display item. If a display item already exists at this cell,
+the old item will be deleted automatically.
+.TP
+\fIpathName \fBsize \fIdim index \fR?\fIoption value ...\fR?
+Queries or sets the size of the row or column given by \fIdim\fR and
+\fIindex\fR. \fIDim\fR may be \fBrow\fR or \fBcolumn\fR. \fIIndex\fR
+may be any non-negative integer that gives the position of a given row
+(or column). \fIIndex\fR can also be the string \fBdefault\fR; in this
+case, this command queries or sets the default size of all rows (or
+columns).
+.PP
+When no \fIoption\fR-\fIvalue\fR pair is given, this command returns a
+list containing the current size setting of the given row (or
+column). When \fIoption\fR-\fIvalue\fR pairs are given, the
+corresponding options of the size setting of the given row are
+changed. \fIOption\fR may be one of the follwing:
+.RS
+.TP
+\fB-pad0\fR \fIpixels\fR
+Specifies the paddings to the left or a column or the top of a row.
+.TP
+\fB-pad1\fR \fIpixels\fR
+Specifies the paddings to the right or a column or the bottom of a row.
+.TP
+\fB-size\fR \fIval\fR
+Specifies the width of a column or the height of a row. \fIVal\fR may
+be: \fBauto\fR -- the width of the column is set the the widest cell
+in the column; a valid Tk screen distance unit (see
+\fBTk_GetPixels(n)\fR); or a real number following by the word
+\fBchars\fR (e.g. \fB3.4chars\fR) that sets the width of the column to
+the given number of characters.
+.RE
+.TP
+\fIpathName \fBunset\fR \fIx\fR \fIy\fR
+Clears the cell at (\fIx\fR,\fIy\fR) by removing its display item.
+.TP
+\fIpathName \fBxview\fR
+TODO place holder
+.TP
+\fIpathName \fByview\fR
+TODO place holder
+.SH KEYWORDS
+grid, spread sheet, table
+
+
+
+
Added: external/tix-8.4.2.x/man/tixHList.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixHList.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1052 @@
+'\"
+'\" $Id: tixHList.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixHList n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixHList \- Create and manipulate Tix Hierarchial List widgets
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixHList \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-background \-borderWidth \-cursor \-foreground
+\-font \-height \-highlightColor \-highlightThickness
+\-relief \-selectBackground \-selectForeground
+\-xScrollCommand \-yScrollCommand \-width
+.SE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browsecmd BrowseCmd
+Specifies a TCL command to be executed when the user browses through the
+entries in the HList widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-columns columns 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.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the TCL command 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.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-drawbranch drawBranch DrawBranch
+A Boolean value to specify whether branch line should be drawn to
+connect list entries to their parents.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBforeground\fR
+Class: \fBForeground\fR
+Switch: \fB\-foreground\fR
+Alias: \fB\-fg\fR
+.fi
+.IP
+\fB[OBSOLETE]\fR Specifies the default foreground color for the list entries.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-gap gap Gap
+\fB[OBSOLETE]\fR The default distance between the bitmap/image and the
+text in list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-header header Header
+A Boolean value specifying whether headers should be displayed for
+this HList widget (see the \fBheader\fR widget command below).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-height height Height
+Specifies the desired height for the window in number of characters.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-indent indent Indent
+Specifies the amount of horizontal indentation between a list entry
+and its children. Must be a valid screen distance value.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-indicator indicator Indicator
+Specifies whether the indicators should be displayed inside the HList
+widget. See the \fBindicator\fR widget command below.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-indicatorcmd indicatorCmd IndicatorCmd
+Specifies a TCL command to be executed when the user manipulates the
+indicator of an HList entry. The \fB\-indicatorcmd\fR is triggered
+when the user press or releases the mouse button over the indicator in
+an HList entry. By default the TCL command specified by
+\fB\-indicatorcmd\fR is executed with one additional argument, the
+entryPath of the entry whose indicator has been triggered. Additional
+information about the event can be obtained by the \fBtixEvent\fR
+command.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-itemtype itemType ItemType
+Specifies the default type of display item for this HList widget. When
+you call the add and addchild widget commands, display items of this
+type will be created if the \fB\-itemtype\fR option is not specified .
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padX Pad
+\fB[OBSOLETE]\fR The default horizontal padding for list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padY Pad
+\fB[OBSOLETE]\fR The default vertical padding for list entries.
+'\"----------END
+'\"----------BEGIN
+.OP \-selectbackground selectBackground SelectBackground
+Specifies the background color for the selected list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectborderwidth selectBorderWidth BorderWidth
+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 \fBTk_GetPixels\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectforeground selectForeground SelectForeground
+Specifies the foreground color for the selected list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectmode selectMode 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 \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or
+\fBextended\fR; the default value is \fBsingle\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-sizecmd sizeCmd SizeCmd
+Specifies a TCL script to be called whenever the HList widget
+changes its size. This command can be useful to implement "user scroll
+bars when needed" features.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-separator separator Separator
+Specifies the character to used as the separator character when
+intepreting the path-names of list entries. By default the character
+"." is used.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-width width Width
+Specifies the desired width for the window in characters.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixHList\fR command creates a new window (given by the
+\fIpathName\fR 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.
+.PP
+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.
+.PP
+Each list entry is identified by an \fBentryPath\fR. The entryPath is a
+sequence of \fBentry names\fR separated by the separator charactor
+(specified by the \fB\-separator\fR option). An \fBentry name\fR can be
+any string that does not contain the separator charactor, or it can be
+the a string that contains only one separator charactor.
+.PP
+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).
+.PP
+Another examples: ".two.three" is the entryPath for a list entry whose
+parent is ".two", whose parent is ".", which is a toplevel entry.
+'\"
+.SH "DISPLAY ITEMS"
+.PP
+Each list entry in an HList widget is associated with a \fBdisplay
+item\fR. The display item determines what visual information should
+be displayed for this list entry. Please see the \fBtixDisplayStyle\fR manual
+page for a list of all display items.
+
+When a list entry is created by the \fBadd\fR or \fBaddchild\fR widget
+commands, the type of its display item is determined by the
+\fB\-itemtype\fR option passed to these commands. If the
+\fB\-itemtype\fR is omitted, then by default the type specified by
+this HList widget's \fB\-itemtype\fR option is used.
+'\"----------------------------------------------------------------------
+.SH "WIDGET COMMAND"
+.PP
+'\"
+The \fBtixHList\fR command creates a new Tcl command whose name is the
+same as the path name of the HList widget's window. This command
+may be used to invoke various operations on the widget. It has the
+following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the HList widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for HList widgets:
+'\"
+.TP
+\fIpathName \fBadd\fI entryPath \fR?\fIoption value ...\fR?
+'\"
+Creates a new list entry with the pathname \fIentryPath\fR. A list
+entry must be created after its parent is created (unless this entry
+is a top-level entry, which has no parent). This command returns the
+entryPath of the newly created list entry. The following
+configuration options can be given to configure the list entry:
+'\"
+.RS
+'\"
+.TP
+\fB\-at\fI position\fR
+'\"
+Insert the new list at the position given by \fIposition\fR.
+\fIposition\fR must be a valid integer. the Position \fB0\fR indicates
+the first position, \fB1\fR indicates the second position, and so on.
+'\"
+.TP
+\fB\-after\fI afterWhich\fR
+'\"
+Insert the new list entry after the entry identified by
+\fIafterWhich\fR. \fIafterWhich\fR must be a valid list entry and it
+mush have the same parent as the new list entry
+'\"
+.TP
+\fB\-before\fI beforeWhich\fR
+'\"
+Insert the new list entry before the entry identified by
+\fIbeforeWhich\fR. \fIbeforeWhich\fR must be a valid list entry and it
+mush have the same parent as the new list entry
+'\"
+.TP
+\fB\-data\fI string\fR
+'\"
+Specifies a string to associate with this list entry. This string can
+be queried by the \fBinfo\fR widget command. The application
+programmer can use the \fB\-data\fR option to associate the list entry
+with the data it represents.
+'\"
+.TP
+\fB\-itemtype\fI type\fR
+'\"
+Specifies the type of display item to be display for the new list
+entry. \fBtype\fR must be a valid display item type. Currently the
+available display item types are \fBimagetext\fR, \fBtext\fR, and
+\fBwindow\fR. If this option is not specified, then by default the
+type specified by this HList widget's \fB\-itemtype\fR option is used.
+'\"
+.TP
+\fB\-state\fR
+'\"
+Specifies whether this entry can be selected or invoked by the user.
+Must be either \fBnormal\fR or \fBdisabled\fR.
+'\"
+.RE
+'\"
+The \fBadd\fR widget command 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 \fB\-itemtype\fR option. Please see the
+\fBtixDisplayStyle\fR manual page for a list of the configuration options for
+each of the display item types.
+'\"
+.TP
+\fIpathName \fBaddchild\fI parentPath \fR?\fIoption value ... \fR?
+'\"
+Adds a new child entry to the children list of the list entry
+identified by \fIparentPath\fR. Or, if \fIparentPath\fR 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 \fIparentPath\fR is \fBfoo\fR, then the
+entryPath of the new entry will be \fBfoo.1\fR, \fBfoo.2\fR, ... etc.
+This command returns the entryPath of the newly created list entry.
+\fIoption\fR can be any option for the \fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBanchor set \fIentryPath\fR
+'\"
+Sets the anchor to the list entry identified by \fIentryPath\fR. The
+anchor is the end of the selection that is fixed while the user is
+dragging out a selection with the mouse.
+'\"
+.TP
+\fIpathName \fBanchor clear\fR
+'\"
+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.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixHList\fR command.
+'\"
+.TP
+\fIpathName \fBcolumn width \fIcol\fR ?\fI\-char\fR? ?\fIwidth\fR?
+'\"
+Querys or sets the width of a the column \fIcol\fR in the HList
+widget. The value of \fIcol\fR 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:
+.PP
+.RS
+.TP
+\fIpathName \fBcolumn width \fIcol\fR \fB{}\fR
+'\"
+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.
+'\"
+.TP
+\fIpathName \fBcolumn width \fIcol\fR \fIwidth\fR
+'\"
+\fIwidth\fR must be in a form accepted by \fBTk_GetPixels(3)\fR.
+'\"
+.TP
+\fIpathName \fBcolumn width \fIcol\fR \fB-char\fR \fInChars\fR
+'\"
+The width is set to be the average width occupied by \fInChars\fR
+number of characters of the font specified by the \fB\-font\fR option
+of this HList widget.
+'\"
+.RE
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixHList\fR command.
+'\"
+.TP
+\fIpathName \fBdelete\fR \fIoption\fR ?\fIentryPath\fR?
+Delete one or more list entries. \fIoption\fR may be one of the
+following:
+.RS
+.TP
+\fBall\fR
+Delete all entries in the HList. In this case the \fIentryPath\fR
+does not need to be specified.
+'\"
+.TP
+\fBentry\fR
+Delete the entry specified by \fIentryPath\fR and all its offsprings,
+if any.
+'\"
+.TP
+\fBoffsprings\fR
+Delete all the offsprings, if any, of the entry specified by
+\fIentryPath\fR. However, \fIentryPath\fR itself is not deleted.
+'\"
+.TP
+\fBsiblings\fR
+Delete all the list entries that share the same parent with the entry
+specified by \fIentryPath\fR. However, \fIentryPath\fR itself is not
+deleted.
+.RE
+'\"
+'\"
+.TP
+\fIpathName \fBdragsite set \fIentryPath\fR
+'\"
+Sets the dragsite to the list entry identified by
+\fIentryPath\fR. 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.
+'\"
+.TP
+\fIpathName \fBdragsite clear\fR
+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.
+'\"
+'\"
+.TP
+\fIpathName \fBdropsite set \fIentryPath\fR
+'\"
+Sets the dropsite to the list entry identified by \fIentryPath\fR. The
+dropsite is used to indicate the target of a grag-and-drop
+action. Currently drag-and-drop functionality has not been implemented
+in Tix yet.
+'\"
+.TP
+\fIpathName \fBdropsite clear\fR
+'\"
+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.
+'\"
+.TP
+\fIpathName \fBentrycget\fR \fI entryPath option\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR for the entry indentfied by \fIentryPath\fR. \fIOption\fR
+may have any of the values accepted by the \fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBentryconfigure\fI entryPath \fR?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the list entry indentfied
+by \fIentryPath\fR. If no \fIoption\fR is specified, returns a list
+describing all of the available options for \fIentryPath\fR (see
+\fBTk_ConfigureInfo\fR for information on the format of this list.) If
+\fIoption\fR is specified with no \fIvalue\fR, 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
+\fIoption\fR is specified). If one or more \fIoption\-value\fR 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.
+\fIOption\fR may have any of the values accepted by the \fBadd\fR or
+\fBaddchild\fR widget command. The exact set of options depends on the
+value of the \fB\-itemtype\fR option passed to the the \fBadd\fR or
+\fBaddchild\fR widget command when this list entry is created.
+'\"
+'\"
+.TP
+\fIpathName \fBheader \fIoption\fR \fIcol\fR ?\fIargs ...\fR?
+'\"
+Manipulates the header items of this HList widget. If the
+\fB\-header\fR option of this HList widget is set to true, then a
+header item is displayed at the top of each column. The \fIcol\fR
+argument for this command must be a valid integer. 0 indicates the
+first column, 1 the second column, ... and so on. This command
+supports the following options:
+'\"
+.RS
+.TP
+\fIpathName \fBheader cget\fR \fIcol\fR \fIoption\fR
+'\"
+If the \fIcol\fR-th column has a header display item, returns the
+value of the specified \fIoption\fR of the header item. If the header
+doesn't exist, returns an error.
+'\"
+.TP
+\fIpathName \fBheader configure\fR \fIcol\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the header display item
+of the \fIcol\fR-th column. The header item must exist, or an error
+will result. If no \fIoption\fR is specified, returns a list
+describing all of the available options for the header display item
+(see \fBTk_ConfigureInfo(3)\fR for information on the format of this
+list.) If \fIoption\fR is specified with no \fIvalue\fR, 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
+\fIoption\fR is specified). If one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the values accepted by the
+\fBheader create\fR widget command. The exact set of options depends
+on the value of the \fB\-itemtype\fR option passed to the the \fBheader
+create\fR widget command when this display item was created.
+'\"
+.TP
+\fIpathName \fBheader create\fR \fIcol\fR ?\fI\-itemtype type\fR? ?\fIoption value ...\fR?
+'\"
+Creates a new display item as the header for the \fIcol\fR-th
+column. If an header display item already exists for this column, it
+will be replaced by the new item. An optional parameter
+\fI\-itemtype\fR can be used to specify what type of display item
+should be created. If the \fI\-itemtype\fR is not given, then by
+default the type specified by this HList widget's \fB\-itemtype\fR
+option is used. Additional parameters, in \fIoption-value\fR pairs,
+can be passed to configure the appearance of the display item. Each
+\fIoption-value\fR pair must be a valid option for this type of
+display item or one of the following:
+.RS
+'\"
+.TP
+\fB\-borderwidth\fR
+'\"
+Specifies the border width of this header item.
+'\"
+.TP
+\fB\-headerbackground\fR
+'\"
+Specifies the background color of this header item.
+'\"
+.TP
+\fB\-relief\fR
+'\"
+Specifies the relief type of the border of this header item.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fBheader delete \fIcol\fR
+'\"
+Deletes the header display item for the \fIcol\fR-th column.
+'\"
+.TP
+\fIpathName \fBheader exists \fIcol\fR
+'\"
+Return true if an header display item exists for the \fIcol\fR-th
+column; return false otherwise.
+'\"
+.TP
+\fIpathName \fBheader size \fIentryPath\fR
+'\"
+If an header display item exists for the \fIcol\fR-th column , returns
+its size in a two element list of the form {\fIwidth height\fR};
+returns an error if the header display item does not exist.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fBhide \fIoption ?entryPath?\fR
+'\"
+Makes some of entries invisible invisible without deleting them.
+\fIOption\fR can be one of the following:
+.RS
+.TP
+\fBentry\fR
+Hides the list entry identified by \fIentryPath\fR.
+.PP
+Currently only the \fBentry\fR option is supported. Other options will
+be added in the next release.
+.RE
+'\"
+.TP
+\fIpathName \fBindicator \fIoption\fR entryPath ?\fIargs ...\fR?
+'\"
+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 indicator whether a directory is opened or
+closed. \fIoption\fR can be one of the following:
+'\"
+.RS
+.TP
+\fIpathName \fBindicator cget\fR \fIentryPath\fR \fIoption\fR
+'\"
+If the list entry given by \fIentryPath\fR has an indicator, returns
+the value of the specified \fIoption\fR of the indicator. If the
+indicator doesn't exist, returns an error.
+'\"
+.TP
+\fIpathName \fBindicator configure\fR \fIentryPath\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the indicator display
+item of the entry specified by \fIentryPath\fR. The indicator item
+must exist, or an error will result. If no \fIoption\fR is specified,
+returns a list describing all of the available options for the
+indicator display item (see \fBTk_ConfigureInfo(3)\fR for information
+on the format of this list). If \fIoption\fR is specified with no
+\fIvalue\fR, 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 \fIoption\fR is specified). If one or more
+\fIoption\-value\fR 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. \fIOption\fR may have any of the values
+accepted by the \fBindicator create\fR widget command. The exact set
+of options depends on the value of the \fB\-itemtype\fR option passed
+to the the \fBindicator create\fR widget command when this display item
+was created.
+'\"
+.TP
+\fIpathName \fBindicator create\fR \fIentryPath\fR ?\fI\-itemtype type\fR? ?\fIoption value ...\fR?
+'\"
+Creates a new display item as the indicator for the entry specified by
+\fIentryPath\fR. If an indicator display item already exists for this
+entry, it will be replaced by the new item. An optional parameter
+\fI\-itemtype\fR can be used to specify what type of display item
+should be created. If the \fI\-itemtype\fR is not given, then by
+default the type specified by this HList widget's \fB\-itemtype\fR
+option is used. Additional parameters, in \fIoption-value\fR pairs,
+can be passed to configure the appearance of the display item. Each
+\fIoption-value\fR pair must be a valid option for this type of
+display item.
+'\"
+.TP
+\fIpathName \fBindicator delete \fIentryPath\fR
+'\"
+Deletes the indicator display item for the entry given by \fIentryPath\fR.
+'\"
+.TP
+\fIpathName \fBindicator exists \fIentryPath\fR
+'\"
+Return true if an indicator display item exists for the entry given by
+\fIentryPath\fR; return false otherwise.
+'\"
+.TP
+\fIpathName \fBindicator size \fIentryPath\fR
+'\"
+If an indicator display item exists for the entry given by
+\fIentryPath\fR, returns its size in a two element list of the form
+{\fIwidth height\fR}; returns an error if the indicator display item
+does not exist.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fBinfo \fIoption\fR \fIarg ...\fR
+'\"
+Query information about the HList widget. \fIoption\fR can be one
+of the following:
+.RS
+.TP
+\fIpathName \fBinfo anchor\fR
+'\"
+Returns the entryPath of the current anchor, if any, of the HList
+widget. If the anchor is not set, returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo bbox\fR \fIentryPath\fR
+'\"
+Returns a list of four numbers describing the visible bounding box of
+the entry given \fIentryPath\fR. 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.
+'\"
+.TP
+\fIpathName \fBinfo children\fR ?\fIentryPath\fR?
+'\"
+If \fIentrpyPath\fR is given, returns a list of the entryPath's of its
+children entries. Otherwise returns a list of the toplevel
+entryPath's.
+'\"
+.TP
+\fIpathName \fBinfo data\fR ?\fIentryPath\fR?
+'\"
+Returns the data associated with \fIentryPath\fR.
+'\"
+.TP
+\fIpathName \fBinfo dragsite\fR
+'\"
+Returns the entryPath of the current dragsite, if any, of the HList
+widget. If the dragsite is not set, returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo dropsite\fR
+'\"
+Returns the entryPath of the current dropsite, if any, of the HList
+widget. If the dropsite is not set, returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo exists\fR \fIentryPath\fR
+Returns a boolean value indicating whether the list entry
+\fIentrpyPath\fR exists.
+'\"
+.TP
+\fIpathName \fBinfo hidden\fR \fIentryPath\fR
+'\"
+Returns a boolean value indicating whether the list entry
+\fBentrpyPath\fR is hidden or not.
+'\"
+.TP
+\fIpathName \fBinfo next\fR \fIentryPath\fR
+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.
+'\"
+.TP
+\fIpathName \fBinfo parent\fR \fIentryPath\fR
+Returns the name of the parent of the list entry identified by
+\fIentrpyPath\fR. If \fIentrpyPath\fR is a toplevel list entry,
+returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo prev\fR \fIentryPath\fR
+'\"
+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.
+'\"
+.TP
+\fIpathName \fBinfo selection\fR
+'\"
+Returns a list of selected entries in the HList widget. If no entries
+are selectd, returns an empty string.
+.RE
+'\"
+.TP
+\fIpathName \fBitem \fIoption\fR ?\fIargs ...\fR?
+'\"
+Creates and configures the display items at individual columns the
+entries. The form of additional of arguments depends on the choice of
+\fIoption\fR:
+'\"
+.RS
+'\"
+.TP
+\fIpathName \fBitem cget \fIentryPath col option\fR
+'\"
+'\"
+Returns the current value of the configure \fIoption\fR of the display
+item at the column designated by \fIcol\fR of the entry specified by
+\fIentryPath\fR.
+'\"
+.TP
+\fIpathName \fBitem configure \fIentryPath col\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the display item at the
+column designated by \fIcol\fR of the entry specified by
+\fIentryPath\fR. If no \fIoption\fR is specified, returns a list
+describing all of the available options for \fIentryPath\fR (see
+\fBTk_ConfigureInfo(3)\fR for information on the format of this
+list). If \fIoption\fR is specified with no \fIvalue\fR, 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
+\fIoption\fR is specified). If one or more \fIoption\-value\fR 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.
+\fIOption\fR may have any of the values accepted by the \fBitem
+create\fR widget command. The exact set of options depends on the
+value of the \fB\-itemtype\fR option passed to the the \fBitem
+create\fR widget command when this display item was created.
+'\"
+.TP
+\fIpathName \fBitem create \fIentryPath col\fR ?\fI\-itemtype type\fR? ?\fIoption value ...\fR?
+'\"
+'\"
+Creates a new display item at the column designated by \fIcol\fR of
+the entry specified by \fIentryPath\fR. An optional parameter
+\fI\-itemtype\fR can be used to specify what type of display items
+should be created. If the \fI\-itemtype\fR is not specified, then by
+default the type specified by this HList widget's \fB\-itemtype\fR
+option is used. Additional parameters, in \fIoption-value\fR pairs,
+can be passed to configure the appearance of the display item. Each
+\fIoption- value\fR pair must be a valid option for this type of
+display item.
+'\"
+.TP
+\fIpathName \fBitem delete \fIentryPath col\fR
+'\"
+Deletes the display item at the column designated by \fIcol\fR of
+the entry specified by \fIentryPath\fR.
+'\"
+.TP
+\fIpathName \fBitem exists \fIentryPath col\fR
+'\"
+Returns true if there is a display item at the column designated by
+\fIcol\fR of the entry specified by \fIentryPath\fR; returns false
+otherwise.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fBnearest \fIy\fR
+'\"
+Given a y-coordinate within the HList window, this command returns
+the entryPath of the (visible) HList element nearest to that
+y-coordinate.
+'\"
+'\"
+.TP
+\fIpathName \fBsee \fIentryPath\fR
+'\"
+Adjust the view in the HList so that the entry given by \fIentryPath\fR is
+visible. If the entry is already visible then the command 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.
+'\"
+.TP
+\fIpathName \fBselection \fIoption\fR \fIarg ...\fR
+'\"
+This command is used to adjust the selection within a HList widget. It
+has several forms, depending on \fIoption\fR:
+.RS
+'\"
+.TP
+\fIpathName \fBselection clear \fR?\fIfrom\fR? ?\fIto\fR?
+'\"
+When no extra arguments are given, deselects all of the list entrie(s)
+in this HList widget. When only \fIfrom\fR is given, only the list
+entry identified by \fIfrom\fR is deselected. When both \fIfrom\fR and
+\fIto\fR are given, deselects all of the list entrie(s) between
+between \fIfrom\fR and \fIto\fR, inclusive, without affecting the
+selection state of entries outside that range.
+'\"
+.TP
+\fIpathName \fBselection get\fR
+'\"
+This is an alias for the \fBinfo selection\fR widget command.
+,
+.TP
+\fIpathName \fBselection includes \fIentryPath\fR
+'\"
+Returns 1 if the list entry indicated by \fIentryPath\fR is currently
+selected; returns 0 otherwise.
+'\"
+.TP
+\fIpathName \fBselection set \fIfrom\fR ?\fIto\fR?
+'\"
+Selects all of the list entrie(s) between between \fIfrom\fR and
+\fIto\fR, inclusive, without affecting the selection state of entries
+outside that range. When only \fIfrom\fR is given, only the list entry
+identified by \fIfrom\fR is selected.
+.RE
+'\"
+.TP
+\fIpathName \fBshow \fIoption ?entryPath?\fR
+'\"
+Show the entries that are hidden by the \fBhide\fR command,
+\fIoption\fR can be one of the following:
+.RS
+.TP
+\fBentry\fR
+Shows the list entry identified by \fIentryPath\fR.
+.PP
+Currently only the \fBentry\fR option is supported. Other options will
+be added in future releases.
+.RE
+'\"
+.TP
+\fIpathName \fBxview \fIargs\fR
+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:
+.RS
+.TP
+\fIpathName \fBxview\fR
+'\"
+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 \fB\-xscrollcommand\fR option.
+.TP
+\fIpathName \fBxview\fR \fIentryPath\fR
+'\"
+Adjusts the view in the window so that the list entry identified by
+\fIentryPath\fR is aligned to the left edge of the window.
+.TP
+\fIpathName \fBxview moveto\fI fraction\fR
+'\"
+Adjusts the view in the window so that \fIfraction\fR of the total
+width of the HList is off-screen to the left. \fIfraction\fR must be
+a fraction between 0 and 1.
+'\"
+.TP
+\fIpathName \fBxview scroll \fInumber what\fR
+'\"
+This command shifts the view in the window left or right according to
+\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer.
+\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an
+abbreviation of one of these. If \fIwhat\fR is \fBunits\fR, the view
+adjusts left or right by \fInumber\fR character units (the width of
+the \fB0\fR character) on the display; if it is \fBpages\fR then the
+view adjusts by \fInumber\fR screenfuls. If \fInumber\fR is negative
+then characters farther to the left become visible; if it is positive
+then characters farther to the right become visible.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fByview \fI?args\fR?
+'\"
+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:
+'\"
+.RS
+.TP
+\fIpathName \fByview\fR
+'\"
+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 \fB\-yscrollcommand\fR
+option.
+'\"
+.TP
+\fIpathName \fByview\fR \fIentryPath\fR
+'\"
+Adjusts the view in the window so that the list entry given by
+\fIentryPath\fR is displayed at the top of the window.
+'\"
+.TP
+\fIpathName \fByview moveto\fI fraction\fR
+'\"
+Adjusts the view in the window so that the list entry given by
+\fIfraction\fR appears at the top of the window. \fIFraction\fR 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.
+.TP
+\fIpathName \fByview scroll \fInumber what\fR
+'\"
+This command adjust the view in the window up or down according to
+\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer.
+\fIWhat\fR must be either \fBunits\fR or \fBpages\fR. If \fIwhat\fR
+is \fBunits\fR, the view adjusts up or down by \fInumber\fR lines; if
+it is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
+If \fInumber\fR is negative then earlier entries become visible; if
+it is positive then later entries become visible.
+.RE
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+.IP [1]
+If the \fB\-selectmode\fR is "browse", when the user drags the mouse
+pointer over the list entries, the entry under the pointer will be
+highlighted and the \fB\-browsecmd\fR procedure will be called with
+one parameter, the entryPath of the highlighted entry. Only one entry
+can be highlighted at a time. The \fB\-command\fR procedure will be
+called when the user double-clicks on a list entry.
+'\"
+.IP [2]
+If the \fB\-selectmode\fR is "single", the entries will only be
+highlighted by mouse <ButtonRelease-1> events. When a new list entry
+is highlighted, the \fB\-browsecmd\fR procedure will be called with
+one parameter indicating the highlighted list entry. The
+\fB\-command\fR procedure will be called when the user double-clicks
+on a list entry.
+'\"
+'\"
+.IP [3]
+If the \fB\-selectmode\fR 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
+\fB\-browsecmd\fR procedure will be called with an undefined
+parameter. It is the responsibility of the \fB\-browsecmd\fR procedure
+to find out the exact highlighted selection in the HList. The
+\fB\-command\fR procedure will be called when the user double-clicks
+on a list entry.
+'\"
+.IP [4]
+'\"
+If the \fB\-selectmode\fR 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
+<Control-ButtonPress-1>. When the highlighted area is changed, the
+\fB\-browsecmd\fR procedure will be called with an undefined
+parameter. It is the responsibility of the \fB\-browsecmd\fR procedure
+to find out the exact highlighted selection in the HList. The
+\fB\-command\fR procedure will be called when the user double-clicks
+on a list entry.
+'\"
+.IP [5]
+\fBArrow key bindings:\fR <Up> arrow key moves the anchor point to the
+item right on top of the current anchor item. <Down> arrow key moves
+the anchor point to the item right below the current anchor item.
+<Left> arrow key moves the anchor to the parent item of the current
+anchor item. <Right> 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.
+'\"----------------------------------------------------------------------
+.SH EXAMPLE
+.PP
+This example demonstrates how to use an HList to store a file
+directory structure and respond to the user's browse events:
+.PP
+.CS
+ tixHList .h -separator "/" \-browsecmd browse \-selectmode single \\
+ -itemtype text
+ .h add / \-text /
+ .h add /home \-text /home
+ .h add /home/ioi \-text /home/ioi
+ .h add /home/foo \-text /home/foo
+ .h add /usr \-text /usr
+ .h add /usr/lib \-text /usr/lib
+ pack .h
+
+ proc browse {file} {
+ puts "$file browsed"
+ }
+.CE
+'\"
+'\"
+.SH 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 \fBitem\fR command and the \fBadd\fR,
+\fBaddchild\fR, \fBentrycget\fR and \fBentryconfigure\fR
+commands. Whenever multiple columns exist, the programmer should use
+ONLY the \fBitem\fR command to create and configure the display items
+in each column; the \fBadd\fR, \fBaddchild\fR, \fBentrycget\fR and
+\fBentryconfigure\fR should be used ONLY to create and configure
+entries.
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), Hierarchical Listbox
+
Added: external/tix-8.4.2.x/man/tixInputOnly.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixInputOnly.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,110 @@
+'\"
+'\" $Id: tixInputOnly.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH tixInputOnly n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"----------------------------------------------------------------------
+.SH NAME
+tixInputOnly \- Create and manipulate TIX \fBInputOnly\fR widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixInputOnly \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-cursor \-width \-height
+.SE
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+\fBTixInputOnly\fR does not have any widget specific options.
+'\"
+.BE
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixInputOnly\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a \fBtixInputOnly\fR
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+\fBtixInputOnly\fR such as its cursor or width.
+.PP
+\fBTixInputOnly\fR widgets are not visible to the user. The only
+purpose of \fBTixInputOnly\fR widgets are to accept inputs from the
+user, which can be done with the \fBbind\fR command.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET COMMAND"
+.PP
+'\"
+The \fBtixInputOnly\fR command creates a new Tcl command whose name is
+the same as the path name of the \fBtixInputOnly\fR's window. This
+command may be used to invoke various operations on the widget. It
+has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+InputOnly widget's path name. \fIOption\fR and the \fIarg\fRs determine
+the exact behavior of the command. The following commands are
+possible for \fBtixInputOnly\fR widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixInputOnly\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If
+no \fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixInputOnly\fR command.
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+\fBtixInputOnly\fR widgets have no default bindings.
+'\"
+.SH BUGS
+\fBtixInputOnly\fR is currently implemented for the Unix version of Tix only.
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
Added: external/tix-8.4.2.x/man/tixLabelEntry.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixLabelEntry.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,183 @@
+'\"
+'\" $Id: tixLabelEntry.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixLabelEntry n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixLabelEntry \- Create and manipulate tixLabelEntry widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixLabelEntry \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixLabelEntry\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The LabelEntry widget supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-disableforeground disableForeground DisableForeground
+The foreground color to use for of the entry subwidget when the
+LabelEntry widget is disabled.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this LabelEntry widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the entry
+subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the whether the LabelEntry widget is normal or disabled. Only
+the values "normal" and "disabled" are recognized.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlabel\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The label subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBentry\fR
+Class: \fBEntry\fR
+.fi
+.IP
+The entry subwidget.
+'\"----------END
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixLabelEntry\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a LabelEntry
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+LabelEntry such as its cursor and relief.
+.PP
+The LabelEntry widget packages an entry widget and a label into one
+mega widget. It can be used be used to simplify the creation of
+"entry-form" type of interface. In this kind of interface, one must
+create many entry widgets with label widgets next to them and describe
+the use of each of the entry widgets.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixLabelEntry\fR command creates a new Tcl command whose
+name is the same as the path name of the LabelEntry's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+LabelEntry widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for LabelEntry widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixLabelEntry\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixLabelEntry\fR command.
+'\"
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixLabelFrame.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixLabelFrame.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,205 @@
+'\"
+'\" $Id: tixLabelFrame.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixLabelFrame n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixLabelFrame \- Create and manipulate tixLabelFrame widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixLabelFrame \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixLabelFrame\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The LabelFrame widget supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this LabelFrame widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the entry
+subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padX Pad
+Specifies the amount of the horizontal padding around the \fBframe\fR
+subwidget. Must be a valid non-negative integer number.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-pady padY Pad
+Specifies the amount of the vertical padding around the \fBframe\fR
+subwidget.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBframe\fR
+Class: \fBFrame\fR
+.fi
+.IP
+The frame subwidget.
+'\"----------END
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlabel\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The label subwidget.
+'\"----------END
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixLabelFrame\fR command creates a new window (given by
+the \fIpathName\fR 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 cursor and relief.
+'\"
+.SH CREATING WIDGETS INSIDE A LABELFRAME
+.PP
+'\"
+The LabelFrame widget packages a frame widget and a label into one
+mega widget. To create widgets inside a LabelFrame widget, one must
+create the new widgets relative to the \fBframe\fR subwidget and
+manage them inside the \fBframe\fR subwidget. An error will be
+generated if one tries to create widgets as immediate children of the
+LabelFrame. For example: the following is correct code, which creates
+new widgets inside the frame subwidget:
+.PP
+.CS
+tixLabelFrame .f
+set f [.f subwidget frame]
+button $f.b \-text hi
+pack $f.b
+.CE
+.PP
+The following example code is \fIincorrect\fR because it tries to
+create immediate children of the LabelFrame \fB\.f\fR:
+.PP
+.CS
+tixLabelFrame .f
+# wrong!
+button .f.b \-text hi
+pack .f.b
+.CE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixLabelFrame\fR command creates a new Tcl command whose
+name is the same as the path name of the LabelFrame's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+LabelFrame widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for LabelFrame widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixLabelFrame\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixLabelFrame\fR command.
+'\"
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+.PP
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixListNoteBook.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixListNoteBook.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,261 @@
+'\"
+'\" $Id: tixListNoteBook.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixListNoteBook n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixListNoteBook - Create and manipulate tixListNoteBook widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixListNoteBook \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The ListNoteBook widget supports all the standard options of a frame widget.
+See the options(n) manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-dynamicgeometry dynamicGeometry DynamicGeometry
+If set to false, the size of the ListNotebook will match the size of the
+largest page. If set to true, the size of the ListNotebook will match the
+size of the current page (therefore, the size may change when the user
+selects different pages). The default value is false. A setting of true
+is discouraged.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-ipadx ipadX Pad
+The amount of internal horizontal paddings around the sides of the
+page subwidgets.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-ipady ipadY Pad
+The amount of internal vertical paddings around the sides of the
+page subwidgets.
+'\"----------END
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+.LP
+.nf
+Name: \fBhlist\fR
+Class: \fBTixHList\fR
+.fi
+.IP
+The HList widget that displays the names of the pages.
+'\"
+'\"----------END
+'\"
+.LP
+In addition, all the page subwidgets created as a result of the
+\fBadd\fR command can be accessed by the \fBsubwidget\fR command. They
+are identified by the \fBpageName\fR parameter to the \fBadd\fR
+command.
+'\"
+'\"
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixListNoteBook\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a ListNoteBook widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+ListNoteBook widget such as its cursor and relief.
+
+The ListNoteBook widget is very similar to the TixNoteBook widget: it
+can be used to display many windows in a limited space using a
+"notebook" metaphore. The notebook is divided into a stack of pages
+(windows). At one time only one of these pages can be shown. The user
+can navigate through these pages by choosing the name of the desired
+page in the \fBhlist\fR subwidget.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixListNoteBook\fR command creates a new Tcl command whose name is
+the same as the path name of the ListNoteBook widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+ListNoteBook widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for ListNoteBook widgets:
+'\"
+'\"
+.TP
+\fIpathName \fBadd\fI pageName \fR?\fIoption value ...\fR?
+'\"
+Adds a new ListNotebook page subwidget into the ListNoteBook widget.
+\fIpageName\fR must be the name of an existing entry of the
+\fBhlist\fR subwidget. You must create the entry before calling the
+\fBadd\fR command. Please refer to the \fBtixHList(n)\fR manual entry
+for adding entries in an HList widget.
+Additional parameters may be supplied to configure this page
+subwidget. Possible options are:
+'\"
+.RS
+.TP
+\fB\-createcmd\fR
+Specifies a TCL command to be called the first time a page is shown on
+the screen. This option can be used to delay the creation of the
+contents of a page until necessary. Therefore, it can be used to speed
+up interface creation process especially when there are a large number
+of pages in a ListNoteBook widget.
+'\"
+.TP
+\fB\-raisecmd\fR
+Specifies a TCL command to be called whenever this page is raised by
+the user.
+'\"
+.RE
+'\"
+When successful, this command returns the pathname of the newly
+created page.
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR.\fIOption\fR may have any of the values accepted by the
+\fBtixListNoteBook\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixListNoteBook\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBdelete\fI pageName\fR?
+'\"
+Deletes the page identified by \fIpageName\fR.
+'\"
+.TP
+\fIpathName \fBpagecget\fR \fIpageName option\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR in the page given by \fIpageName\fR. \fIOption\fR may
+have any of the values accepted by the \fBadd\fR widget command.
+'\"
+'\"
+.TP
+\fIpathName \fBpageconfigure\fI pageName \fR?\fIoption\fR? ?\fIvalue ...\fR?
+'\"
+When no option is given, prints out the values of all options of this
+page. If \fIoption\fR is specified with no \fIvalue\fR, then the
+command returns the current value of that option. If one or more
+\fIoption\-value\fR pairs are specified, then the command modifies the
+given page's option(s) to have the given value(s); in this case the
+command returns an empty string. \fIOption\fR may be any of options
+accepted by the \fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBpages\fR
+'\"
+Returns a list of the names of all the pages.
+'\"
+.TP
+\fIpathName \fBraise \fIpageName\fR
+'\"
+Raise the page identified by \fIpageName\fR.
+'\"
+.TP
+\fIpathName \fBraised\fR
+'\"
+Returns the name of the currently raised page.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH EXAMPLE
+'\"
+.CS
+set n [tixListNoteBook .n]; pack $n
+$n subwidget hlist add page1 -text "Page 1"
+$n subwidget hlist add page2 -text "Page 2"
+
+set page1 [$n add page1]
+set page2 [$n add page2]
+
+button $page1.b -text "On page1"
+button $page2.b -text "On page2"
+
+pack $page1.b
+pack $page2.b
+
+$n raise page2
+.CE
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+When the user activates an entry in the \fBhlist\fR subwidget, the
+page associated with that entry will be raised to the front. This can
+be done by using the mouse or keyboard. The \fIhlist\fR subwidget
+operates with its \fB\-selectmode\fR option set to single. See the
+event bindings of the HList widget for more details.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), tixHList(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixMeter.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixMeter.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,130 @@
+'\"
+'\" $Id: tixMeter.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixMeter n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixMeter \- Create and manipulate Tix Meter widgets
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixMeter \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+None.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The Meter widget supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard
+options.
+'\"
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-fillcolor fillColor FillColor
+The color of the progress bar.
+'\"----------END
+'\"----------BEGIN
+.OP \-text text Text
+The text string to place inside the progress bar. If not specified,
+then the text string will be the percentage value specified by the
+\fB\-value\fR option.
+'\"----------END
+'\"----------BEGIN
+.OP \-value value Value
+A real value that specifies the progress. Must be between 0.0 to 1.0.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixMeter\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a Meter widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+Meter widget such as its cursor and relief.
+
+The Meter widget can be used to show the pregress of a background job
+which may take a long time to execute.
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixMeter\fR command creates a new Tcl command whose name is
+the same as the path name of the Meter widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+Meter widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for Meter widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixMeter\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixMeter\fR command.
+'\"
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+There is no bindings for the Meter widget.
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), Meter Widget
+
+
+
+
Added: external/tix-8.4.2.x/man/tixMwm.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixMwm.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,114 @@
+'\"
+'\" $Id: tixMwm.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixMwm n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+tixMwm - Communicate with the Motif(tm) window manager.
+'\"
+'\"
+'\"
+.SH SYNOPSIS
+\fBtixMwm\fI option pathName \fR?\fIargs\fR?
+.SH COMMAND OPTIONS
+.PP
+.TP
+\fBtixMwm decoration \fIpathName\fR ?\fIoption\fR? ?\fIvalue ...\fR?
+'\"
+When no options are given, this command returns the values of all the
+decorations options for the toplevel window with the \fIpathName\fR.
+
+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 command,
+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: \fB-border\fR, \fB-menu\fR, \fB-maximize\fR,
+\fB-minimize\fR, \fB-resizeh\fR and \fB-title\fR. The value must be a
+Boolean value. The values returned by this command are undefined when
+the window is not managed by mwm.
+'\"
+'\"
+.TP
+\fBtixMwm ismwmrunning \fIpathName\fR
+This returns true if mwm is running on the screen where the specified
+window is located, false otherwise.
+'\"
+'\"
+.TP
+\fBtixMwm protocol \fIpathName\fR
+'\"
+When no additional options are given, this command returns all
+protocols associated with this toplevel window.
+'\"
+.TP
+\fBtixMwm protocol \fIpathName \fBactivate\fI protocol_name\fR
+'\"
+Activate the mwm protocol message in mwm's menu.
+'\"
+.TP
+\fBtixMwm protocol \fIpathName \fBadd\fI protocol_name menu_message\fR
+'\"
+Add a new mwm protocol message for this toplevel window. The
+message is identified by the string name specified in
+\fIprotocol_name\fR. A menu item will be added into mwm's menu as
+specified by \fImenu_message\fR. Once a new mwm protocol message is
+added to a toplevel, it can be catched by the TK \fBwm protocol\fR
+command. Here is an example:
+.CS
+tixMwm protocol . add MY_PRINT_HELLO \\
+ {"Print Hello" _H Ctrl<Key>H}
+wm protocol . MY_PRINT_HELLO {puts Hello}
+.CE
+'\"
+.TP
+\fBtixMwm protocol \fIpathName \fBdeactivate\fI protocol_name\fR
+'\"
+Deactivate the mwm protocol message in mwm's menu.
+'\"
+.TP
+\fBtixMwm protocol \fIpathName \fBdelete\fI protocol_name\fR
+'\"
+Delete the mwm protocol message from mwm's menu. Please note that the
+window manager protocol handler associated with this protocol (by the
+\fBwm protocol\fR command) is not deleted automatically. You have to
+delete the protocol handle explicitly. E.g.:
+.CS
+tixMwm protocol . delete MY_PRINT_HELLO
+wm protocol . MY_PRINT_HELLO {}
+.CE
+'\"
+.PP
+.SH BUGS
+'\"
+On some versions of Mwm, the \fB-border\fR will not disappear unless
+\fB-resizeh\fR is turned off. Also, the -title will not disappear
+unless all of \fB-title\fR, \fB-menu\fR, \fB-maximize\fR and
+\fB-minimize\fR are turned off.
+'\"
+'\"
+'\"
+.PP
+.SH KEYWORDS
+Tix(n)
+
+
Added: external/tix-8.4.2.x/man/tixNBFrame.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixNBFrame.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,109 @@
+'\"
+'\" $Id: tixNBFrame.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixNBFrame n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixNBFrame \- Create and manipulate Tix NoteBook Frame widgets
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixNBFrame \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-background \-borderWidth \-cursor \-disabledForeground
+\-foreground \-font \-height \-highlightColor
+\-highlightThickness \-relief \-takeFocus
+\-width
+.SE
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-backpagecolor backPageColor BackPageColor
+Specifies the color for the extra space on the row of tabs which is
+not covered by any page tabs.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-focuscolor focusColor FocusColor
+Specifies the color for the focus highlight.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-inactivebackground inactiveBackground InactiveBackground
+Specifies the color for the inactive tabs (the active tab always have
+the same background color as the notebook).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-tabpadx tabPadX Pad
+The horizontal padding around the text labels on the page tabs.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-tabpady tabPadY Pad
+The vertical padding around the text labels on the page tabs.
+'\"----------END
+'\"
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+'\"
+The NBFrame widget is used privately inside the \fBTixNoteBook(n)\fR
+widget to display the page tabs. The application programmer should
+never create a NBFrame widget directly. The sole purpose of this maual
+page is to describe the options that can be used to configure the
+appearance of the TixNoteBook widget.
+.PP
+The name of the NBFrame subwidget inside the TixNoteBook widget is
+called \fBnbframe\fR. It can be accessed using the \fBsubwidget\fR
+command of the TixNoteBook widget or the \fB\-options\fR switch. See
+below for an example.
+.PP
+'\"----------------------------------------------------------------------
+.SH EXAMPLE
+'\"
+.CS
+set nb [tixNoteBook .nb -options {
+ nbframe.BackPageColor gray60
+}]
+$nb subwidget nbframe config -font fixed
+
+$nb add page1 -label "Page1"
+set page [$nb subwidget page1]
+button $page.b1
+pack $page.b1
+
+pack $nb -expand yes -fill both
+.CE
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), tixNoteBook(n)
+
+
Added: external/tix-8.4.2.x/man/tixNoteBook.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixNoteBook.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,317 @@
+'\"
+'\" $Id: tixNoteBook.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixNoteBook n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixNoteBook - Create and manipulate tixNoteBook widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixNoteBook \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The NoteBook widget supports all the standard options of a frame widget.
+See the options(n) manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-dynamicgeometry dynamicGeometry DynamicGeometry
+If set to false, the size of the Notebook will match the size of the
+largest page. If set to true, the size of the Notebook will match the
+size of the current page (therefore, the size may change when the user
+selects different pages). The default value is false. A setting of true
+is discouraged.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-ipadx ipadX Pad
+The amount of internal horizontal paddings around the sides of the
+page subwidgets.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-ipady ipadY Pad
+The amount of internal vertical paddings around the sides of the
+page subwidgets.
+'\"----------END
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBnbframe\fR
+Class: \fBtixNoteBookFrame\fR
+.fi
+.IP
+The "note book frame" widget that displays ths tabs of the notebook.
+Most of the display options of the page tabs are controlled by this
+subwidget. For example, if you need to choose a different font to
+display the tab names of the pages, the color of the inactive tabs or
+the color behind the tabs, you can configure the options of the
+\fBnbframe\fR subwidget. See the manual page of
+\fBtixNoteBookFrame(n)\fR for more details.
+'\"
+'\"----------END
+'\"
+.LP
+In addition, all the page subwidgets created as a result of the
+\fBadd\fR command can be accessed by the \fBsubwidget\fR command. They
+are identified by the \fBpageName\fR parameter to the \fBadd\fR
+command.
+'\"
+'\"
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixNoteBook\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a NoteBook widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+NoteBook widget such as its cursor and relief.
+
+The NoteBook widget can be used to display many windows in a
+limited space using a "notebook" metaphore. The notebook is divided
+into a stack of pages (windows). At one time only one of these pages
+can be shown. The user can navigate through these pages by choosing
+the visual "tabs" at the top of the NoteBook widget.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixNoteBook\fR command creates a new Tcl command whose name is
+the same as the path name of the NoteBook widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+NoteBook widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for NoteBook widgets:
+'\"
+'\"
+.TP
+\fIpathName \fBadd\fI pageName \fR?\fIoption value ...\fR?
+'\"
+Adds a new notebook page subwidget into the NoteBook widget.
+Additional parameters may be supplied to configure this page
+subwidget. Possible options are:
+'\"
+.RS
+.TP
+\fB\-anchor\fR
+'\"
+Specifies how the information in a tab (e.g. text or a bitmap) is to
+be displayed in the widget. Must be one of the values \fBn\fR,
+\fBne\fR, \fBe\fR, \fBse\fR, \fBs\fR, \fBsw\fR, \fBw\fR, \fBnw\fR, or
+\fBcenter\fR. For example, nw means display the information such that
+its top-left corner is at the top-left corner of the widget.
+'\"
+.TP
+\fB\-bitmap\fR
+'\"
+Specifies a bitmap to display on the tab of this page. The bitmap is
+displayed only if none of the \fB-label\fR or \fB-image\fR options are
+specified.
+'\"
+.TP
+\fB\-createcmd\fR
+'\"
+Specifies a TCL command to be called the first time a page is shown on
+the screen. This option can be used to delay the creation of the
+contents of a page until necessary. Therefore, it can be used to speed
+up interface creation process especially when there are a large number
+of pages in a NoteBook widget.
+'\"
+.TP
+\fB\-image\fR
+'\"
+Specifies an image to display on the tab of this page. The image is
+displayed only if the \fB-label\fR options is not specified.
+'\"
+.TP
+\fB\-justify\fR
+'\"
+When there are multiple lines of text displayed in a tab, this option
+determines how the lines line up with each other. Must be one of left,
+center, or right. \fBLeft\fR means that the lines' left edges all
+line up, \fBcenter\fR means that the lines' centers are aligned, and
+\fBright\fR means that the lines' right edges line up.
+'\"
+.TP
+\fB\-label\fR
+'\"
+Specifies a text label string to display on the tab of this page subwidget.
+'\"
+.TP
+\fB\-raisecmd\fR
+'\"
+Specifies a TCL command to be called whenever this page is raised by
+the user.
+'\"
+.TP
+\fB\-state\fR
+'\"
+Specifies whether this page can be raised by the user. Must be either
+\fBnormal\fR or \fBdisabled\fR.
+'\"
+.TP
+\fB\-underline\fR
+'\"
+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 the text displayed in the widget, 1 to the next
+character, and so on.
+'\"
+.TP
+\fB\-wraplength\fR
+'\"
+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,
+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.
+'\"
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR.\fIOption\fR may have any of the values accepted by the
+\fBtixNoteBook\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixNoteBook\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBdelete\fI pageName\fR?
+'\"
+Deletes the page identified by \fIpageName\fR.
+'\"
+.TP
+\fIpathName \fBpagecget\fR \fIpageName option\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR in the page given by \fIpageName\fR. \fIOption\fR may
+have any of the values accepted by the \fBadd\fR widget command.
+'\"
+'\"
+.TP
+\fIpathName \fBpageconfigure\fI pageName \fR?\fIoption\fR? ?\fIvalue ...\fR?
+'\"
+'\"
+When no option is given, prints out the values of all options of this
+page. If \fIoption\fR is specified with no \fIvalue\fR, then the
+command returns the current value of that option. If one or more
+\fIoption\-value\fR pairs are specified, then the command modifies the
+given page's option(s) to have the given value(s); in this case the
+command returns an empty string. \fIOption\fR may be any of options
+accepted by the \fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBpages\fR
+'\"
+Returns a list of the names of all the pages.
+'\"
+.TP
+\fIpathName \fBraise \fIpageName\fR
+'\"
+Raise the page identified by \fIpageName\fR.
+'\"
+.TP
+\fIpathName \fBraised\fR
+'\"
+Returns the name of the currently raised page.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+.IP [1]
+When the user pressed the left mouse button over a notebook tab, the
+notebook page associated with that tab will be raised to the top of
+the stack of pages.
+'\"
+.PP
+.IP [2]
+The pages can also be selected using the keyboard. The user can type
+the \fB<Tab>\fR key to cycle among the set of pages. When the focus
+appears on the desired page, the user can type \fB<Return>\fR or
+\fB<space>\fR to select that page. Or, if the user wants to cancel the
+selection, he/she can type the \fB<Escape>\fR key.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixOptionMenu.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixOptionMenu.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,263 @@
+'\"
+'\" $Id: tixOptionMenu.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixOptionMenu n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixOptionMenu \- Create and manipulate tixOptionMenu widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixOptionMenu \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixOptionMenu\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and
+subwidgets of its super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The OptionMenu widget supports all the standard Tix widget
+options. See the \fBTix-Options(n)\fR manual entry for details on the
+standard Tix widget options.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the \fB\-value\fR option of
+the OptionMenu is changed. The command will be called with one
+arguments -- the new value of the OptionMenu widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the OptionMenu widget
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dynamicgeometry dynamicGeometry DynamicGeometry
+A boolean value indicating whether the size of the \fBmenubutton\fR
+subwidget should change dynamically to match the width of the
+currently selected menu entry. If set to false (the default), the the
+size of the menubutton subwidget will be wide enough to display every
+menu entry fully and does not change when the user selects different
+entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this OptionMenu widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the entry
+subwidget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the whether the OptionMenu widget is normal or disabled. Only
+the values "normal" and "disabled" are recognized.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-value value Value
+Specifies the value of the OptionMenu. The value of the OptionMenu
+widget is the name of the item currently displayed by its
+\fBmenubutton\fR subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-variable variable Variable
+Specifies the global variable in which the value of the OptionMenu
+should be stored. The value of the OptionMenu will be automatically
+updated when this variable is changed.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmenu\fR
+Class: \fBMenu\fR
+.fi
+.IP
+The menu subwidget, which is popped up when the user press the
+\fBmenubutton\fR subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmenubutton\fR
+Class: \fBMenubutton\fR
+.fi
+.IP
+The menubutton subwidget.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixOptionMenu\fR command creates a new window (given by
+the \fIpathName\fR argument) and makes it into a OptionMenu
+widget. Additional options, described above, may be specified on the
+command line or in the option database to configure aspects of the
+OptionMenu such as its cursor and relief.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixOptionMenu\fR command creates a new Tcl command whose
+name is the same as the path name of the OptionMenu's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+OptionMenu widget's path name. \fIOption\fR and the
+\fIarg\fRs determine the exact behavior of the command. The following
+commands are possible for OptionMenu widgets:
+'\"
+'\"
+.TP
+\fIpathName \fBadd\fR \fItype name \fR?\fIoption value ...\fR?
+'\"
+Adds a new item into the OptionMenu widget. \fItype\fR must be either
+\fBcommand\fR or \fBseparator\fR. The \fIoptions\fR may be any of the
+valid options for the \fBcommand\fR or \fBseparator\fR menu entry
+types for the TK \fBmenu\fR widget class, except \fB\-command\fR.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixOptionMenu\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixOptionMenu\fR command.
+'\"
+.TP
+\fIpathName \fBdelete\fR \fIname\fR
+'\"
+Deletes the menu entry identified by \fIname\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBdisable\fR \fIname\fR
+'\"
+Disables the menu entry identified by \fIname\fR.
+'\"
+.TP
+\fIpathName \fBenable\fR \fIname\fR
+'\"
+Enables the menu entry identified by \fIname\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBentrycget\fR \fIname option\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR in the menu entry identified by \fIname\fR. \fIOption\fR
+may have any of the values accepted by the \fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBentryconfigure\fI name\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the menu entry identified
+by \fIname\fR. If no \fIoption\fR is specified, returns a list
+describing all of the available options for the menu entry (see
+\fBTk_ConfigureInfo\fR for information on the format of this list).
+If \fIoption\fR is specified with no \fIvalue\fR, 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
+\fIoption\fR is specified). If one or more \fIoption\-value\fR 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. \fIOption\fR may have any of the values accepted by the
+\fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBentries\fR
+'\"
+Returns the names of all the entries currently in the OptionMenu
+widget.
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixPanedWindow.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixPanedWindow.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,334 @@
+'\"
+'\" $Id: tixPanedWindow.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixPanedWindow n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixPanedWindow \- Create and manipulate tixPanedWindow widgets
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixPanedWindow \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The PanedWindow widget supports all the standard options of a frame
+widget. See the \fBoptions(n)\fR manual entry for details on the
+standard options.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+'\"
+Name: \fBcommand\fR
+Class: \fBCommand\fR
+Switch: \fB\-command\fR
+'\"
+.fi
+.IP
+'\"
+Specifies the command to invoke when the panes change their sizes.
+This command is called with a list of integers that record the new
+sizes of the panes. The sizes of the panes are listed in the order of
+the panes' creation.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-dynamicgeometry dynamicGeometry DynamicGeometry
+'\"
+If set to true, the size of the PanedWindow will dynamically change
+if the size of any of its panes changes. Otherwise, the size of the
+PanedWindow will only increase when size of any of its panes changes
+and will not decrease. The default value is true.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-handleactivebg handleActiveBg HandleActiveBg
+'\"
+Specifies the active background color of the resize handles. When the
+mouse cursor enters a resize handle, the resize handle will adopt
+the active background color.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-handlebg handleBg Background
+'\"
+Specifies the normal background color of the resize handles.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-height height Height
+Specifies the desired height for the window.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-orientation orientation Orientation
+Specifies the orientation of the panes. Must be either \fBvertical\fR
+or \fBhorizontal\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP "-paneborderwidth or -panebd" paneBorderWidth PaneBorderWidth
+Specifies the border width of the panes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-panerelief paneRelief PaneRelief
+Specifies the border relief of the panes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-separatoractivebg separatorActiveBg SeparatorActiveBg
+Specifies the active background color of the separators. When the user
+grabs a resize handle, the separators
+will adopt the active background color.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-separatorbg separatorBg Background
+'\"
+Specifies the normal background color of the separators.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-width width Width
+Specifies the desired width for the window.
+'\"----------END
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+.PP
+'\"
+All the pane subwidgets created as a result of the \fBadd\fR command
+can be accessed by the \fBsubwidget\fR command. They are identified by
+the \fBpaneName\fR parameter to the \fBadd\fR command.
+'\"
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+
+.PP
+'\"
+The \fBtixPanedWindow\fR command creates a new window (given by the
+\fIpathName\fR 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 widget such as its cursor and relief.
+'\"
+.PP
+'\"
+The PanedWindow widget allows the user to interactively manipulate the
+sizes of several panes. The panes can be arranged either vertically or
+horizontally. Each individual pane may have upper and lower limits of
+its size. The user changes the sizes of the panes by dragging the
+resize handle between two panes.
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET COMMAND"
+'\"
+.PP
+'\"
+The \fBtixPanedWindow\fR command creates a new Tcl command whose name is
+the same as the path name of the PanedWindow widget's window. This
+command may be used to invoke various operations on the widget. It
+has the following general form:
+'\"
+.RS
+.CS
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+frame widget's path name. \fIOption\fR and the \fIarg\fRs determine
+the exact behavior of the command. The following commands are
+possible for PanedWindow widgets:
+'\"
+.TP
+\fIpathName \fBadd\fI paneName \fR?\fIoption value ...\fR?
+'\"
+Adds a new pane subwidget with the name \fIpaneName\fR into the
+PanedWindow widget. Additional configuration options can be
+given to configure the new button subwidget. Three configuration
+options are supported:
+.RS
+'\"
+.TP
+\fB\-after\fR \fIpane\fR
+'\"
+Specifies that the new pane should be placed after \fIpane\fR in the
+list of panes in this PanedWindow widget.
+'\"
+.TP
+\fB\-at\fR \fIinteger\fR
+'\"
+Specifies the position of the new pane in the list of panes in this
+PanedWindow widget. \fB0\fR means the first position, \fB1\fR means
+the second, and so on. In addition, \fBend\fR means the end of the
+list.
+'\"
+.TP
+\fB\-before\fR \fIpane\fR
+'\"
+Specifies that the new pane should be placed before \fIpane\fR in the
+list of panes in this PanedWindow widget.
+'\"
+.TP
+\fB\-expand\fR \fIfactor\fR
+'\"
+Specifies the \fBexpand/shrink factor\fR of this pane. \fIFactor\fR
+must be a non-negative floating point number. The default value is
+0.0. The expand/shrink factor is used to calculate how much each pane
+should grow or shrink when the size of the PanedWindow main window is
+changed. When the main window expands/shrinks by \fIn\fR pixels, then
+pane \fIi\fR will grow/shrink by about \fIn * factor(i) /
+summation(factors)\fR, where \fIfactor(i)\fR is the expand/shrink
+factor of pane i and \fIsummation(factors)\fR is the summation of the
+expand/shrink factors of all the panes. If \fIsummation(factors)\fR is
+0.0, however, only the last visible pane will be grown or shrunk.
+'\"
+.TP
+\fB\-min\fR \fIinteger\fR
+'\"
+Specifies the minimum size, in pixels, of the new pane; the default is 0.
+'\"
+.TP
+\fB\-max\fR \fIinteger\fR
+Specifies the maximum size, in pixels, of the new pane; the default is 10000.
+'\"
+.TP
+\fB\-size\fR \fIinteger\fR
+Specifies the size, in pixels, of the new pane; if the \fB\-size\fR
+option is not given, or set to the empty string, the PanedWindow
+widget will use the natural size of the pane subwidget.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may be \fB\-min\fR, \fB\-max\fR and/or
+\fB\-size\fR, or any option accepted by the Tk frame widget.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may be any
+of the non-static options of the PanedWindow widget.
+'\"
+.TP
+\fIpathName \fBdelete\fR \fIpaneName\fR
+'\"
+Removes the pane given by \fIpaneName\fR and deletes its contents.
+'\"
+.TP
+\fIpathName \fBforget\fR \fIpaneName\fR
+'\"
+Removes the pane given by \fIpaneName\fR but does not delete its
+contents. This pane can be later added back to the PanedWindow widget
+by the \fBmanage\fR method.
+'\"
+.TP
+\fIpathName \fBmanage\fR \fIpaneName \fR?\fIoption value ...\fR?
+'\"
+Adds the pane given by \fIpaneName\fR back to the PanedWindow widget.
+\fIPaneName\fR must be already forgotten by the \fBforget\fR
+method. Additional \fIoption-value\fR pairs, same as those accepted by
+the \fBadd\fR method, can be given to control the appearance and
+position of the pane.
+'\"
+.TP
+\fIpathName \fBpanecget\fR \fIpaneName option\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR in the pane given by \fIpaneName\fR. \fIOption\fR may
+have any of the values accepted by the \fBadd\fR widget command.
+'\"
+.TP
+\fIpathName \fBpaneconfigure\fI paneName \fR?\fIoption\fR? ?\fIvalue ...\fR?
+'\"
+'\"
+When no option is given, prints out the values of all options of this
+pane. If \fIoption\fR is specified with no \fIvalue\fR, then the
+command returns the current value of that option. If one or more
+\fIoption\-value\fR pairs are specified, then the command modifies the
+given pane's option(s) to have the given value(s); in this case the
+command returns an empty string. \fIOption\fR may be \fB\-min\fR,
+\fB\-max\fR and/or \fB\-size\fR, or any option accepted by the Tk
+frame widget. The sizes of the panes may be changed as a result of
+calling the \fBpaneconfigure\fR command.
+'\"
+.TP
+\fIpathName \fBpanes\fR
+'\"
+Returns a list of the names of all panes.
+'\"
+.TP
+\fIpathName \fBsetsize\fR \fIpaneName newSize\fR ?\fIdirection\fR?
+'\"
+Sets the size of the pane specified by \fIpaneName\fR to
+\fInewSize\fR. The \fIdirection\fR parameter specifies in which
+direction the pane should grow/shrink. Possible values are \fBnext\fR:
+the pane will grow or shrink by moving the boundary between itself and
+the pane to its right or bottom; \fBprev\fR: the pane will grow or
+shrink by moving the boundary between itself and the pane to its left
+or top.
+'\"
+.TP
+\fIpathName \fBsubwidget \fIname ?args?\fR
+'\"
+When no options are given, returns the pathname of the subwidget of
+the specified name.
+.LP
+When options are given, the widget command of the specified subwidget will
+be called with these options.
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+'\"
+The panes' sizes will be changed when the user drags the handles. The
+change in the panes' sizes may be subjected to the \fB\-min\fR,
+\fB\-max\fR and \fB\-size\fR options of the panes.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+'\"
+TIX, Container Widget
+
+
+
+
Added: external/tix-8.4.2.x/man/tixPopupMenu.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixPopupMenu.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,222 @@
+'\"
+'\" $Id: tixPopupMenu.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixPopupMenu n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixPopupMenu \- Create and manipulate tixPopupMenu widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixPopupMenu \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBtixPopupMenu\fR class is derived from the \fBTixShell\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The PopupMenu widget supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"
+'\"----------BEGIN
+.OP \-buttons buttons Buttons
+A Tcl list that specifies the mouse button(s) and key modifier(s) that
+bring up the popup menu. Each element of this list is in turn a list
+that contains two elements: the first element is an integer that
+indicates the
+mouse button that brings up the popup menu; the second element
+specifies the key modifiers that should be used in conjunction with
+the mouse button. For example, the value \fB{{1 {Control Meta}} {3
+{Any}}}\fR specifies that the popup menu can be popped up by (a)
+pressing mouse button 1 with either the Control or the Meta key or (b)
+pressing mouse button 3 with any key modifier. The default value is
+\fB{{3 {Any}}}\fR: only mouse button 3 brings up the popup menu.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-postcmd postCmd PostCmd
+Specifies a command to be evaluated just before the menu is about to
+pop-up. This command is called with two default arguments: the root
+x-y coordinates where the user has pressed the mouse button. This
+command must return a boolean value: a false indicates that the menu
+shouldn't be popped up at this point; a true indicates that the menu
+should be popped up. This option can be used to find out where the
+user has pressed the mouse-button and optionally disable the popup
+menu over certain screen areas.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-spring spring Spring
+When set to \fBtrue\fR, the menu will be automatically popped down if
+the user releases the mouse button outside of the menu and no menu
+commands will be invoked. This makes it easy for the user to cancel
+the popup menu without pressing the Escape key. The default value is
+\fBtrue\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Must be either \fBdisabled\fR or \fBnormal\fR. The PopupMenu widget will not
+pop up unless its \fB\-state\fR is set to \fBnormal\fR.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-title title Title
+Specifies a text string to display inside the \fBmenubutton\fR
+subwidget, as the title of this PopupMenu.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmenu\fR
+Class: \fBMenu\fR
+.fi
+.IP
+The menu subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBmenubutton\fR
+Class: \fBMenubutton\fR
+.fi
+.IP
+The menubutton subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixPopupMenu\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a PopupMenu widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+PopupMenu widget such as its cursor and relief.
+
+The Tix PopupMenu widget can be used as a replacement of the
+\fBtk_popup\fR command. The advantage of the Tix PopupMenu widget is
+it requires less application code to manipulate. Also, it provides a
+title for the popup menu, which is not available from \fBtk_popup\fR.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixPopupMenu\fR command creates a new Tcl command whose name is
+the same as the path name of the PopupMenu widget's window. This
+command may be used to invoke various operations on the widget. It has
+the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+PopupMenu widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for PopupMenu widgets:
+.TP
+\fIpathName \fBbind \fIwidget \fR?\fIwidget ...\fR?
+'\"
+Binds this PopupMenu to one or more \fIwidgets\fR. The PopupMenu
+will be activated when the user presses the right mouse button over
+these \fIwidgets\fR.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixPopupMenu\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixPopupMenu\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBpost \fIwidget x y\fR
+'\"
+Posts the PopupMenu inside the \fIwidget\fR at the coordinate
+\fIx\fR,\fIy\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBunbind \fIwidget \fR?\fIwidget ...\fR?
+'\"
+Cancels the PopupMenu's binding with the \fIwidget(s)\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+'\".SH BINDINGS
+'\".PP
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixScrolledHList.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixScrolledHList.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,193 @@
+'\"
+'\" $Id: tixScrolledHList.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixScrolledHList n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixScrolledHList \- Create and manipulate Tix ScrolledHList widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixScrolledHList \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-anchor \-background \-cursor
+\-relief \-borderWidth
+.SE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP -height height Height
+Specifies the desired height for the window, in pixels.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-scrollbar scrollbar Scrollbar
+Specifies the display policy of the scrollbars. The following
+values are recognized:
+.RS
+'\"
+.TP
+\fBauto \fR?\fI+x\fR? ?\fI\-x\fR? ?\fI+y\fR? ?\fI\-y\fR?
+'\"
+When \fB\-scrollbar\fR is set to "\fBauto\fR", the scrollbars are
+shown only when needed. Additional modifiers can be used to force a
+scrollbar to be shown or hidden. For example, "\fBauto \-y\fR" means
+the horizontal scrollbar should be shown when needed but the vertical
+scrollbar should always be hidden; "\fBauto +x\fR" means the vertical
+scrollbar should be shown when needed but the horizontal scrollbar
+should always be shown, and so on.
+'\"
+.TP
+\fBboth\fR
+Both scrollbars are shown
+'\"
+.TP
+\fBnone\fR
+The scrollbars are never shown.
+'\"
+.TP
+\fBx\fR
+Only the horizontal scrollbar is shown;
+'\"
+.TP
+\fBy\fR
+Only the vertical scrollbar is shown.
+'\"
+.RE
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -width width Width
+Specifies the desired width for the window, in pixels.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhlist\fR
+Class: \fBHlist\fR
+.fi
+.IP
+The tixHList subwidget inside the ScrolledHList widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixScrolledHList\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a ScrolledHList widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+ScrolledHList widget such as its cursor and relief.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixScrolledHList\fR command creates a new Tcl command whose
+name is the same as the path name of the ScrolledHList widget's window. This
+command may be used to invoke various
+operations on the widget. It has the following general form:
+'\"
+.RS
+.CS
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the ScrolledHList widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for ScrolledHList widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixScrolledHList\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If
+no \fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixScrolledHList\fR command.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no additional arguments are given, returns the pathname of the
+subwidget of the specified name.
+
+When no additional arguments are given, the widget command of the
+specified subwidget will be called with these parameters.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
Added: external/tix-8.4.2.x/man/tixScrolledListBox.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixScrolledListBox.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,244 @@
+'\"
+'\" $Id: tixScrolledListBox.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixScrolledListBox n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixScrolledListBox \- Create and manipulate Tix ScrolledListBox widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixScrolledListBox \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-anchor \-background \-cursor
+\-relief \-borderWidth
+.SE
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"----------BEGIN
+.OP \-anchor anchor Anchor
+Specifies the alignment of the items inside the listbox subwidget.
+Only the values \fBw\fR and \fBe\fR are allowed. When set to \fBw\fR,
+the listbox is automatically aligned to the beginning of the items.
+When set to \fBe\fR, the listbox is automatically aligned to the end
+of the items. Automatically alignment only happens when the
+ScrolledListBox widget changes its size.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browsecmd BrowseCmd
+Specifies the command to be called when the user browses the elements
+inside the \fBlistbox\fR subwidget (see the BINDINGS section below).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the command to be called when the user invokes the \fBlistbox\fR
+subwidget (see the BINDINGS section below).
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-height height Height
+Specifies the desired height for the window, in pixels.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-scrollbar scrollbar Scrollbar
+Specifies the display policy of the scrollbars. The following
+values are recognized:
+.RS
+'\"
+.TP
+\fBauto \fR?\fI+x\fR? ?\fI\-x\fR? ?\fI+y\fR? ?\fI\-y\fR?
+'\"
+When \fB\-scrollbar\fR is set to "\fBauto\fR", the scrollbars are
+shown only when needed. Additional modifiers can be used to force a
+scrollbar to be shown or hidden. For example, "\fBauto \-y\fR" means
+the horizontal scrollbar should be shown when needed but the vertical
+scrollbar should always be hidden; "\fBauto +x\fR" means the vertical
+scrollbar should be shown when needed but the horizontal scrollbar
+should always be shown, and so on.
+'\"
+.TP
+\fBboth\fR
+Both scrollbars are shown
+'\"
+.TP
+\fBnone\fR
+The scrollbars are never shown.
+'\"
+.TP
+\fBx\fR
+Only the horizontal scrollbar is shown;
+'\"
+.TP
+\fBy\fR
+Only the vertical scrollbar is shown.
+'\"
+.RE
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -width width Width
+Specifies the desired width for the window, in pixels.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlistbox\fR
+Class: \fBListbox\fR
+.fi
+.IP
+The listbox subwidget inside the ScrolledListBox widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixScrolledListBox\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a ScrolledListBox widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+ScrolledListBox widget such as its cursor and relief.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixScrolledListBox\fR command creates a new Tcl command whose
+name is the same as the path name of the ScrolledListBox widget's
+window. This command may be used to invoke various operations on the
+widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+ScrolledListBox widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for ScrolledListBox widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixScrolledListBox\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If
+no \fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixScrolledListBox\fR command.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no additional arguments are given, returns the pathname of the
+subwidget of the specified name.
+
+When no additional arguments are given, the widget command of the
+specified subwidget will be called with these parameters.
+'\"
+'\"----------------------------------------------------------------------
+'\"
+.SH BINDINGS
+.PP
+.IP [1]
+'\"
+If the \fB\-browsecmd\fR option is set, the command which it referes
+to is called whenever a <ButtonPress\-1> or a <Motion\-1> event occurrs
+inside the \fBlistbox\fR subwidget.
+'\"
+.PP
+.IP [2]
+'\"
+The command specified by the \fB\-command\fR option is invoked when a
+<Double\-1> event occurrs inside the \fBlistbox\fR subwidget.
+'\"
+'\"----------------------------------------------------------------------
+'\"
+.SH BUGS
+'\"
+The capitalization of some of the commands names in Tix 3.x has been
+changed in Tix 4.0. All commands that ended with \fBbox\fR have been
+changed to a capitalized \fBBox\fR. Hence, the command
+\fBtixScrolledListbox\fR in Tix 3.x has been changed to
+\fBtixScrolledListBox\fR in Tix 4.0
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixScrolledText.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixScrolledText.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,197 @@
+'\"
+'\" $Id: tixScrolledText.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixScrolledText n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixScrolledText \- Create and manipulate Tix ScrolledText widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixScrolledText \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-anchor \-background \-cursor
+\-relief \-borderWidth
+.SE
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP -height height Height
+Specifies the desired height for the window, in pixels.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-scrollbar scrollbar Scrollbar
+Specifies the display policy of the scrollbars. The following
+values are recognized:
+.RS
+'\"
+.TP
+\fBauto \fR?\fI+x\fR? ?\fI\-x\fR? ?\fI+y\fR? ?\fI\-y\fR?
+'\"
+When \fB\-scrollbar\fR is set to "\fBauto\fR", the scrollbars are
+shown only when needed. Additional modifiers can be used to force a
+scrollbar to be shown or hidden. For example, "\fBauto \-y\fR" means
+the horizontal scrollbar should be shown when needed but the vertical
+scrollbar should always be hidden; "\fBauto +x\fR" means the vertical
+scrollbar should be shown when needed but the horizontal scrollbar
+should always be shown, and so on.
+'\"
+.TP
+\fBboth\fR
+Both scrollbars are shown
+'\"
+.TP
+\fBnone\fR
+The scrollbars are never shown.
+'\"
+.TP
+\fBx\fR
+Only the horizontal scrollbar is shown;
+'\"
+.TP
+\fBy\fR
+Only the vertical scrollbar is shown.
+'\"
+.RE
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -width width Width
+Specifies the desired width for the window, in pixels.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBtext\fR
+Class: \fBText\fR
+.fi
+.IP
+The Text subwidget inside the ScrolledText widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixScrolledText\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a ScrolledText widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+ScrolledText widget such as its cursor and relief.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixScrolledText\fR command creates a new Tcl command whose
+name is the same as the path name of the ScrolledText widget's window. This
+command may be used to invoke various
+operations on the widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the ScrolledText widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for ScrolledText widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixScrolledText\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If
+no \fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixScrolledText\fR command.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no additional arguments are given, returns the pathname of the
+subwidget of the specified name.
+
+When no additional arguments are given, the widget command of the
+specified subwidget will be called with these parameters.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixScrolledWindow.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixScrolledWindow.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,237 @@
+'\"
+'\" $Id: tixScrolledWindow.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixScrolledWindow n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixScrolledWindow \- Create and manipulate Tix ScrolledWindow widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixScrolledWindow \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-anchor \-background \-cursor
+\-relief \-borderWidth
+.SE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP -height height Height
+Specifies the desired height for the window, in pixels.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-scrollbar scrollbar Scrollbar
+Specifies the display policy of the scrollbars. The following
+values are recognized:
+.RS
+'\"
+.TP
+\fBauto \fR?\fI+x\fR? ?\fI\-x\fR? ?\fI+y\fR? ?\fI\-y\fR?
+'\"
+When \fB\-scrollbar\fR is set to "\fBauto\fR", the scrollbars are
+shown only when needed. Additional modifiers can be used to force a
+scrollbar to be shown or hidden. For example, "\fBauto \-y\fR" means
+the horizontal scrollbar should be shown when needed but the vertical
+scrollbar should always be hidden; "\fBauto +x\fR" means the vertical
+scrollbar should be shown when needed but the horizontal scrollbar
+should always be shown, and so on.
+'\"
+.TP
+\fBboth\fR
+Both scrollbars are shown
+'\"
+.TP
+\fBnone\fR
+The scrollbars are never shown.
+'\"
+.TP
+\fBx\fR
+Only the horizontal scrollbar is shown;
+'\"
+.TP
+\fBy\fR
+Only the vertical scrollbar is shown.
+'\"
+.RE
+'\"
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -width width Width
+Specifies the desired width for the window, in pixels.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -xscrollincrement xScrollIncrement ScrollIncrement
+Specifies by how much the window should be scrolled in the horizontal
+direction when the user presses the arrows in the horizontal
+scrollbar. In Pixels.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -yscrollincrement yScrollIncrement ScrollIncrement
+Specifies by how much the window should be scrolled in the vertical
+direction when the user presses the arrows in the horizontal
+scrollbar. In pixels.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBwindow\fR
+Class: \fBFrame\fR
+.fi
+.IP
+The frame subwidget which is scrolled by the ScrolledWindow widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixScrolledWindow\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a ScrolledWindow widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+ScrolledWindow widget such as its cursor and relief.
+'\"
+.SH CREATING WIDGETS INSIDE A SCROLLEDWINDOW WIDGET
+.PP
+'\"
+To create widgets inside a ScrolledWindow widget, one must create the
+new widgets relative to the \fBwindow\fR subwidget and manage them
+inside the \fBwindow\fR subwidget. An error will be generated if one
+tries to create widgets as immediate children of the ScrolledWindow.
+For example: the following is correct code, which creates new widgets
+inside the window subwidget:
+.PP
+.nf
+ tixScrolledWindow .w; pack .w
+ set f [.w subwidget window]
+ button $f.b \-text hi \-width 40 \-height 40
+ pack $f.b
+.fi
+.PP
+The following example code is \fIincorrect\fR because it tries to
+create immediate children of the ScrolledWindow \fB\.w\fR:
+.PP
+.nf
+ tixScrolledWindow .w; pack .w
+ button .w.b \-text hi \-width 40 \-height 40
+ pack .w.b
+.fi
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixScrolledWindow\fR command creates a new Tcl command whose
+name is the same as the path name of the ScrolledWindow widget's window. This
+command may be used to invoke various
+operations on the widget. It has the following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the ScrolledWindow widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for ScrolledWindow widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixScrolledWindow\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If
+no \fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixScrolledWindow\fR command.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no additional arguments are given, returns the pathname of the
+subwidget of the specified name.
+
+When no additional arguments are given, the widget command of the
+specified subwidget will be called with these parameters.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixSelect.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixSelect.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,321 @@
+'\"
+'\" $Id: tixSelect.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixSelect n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixSelect \- Create and manipulate tixSelect widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixSelect \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixSelect\fR class is derived from the \fBTixLabelWidget\fR
+class and inherits all the commands, options and
+subwidgets of its super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+The Select widget supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-allowzero allowZero AllowZero
+A boolean value that specifies whether the selection can be empty.
+When set to false, at least one button subwidget must be selected at
+any time.
+
+\fBNote\fR: When the Select widget is first constructed, the default
+selection is always empty, even if \fB\-allowzero\fR is set to
+\fBfalse\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-buttontype buttonType ButtonType
+The type of buttons to be used as subwidgets inside the Select widget.
+By default, the standard Tk \fBbutton\fR widget class is used.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the TCL command to be executed when the \fB\-value\fR of the
+Select widget is changed. This command will be invoked with
+two arguments. The first is the name of the button subwidget that has
+toggled. The second is a boolean value indicating whether the button
+subwidget is selected. This command is executed only when the
+\fB\-disableCallback\fR option is set to false.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-disablecallback disableCallback DisableCallback
+A boolean value indicating whether callbacks should be disabled. When
+set to true, the TCL command specified by the \fB\-command\fR option
+is not executed when the \fB\-value\fR of the Select widget
+changes.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBorientation\fR
+Class: \fBOrientation\fR
+Switch: \fB\-orientation\fR
+Alias: \fB\-orient\fR
+.fi
+.IP
+Specifies the orientation of the button subwidgets. Only the values
+\fBhorizontal\fR and \fBvertical\fR are recognized. This is a
+\fIstatic option\fR and it can only be assigned during the creation of
+the widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-label label Label
+Specifies the string to display as the label of this Select widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-labelside labelSide LabelSide
+Specifies where the label should be displayed relative to the Select
+widget. Valid options are: \fBtop\fR, \fBleft\fR, \fBright\fR,
+\fBbottom\fR, \fBnone\fR or \fBacrosstop\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padX Pad
+Specifies the horizontal padding between two neighboring button
+subwidgets. This is a \fIstatic option\fR and it can only be assigned
+during the creation of the widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padY Pad
+Specifies the vertical padding between two neighboring button
+subwidgets. This is a \fIstatic option\fR and it can only be assigned
+during the creation of the widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-radio radio Radio
+A boolean value that specifies whether the Select widget
+should act as a radio-box. When set to true, at most one button
+subwidget can be selected at any time. This is a \fIstatic option\fR
+and it can only be assigned during the creation of the widget.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-selectedbg selectedBg SelectedBg
+Specifies the background color of all the selected button subwidgets.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the state of all the buttons inside the Select widget. Only
+the values \fBnormal\fR and \fBdisabled\fR are recognized. When the
+state is set to \fBdisabled\fR, all user actions on this Select widget
+are ignore.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-validatecmd validateCmd ValidateCmd
+Specifies a TCL command to be called when the -value of the
+Select widget is about to change. This command is called with
+one parameter -- the new \fB\-value\fR entered by the user. This
+command is to validate this new value by returning a value it deems
+valid.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-value value Value
+The value of a Select widget is a list of the names of the
+button subwidgets that have been selected by the user.
+
+When you assign the value of a Select widget using the "config -value"
+widget command, the TCL command specified by the \fB\-command\fR
+option will be invoked if some button subwidgets are toggled.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-variable variable Variable
+Specifies the global variable in which the value of the Select widget
+should be stored. The value of a Select widget is stored as a list of
+the names of the button subwidgets that have been selected by the
+user. The value of the Select widget will be automatically updated
+when this variable is changed.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+.PP
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBlabel\fR
+Class: \fBLabel\fR
+.fi
+.IP
+The label subwidget.
+'\"----------END
+.PP
+In addition, all the button subwidgets created as a result of the
+\fBadd\fR widget command can be accessed by the \fBsubwidget\fR
+command. They are identified by the \fIbuttonName\fR parameter to the
+\fBadd\fR widget command. Here is an example:
+.PP
+.CS
+set s [tixSelect .s]
+pack $s
+$s add eat -text Eat
+$s add sleep -text Sleep
+$s subwidget eat config -fg green
+$s subwidget sleep config -fg red
+.CE
+'\"
+'\"
+.BE
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixSelect\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a Select widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the
+Select widget such as its cursor and relief.
+
+The Select widget is a container of button subwidgets. It can
+be used to provide radio-box or check-box style of selection options
+for the user.
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixSelect\fR command creates a new Tcl command whose name is
+the same as the path name of the Select widget's window. This
+command may be used to invoke various operations on the widget. It
+has the following general form:
+'\"
+.RS
+.CS
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+Select widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for Select widgets:
+'\"
+.TP
+\fIpathName \fBadd\fI buttonName \fR?\fIoption value ... \fR?
+'\"
+Adds a new button subwidget with the name \fIbuttonName\fR into the
+Select widget. Additional configuration options can be given
+to configure the new button subwidget.
+'\"
+.TP
+\fIpathName \fBcget \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixSelect\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixSelect\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBinvoke\fI buttonName\fR
+'\"
+Invokes the button subwidget with the name \fIbuttonName\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBsubwidget\fI name ?args?\fR
+'\"
+When no options are given, returns the pathname of the subwidget of
+the specified name.
+
+When options are given, the widget command of the specified subwidget will
+be called with these options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+'\"
+When the user presses the left mouse button over the a button
+subwidget, it will be toggled and the \fB\-value\fR option of the
+tixSelect widget will be changed.
+'\"
+'\"----------------------------------------------------------------------
+.SH EXAMPLE
+.PP
+'\"
+The following example creates a radio-box style iconbar for the user
+to choose one value among \fBeat\fR, \fBwork\fR or \fBsleep\fR.
+.PP
+.CS
+set s [tixSelect .s \-radio true \-allowzero false]
+$s add eat \-bitmap [tix getbitmap eat]
+$s add work \-bitmap [tix getbitmap work]
+$s add sleep \-bitmap [tix getbitmap sleep]
+.CE
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), Container Widget
+
+
+
Added: external/tix-8.4.2.x/man/tixStdButtonBox.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixStdButtonBox.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,210 @@
+'\"
+'\" $Id: tixStdButtonBox.n,v 1.1 2001/01/22 07:59:14 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixStdButtonBox n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixStdButtonBox \- Create and manipulate Tix StdButtonBox widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixStdButtonBox \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+\-anchor \-background \-cursor
+\-relief \-borderWidth
+.SE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"
+'\"----------BEGIN
+.OP -orientation orientation Orientation
+\fBStatic Option\fR. Specifies the orientation of the button
+subwidgets. Only the values "horizontal" and "vertical" are recognized.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padx Pad
+Specifies the horizontal padding between two neighboring button
+subwidgets in the StdButtonBox widget.
+'\"----------END
+
+'\"----------BEGIN
+.OP \-padx padx Pad
+Specifies the vertical padding between two neighboring button
+subwidgets in the StdButtonBox widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies the state of all the buttons inside the StdButtonBox widget.
+
+\fINote\fR:
+Setting this option using the \fIconfig\fR widget command will enable
+or disable all the buttons subwidgets. Original states of the
+individual buttons are \fInot\fR saved.
+'\"----------END
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+.PP
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBok\fR
+Class: \fBButton\fR
+.fi
+.IP
+The first button subwidget. By default it displays the text string "Ok"
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBapply\fR
+Class: \fBButton\fR
+.fi
+.IP
+The second button subwidget. By default it displays the text string "Apply"
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBcancel\fR
+Class: \fBButton\fR
+.fi
+.IP
+The third button subwidget. By default it displays the text string "Cancel"
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhelp\fR
+Class: \fBButton\fR
+.fi
+.IP
+The fourth button subwidget. By default it displays the text string "Help"
+'\"----------END
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixStdButtonBox\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a StdButtonBox widget.
+Additional options, described above, may be specified on the command
+line or in the option database to configure aspects of the StdButtonBox
+such as its cursor and relief.
+'\"
+.PP
+The StdButtonBox widget is a group of Standard buttons for Motif-like
+dialog boxes.
+
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET COMMAND"
+.PP
+'\"
+The \fBtixStdButtonBox\fR command creates a new Tcl command whose name is
+the same as the path name of the StdButtonBox's window. This command may
+be used to invoke various operations on the widget. It has the
+following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the StdButtonBox widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for StdButtonBox widgets:
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixStdButtonBox\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixStdButtonBox\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBinvoke \fIbuttonName\fR
+'\"
+Invoke the button subwidget with the name \fIbuttonName\fR.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no additional arguments are given, returns the pathname of the
+subwidget of the specified name.
+.PP
+When no additional arguments are given, the widget command of the
+specified subwidget will be called with these parameters.
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+TixStdButtonBox widgets have no default bindings. The button subwidgets
+retain their default Tk bindings.
+'\"
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), Container Widgets
+
+
+
Added: external/tix-8.4.2.x/man/tixTList.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixTList.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,583 @@
+'\"
+'\" $Id: tixTList.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixTList n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixTList \- Create and manipulate Tix Tabular List widgets
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixTList \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SO
+'\"
+\-background \-borderWidth \-cursor \-foreground
+\-font \-height \-highlightColor \-highlightThickness
+\-relief \-selectBackground \-selectForeground
+\-xScrollCommand \-yScrollCommand \-width
+.SE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browsecmd BrowseCmd
+Specifies a TCL command to be executed when the user browses through the
+entries in the TList widget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies the TCL command 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.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP -foreground foreground Foreground
+Specifies the default foreground color for the list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-height height Height
+Specifies the desired height for the window in number of characters.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-itemtype itemType ItemType
+Specifies the default type of display item for this TList widget. When
+you call the \fBinsert\fR widget commands, display items of this
+type will be created if the \fB\-itemtype\fR option is not specified .
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-orient orient Orient
+Specifies the order of tabularizing the list entries. When set to
+"\fBvertical\fR", 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
+"\fBhorizontal\fR", 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.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padX Pad
+The default horizontal padding for list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-padx padY Pad
+The default vertical padding for list entries.
+'\"----------END
+'\"----------BEGIN
+.OP \-selectbackground selectBackground SelectBackground
+Specifies the background color for the selected list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectborderwidth selectBorderWidth BorderWidth
+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 \fBTk_GetPixels\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectforeground selectForeground SelectForeground
+Specifies the foreground color for the selected list entries.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-selectmode selectMode 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 \fBsingle\fR, \fBbrowse\fR, \fBmultiple\fR, or
+\fBextended\fR; the default value is \fBsingle\fR.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-sizecmd sizeCmd SizeCmd
+Specifies a TCL script to be called whenever the TList widget
+changes its size. This command can be useful to implement "user scroll
+bars when needed" features.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-state state State
+Specifies whether the TList command should react to user actions. When
+set to "\fBnormal\fR", the TList reacts to user actions in the normal
+way. When set to "\fBdisabled\fR", the TList can only be scrolled, but
+its entries cannot be selected or activated.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-width width Width
+Specifies the desired width for the window in characters.
+'\"----------END
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixTList\fR command creates a new window (given by the
+\fIpathName\fR 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.
+'\"
+.PP
+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.
+'\"
+.PP
+Each list entry is identified by an \fBindex\fR, which can be in the
+following forms:
+.RS
+.TP
+\fInumber\fR
+'\"
+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.
+'\"
+.TP
+\fBend\fR
+'\"
+Indicates the end of the listbox. For some commands this means just
+after the last entry; for other commands it means the last entry.
+'\"
+.TP
+\fB@\fR\fIx\fR,\fIy\fR
+'\"
+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.
+'\"
+.RE
+'\"
+.SH "DISPLAY ITEMS"
+.PP
+Each list entry in an TList widget is associated with a \fBdisplay
+item\fR. The display item determines what visual information should
+be displayed for this list entry. Please see the \fBtixDisplayStyle\fR manual
+page for a list of all display items.
+'\"
+.PP
+When a list entry is created by the \fBinsert\fR command, the type of
+its display item is determined by the \fB\-itemtype\fR option passed
+to these commands. If the \fB\-itemtype\fR is omitted, then by default
+the type specified by this TList widget's \fB\-itemtype\fR option is
+used.
+'\"----------------------------------------------------------------------
+.SH "WIDGET COMMAND"
+.PP
+'\"
+The \fBtixTList\fR command creates a new Tcl command whose name is the
+same as the path name of the TList widget's window. This command
+may be used to invoke various operations on the widget. It has the
+following general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as
+the TList widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following
+commands are possible for TList widgets:
+'\"
+.TP
+\fIpathName \fBanchor set \fIindex\fR
+'\"
+Sets the anchor to the list entry identified by \fIindex\fR. The
+anchor is the end of the selection that is fixed while dragging out a
+selection with the mouse.
+'\"
+.TP
+\fIpathName \fBanchor clear\fR
+'\"
+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.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixTList\fR command.
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixTList\fR command.
+'\"
+.TP
+\fIpathName \fBdelete\fR \fIfrom\fR ?\fIto\fR?
+Deletes one or more list entries between the two entries specified by
+the indices \fIfrom\fR and \fIto\fR. If \fIto\fR is not specified, deletes
+the single entry specified by \fIfrom\fR.
+'\"
+.TP
+\fIpathName \fBdragsite set \fIindex\fR
+'\"
+Sets the dragsite to the list entry identified by
+\fIindex\fR. 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.
+'\"
+.TP
+\fIpathName \fBdragsite clear\fR
+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.
+'\"
+'\"
+.TP
+\fIpathName \fBdropsite set \fIindex\fR
+'\"
+Sets the dropsite to the list entry identified by \fIindex\fR. The
+dropsite is used to indicate the target of a grag-and-drop
+action. Currently drag-and-drop functionality has not been implemented
+in Tix yet.
+'\"
+.TP
+\fIpathName \fBdropsite clear\fR
+'\"
+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.
+'\"
+.TP
+\fIpathName \fBentrycget\fR \fIindex option\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR for the entry indentfied by \fIindex\fR. \fIOption\fR may
+have any of the values accepted by the \fBinsert\fR widget command.
+'\"
+.TP
+\fIpathName \fBentryconfigure\fI index \fR?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the list entry indentfied
+by \fIindex\fR. If no \fIoption\fR is specified, returns a list
+describing all of the available options for \fIindex\fR (see
+\fBTk_ConfigureInfo\fR for information on the format of this list). If
+\fIoption\fR is specified with no \fIvalue\fR, 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
+\fIoption\fR is specified). If one or more \fIoption\-value\fR 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.
+\fIOption\fR may have any of the values accepted by the \fBinsert\fR
+widget command. The exact set of options depends on the
+value of the \fB\-itemtype\fR option passed to the the \fBinsert\fR
+widget command when this list entry is created.
+'\"
+.TP
+\fIpathName \fBinsert\fI index \fR?\fIoption value ...\fR?
+'\"
+Creates a new list entry at the position indicated by \fIindex\fR. The
+following configuration options can be given to configure the list
+entry:
+'\"
+.RS
+'\"
+.TP
+\fB\-itemtype\fI type\fR
+'\"
+Specifies the type of display item to be display for the new list
+entry. \fItype\fR must be a valid display item type. Currently the
+available display item types are \fBimage\fR, \fBimagetext\fR,
+\fBtext\fR, and \fBwindow\fR. If this option is not specified, then by
+default the type specified by this TList widget's \fB\-itemtype\fR
+option is used.
+'\"
+.TP
+\fB\-state\fR
+'\"
+Specifies whether this entry can be selected or invoked by the user.
+Must be either \fBnormal\fR or \fBdisabled\fR.
+'\"
+.RE
+'\"
+The \fBinsert\fR widget command 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 \fB\-itemtype\fR option. Please see the
+\fBtixDisplayStyle\fR manual page for a list of the configuration options for
+each of the display item types.
+'\"
+.TP
+\fIpathName \fBinfo \fIoption\fR \fIarg ...\fR
+'\"
+Query information about the TList widget. \fIoption\fR can be one
+of the following:
+.RS
+.TP
+\fIpathName \fBinfo anchor\fR \fIindex\fR
+;
+Returns the index of the current anchor, if any, of the TList
+widget. If the anchor is not set, returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo dragsite\fR \fIindex\fR
+Returns the index of the current dragsite, if any, of the TList
+widget. If the dragsite is not set, returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo dropsite\fR \fIindex\fR
+Returns the index of the current dropsite, if any, of the TList
+widget. If the dropsite is not set, returns the empty string.
+'\"
+.TP
+\fIpathName \fBinfo selection\fR
+'\"
+Returns a list of selected elements in the TList widget. If no entries
+are selectd, returns an empty string.
+.RE
+'\"
+.TP
+\fIpathName \fBnearest \fIx y\fR
+'\"
+Given an (x,y) coordinate within the TList window, this command
+returns the index of the TList element nearest to that coordinate.
+'\"
+'\"
+.TP
+\fIpathName \fBsee \fIindex\fR
+'\"
+Adjust the view in the TList so that the entry given by \fIindex\fR is
+visible. If the entry is already visible then the command has no
+effect; if the entry is near one edge of the window then the TList
+scrolls to bring the element into view at the edge; otherwise the
+TList widget scrolls to center the entry.
+'\"
+.TP
+\fIpathName \fBselection \fIoption\fR \fIarg ...\fR
+'\"
+This command is used to adjust the selection within a TList widget. It
+has several forms, depending on \fIoption\fR:
+.RS
+'\"
+.TP
+\fIpathName \fBselection clear \fR?\fIfrom\fR? ?\fIto\fR?
+'\"
+When no extra arguments are given, deselects all of the list entrie(s)
+in this TList widget. When only \fIfrom\fR is given, only the list
+entry identified by \fIfrom\fR is deselected. When both \fIfrom\fR and
+\fIto\fR are given, deselects all of the list entrie(s) between
+between \fIfrom\fR and \fIto\fR, inclusive, without affecting the
+selection state of entries outside that range.
+'\"
+.TP
+\fIpathName \fBselection includes \fIindex\fR
+'\"
+Returns 1 if the list entry indicated by \fIindex\fR is currently
+selected; returns 0 otherwise.
+'\"
+.TP
+\fIpathName \fBselection set \fIfrom\fR ?\fIto\fR?
+'\"
+Selects all of the list entrie(s) between between \fIfrom\fR and
+\fIto\fR, inclusive, without affecting the selection state of entries
+outside that range. When only \fIfrom\fR is given, only the list entry
+identified by \fIfrom\fR is selected.
+.RE
+'\"
+.TP
+\fIpathName \fBxview \fIargs\fR
+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:
+.RS
+.TP
+\fIpathName \fBxview\fR
+'\"
+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 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 \fB\-xscrollcommand\fR option.
+.TP
+\fIpathName \fBxview\fR \fIindex\fR
+'\"
+Adjusts the view in the window so that the list entry identified by
+\fIindex\fR is aligned to the left edge of the window.
+.TP
+\fIpathName \fBxview moveto\fI fraction\fR
+'\"
+Adjusts the view in the window so that \fIfraction\fR of the total
+width of the TList is off-screen to the left. \fIfraction\fR must be
+a fraction between 0 and 1.
+'\"
+.TP
+\fIpathName \fBxview scroll \fInumber what\fR
+'\"
+This command shifts the view in the window left or right according to
+\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer.
+\fIWhat\fR must be either \fBunits\fR or \fBpages\fR or an
+abbreviation of one of these. If \fIwhat\fR is \fBunits\fR, the view
+adjusts left or right by \fInumber\fR character units (the width of
+the \fB0\fR character) on the display; if it is \fBpages\fR then the
+view adjusts by \fInumber\fR screenfuls. If \fInumber\fR is negative
+then characters farther to the left become visible; if it is positive
+then characters farther to the right become visible.
+'\"
+.RE
+'\"
+.TP
+\fIpathName \fByview \fI?args\fR?
+'\"
+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:
+'\"
+.RS
+.TP
+\fIpathName \fByview\fR
+'\"
+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 \fB\-yscrollcommand\fR
+option.
+'\"
+.TP
+\fIpathName \fByview\fR \fIindex\fR
+'\"
+Adjusts the view in the window so that the list entry given by
+\fIindex\fR is displayed at the top of the window.
+'\"
+.TP
+\fIpathName \fByview moveto\fI fraction\fR
+'\"
+Adjusts the view in the window so that the list entry given by
+\fIfraction\fR appears at the top of the window. \fIFraction\fR 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.
+.TP
+\fIpathName \fByview scroll \fInumber what\fR
+'\"
+This command adjust the view in the window up or down according to
+\fInumber\fR and \fIwhat\fR. \fINumber\fR must be an integer.
+\fIWhat\fR must be either \fBunits\fR or \fBpages\fR. If \fIwhat\fR
+is \fBunits\fR, the view adjusts up or down by \fInumber\fR lines; if
+it is \fBpages\fR then the view adjusts by \fInumber\fR screenfuls.
+If \fInumber\fR is negative then earlier entries become visible; if
+it is positive then later entries become visible.
+.RE
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+.IP [1]
+If the \fB\-selectmode\fR is "browse", when the user drags the mouse
+pointer over the list entries, the entry under the pointer will be
+highlighted and the \fB\-browsecmd\fR procedure will be called with
+one parameter, the index of the highlighted entry. Only one entry
+can be highlighted at a time. The \fB\-command\fR procedure will be
+called when the user double-clicks on a list entry.
+'\"
+.IP [2]
+If the \fB\-selectmode\fR is "single", the entries will only be
+highlighted by mouse <ButtonRelease-1> events. When a new list entry
+is highlighted, the \fB\-browsecmd\fR procedure will be called with
+one parameter indicating the highlighted list entry. The
+\fB\-command\fR procedure will be called when the user double-clicks
+on a list entry.
+'\"
+'\"
+.IP [3]
+If the \fB\-selectmode\fR 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
+\fB\-browsecmd\fR procedure will be called with an undefined
+parameter. It is the responsibility of the \fB\-browsecmd\fR procedure
+to find out the exact highlighted selection in the TList. The
+\fB\-command\fR procedure will be called when the user double-clicks
+on a list entry.
+'\"
+.IP [4]
+'\"
+If the \fB\-selectmode\fR 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
+<Control-ButtonPress-1>. When the highlighted area is changed, the
+\fB\-browsecmd\fR procedure will be called with an undefined
+parameter. It is the responsibility of the \fB\-browsecmd\fR procedure
+to find out the exact highlighted selection in the TList. The
+\fB\-command\fR procedure will be called when the user double-clicks
+on a list entry.
+'\"
+'\"----------------------------------------------------------------------
+.SH EXAMPLE
+.PP
+This example demonstrates how to use an TList to store a list of
+numbers:
+.PP
+.CS
+set image [tix getimage folder]
+set t [tixTList .t -orient vertical]
+$t insert end -itemtype imagetext -image $image -text one
+$t insert end -itemtype imagetext -image $image -text two
+$t insert end -itemtype imagetext -image $image -text three
+$t insert end -itemtype imagetext -image $image -text four
+$t insert end -itemtype imagetext -image $image -text five
+$t insert end -itemtype imagetext -image $image -text six
+pack $t -expand yes -fill both
+.CE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n), Tabular Listbox, Display Items
+
+
+
Added: external/tix-8.4.2.x/man/tixTree.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixTree.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,282 @@
+'\"
+'\" $Id: tixTree.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH tixTree n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH NAME
+tixTree \- Create and manipulate tixTree widgets
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SYNOPSIS
+\fBtixTree \fIpathName \fR?\fIoptions\fR?
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUPER-CLASS
+The \fBTixTree\fR class is derived from the \fBTixScrolledHList\fR
+class and inherits all the commands, options and subwidgets of its
+super-class.
+'\"
+'\"----------------------------------------------------------------------
+.SH "STANDARD OPTIONS"
+'\"
+\fBTixTree\fR supports all the standard options of a frame widget.
+See the \fBoptions(n)\fR manual entry for details on the standard options.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH "WIDGET-SPECIFIC OPTIONS"
+'\"
+'\"----------BEGIN
+.OP \-browsecmd browseCmd BrowseCmd
+Specifies a command to call whenever the user browses on an entry
+(usually by single-clicking on the entry). The command is called with
+one argument, the pathname of the entry.
+'\"----------END
+'\"
+'\"
+'\"----------BEGIN
+.OP \-closecmd closeCmd CloseCmd
+Specifies a command to call whenever an entry needs to be closed (See
+the BINDINGS section below). This command is called with one argument,
+the pathname of the entry. This command should perform appropriate
+actions to close the specified entry. If the \fB\-closecmd\fR option
+is not specified, the default closing action is to hide all child
+entries of the specified entry.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-command command Command
+Specifies a command to call whenever the user activates an entry
+(usually by double-clicking on the entry). The command
+is called with one argument, the pathname of the entry.
+'\"----------END
+'\"
+'\"----------BEGIN
+.OP \-ignoreinvoke ignoreInvoke 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 <Return>), the branch will be opened
+or closed only if \fB\-ignoreinvoke\fR is set to false (the default
+setting).
+'\"----------END
+'\"
+
+'\"----------BEGIN
+.OP \-opencmd openCmd OpenCmd
+Specifies a command to call whenever an entry needs to be opened (See
+the BINDINGS section below). This command is called with one argument,
+the pathname of the entry. This command should perform appropriate
+actions to open the specified entry. If the \fB\-opencmd\fR option
+is not specified, the default opening action is to show all the child
+entries of the specified entry.
+'\"----------END
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH SUBWIDGETS
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhlist\fR
+Class: \fBTixHList\fR
+.fi
+.IP
+The hierarchical listbox that displays the tree.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBhsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The horizontal scrollbar subwidget.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBvsb\fR
+Class: \fBScrollbar\fR
+.fi
+.IP
+The vertical scrollbar subwidget.
+'\"----------END
+'\"
+.BE
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH DESCRIPTION
+'\"
+.PP
+'\"
+The \fBtixTree\fR command creates a new window (given by the
+\fIpathName\fR argument) and makes it into a Tree widget. 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.
+.PP
+The Tree widget can be used to display hierachical data in a tree
+form. The user can adjust the view of the tree by opening or closing
+parts of the tree.
+.PP
+To display a static tree structure, you can add the entries into the
+\fBhlist\fR subwidget and hide any entries as desired. Then you can
+call the \fBautosetmode\fR method. This will set up the Tree widget so
+that it handles all the \fIopen\fR and \fIclose\fR events
+automatically.
+'\"(TODO add an example).
+.PP
+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 \fBhlist\fR subwidget. Then, use the
+setmode method to indicate the entries that can be opened or closed,
+and use the \fB\-opencmd\fR and \fB \-closecmd\fR options to handle
+the opening and closing events.
+'\"(TODO add an example).
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH WIDGET COMMANDS
+.PP
+'\"
+The \fBtixTree\fR command creates a new Tcl command whose name is the
+same as the path name of the Tree's window. This command may be used
+to invoke various operations on the widget. It has the following
+general form:
+'\"
+.RS
+.CS
+'\"
+\fIpathName option \fR?\fIarg arg ...\fR?
+.CE
+.RE
+'\"
+\fIPathName\fR is the name of the command, which is the same as the
+Tree widget's path name. \fIOption\fR and the \fIarg\fRs
+determine the exact behavior of the command. The following commands
+are possible for Tree widgets:
+'\"
+.TP
+\fIpathName \fBautosetmode\fR
+'\"
+This command calls the \fBsetmode\fR method for all the entries in
+this Tree widget: if an entry has no child entries, its mode is set to
+\fBnone\fR. Otherwise, if the entry has any hidden child entries, its
+mode is set to \fBopen\fR; otherwise its mode is set to \fBclose\fR.
+'\"
+.TP
+\fIpathName \fBcget\fR \fIoption\fR
+'\"
+Returns the current value of the configuration option given by
+\fIoption\fR. \fIOption\fR may have any of the values accepted by the
+\fBtixTree\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBclose \fIentryPath\fR
+'\"
+Close the entry given by \fIentryPath\fR if its \fImode\fR is \fBclose\fR.
+'\"
+'\"
+.TP
+\fIpathName \fBconfigure\fR ?\fIoption\fR? \fI?value option value ...\fR?
+'\"
+Query or modify the configuration options of the widget. If no
+\fIoption\fR is specified, returns a list describing all of the
+available options for \fIpathName\fR (see \fBTk_ConfigureInfo\fR for
+information on the format of this list). If \fIoption\fR is specified
+with no \fIvalue\fR, 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 \fIoption\fR is specified). If
+one or more \fIoption\-value\fR 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. \fIOption\fR may have
+any of the values accepted by the \fBtixTree\fR command.
+'\"
+'\"
+.TP
+\fIpathName \fBgetmode \fIentryPath\fR
+'\"
+Returns the current \fImode\fR of the entry given by \fIentryPath\fR.
+'\"
+.TP
+\fIpathName \fBopen \fIentryPath\fR
+'\"
+Open the entry givaen by \fIentryPath\fR if its \fImode\fR is \fBopen\fR.
+'\"
+.TP
+\fIpathName \fBsetmode \fI entryPath mode\fR
+'\"
+This command is used to indicate whether the entry given by
+\fIentryPath\fR has children entries and whether the children are
+visible. \fImode\fR must be one of \fBopen\fR,
+\fBclose\fR or \fBnone\fR. If \fImode\fR is set to \fBopen\fR, a (+)
+indicator is drawn next the the entry. If \fImode\fR is set to
+\fBclose\fR, a (-) indicator is drawn next the the entry. If
+\fImode\fR is set to \fBnone\fR, no indicators will be drawn for this
+entry. The default \fImode\fR is none. The \fBopen\fR mode indicates
+the entry has hidden children and this entry can be opened by the
+user. The \fBclose\fR mode indicates that all the children of the entry
+are now visible and the entry can be closed by the user.
+'\"
+.TP
+\fIpathName \fBsubwidget \fI name ?args?\fR
+'\"
+When no options are given, this command returns the pathname of the
+subwidget of the specified name.
+
+When options are given, the widget command of the specified subwidget
+will be called with these options.
+'\"
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH BINDINGS
+.PP
+'\"
+The basic mouse and keyboard bindings of the Tree widget are the same
+as the bindings of the HList widget.
+
+In addition, the entries can be opened or closed under the following
+conditions:
+'\"
+.IP [1]
+If the \fImode\fR of the entry is \fBopen\fR, it can be opened by clicking
+on its (+) indicator or double-clicking on the entry.
+'\"
+.IP [2]
+If the \fImode\fR of the entry is \fBclose\fR, it can be closed by clicking
+on its (-) indicator or double-clicking on the entry.
+'\"
+'\"
+'\"----------------------------------------------------------------------
+.SH KEYWORDS
+Tix(n),tixHList(n)
+
+
+
Added: external/tix-8.4.2.x/man/tixUtils.n
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixUtils.n Tue Mar 18 19:38:59 2008
@@ -0,0 +1,83 @@
+'\"
+'\" $Id: tixUtils.n,v 1.2 2001/01/22 08:02:45 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+'\"----------------------------------------------------------------------
+.TH Utils n 4.0 Tix "Tix Built-In Commands"
+.BS
+'\"
+'\"
+.SH NAME
+tixUtils \- Utility commands in Tix.
+'\"
+'\"
+'\"
+.SH SYNOPSIS
+.nf
+\fBtixDescendants \fIpathName\fR
+\fBtixDisableAll \fIpathName\fR
+\fBtixEnableAll \fIpathName\fR
+\fBtixPushGrab\fR ?\fI-global\fR? \fIwindow\fR
+\fBtixPopGrab\fR
+.fi
+.BE
+.PP
+.SH DESCRIPTION
+.PP
+.TP
+\fBtixDescendants\fR \fIpathName\fR
+'\"
+Returns a list of all the descendant widgets of \fIpathName\fR plus
+\fIpathName\fR itself.
+'\"
+.TP
+\fBtixDisableAll\fR \fIpathName\fR
+'\"
+Disables \fIpathName\fR and all its descendants.
+'\"
+'\"
+.TP
+\fBtixEnableAll\fR \fIpathName\fR
+'\"
+Enables \fIpathName\fR and all its descendants.
+'\"
+'\"
+.TP
+\fBtixPushGrab\fR ?\fI-global\fR? \fIwindow\fR
+'\"
+The \fBtixPushGrab\fR and \fBtixPopGrab\fR commands allows you to
+perform "cascade-grabbing". \fBtixPushGrab\fR calls the \fBgrab(n)\fR
+command on \fIwindow\fR and saves \fIwindow\fR on a grabbing
+stack.
+'\"
+.TP
+\fBtixPopGrab\fR
+'\"
+\fBtixPopGrab\fR pops the top-most element from the grabbing stack and
+release its grab. If the grabbing stack is not empty, then
+\fBtixPopGrab\fR will execute grab(n) on the current top-most element
+in the grabbing stack.
+'\"
+.SH NOTES
+.PP
+Some Tix widgets (for example, tixComboBox and tixPanedWindow) grabs
+the screen on certain occasions using \fBtixPushGrab\fR and
+\fBtixPopGrab\fR. Therefore, if you need to grab the screen when these
+widgets are present, you should also call \fBtixPushGrab\fR and
+\fBtixPopGrab\fR in place of the Tk \fBgrab\fR and \fBgrab release\fR
+commands. Otherwise, the behavior of these widgets may be undefined.
+'\"
+.SH KEYWORDS
+Tix(n), grab(n)
Added: external/tix-8.4.2.x/man/tixwish.1
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/man/tixwish.1 Tue Mar 18 19:38:59 2008
@@ -0,0 +1,198 @@
+'\"
+'\" $Id: tixwish.1,v 1.2 2001/01/22 00:33:19 ioilam Exp $
+'\"
+'\"
+'\" Copyright (c) 1993-1999 Ioi Kim Lam.
+'\" Copyright (c) 2000-2001 Tix Project Group.
+'\"
+'\" 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.
+.so man.macros
+.TH tixwish 1 8.0 Tix "Tix Applications"
+.BS
+'\"
+.SH NAME
+tixwish \- Windowing shell for interpreting Tix commands.
+'\"
+.SH SYNOPSIS
+\fBtixwish\fR ?\fIfileName arg arg ...\fR?
+'\"
+.SH OPTIONS
+'\"
+.IP "\fB\-display \fIdisplay\fR" 20
+Display (and screen) on which to display window.
+'\"
+.IP "\fB\-geometry \fIgeometry\fR" 20
+Initial geometry to use for window. If this option is specified, its
+value is stored in the \fBgeometry\fR global variable of the application's
+Tcl interpreter.
+'\"
+.IP "\fB\-name \fIname\fR" 20
+'\"
+Use \fIname\fR as the title to be displayed in the window, and
+as the name of the interpreter for \fBsend\fR commands.
+'\"
+.IP "\fB\-sync\fR" 20
+'\"
+Execute all X server commands synchronously, so that errors are
+reported immediately. This will result in much slower execution, but
+it is useful for debugging.
+.BE
+
+.SH DESCRIPTION
+.PP
+\fBTixwish\fR is a simple program consisting of the Tcl command
+language, the Tk toolkit, and a main program that reads commands from
+standard input or from a file. It creates a main window and then
+processes Tcl commands.
+'\"
+If \fBtixwish\fR is invoked with no arguments, or with a first
+argument that starts with ``\-'', then it reads Tcl commands
+interactively from standard input.
+'\"
+It will continue processing commands until all windows have been
+deleted or until end-of-file is reached on standard input. If there
+exists a file \fB.tixwishrc\fR in the home directory of the user,
+\fBtixwish\fR evaluates the file as a Tcl script just before reading
+the first command from standard input.
+'\"
+.PP
+'\"
+If \fBtixwish\fR is invoked with an initial \fIfileName\fR argument,
+then \fIfileName\fR is treated as the name of a script file.
+\fBTixwish\fR will evaluate the script in \fIfileName\fR (which
+presumably creates a user interface), then it will respond to events
+until all windows have been deleted. Commands will not be read from
+standard input. There is no automatic evaluation of \fB.tixwishrc\fR
+in this case, but the script file can always \fBsource\fR it if
+desired.
+
+.SH "OPTIONS"
+.PP
+\fBTixwish\fR automatically processes all of the command-line options
+described in the \fBOPTIONS\fR summary above. Any other command-line
+arguments besides these are passed through to the application using
+the \fBargc\fR and \fBargv\fR variables described later.
+
+.SH "APPLICATION NAME AND CLASS"
+.PP
+.VS
+The name of the application, which is used for purposes such as
+\fBsend\fR commands, is taken from the \fB\-name\fR option,
+if it is specified; otherwise it is taken from \fIfileName\fR,
+if it is specified, or from the command name by which
+\fBtixwish\fR was invoked. In the last two cases, if the name contains a ``/''
+character, then only the characters after the last slash are used
+as the application name.
+.PP
+The class of the application, which is used for purposes such as
+specifying options with a \fBRESOURCE_MANAGER\fR property or .Xdefaults
+file, is the same as its name except that the first letter is
+capitalized.
+.VE
+
+.SH "VARIABLES"
+.PP
+\fBTixwish\fR sets the following Tcl variables:
+.TP 15
+\fBargc\fR
+Contains a count of the number of \fIarg\fR arguments (0 if none),
+not including the options described above.
+.TP 15
+\fBargv\fR
+Contains a Tcl list whose elements are the \fIarg\fR arguments (not
+including the options described above), in order, or an empty string
+if there are no \fIarg\fR arguments.
+.TP 15
+\fBargv0\fR
+Contains \fIfileName\fR if it was specified.
+Otherwise, contains the name by which \fBtixwish\fR was invoked.
+.TP 15
+\fBgeometry\fR
+If the \fB\-geometry\fR option is specified, \fBtixwish\fR copies its
+value into this variable. If the variable still exists after
+\fIfileName\fR has been evaluated, \fBtixwish\fR uses the value of
+the variable in a \fBwm geometry\fR command to set the main
+window's geometry.
+.TP 15
+\fBtcl_interactive\fR
+'\"
+Contains 1 if \fBtixwish\fR is reading commands interactively
+(\fBfileName\fR was not specified and standard input is a
+terminal-like device), 0 otherwise.
+'\"
+.SH "X RESOURCES"
+'\"
+\fBTixwish\fR makes use of several X Resources to determine the
+\fBToolkit Options\fR for the Tix library. These X resources must be
+set using \fBRESOURCE_MANAGER\fR properties or .Xdefaults files
+\fBbefore\fR \fBtixwish\fR starts running. These resources must be
+associated with the main window of the \fBtixwish\fR application.
+These options include:
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBtixScheme\fR
+Class: \fBTixScheme\fR
+.fi
+.IP
+Specifies the color scheme to use for the Tix application. Currently
+only these schemes are supported: Blue, Gray, SGIGray, TixGray, and
+TK.
+'\"----------END
+'\"
+'\"----------BEGIN
+.LP
+.nf
+Name: \fBtixFontSet\fR
+Class: \fBTixFontSet\fR
+.fi
+.IP
+Specifies the FontSet to use for the Tix application. A FontSet
+designates the fonts to use for different types of widgets. Currently
+only these FontSets are supported: 12Point, 14Point and TK.
+'\"----------END
+.PP
+For example, you may put these two lines in your .Xdefaults file
+.nf
+ *tixwish.tixScheme: Gray
+ *tixwish.tixFontSet: 12Point
+.fi
+.SH "SCRIPT FILES"
+.PP
+If you create a Tcl script in a file whose first line is
+.RS
+.CS
+\fB#!/usr/local/bin/tixwish\fR
+.CE
+.RE
+then you can invoke the script file directly from your shell if you
+mark it as executable. This assumes that \fBtixwish\fR has been
+installed in the default location in /usr/local/bin; if it's installed
+somewhere else then you'll have to modify the above line to match.
+Many UNIX systems do not allow the \fB#!\fR line to exceed about 30
+characters in length, so be sure that the \fBtixwish\fR executable can be
+accessed with a short file name.
+
+.SH PROMPTS
+.PP
+When \fBtixwish\fR is invoked interactively it normally prompts for each
+command with ``\fB% \fR''. You can change the prompt by setting the
+variables \fBtcl_prompt1\fR and \fBtcl_prompt2\fR. If variable
+\fBtcl_prompt1\fR exists then it must consist of a Tcl script to
+output a prompt; instead of outputting a prompt \fBtixwish\fR will
+evaluate the script in \fBtcl_prompt1\fR. The variable
+\fBtcl_prompt2\fR is used in a similar way when a newline is typed but
+the current command isn't yet complete; if \fBtcl_prompt2\fR isn't set
+then no prompt is output for incomplete commands.
+
+.SH KEYWORDS
+shell, wish, Tk, toolkit
+
Added: external/tix-8.4.2.x/tclconfig/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tclconfig/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,26 @@
+These files comprise the basic building blocks for a Tcl Extension
+Architecture (TEA) extension. For more information on TEA see:
+
+ http://www.tcl.tk/doc/tea/
+
+This package is part of the Tcl project at SourceForge, and latest
+sources should be available there:
+
+ http://tcl.sourceforge.net/
+
+This package is a freely available open source package. You can do
+virtually anything you like with it, such as modifying it, redistributing
+it, and selling it either in whole or in part.
+
+CONTENTS
+========
+The following is a short description of the files you will find in
+the sample extension.
+
+README.txt This file
+
+install-sh Program used for copying binaries and script files
+ to their install locations.
+
+tcl.m4 Collection of Tcl autoconf macros. Included by a package's
+ aclocal.m4 to define SC_* macros.
Added: external/tix-8.4.2.x/tclconfig/install-sh
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tclconfig/install-sh Tue Mar 18 19:38:59 2008
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+#
+# install - install a program, script, or datafile
+# This comes from X11R5; it is not part of GNU.
+#
+# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+
+instcmd="$mvprog"
+chmodcmd=""
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+fi
+
+if [ x"$dst" = x ]
+then
+ echo "install: no destination specified"
+ exit 1
+fi
+
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+if [ -d $dst ]
+then
+ dst="$dst"/`basename $src`
+fi
+
+# Make a temp file name in the proper directory.
+
+dstdir=`dirname $dst`
+dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+$doit $instcmd $src $dsttmp
+
+# and set any options; do chmod last to preserve setuid bits
+
+if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi
+if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi
+if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi
+if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi
+
+# Now rename the file to the real destination.
+
+$doit $rmcmd $dst
+$doit $mvcmd $dsttmp $dst
+
+
+exit 0
Added: external/tix-8.4.2.x/tclconfig/tcl.m4
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tclconfig/tcl.m4 Tue Mar 18 19:38:59 2008
@@ -0,0 +1,3970 @@
+# tcl.m4 --
+#
+# This file provides a set of autoconf macros to help TEA-enable
+# a Tcl extension.
+#
+# Copyright (c) 1999-2000 Ajuba Solutions.
+# Copyright (c) 2002-2005 ActiveState Corporation.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# RCS: @(#) $Id: tcl.m4,v 1.5 2006/11/15 22:19:52 hobbs Exp $
+
+AC_PREREQ(2.50)
+
+dnl TEA extensions pass us the version of TEA they think they
+dnl are compatible with (must be set in TEA_INIT below)
+dnl TEA_VERSION="3.5"
+
+# Possible values for key variables defined:
+#
+# TEA_WINDOWINGSYSTEM - win32 aqua x11 (mirrors 'tk windowingsystem')
+# TEA_PLATFORM - windows unix
+#
+
+#------------------------------------------------------------------------
+# TEA_PATH_TCLCONFIG --
+#
+# Locate the tclConfig.sh file and perform a sanity check on
+# the Tcl compile flags
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-tcl=...
+#
+# Defines the following vars:
+# TCL_BIN_DIR Full path to the directory containing
+# the tclConfig.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_TCLCONFIG], [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_INIT])
+ #
+ # Ok, lets find the tcl configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tcl
+ #
+
+ if test x"${no_tcl}" = x ; then
+ # we reset no_tcl in case something fails here
+ no_tcl=true
+ AC_ARG_WITH(tcl,
+ AC_HELP_STRING([--with-tcl],
+ [directory containing tcl configuration (tclConfig.sh)]),
+ with_tclconfig=${withval})
+ AC_MSG_CHECKING([for Tcl configuration])
+ AC_CACHE_VAL(ac_cv_c_tclconfig,[
+
+ # First check to see if --with-tcl was specified.
+ if test x"${with_tclconfig}" != x ; then
+ case ${with_tclconfig} in
+ */tclConfig.sh )
+ if test -f ${with_tclconfig}; then
+ AC_MSG_WARN([--with-tcl argument should refer to directory containing tclConfig.sh, not to tclConfig.sh itself])
+ with_tclconfig=`echo ${with_tclconfig} | sed 's!/tclConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tclconfig}/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tcl installation
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ../tcl \
+ `ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../tcl \
+ `ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../../tcl \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tcl.framework/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Windows, check in common installation locations
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tcl \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tclConfig.sh" ; then
+ ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_tclconfig}" = x ; then
+ TCL_BIN_DIR="# no Tcl configs found"
+ AC_MSG_WARN([Can't find Tcl configuration definitions])
+ exit 0
+ else
+ no_tcl=
+ TCL_BIN_DIR=${ac_cv_c_tclconfig}
+ AC_MSG_RESULT([found ${TCL_BIN_DIR}/tclConfig.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_TKCONFIG --
+#
+# Locate the tkConfig.sh file
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-tk=...
+#
+# Defines the following vars:
+# TK_BIN_DIR Full path to the directory containing
+# the tkConfig.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_TKCONFIG], [
+ #
+ # Ok, lets find the tk configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-tk
+ #
+
+ if test x"${no_tk}" = x ; then
+ # we reset no_tk in case something fails here
+ no_tk=true
+ AC_ARG_WITH(tk,
+ AC_HELP_STRING([--with-tk],
+ [directory containing tk configuration (tkConfig.sh)]),
+ with_tkconfig=${withval})
+ AC_MSG_CHECKING([for Tk configuration])
+ AC_CACHE_VAL(ac_cv_c_tkconfig,[
+
+ # First check to see if --with-tkconfig was specified.
+ if test x"${with_tkconfig}" != x ; then
+ case ${with_tkconfig} in
+ */tkConfig.sh )
+ if test -f ${with_tkconfig}; then
+ AC_MSG_WARN([--with-tk argument should refer to directory containing tkConfig.sh, not to tkConfig.sh itself])
+ with_tkconfig=`echo ${with_tkconfig} | sed 's!/tkConfig\.sh$!!'`
+ fi ;;
+ esac
+ if test -f "${with_tkconfig}/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
+ fi
+ fi
+
+ # then check for a private Tk library
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ../tk \
+ `ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../tk \
+ `ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
+ ../../../tk \
+ `ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Darwin, check in Framework installation locations
+ if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
+ `ls -d /Library/Frameworks 2>/dev/null` \
+ `ls -d /Network/Library/Frameworks 2>/dev/null` \
+ `ls -d /System/Library/Frameworks 2>/dev/null` \
+ ; do
+ if test -f "$i/Tk.framework/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # on Windows, check in common installation locations
+ if test "${TEA_PLATFORM}" = "windows" \
+ -a x"${ac_cv_c_tkconfig}" = x ; then
+ for i in `ls -d C:/Tcl/lib 2>/dev/null` \
+ `ls -d C:/Progra~1/Tcl/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few other private locations
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ for i in \
+ ${srcdir}/../tk \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
+ if test -f "$i/unix/tkConfig.sh" ; then
+ ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_tkconfig}" = x ; then
+ TK_BIN_DIR="# no Tk configs found"
+ AC_MSG_WARN([Can't find Tk configuration definitions])
+ exit 0
+ else
+ no_tk=
+ TK_BIN_DIR=${ac_cv_c_tkconfig}
+ AC_MSG_RESULT([found ${TK_BIN_DIR}/tkConfig.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_TCLCONFIG --
+#
+# Load the tclConfig.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# TCL_BIN_DIR
+#
+# Results:
+#
+# Subst the following vars:
+# TCL_BIN_DIR
+# TCL_SRC_DIR
+# TCL_LIB_FILE
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_LOAD_TCLCONFIG], [
+ AC_MSG_CHECKING([for existence of ${TCL_BIN_DIR}/tclConfig.sh])
+
+ if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . ${TCL_BIN_DIR}/tclConfig.sh
+ else
+ AC_MSG_RESULT([could not find ${TCL_BIN_DIR}/tclConfig.sh])
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
+ eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
+
+ # If the TCL_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TCL_LIB_SPEC will be set to the value
+ # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
+ # instead of TCL_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f ${TCL_BIN_DIR}/Makefile ; then
+ TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
+ TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
+ TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tcl.framework installed in an arbitary location.
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -f ${TCL_BIN_DIR}/${TCL_LIB_FILE}; then
+ for i in "`cd ${TCL_BIN_DIR}; pwd`" \
+ "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
+ TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}; then
+ TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
+ TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TCL_DBGX substitution
+ eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
+ eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
+ eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
+ eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
+
+ AC_SUBST(TCL_VERSION)
+ AC_SUBST(TCL_BIN_DIR)
+ AC_SUBST(TCL_SRC_DIR)
+
+ AC_SUBST(TCL_LIB_FILE)
+ AC_SUBST(TCL_LIB_FLAG)
+ AC_SUBST(TCL_LIB_SPEC)
+
+ AC_SUBST(TCL_STUB_LIB_FILE)
+ AC_SUBST(TCL_STUB_LIB_FLAG)
+ AC_SUBST(TCL_STUB_LIB_SPEC)
+
+ AC_SUBST(TCL_LIBS)
+ AC_SUBST(TCL_DEFS)
+ AC_SUBST(TCL_EXTRA_CFLAGS)
+ AC_SUBST(TCL_LD_FLAGS)
+ AC_SUBST(TCL_SHLIB_LD_LIBS)
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_TKCONFIG --
+#
+# Load the tkConfig.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# TK_BIN_DIR
+#
+# Results:
+#
+# Sets the following vars that should be in tkConfig.sh:
+# TK_BIN_DIR
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_LOAD_TKCONFIG], [
+ AC_MSG_CHECKING([for existence of ${TK_BIN_DIR}/tkConfig.sh])
+
+ if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
+ AC_MSG_RESULT([loading])
+ . ${TK_BIN_DIR}/tkConfig.sh
+ else
+ AC_MSG_RESULT([could not find ${TK_BIN_DIR}/tkConfig.sh])
+ fi
+
+ # eval is required to do the TK_DBGX substitution
+ eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
+ eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
+
+ # If the TK_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable TK_LIB_SPEC will be set to the value
+ # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
+ # instead of TK_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ if test -f ${TK_BIN_DIR}/Makefile ; then
+ TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
+ TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
+ TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
+ elif test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use the libraries
+ # from the framework at the given location so that linking works
+ # against Tk.framework installed in an arbitary location.
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ if test -f ${TK_BIN_DIR}/${TK_LIB_FILE}; then
+ for i in "`cd ${TK_BIN_DIR}; pwd`" \
+ "`cd ${TK_BIN_DIR}/../..; pwd`"; do
+ if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
+ TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
+ break
+ fi
+ done
+ fi
+ if test -f ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}; then
+ TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
+ TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
+ fi
+ ;;
+ esac
+ fi
+
+ # eval is required to do the TK_DBGX substitution
+ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
+ eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
+ eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
+ eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
+
+ # Ensure windowingsystem is defined
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ case ${TK_DEFS} in
+ *MAC_OSX_TK*)
+ AC_DEFINE(MAC_OSX_TK, 1, [Are we building against Mac OS X TkAqua?])
+ TEA_WINDOWINGSYSTEM="aqua"
+ ;;
+ *)
+ TEA_WINDOWINGSYSTEM="x11"
+ ;;
+ esac
+ elif test "${TEA_PLATFORM}" = "windows" ; then
+ TEA_WINDOWINGSYSTEM="win32"
+ fi
+
+ AC_SUBST(TK_VERSION)
+ AC_SUBST(TK_BIN_DIR)
+ AC_SUBST(TK_SRC_DIR)
+
+ AC_SUBST(TK_LIB_FILE)
+ AC_SUBST(TK_LIB_FLAG)
+ AC_SUBST(TK_LIB_SPEC)
+
+ AC_SUBST(TK_STUB_LIB_FILE)
+ AC_SUBST(TK_STUB_LIB_FLAG)
+ AC_SUBST(TK_STUB_LIB_SPEC)
+
+ AC_SUBST(TK_LIBS)
+ AC_SUBST(TK_XINCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_SHARED --
+#
+# Allows the building of shared libraries
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-shared=yes|no
+#
+# Defines the following vars:
+# STATIC_BUILD Used for building import/export libraries
+# on Windows.
+#
+# Sets the following vars:
+# SHARED_BUILD Value of 1 or 0
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_SHARED], [
+ AC_MSG_CHECKING([how to build libraries])
+ AC_ARG_ENABLE(shared,
+ AC_HELP_STRING([--enable-shared],
+ [build and link with shared libraries (default: on)]),
+ [tcl_ok=$enableval], [tcl_ok=yes])
+
+ if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ tcl_ok=$enableval
+ else
+ tcl_ok=yes
+ fi
+
+ if test "$tcl_ok" = "yes" ; then
+ AC_MSG_RESULT([shared])
+ SHARED_BUILD=1
+ else
+ AC_MSG_RESULT([static])
+ SHARED_BUILD=0
+ AC_DEFINE(STATIC_BUILD, 1, [Is this a static build?])
+ fi
+ AC_SUBST(SHARED_BUILD)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_THREADS --
+#
+# Specify if thread support should be enabled. If "yes" is specified
+# as an arg (optional), threads are enabled by default, "no" means
+# threads are disabled. "yes" is the default.
+#
+# TCL_THREADS is checked so that if you are compiling an extension
+# against a threaded core, your extension must be compiled threaded
+# as well.
+#
+# Note that it is legal to have a thread enabled extension run in a
+# threaded or non-threaded Tcl core, but a non-threaded extension may
+# only run in a non-threaded Tcl core.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-threads
+#
+# Sets the following vars:
+# THREADS_LIBS Thread library(s)
+#
+# Defines the following vars:
+# TCL_THREADS
+# _REENTRANT
+# _THREAD_SAFE
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_THREADS], [
+ AC_ARG_ENABLE(threads,
+ AC_HELP_STRING([--enable-threads],
+ [build with threads]),
+ [tcl_ok=$enableval], [tcl_ok=yes])
+
+ if test "${enable_threads+set}" = set; then
+ enableval="$enable_threads"
+ tcl_ok=$enableval
+ else
+ tcl_ok=yes
+ fi
+
+ if test "$tcl_ok" = "yes" -o "${TCL_THREADS}" = 1; then
+ TCL_THREADS=1
+
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ # We are always OK on Windows, so check what this platform wants:
+
+ # USE_THREAD_ALLOC tells us to try the special thread-based
+ # allocator that significantly reduces lock contention
+ AC_DEFINE(USE_THREAD_ALLOC, 1,
+ [Do we want to use the threaded memory allocator?])
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ if test "`uname -s`" = "SunOS" ; then
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+ [Do we really want to follow the standard? Yes we do!])
+ fi
+ AC_DEFINE(_THREAD_SAFE, 1, [Do we want the thread-safe OS API?])
+ AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ # Check a little harder for __pthread_mutex_init in the same
+ # library, as some systems hide it there until pthread.h is
+ # defined. We could alternatively do an AC_TRY_COMPILE with
+ # pthread.h, but that will work with libpthread really doesn't
+ # exist, like AIX 4.2. [Bug: 4359]
+ AC_CHECK_LIB(pthread, __pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ fi
+
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthread"
+ else
+ AC_CHECK_LIB(pthreads, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -lpthreads"
+ else
+ AC_CHECK_LIB(c, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "no"; then
+ AC_CHECK_LIB(c_r, pthread_mutex_init,
+ tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = "yes"; then
+ # The space is needed
+ THREADS_LIBS=" -pthread"
+ else
+ TCL_THREADS=0
+ AC_MSG_WARN([Do not know how to find pthread lib on your system - thread support disabled])
+ fi
+ fi
+ fi
+ fi
+ fi
+ else
+ TCL_THREADS=0
+ fi
+ # Do checking message here to not mess up interleaved configure output
+ AC_MSG_CHECKING([for building with threads])
+ if test "${TCL_THREADS}" = 1; then
+ AC_DEFINE(TCL_THREADS, 1, [Are we building with threads enabled?])
+ AC_MSG_RESULT([yes (default)])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ # TCL_THREADS sanity checking. See if our request for building with
+ # threads is the same as the way Tcl was built. If not, warn the user.
+ case ${TCL_DEFS} in
+ *THREADS=1*)
+ if test "${TCL_THREADS}" = "0"; then
+ AC_MSG_WARN([
+ Building ${PACKAGE_NAME} without threads enabled, but building against Tcl
+ that IS thread-enabled. It is recommended to use --enable-threads.])
+ fi
+ ;;
+ *)
+ if test "${TCL_THREADS}" = "1"; then
+ AC_MSG_WARN([
+ --enable-threads requested, but building against a Tcl that is NOT
+ thread-enabled. This is an OK configuration that will also run in
+ a thread-enabled core.])
+ fi
+ ;;
+ esac
+ AC_SUBST(TCL_THREADS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_SYMBOLS --
+#
+# Specify if debugging symbols should be used.
+# Memory (TCL_MEM_DEBUG) debugging can also be enabled.
+#
+# Arguments:
+# none
+#
+# TEA varies from core Tcl in that C|LDFLAGS_DEFAULT receives
+# the value of C|LDFLAGS_OPTIMIZE|DEBUG already substituted.
+# Requires the following vars to be set in the Makefile:
+# CFLAGS_DEFAULT
+# LDFLAGS_DEFAULT
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-symbols
+#
+# Defines the following vars:
+# CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true
+# Sets to $(CFLAGS_OPTIMIZE) if false
+# LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
+# Sets to $(LDFLAGS_OPTIMIZE) if false
+# DBGX Formerly used as debug library extension;
+# always blank now.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_SYMBOLS], [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_CONFIG_CFLAGS])
+ AC_MSG_CHECKING([for build with symbols])
+ AC_ARG_ENABLE(symbols,
+ AC_HELP_STRING([--enable-symbols],
+ [build with debugging symbols (default: off)]),
+ [tcl_ok=$enableval], [tcl_ok=no])
+ DBGX=""
+ if test "$tcl_ok" = "no"; then
+ CFLAGS_DEFAULT="${CFLAGS_OPTIMIZE}"
+ LDFLAGS_DEFAULT="${LDFLAGS_OPTIMIZE}"
+ AC_MSG_RESULT([no])
+ else
+ CFLAGS_DEFAULT="${CFLAGS_DEBUG}"
+ LDFLAGS_DEFAULT="${LDFLAGS_DEBUG}"
+ if test "$tcl_ok" = "yes"; then
+ AC_MSG_RESULT([yes (standard debugging)])
+ fi
+ fi
+ if test "${TEA_PLATFORM}" != "windows" ; then
+ LDFLAGS_DEFAULT="${LDFLAGS}"
+ fi
+
+ AC_SUBST(TCL_DBGX)
+ AC_SUBST(CFLAGS_DEFAULT)
+ AC_SUBST(LDFLAGS_DEFAULT)
+
+ if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
+ AC_DEFINE(TCL_MEM_DEBUG, 1, [Is memory debugging enabled?])
+ fi
+
+ if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
+ if test "$tcl_ok" = "all"; then
+ AC_MSG_RESULT([enabled symbols mem debugging])
+ else
+ AC_MSG_RESULT([enabled $tcl_ok debugging])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_ENABLE_LANGINFO --
+#
+# Allows use of modern nl_langinfo check for better l10n.
+# This is only relevant for Unix.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --enable-langinfo=yes|no (default is yes)
+#
+# Defines the following vars:
+# HAVE_LANGINFO Triggers use of nl_langinfo if defined.
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_ENABLE_LANGINFO], [
+ AC_ARG_ENABLE(langinfo,
+ AC_HELP_STRING([--enable-langinfo],
+ [use nl_langinfo if possible to determine encoding at startup, otherwise use old heuristic (default: on)]),
+ [langinfo_ok=$enableval], [langinfo_ok=yes])
+
+ HAVE_LANGINFO=0
+ if test "$langinfo_ok" = "yes"; then
+ AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
+ fi
+ AC_MSG_CHECKING([whether to use nl_langinfo])
+ if test "$langinfo_ok" = "yes"; then
+ AC_CACHE_VAL(tcl_cv_langinfo_h, [
+ AC_TRY_COMPILE([#include <langinfo.h>], [nl_langinfo(CODESET);],
+ [tcl_cv_langinfo_h=yes],[tcl_cv_langinfo_h=no])])
+ AC_MSG_RESULT([$tcl_cv_langinfo_h])
+ if test $tcl_cv_langinfo_h = yes; then
+ AC_DEFINE(HAVE_LANGINFO, 1, [Do we have nl_langinfo()?])
+ fi
+ else
+ AC_MSG_RESULT([$langinfo_ok])
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_CONFIG_SYSTEM
+#
+# Determine what the system is (some things cannot be easily checked
+# on a feature-driven basis, alas). This can usually be done via the
+# "uname" command, but there are a few systems, like Next, where
+# this doesn't work.
+#
+# Arguments:
+# none
+#
+# Results:
+# Defines the following var:
+#
+# system - System/platform/version identification code.
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_SYSTEM], [
+ AC_CACHE_CHECK([system version], tcl_cv_sys_version, [
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ tcl_cv_sys_version=windows
+ elif test -f /usr/lib/NextStep/software_version; then
+ tcl_cv_sys_version=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
+ else
+ tcl_cv_sys_version=`uname -s`-`uname -r`
+ if test "$?" -ne 0 ; then
+ AC_MSG_WARN([can't find uname command])
+ tcl_cv_sys_version=unknown
+ else
+ # Special check for weird MP-RAS system (uname returns weird
+ # results, and the version is kept in special file).
+
+ if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
+ tcl_cv_sys_version=MP-RAS-`awk '{print $[3]}' /etc/.relid`
+ fi
+ if test "`uname -s`" = "AIX" ; then
+ tcl_cv_sys_version=AIX-`uname -v`.`uname -r`
+ fi
+ fi
+ fi
+ ])
+ system=$tcl_cv_sys_version
+])
+
+#--------------------------------------------------------------------
+# TEA_CONFIG_CFLAGS
+#
+# Try to determine the proper flags to pass to the compiler
+# for building shared libraries and other such nonsense.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines and substitutes the following vars:
+#
+# DL_OBJS - Name of the object file that implements dynamic
+# loading for Tcl on this system.
+# DL_LIBS - Library file(s) to include in tclsh and other base
+# applications in order for the "load" command to work.
+# LDFLAGS - Flags to pass to the compiler when linking object
+# files into an executable application binary such
+# as tclsh.
+# LD_SEARCH_FLAGS-Flags to pass to ld, such as "-R /usr/local/tcl/lib",
+# that tell the run-time dynamic linker where to look
+# for shared libraries such as libtcl.so. Depends on
+# the variable LIB_RUNTIME_DIR in the Makefile. Could
+# be the same as CC_SEARCH_FLAGS if ${CC} is used to link.
+# CC_SEARCH_FLAGS-Flags to pass to ${CC}, such as "-Wl,-rpath,/usr/local/tcl/lib",
+# that tell the run-time dynamic linker where to look
+# for shared libraries such as libtcl.so. Depends on
+# the variable LIB_RUNTIME_DIR in the Makefile.
+# SHLIB_CFLAGS - Flags to pass to cc when compiling the components
+# of a shared library (may request position-independent
+# code, among other things).
+# SHLIB_LD - Base command to use for combining object files
+# into a shared library.
+# SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
+# creating shared libraries. This symbol typically
+# goes at the end of the "ld" commands that build
+# shared libraries. The value of the symbol is
+# "${LIBS}" if all of the dependent libraries should
+# be specified when creating a shared library. If
+# dependent libraries should not be specified (as on
+# SunOS 4.x, where they cause the link to fail, or in
+# general if Tcl and Tk aren't themselves shared
+# libraries), then this symbol has an empty string
+# as its value.
+# SHLIB_SUFFIX - Suffix to use for the names of dynamically loadable
+# extensions. An empty string means we don't know how
+# to use shared libraries on this platform.
+# LIB_SUFFIX - Specifies everything that comes after the "libfoo"
+# in a static or shared library name, using the $VERSION variable
+# to put the version in the right place. This is used
+# by platforms that need non-standard library names.
+# Examples: ${VERSION}.so.1.1 on NetBSD, since it needs
+# to have a version after the .so, and ${VERSION}.a
+# on AIX, since a shared library needs to have
+# a .a extension whereas shared objects for loadable
+# extensions have a .so extension. Defaults to
+# ${VERSION}${SHLIB_SUFFIX}.
+# TCL_NEEDS_EXP_FILE -
+# 1 means that an export file is needed to link to a
+# shared library.
+# TCL_EXP_FILE - The name of the installed export / import file which
+# should be used to link to the Tcl shared library.
+# Empty if Tcl is unshared.
+# TCL_BUILD_EXP_FILE -
+# The name of the built export / import file which
+# should be used to link to the Tcl shared library.
+# Empty if Tcl is unshared.
+# CFLAGS_DEBUG -
+# Flags used when running the compiler in debug mode
+# CFLAGS_OPTIMIZE -
+# Flags used when running the compiler in optimize mode
+# CFLAGS - Additional CFLAGS added as necessary (usually 64-bit)
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_CONFIG_CFLAGS], [
+ dnl Make sure we are initialized
+ AC_REQUIRE([TEA_INIT])
+
+ # Step 0.a: Enable 64 bit support?
+
+ AC_MSG_CHECKING([if 64bit support is requested])
+ AC_ARG_ENABLE(64bit,
+ AC_HELP_STRING([--enable-64bit],
+ [enable 64bit support (default: off)]),
+ [do64bit=$enableval], [do64bit=no])
+ AC_MSG_RESULT([$do64bit])
+
+ # Step 0.b: Enable Solaris 64 bit VIS support?
+
+ AC_MSG_CHECKING([if 64bit Sparc VIS support is requested])
+ AC_ARG_ENABLE(64bit-vis,
+ AC_HELP_STRING([--enable-64bit-vis],
+ [enable 64bit Sparc VIS support (default: off)]),
+ [do64bitVIS=$enableval], [do64bitVIS=no])
+ AC_MSG_RESULT([$do64bitVIS])
+
+ if test "$do64bitVIS" = "yes"; then
+ # Force 64bit on with VIS
+ do64bit=yes
+ fi
+
+ # Step 0.c: Cross-compiling options for Windows/CE builds?
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ AC_MSG_CHECKING([if Windows/CE build is requested])
+ AC_ARG_ENABLE(wince,[ --enable-wince enable Win/CE support (where applicable)], [doWince=$enableval], [doWince=no])
+ AC_MSG_RESULT([$doWince])
+ fi
+
+ # Step 1: set the variable "system" to hold the name and version number
+ # for the system.
+
+ TEA_CONFIG_SYSTEM
+
+ # Step 2: check for existence of -ldl library. This is needed because
+ # Linux can use either -ldl or -ldld for dynamic loading.
+
+ AC_CHECK_LIB(dl, dlopen, have_dl=yes, have_dl=no)
+
+ # Require ranlib early so we can override it in special cases below.
+
+ AC_REQUIRE([AC_PROG_RANLIB])
+
+ # Step 3: set configuration options based on system name and version.
+ # This is similar to Tcl's unix/tcl.m4 except that we've added a
+ # "windows" case.
+
+ do64bit_ok=no
+ LDFLAGS_ORIG="$LDFLAGS"
+ # When ld needs options to work in 64-bit mode, put them in
+ # LDFLAGS_ARCH so they eventually end up in LDFLAGS even if [load]
+ # is disabled by the user. [Bug 1016796]
+ LDFLAGS_ARCH=""
+ TCL_EXPORT_FILE_SUFFIX=""
+ UNSHARED_LIB_SUFFIX=""
+ TCL_TRIM_DOTS='`echo ${PACKAGE_VERSION} | tr -d .`'
+ ECHO_VERSION='`echo ${PACKAGE_VERSION}`'
+ TCL_LIB_VERSIONS_OK=ok
+ CFLAGS_DEBUG=-g
+ CFLAGS_OPTIMIZE=-O
+ if test "$GCC" = "yes" ; then
+ CFLAGS_OPTIMIZE=-O2
+ CFLAGS_WARNING="-Wall -Wno-implicit-int"
+ else
+ CFLAGS_WARNING=""
+ fi
+ TCL_NEEDS_EXP_FILE=0
+ TCL_BUILD_EXP_FILE=""
+ TCL_EXP_FILE=""
+dnl FIXME: Replace AC_CHECK_PROG with AC_CHECK_TOOL once cross compiling is fixed.
+dnl AC_CHECK_TOOL(AR, ar)
+ AC_CHECK_PROG(AR, ar, ar)
+ STLIB_LD='${AR} cr'
+ LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH"
+ case $system in
+ windows)
+ # This is a 2-stage check to make sure we have the 64-bit SDK
+ # We have to know where the SDK is installed.
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
+ if test "x${MSSDK}x" = "xx" ; then
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
+ fi
+ MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+ AC_MSG_WARN([Ensure latest Platform SDK is installed])
+ do64bit="no"
+ else
+ AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
+ do64bit_ok="yes"
+ fi
+ fi
+
+ if test "$doWince" != "no" ; then
+ if test "$do64bit" != "no" ; then
+ AC_MSG_ERROR([Windows/CE and 64-bit builds incompatible])
+ fi
+ if test "$GCC" = "yes" ; then
+ AC_MSG_ERROR([Windows/CE and GCC builds incompatible])
+ fi
+ TEA_PATH_CELIB
+ # Set defaults for common evc4/PPC2003 setup
+ # Currently Tcl requires 300+, possibly 420+ for sockets
+ CEVERSION=420; # could be 211 300 301 400 420 ...
+ TARGETCPU=ARMV4; # could be ARMV4 ARM MIPS SH3 X86 ...
+ ARCH=ARM; # could be ARM MIPS X86EM ...
+ PLATFORM="Pocket PC 2003"; # or "Pocket PC 2002"
+ if test "$doWince" != "yes"; then
+ # If !yes then the user specified something
+ # Reset ARCH to allow user to skip specifying it
+ ARCH=
+ eval `echo $doWince | awk -F, '{ \
+ if (length([$]1)) { printf "CEVERSION=\"%s\"\n", [$]1; \
+ if ([$]1 < 400) { printf "PLATFORM=\"Pocket PC 2002\"\n" } }; \
+ if (length([$]2)) { printf "TARGETCPU=\"%s\"\n", toupper([$]2) }; \
+ if (length([$]3)) { printf "ARCH=\"%s\"\n", toupper([$]3) }; \
+ if (length([$]4)) { printf "PLATFORM=\"%s\"\n", [$]4 }; \
+ }'`
+ if test "x${ARCH}" = "x" ; then
+ ARCH=$TARGETCPU;
+ fi
+ fi
+ OSVERSION=WCE$CEVERSION;
+ if test "x${WCEROOT}" = "x" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded C++ 4.0"
+ if test ! -d "${WCEROOT}" ; then
+ WCEROOT="C:/Program Files/Microsoft eMbedded Tools"
+ fi
+ fi
+ if test "x${SDKROOT}" = "x" ; then
+ SDKROOT="C:/Program Files/Windows CE Tools"
+ if test ! -d "${SDKROOT}" ; then
+ SDKROOT="C:/Windows CE Tools"
+ fi
+ fi
+ WCEROOT=`echo "$WCEROOT" | sed -e 's!\\\!/!g'`
+ SDKROOT=`echo "$SDKROOT" | sed -e 's!\\\!/!g'`
+ if test ! -d "${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}" \
+ -o ! -d "${WCEROOT}/EVC/${OSVERSION}/bin"; then
+ AC_MSG_ERROR([could not find PocketPC SDK or target compiler to enable WinCE mode [$CEVERSION,$TARGETCPU,$ARCH,$PLATFORM]])
+ doWince="no"
+ else
+ # We could PATH_NOSPACE these, but that's not important,
+ # as long as we quote them when used.
+ CEINCLUDE="${SDKROOT}/${OSVERSION}/${PLATFORM}/include"
+ if test -d "${CEINCLUDE}/${TARGETCPU}" ; then
+ CEINCLUDE="${CEINCLUDE}/${TARGETCPU}"
+ fi
+ CELIBPATH="${SDKROOT}/${OSVERSION}/${PLATFORM}/Lib/${TARGETCPU}"
+ fi
+ fi
+
+ if test "$GCC" != "yes" ; then
+ if test "${SHARED_BUILD}" = "0" ; then
+ runtime=-MT
+ else
+ runtime=-MD
+ fi
+
+ if test "$do64bit" != "no" ; then
+ # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ CC="\"${PATH64}/cl.exe\""
+ CFLAGS="${CFLAGS} -I\"${MSSDK}/Include\" -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
+ RC="\"${MSSDK}/bin/rc.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
+ CFLAGS_DEBUG="-nologo -Zi -Od -W3 ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ # Avoid 'unresolved external symbol __security_cookie'
+ # errors, c.f. http://support.microsoft.com/?id=894573
+ TEA_ADD_LIBS([bufferoverflowU.lib])
+ elif test "$doWince" != "no" ; then
+ CEBINROOT="${WCEROOT}/EVC/${OSVERSION}/bin"
+ if test "${TARGETCPU}" = "X86"; then
+ CC="\"${CEBINROOT}/cl.exe\""
+ else
+ CC="\"${CEBINROOT}/cl${ARCH}.exe\""
+ fi
+ CFLAGS="$CFLAGS -I\"${CELIB_DIR}/inc\" -I\"${CEINCLUDE}\""
+ RC="\"${WCEROOT}/Common/EVC/bin/rc.exe\""
+ arch=`echo ${ARCH} | awk '{print tolower([$]0)}'`
+ defs="${ARCH} _${ARCH}_ ${arch} PALM_SIZE _MT _WINDOWS"
+ if test "${SHARED_BUILD}" = "1" ; then
+ # Static CE builds require static celib as well
+ defs="${defs} _DLL"
+ fi
+ for i in $defs ; do
+ AC_DEFINE_UNQUOTED($i, 1, [WinCE def ]$i)
+ done
+ AC_DEFINE_UNQUOTED(_WIN32_WCE, $CEVERSION, [_WIN32_WCE version])
+ AC_DEFINE_UNQUOTED(UNDER_CE, $CEVERSION, [UNDER_CE version])
+ CFLAGS_DEBUG="-nologo -Zi -Od"
+ CFLAGS_OPTIMIZE="-nologo -Ox"
+ lversion=`echo ${CEVERSION} | sed -e 's/\(.\)\(..\)/\1\.\2/'`
+ lflags="-MACHINE:${ARCH} -LIBPATH:\"${CELIBPATH}\" -subsystem:windowsce,${lversion} -nologo"
+ LINKBIN="\"${CEBINROOT}/link.exe\""
+ AC_SUBST(CELIB_DIR)
+ else
+ RC="rc"
+ lflags="-nologo"
+ LINKBIN="link"
+ CFLAGS_DEBUG="-nologo -Z7 -Od -W3 -WX ${runtime}d"
+ CFLAGS_OPTIMIZE="-nologo -O2 -W2 ${runtime}"
+ fi
+ fi
+
+ if test "$GCC" = "yes"; then
+ # mingw gcc mode
+ RC="windres"
+ CFLAGS_DEBUG="-g"
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ SHLIB_LD="$CC -shared"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ LDFLAGS_CONSOLE="-wl,--subsystem,console ${lflags}"
+ LDFLAGS_WINDOW="-wl,--subsystem,windows ${lflags}"
+ else
+ SHLIB_LD="${LINKBIN} -dll ${lflags}"
+ # link -lib only works when -lib is the first arg
+ STLIB_LD="${LINKBIN} -lib ${lflags}"
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.lib'
+ PATHTYPE=-w
+ # For information on what debugtype is most useful, see:
+ # http://msdn.microsoft.com/library/en-us/dnvc60/html/gendepdebug.asp
+ # This essentially turns it all on.
+ LDFLAGS_DEBUG="-debug:full -debugtype:both -warn:2"
+ LDFLAGS_OPTIMIZE="-release"
+ if test "$doWince" != "no" ; then
+ LDFLAGS_CONSOLE="-link ${lflags}"
+ LDFLAGS_WINDOW=${LDFLAGS_CONSOLE}
+ else
+ LDFLAGS_CONSOLE="-link -subsystem:console ${lflags}"
+ LDFLAGS_WINDOW="-link -subsystem:windows ${lflags}"
+ fi
+ fi
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dll"
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.dll'
+
+ TCL_LIB_VERSIONS_OK=nodots
+ # Bogus to avoid getting this turned off
+ DL_OBJS="tclLoadNone.obj"
+ ;;
+ AIX-*)
+ if test "${TCL_THREADS}" = "1" -a "$GCC" != "yes" ; then
+ # AIX requires the _r compiler when gcc isn't being used
+ case "${CC}" in
+ *_r)
+ # ok ...
+ ;;
+ *)
+ CC=${CC}_r
+ ;;
+ esac
+ AC_MSG_RESULT([Using $CC for compiling with threads])
+ fi
+ LIBS="$LIBS -lc"
+ SHLIB_CFLAGS=""
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ DL_OBJS="tclLoadDl.o"
+ LD_LIBRARY_PATH_VAR="LIBPATH"
+
+ # Check to enable 64-bit flags for compiler/linker on AIX 4+
+ if test "$do64bit" = "yes" -a "`uname -v`" -gt "3" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -q64"
+ LDFLAGS_ARCH="-q64"
+ RANLIB="${RANLIB} -X64"
+ AR="${AR} -X64"
+ SHLIB_LD_FLAGS="-b64"
+ fi
+ fi
+
+ if test "`uname -m`" = "ia64" ; then
+ # AIX-5 uses ELF style dynamic libraries on IA-64, but not PPC
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ # AIX-5 has dl* in libc.so
+ DL_LIBS=""
+ if test "$GCC" = "yes" ; then
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ else
+ CC_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ fi
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ else
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ else
+ SHLIB_LD="/bin/ld -bhalt:4 -bM:SRE -bE:lib.exp -H512 -T512 -bnoentry"
+ fi
+ SHLIB_LD="${TCL_SRC_DIR}/unix/ldAix ${SHLIB_LD} ${SHLIB_LD_FLAGS}"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ TCL_NEEDS_EXP_FILE=1
+ TCL_EXPORT_FILE_SUFFIX='${PACKAGE_VERSION}.exp'
+ fi
+
+ # AIX v<=4.1 has some different flags than 4.2+
+ if test "$system" = "AIX-4.1" -o "`uname -v`" -lt "4" ; then
+ AC_LIBOBJ([tclLoadAix])
+ DL_LIBS="-lld"
+ fi
+
+ # On AIX <=v4 systems, libbsd.a has to be linked in to support
+ # non-blocking file IO. This library has to be linked in after
+ # the MATH_LIBS or it breaks the pow() function. The way to
+ # insure proper sequencing, is to add it to the tail of MATH_LIBS.
+ # This library also supplies gettimeofday.
+ #
+ # AIX does not have a timezone field in struct tm. When the AIX
+ # bsd library is used, the timezone global and the gettimeofday
+ # methods are to be avoided for timezone deduction instead, we
+ # deduce the timezone by comparing the localtime result on a
+ # known GMT value.
+
+ AC_CHECK_LIB(bsd, gettimeofday, libbsd=yes, libbsd=no)
+ if test $libbsd = yes; then
+ MATH_LIBS="$MATH_LIBS -lbsd"
+ AC_DEFINE(USE_DELTA_FOR_TZ, 1, [Do we need a special AIX hack for timezones?])
+ fi
+ ;;
+ BeOS*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -nostart"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+
+ #-----------------------------------------------------------
+ # Check for inet_ntoa in -lbind, for BeOS (which also needs
+ # -lsocket, even if the network functions are in -lnet which
+ # is always linked to, for compatibility.
+ #-----------------------------------------------------------
+ AC_CHECK_LIB(bind, inet_ntoa, [LIBS="$LIBS -lbind -lsocket"])
+ ;;
+ BSD/OS-2.1*|BSD/OS-3*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="shlicc -r"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ BSD/OS-4.*)
+ SHLIB_CFLAGS="-export-dynamic -fPIC"
+ SHLIB_LD="cc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ dgux*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ HP-UX-*.11.*)
+ # Use updated header definitions where possible
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, [Do we want to use the XOPEN network library?])
+ # Needed by Tcl, but not most extensions
+ #AC_DEFINE(_XOPEN_SOURCE, 1, [Do we want to use the XOPEN network library?])
+ #LIBS="$LIBS -lxnet" # Use the XOPEN network library
+
+ SHLIB_SUFFIX=".sl"
+ AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS='${LIBS}'
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="gcc -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ fi
+
+ # Users may want PA-RISC 1.1/2.0 portable code - needs HP cc
+ #CFLAGS="$CFLAGS +DAportable"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ hpux_arch=`${CC} -dumpmachine`
+ case $hpux_arch in
+ hppa64*)
+ # 64-bit gcc in use. Fix flags for GNU ld.
+ do64bit_ok=yes
+ SHLIB_LD="${CC} -shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ ;;
+ *)
+ AC_MSG_WARN([64bit mode not supported with GCC on $system])
+ ;;
+ esac
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS +DD64"
+ LDFLAGS_ARCH="+DD64"
+ fi
+ fi
+ ;;
+ HP-UX-*.08.*|HP-UX-*.09.*|HP-UX-*.10.*)
+ SHLIB_SUFFIX=".sl"
+ AC_CHECK_LIB(dld, shl_load, tcl_ok=yes, tcl_ok=no)
+ if test "$tcl_ok" = yes; then
+ SHLIB_CFLAGS="+z"
+ SHLIB_LD="ld -b"
+ SHLIB_LD_LIBS=""
+ DL_OBJS="tclLoadShl.o"
+ DL_LIBS="-ldld"
+ LDFLAGS="$LDFLAGS -Wl,-E"
+ CC_SEARCH_FLAGS='-Wl,+s,+b,${LIB_RUNTIME_DIR}:.'
+ LD_SEARCH_FLAGS='+s +b ${LIB_RUNTIME_DIR}:.'
+ LD_LIBRARY_PATH_VAR="SHLIB_PATH"
+ fi
+ ;;
+ IRIX-5.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ ;;
+ IRIX-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mabi=n32"
+ LDFLAGS="$LDFLAGS -mabi=n32"
+ else
+ case $system in
+ IRIX-6.3)
+ # Use to build 6.2 compatible binaries on 6.3.
+ CFLAGS="$CFLAGS -n32 -D_OLD_TERMIOS"
+ ;;
+ *)
+ CFLAGS="$CFLAGS -n32"
+ ;;
+ esac
+ LDFLAGS="$LDFLAGS -n32"
+ fi
+ ;;
+ IRIX64-6.*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld -n32 -shared -rdata_shared"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+
+ # Check to enable 64-bit flags for compiler/linker
+
+ if test "$do64bit" = "yes" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported by gcc])
+ else
+ do64bit_ok=yes
+ SHLIB_LD="ld -64 -shared -rdata_shared"
+ CFLAGS="$CFLAGS -64"
+ LDFLAGS_ARCH="-64"
+ fi
+ fi
+ ;;
+ Linux*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
+ # egcs-2.91.66 on Redhat Linux 6.0 generates lots of warnings
+ # when you inline the string and math operations. Turn this off to
+ # get rid of the warnings.
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
+
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+
+ # The combo of gcc + glibc has a bug related
+ # to inlining of functions like strtod(). The
+ # -fno-builtin flag should address this problem
+ # but it does not work. The -fno-inline flag
+ # is kind of overkill but it works.
+ # Disable inlining only when one of the
+ # files in compat/*.c is being linked in.
+ if test x"${USE_COMPAT}" != x ; then
+ CFLAGS="$CFLAGS -fno-inline"
+ fi
+
+ ;;
+ GNU*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+
+ SHLIB_LD="${CC} -shared"
+ DL_OBJS=""
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ if test "`uname -m`" = "alpha" ; then
+ CFLAGS="$CFLAGS -mieee"
+ fi
+ ;;
+ Lynx*)
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ CFLAGS_OPTIMIZE=-02
+ SHLIB_LD="${CC} -shared "
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-mshared -ldl"
+ LD_FLAGS="-Wl,--export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ ;;
+ MP-RAS-02*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ MP-RAS-*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ NetBSD-*|FreeBSD-[[1-2]].*)
+ # NetBSD/SPARC needs -fPIC, -fpic will not do.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
+ if test $tcl_cv_ld_elf = yes; then
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ else
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ fi
+
+ # Ancient FreeBSD doesn't handle version numbers with dots.
+
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ OpenBSD-*)
+ # OpenBSD/SPARC[64] needs -fPIC, -fpic will not do.
+ case `machine` in
+ sparc|sparc64)
+ SHLIB_CFLAGS="-fPIC";;
+ *)
+ SHLIB_CFLAGS="-fpic";;
+ esac
+ SHLIB_LD="${CC} -shared ${SHLIB_CFLAGS}"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ AC_CACHE_CHECK([for ELF], tcl_cv_ld_elf, [
+ AC_EGREP_CPP(yes, [
+#ifdef __ELF__
+ yes
+#endif
+ ], tcl_cv_ld_elf=yes, tcl_cv_ld_elf=no)])
+ if test $tcl_cv_ld_elf = yes; then
+ LDFLAGS=-Wl,-export-dynamic
+ else
+ LDFLAGS=""
+ fi
+
+ # OpenBSD doesn't do version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ FreeBSD-*)
+ # FreeBSD 3.* and greater have ELF.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS -export-dynamic"
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "${TCL_THREADS}" = "1" ; then
+ # The -pthread needs to go in the CFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ case $system in
+ FreeBSD-3.*)
+ # FreeBSD-3 doesn't handle version numbers with dots.
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ esac
+ ;;
+ Darwin-*)
+ CFLAGS_OPTIMIZE="-Os"
+ SHLIB_CFLAGS="-fno-common"
+ if test $do64bit = yes; then
+ do64bit_ok=yes
+ case `arch` in
+ ppc)
+ CFLAGS="$CFLAGS -arch ppc64 -mpowerpc64 -mcpu=G5";;
+ i386)
+ CFLAGS="$CFLAGS -arch x86_64";;
+ *)
+ AC_MSG_WARN([Don't know how enable 64-bit on architecture `arch`])
+ do64bit_ok=no;;
+ esac
+ else
+ # Check for combined 32-bit and 64-bit fat build
+ echo "$CFLAGS " | grep -E -q -- '-arch (ppc64|x86_64) ' && \
+ echo "$CFLAGS " | grep -E -q -- '-arch (ppc|i386) ' && \
+ fat_32_64=yes
+ fi
+ # TEA specific: use LDFLAGS_DEFAULT instead of LDFLAGS here:
+ SHLIB_LD='${CC} -dynamiclib ${CFLAGS} ${LDFLAGS_DEFAULT}'
+ AC_CACHE_CHECK([if ld accepts -single_module flag], tcl_cv_ld_single_module, [
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -dynamiclib -Wl,-single_module"
+ AC_TRY_LINK(, [int i;], tcl_cv_ld_single_module=yes, tcl_cv_ld_single_module=no)
+ LDFLAGS=$hold_ldflags])
+ if test $tcl_cv_ld_single_module = yes; then
+ SHLIB_LD="${SHLIB_LD} -Wl,-single_module"
+ fi
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".dylib"
+ DL_OBJS="tclLoadDyld.o"
+ DL_LIBS=""
+ # Don't use -prebind when building for Mac OS X 10.4 or later only:
+ test "`echo "${MACOSX_DEPLOYMENT_TARGET}" | awk -F '10\\.' '{print int([$]2)}'`" -lt 4 -a \
+ "`echo "${CFLAGS}" | awk -F '-mmacosx-version-min=10\\.' '{print int([$]2)}'`" -lt 4 && \
+ LDFLAGS="$LDFLAGS -prebind"
+ LDFLAGS="$LDFLAGS -headerpad_max_install_names"
+ AC_CACHE_CHECK([if ld accepts -search_paths_first flag], tcl_cv_ld_search_paths_first, [
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ AC_TRY_LINK(, [int i;], tcl_cv_ld_search_paths_first=yes, tcl_cv_ld_search_paths_first=no)
+ LDFLAGS=$hold_ldflags])
+ if test $tcl_cv_ld_search_paths_first = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
+ fi
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH"
+
+ # TEA specific: for Tk extensions, remove 64-bit arch flags from
+ # CFLAGS for combined 32-bit and 64-bit fat builds as neither TkAqua
+ # nor TkX11 can be built for 64-bit at present.
+ test "$fat_32_64" = yes && test -n "${TK_BIN_DIR}" && \
+ CFLAGS="`echo "$CFLAGS " | sed -e 's/-arch ppc64 / /g' -e 's/-arch x86_64 / /g'`"
+ ;;
+ NEXTSTEP-*)
+ SHLIB_CFLAGS=""
+ SHLIB_LD="cc -nostdlib -r"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadNext.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OS/390-*)
+ CFLAGS_OPTIMIZE="" # Optimizer is buggy
+ AC_DEFINE(_OE_SOCKETS, 1, # needed in sys/socket.h
+ [Should OS/390 do the right thing with sockets?])
+ ;;
+ OSF1-1.0|OSF1-1.1|OSF1-1.2)
+ # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
+ SHLIB_CFLAGS=""
+ # Hack: make package name same as library name
+ SHLIB_LD='ld -R -export $@:'
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadOSF.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-1.*)
+ # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
+ SHLIB_CFLAGS="-fPIC"
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD="ld -shared"
+ else
+ SHLIB_LD="ld -non_shared"
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ OSF1-V*)
+ # Digital OSF/1
+ SHLIB_CFLAGS=""
+ if test "$SHARED_BUILD" = "1" ; then
+ SHLIB_LD='ld -shared -expect_unresolved "*"'
+ else
+ SHLIB_LD='ld -non_shared -expect_unresolved "*"'
+ fi
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ if test "$GCC" = "yes" ; then
+ CFLAGS="$CFLAGS -mieee"
+ else
+ CFLAGS="$CFLAGS -DHAVE_TZSET -std1 -ieee"
+ fi
+ # see pthread_intro(3) for pthread support on osf1, k.furukawa
+ if test "${TCL_THREADS}" = "1" ; then
+ CFLAGS="$CFLAGS -DHAVE_PTHREAD_ATTR_SETSTACKSIZE"
+ CFLAGS="$CFLAGS -DTCL_THREAD_STACK_MIN=PTHREAD_STACK_MIN*64"
+ LIBS=`echo $LIBS | sed s/-lpthreads//`
+ if test "$GCC" = "yes" ; then
+ LIBS="$LIBS -lpthread -lmach -lexc"
+ else
+ CFLAGS="$CFLAGS -pthread"
+ LDFLAGS="$LDFLAGS -pthread"
+ fi
+ fi
+
+ ;;
+ QNX-6*)
+ # QNX RTP
+ # This may work for all QNX, but it was only reported for v6.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="ld -Bshareable -x"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ # dlopen is in -lc on QNX
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ SCO_SV-3.2*)
+ # Note, dlopen is available only on SCO 3.2.5 and greater. However,
+ # this test works, since "uname -s" was non-standard in 3.2.4 and
+ # below.
+ if test "$GCC" = "yes" ; then
+ SHLIB_CFLAGS="-fPIC -melf"
+ LDFLAGS="$LDFLAGS -melf -Wl,-Bexport"
+ else
+ SHLIB_CFLAGS="-Kpic -belf"
+ LDFLAGS="$LDFLAGS -belf -Wl,-Bexport"
+ fi
+ SHLIB_LD="ld -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ SINIX*5.4*)
+ SHLIB_CFLAGS="-K PIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ SunOS-4*)
+ SHLIB_CFLAGS="-PIC"
+ SHLIB_LD="ld"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ CC_SEARCH_FLAGS='-L${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+
+ # SunOS can't handle version numbers with dots in them in library
+ # specs, like -ltcl7.5, so use -ltcl75 instead. Also, it
+ # requires an extra version number at the end of .so file names.
+ # So, the library has to have a name like libtcl75.so.1.0
+
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.1.0'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
+ SunOS-5.[[0-6]])
+ # Careful to not let 5.10+ fall into this case
+
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+ [Do we really want to follow the standard? Yes we do!])
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Note: need the LIBS below, otherwise Tk won't find Tcl's
+ # symbols when dynamically loaded into tclsh.
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ CC_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ fi
+ ;;
+ SunOS-5*)
+ # Note: If _REENTRANT isn't defined, then Solaris
+ # won't define thread-safe library routines.
+
+ AC_DEFINE(_REENTRANT, 1, [Do we want the reentrant OS API?])
+ AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1,
+ [Do we really want to follow the standard? Yes we do!])
+
+ SHLIB_CFLAGS="-KPIC"
+
+ # Check to enable 64-bit flags for compiler/linker
+ if test "$do64bit" = "yes" ; then
+ arch=`isainfo`
+ if test "$arch" = "sparcv9 sparc" ; then
+ if test "$GCC" = "yes" ; then
+ if test "`gcc -dumpversion | awk -F. '{print [$]1}'`" -lt "3" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC < 3.2 on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -m64 -mcpu=v9"
+ LDFLAGS="$LDFLAGS -m64 -mcpu=v9"
+ SHLIB_CFLAGS="-fPIC"
+ fi
+ else
+ do64bit_ok=yes
+ if test "$do64bitVIS" = "yes" ; then
+ CFLAGS="$CFLAGS -xarch=v9a"
+ LDFLAGS_ARCH="-xarch=v9a"
+ else
+ CFLAGS="$CFLAGS -xarch=v9"
+ LDFLAGS_ARCH="-xarch=v9"
+ fi
+ # Solaris 64 uses this as well
+ #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64"
+ fi
+ elif test "$arch" = "amd64 i386" ; then
+ if test "$GCC" = "yes" ; then
+ AC_MSG_WARN([64bit mode not supported with GCC on $system])
+ else
+ do64bit_ok=yes
+ CFLAGS="$CFLAGS -xarch=amd64"
+ LDFLAGS="$LDFLAGS -xarch=amd64"
+ fi
+ else
+ AC_MSG_WARN([64bit mode not supported for $arch])
+ fi
+ fi
+
+ # Note: need the LIBS below, otherwise Tk won't find Tcl's
+ # symbols when dynamically loaded into tclsh.
+
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ if test "$GCC" = "yes" ; then
+ SHLIB_LD="$CC -shared"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
+ if test "$do64bit_ok" = "yes" ; then
+ # We need to specify -static-libgcc or we need to
+ # add the path to the sparv9 libgcc.
+ # JH: static-libgcc is necessary for core Tcl, but may
+ # not be necessary for extensions.
+ SHLIB_LD="$SHLIB_LD -m64 -mcpu=v9 -static-libgcc"
+ # for finding sparcv9 libgcc, get the regular libgcc
+ # path, remove so name and append 'sparcv9'
+ #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..."
+ #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir"
+ fi
+ else
+ SHLIB_LD="/usr/ccs/bin/ld -G -z text"
+ CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
+ fi
+ ;;
+ UNIX_SV* | UnixWare-5*)
+ SHLIB_CFLAGS="-KPIC"
+ SHLIB_LD="cc -G"
+ SHLIB_LD_LIBS=""
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS="-ldl"
+ # Some UNIX_SV* systems (unixware 1.1.2 for example) have linkers
+ # that don't grok the -Bexport option. Test that it does.
+ AC_CACHE_CHECK([for ld accepts -Bexport flag], tcl_cv_ld_Bexport, [
+ hold_ldflags=$LDFLAGS
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ AC_TRY_LINK(, [int i;], tcl_cv_ld_Bexport=yes, tcl_cv_ld_Bexport=no)
+ LDFLAGS=$hold_ldflags])
+ if test $tcl_cv_ld_Bexport = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-Bexport"
+ fi
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ ;;
+ esac
+
+ if test "$do64bit" = "yes" -a "$do64bit_ok" = "no" ; then
+ AC_MSG_WARN([64bit support being disabled -- don't know magic for this platform])
+ fi
+
+ # Step 4: disable dynamic loading if requested via a command-line switch.
+
+ AC_ARG_ENABLE(load,
+ AC_HELP_STRING([--enable-load],
+ [allow dynamic loading and "load" command (default: on)]),
+ [tcl_ok=$enableval], [tcl_ok=yes])
+ if test "$tcl_ok" = "no"; then
+ DL_OBJS=""
+ fi
+
+ if test "x$DL_OBJS" != "x" ; then
+ BUILD_DLTEST="\$(DLTEST_TARGETS)"
+ else
+ echo "Can't figure out how to do dynamic loading or shared libraries"
+ echo "on this system."
+ SHLIB_CFLAGS=""
+ SHLIB_LD=""
+ SHLIB_SUFFIX=""
+ DL_OBJS="tclLoadNone.o"
+ DL_LIBS=""
+ LDFLAGS="$LDFLAGS_ORIG"
+ CC_SEARCH_FLAGS=""
+ LD_SEARCH_FLAGS=""
+ BUILD_DLTEST=""
+ fi
+ LDFLAGS="$LDFLAGS $LDFLAGS_ARCH"
+
+ # If we're running gcc, then change the C flags for compiling shared
+ # libraries to the right flags for gcc, instead of those for the
+ # standard manufacturer compiler.
+
+ if test "$DL_OBJS" != "tclLoadNone.o" ; then
+ if test "$GCC" = "yes" ; then
+ case $system in
+ AIX-*)
+ ;;
+ BSD/OS*)
+ ;;
+ IRIX*)
+ ;;
+ NetBSD-*|FreeBSD-*)
+ ;;
+ Darwin-*)
+ ;;
+ SCO_SV-3.2*)
+ ;;
+ windows)
+ ;;
+ *)
+ SHLIB_CFLAGS="-fPIC"
+ ;;
+ esac
+ fi
+ fi
+
+ if test "$SHARED_LIB_SUFFIX" = "" ; then
+ SHARED_LIB_SUFFIX='${PACKAGE_VERSION}${SHLIB_SUFFIX}'
+ fi
+ if test "$UNSHARED_LIB_SUFFIX" = "" ; then
+ UNSHARED_LIB_SUFFIX='${PACKAGE_VERSION}.a'
+ fi
+
+ AC_SUBST(DL_LIBS)
+
+ AC_SUBST(CFLAGS_DEBUG)
+ AC_SUBST(CFLAGS_OPTIMIZE)
+ AC_SUBST(CFLAGS_WARNING)
+
+ AC_SUBST(STLIB_LD)
+ AC_SUBST(SHLIB_LD)
+
+ AC_SUBST(SHLIB_LD_LIBS)
+ AC_SUBST(SHLIB_CFLAGS)
+
+ AC_SUBST(LD_LIBRARY_PATH_VAR)
+
+ # These must be called after we do the basic CFLAGS checks and
+ # verify any possible 64-bit or similar switches are necessary
+ TEA_TCL_EARLY_FLAGS
+ TEA_TCL_64BIT_FLAGS
+])
+
+#--------------------------------------------------------------------
+# TEA_SERIAL_PORT
+#
+# Determine which interface to use to talk to the serial port.
+# Note that #include lines must begin in leftmost column for
+# some compilers to recognize them as preprocessor directives,
+# and some build environments have stdin not pointing at a
+# pseudo-terminal (usually /dev/null instead.)
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines only one of the following vars:
+# HAVE_SYS_MODEM_H
+# USE_TERMIOS
+# USE_TERMIO
+# USE_SGTTY
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_SERIAL_PORT], [
+ AC_CHECK_HEADERS(sys/modem.h)
+ AC_CACHE_CHECK([termios vs. termio vs. sgtty], tcl_cv_api_serial, [
+ AC_TRY_RUN([
+#include <termios.h>
+
+int main() {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <termio.h>
+
+int main() {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <sgtty.h>
+
+int main() {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no ; then
+ AC_TRY_RUN([
+#include <termios.h>
+#include <errno.h>
+
+int main() {
+ struct termios t;
+ if (tcgetattr(0, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ cfsetospeed(&t, 0);
+ t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
+ AC_TRY_RUN([
+#include <termio.h>
+#include <errno.h>
+
+int main() {
+ struct termio t;
+ if (ioctl(0, TCGETA, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
+ return 0;
+ }
+ return 1;
+ }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
+ fi
+ if test $tcl_cv_api_serial = no; then
+ AC_TRY_RUN([
+#include <sgtty.h>
+#include <errno.h>
+
+int main() {
+ struct sgttyb t;
+ if (ioctl(0, TIOCGETP, &t) == 0
+ || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
+ t.sg_ospeed = 0;
+ t.sg_flags |= ODDP | EVENP | RAW;
+ return 0;
+ }
+ return 1;
+}], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
+ fi])
+ case $tcl_cv_api_serial in
+ termios) AC_DEFINE(USE_TERMIOS, 1, [Use the termios API for serial lines]);;
+ termio) AC_DEFINE(USE_TERMIO, 1, [Use the termio API for serial lines]);;
+ sgtty) AC_DEFINE(USE_SGTTY, 1, [Use the sgtty API for serial lines]);;
+ esac
+])
+
+#--------------------------------------------------------------------
+# TEA_MISSING_POSIX_HEADERS
+#
+# Supply substitutes for missing POSIX header files. Special
+# notes:
+# - stdlib.h doesn't define strtol, strtoul, or
+# strtod insome versions of SunOS
+# - some versions of string.h don't declare procedures such
+# as strstr
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines some of the following vars:
+# NO_DIRENT_H
+# NO_ERRNO_H
+# NO_VALUES_H
+# HAVE_LIMITS_H or NO_LIMITS_H
+# NO_STDLIB_H
+# NO_STRING_H
+# NO_SYS_WAIT_H
+# NO_DLFCN_H
+# HAVE_SYS_PARAM_H
+#
+# HAVE_STRING_H ?
+#
+# tkUnixPort.h checks for HAVE_LIMITS_H, so do both HAVE and
+# CHECK on limits.h
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_MISSING_POSIX_HEADERS], [
+ AC_CACHE_CHECK([dirent.h], tcl_cv_dirent_h, [
+ AC_TRY_LINK([#include <sys/types.h>
+#include <dirent.h>], [
+#ifndef _POSIX_SOURCE
+# ifdef __Lynx__
+ /*
+ * Generate compilation error to make the test fail: Lynx headers
+ * are only valid if really in the POSIX environment.
+ */
+
+ missing_procedure();
+# endif
+#endif
+DIR *d;
+struct dirent *entryPtr;
+char *p;
+d = opendir("foobar");
+entryPtr = readdir(d);
+p = entryPtr->d_name;
+closedir(d);
+], tcl_cv_dirent_h=yes, tcl_cv_dirent_h=no)])
+
+ if test $tcl_cv_dirent_h = no; then
+ AC_DEFINE(NO_DIRENT_H, 1, [Do we have <dirent.h>?])
+ fi
+
+ AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H, 1, [Do we have <errno.h>?])])
+ AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H, 1, [Do we have <float.h>?])])
+ AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H, 1, [Do we have <values.h>?])])
+ AC_CHECK_HEADER(limits.h,
+ [AC_DEFINE(HAVE_LIMITS_H, 1, [Do we have <limits.h>?])],
+ [AC_DEFINE(NO_LIMITS_H, 1, [Do we have <limits.h>?])])
+ AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
+ AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
+ AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
+ AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
+ if test $tcl_ok = 0; then
+ AC_DEFINE(NO_STDLIB_H, 1, [Do we have <stdlib.h>?])
+ fi
+ AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
+ AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
+ AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
+
+ # See also memmove check below for a place where NO_STRING_H can be
+ # set and why.
+
+ if test $tcl_ok = 0; then
+ AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?])
+ fi
+
+ AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H, 1, [Do we have <sys/wait.h>?])])
+ AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H, 1, [Do we have <dlfcn.h>?])])
+
+ # OS/390 lacks sys/param.h (and doesn't need it, by chance).
+ AC_HAVE_HEADERS(sys/param.h)
+])
+
+#--------------------------------------------------------------------
+# TEA_PATH_X
+#
+# Locate the X11 header files and the X11 library archive. Try
+# the ac_path_x macro first, but if it doesn't find the X stuff
+# (e.g. because there's no xmkmf program) then check through
+# a list of possible directories. Under some conditions the
+# autoconf macro will return an include directory that contains
+# no include files, so double-check its result just to be safe.
+#
+# This should be called after TEA_CONFIG_CFLAGS as setting the
+# LIBS line can confuse some configure macro magic.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets the following vars:
+# XINCLUDES
+# XLIBSW
+# PKG_LIBS (appends to)
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_X], [
+ if test "${TEA_WINDOWINGSYSTEM}" = "x11" ; then
+ TEA_PATH_UNIX_X
+ fi
+])
+
+AC_DEFUN([TEA_PATH_UNIX_X], [
+ AC_PATH_X
+ not_really_there=""
+ if test "$no_x" = ""; then
+ if test "$x_includes" = ""; then
+ AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
+ else
+ if test ! -r $x_includes/X11/Intrinsic.h; then
+ not_really_there="yes"
+ fi
+ fi
+ fi
+ if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
+ AC_MSG_CHECKING([for X11 header files])
+ found_xincludes="no"
+ AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
+ if test "$found_xincludes" = "no"; then
+ dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
+ for i in $dirs ; do
+ if test -r $i/X11/Intrinsic.h; then
+ AC_MSG_RESULT([$i])
+ XINCLUDES=" -I$i"
+ found_xincludes="yes"
+ break
+ fi
+ done
+ fi
+ else
+ if test "$x_includes" != ""; then
+ XINCLUDES="-I$x_includes"
+ found_xincludes="yes"
+ fi
+ fi
+ if test found_xincludes = "no"; then
+ AC_MSG_RESULT([couldn't find any!])
+ fi
+
+ if test "$no_x" = yes; then
+ AC_MSG_CHECKING([for X11 libraries])
+ XLIBSW=nope
+ dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
+ for i in $dirs ; do
+ if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
+ AC_MSG_RESULT([$i])
+ XLIBSW="-L$i -lX11"
+ x_libraries="$i"
+ break
+ fi
+ done
+ else
+ if test "$x_libraries" = ""; then
+ XLIBSW=-lX11
+ else
+ XLIBSW="-L$x_libraries -lX11"
+ fi
+ fi
+ if test "$XLIBSW" = nope ; then
+ AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
+ fi
+ if test "$XLIBSW" = nope ; then
+ AC_MSG_RESULT([could not find any! Using -lX11.])
+ XLIBSW=-lX11
+ fi
+ if test x"${XLIBSW}" != x ; then
+ PKG_LIBS="${PKG_LIBS} ${XLIBSW}"
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_BLOCKING_STYLE
+#
+# The statements below check for systems where POSIX-style
+# non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
+# On these systems (mostly older ones), use the old BSD-style
+# FIONBIO approach instead.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines some of the following vars:
+# HAVE_SYS_IOCTL_H
+# HAVE_SYS_FILIO_H
+# USE_FIONBIO
+# O_NONBLOCK
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_BLOCKING_STYLE], [
+ AC_CHECK_HEADERS(sys/ioctl.h)
+ AC_CHECK_HEADERS(sys/filio.h)
+ TEA_CONFIG_SYSTEM
+ AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
+ case $system in
+ # There used to be code here to use FIONBIO under AIX. However, it
+ # was reported that FIONBIO doesn't work under AIX 3.2.5. Since
+ # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
+ # code (JO, 5/31/97).
+
+ OSF*)
+ AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
+ AC_MSG_RESULT([FIONBIO])
+ ;;
+ SunOS-4*)
+ AC_DEFINE(USE_FIONBIO, 1, [Should we use FIONBIO?])
+ AC_MSG_RESULT([FIONBIO])
+ ;;
+ *)
+ AC_MSG_RESULT([O_NONBLOCK])
+ ;;
+ esac
+])
+
+#--------------------------------------------------------------------
+# TEA_TIME_HANLDER
+#
+# Checks how the system deals with time.h, what time structures
+# are used on the system, and what fields the structures have.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines some of the following vars:
+# USE_DELTA_FOR_TZ
+# HAVE_TM_GMTOFF
+# HAVE_TM_TZADJ
+# HAVE_TIMEZONE_VAR
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_TIME_HANDLER], [
+ AC_CHECK_HEADERS(sys/time.h)
+ AC_HEADER_TIME
+ AC_STRUCT_TIMEZONE
+
+ AC_CHECK_FUNCS(gmtime_r localtime_r)
+
+ AC_CACHE_CHECK([tm_tzadj in struct tm], tcl_cv_member_tm_tzadj, [
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
+ tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no)])
+ if test $tcl_cv_member_tm_tzadj = yes ; then
+ AC_DEFINE(HAVE_TM_TZADJ, 1, [Should we use the tm_tzadj field of struct tm?])
+ fi
+
+ AC_CACHE_CHECK([tm_gmtoff in struct tm], tcl_cv_member_tm_gmtoff, [
+ AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
+ tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no)])
+ if test $tcl_cv_member_tm_gmtoff = yes ; then
+ AC_DEFINE(HAVE_TM_GMTOFF, 1, [Should we use the tm_gmtoff field of struct tm?])
+ fi
+
+ #
+ # Its important to include time.h in this check, as some systems
+ # (like convex) have timezone functions, etc.
+ #
+ AC_CACHE_CHECK([long timezone variable], tcl_cv_timezone_long, [
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern long timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
+ if test $tcl_cv_timezone_long = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+ else
+ #
+ # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
+ #
+ AC_CACHE_CHECK([time_t timezone variable], tcl_cv_timezone_time, [
+ AC_TRY_COMPILE([#include <time.h>],
+ [extern time_t timezone;
+ timezone += 1;
+ exit (0);],
+ tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
+ if test $tcl_cv_timezone_time = yes ; then
+ AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
+ fi
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_BUGGY_STRTOD
+#
+# Under Solaris 2.4, strtod returns the wrong value for the
+# terminating character under some conditions. Check for this
+# and if the problem exists use a substitute procedure
+# "fixstrtod" (provided by Tcl) that corrects the error.
+# Also, on Compaq's Tru64 Unix 5.0,
+# strtod(" ") returns 0.0 instead of a failure to convert.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Might defines some of the following vars:
+# strtod (=fixstrtod)
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_BUGGY_STRTOD], [
+ AC_CHECK_FUNC(strtod, tcl_strtod=1, tcl_strtod=0)
+ if test "$tcl_strtod" = 1; then
+ AC_CACHE_CHECK([for Solaris2.4/Tru64 strtod bugs], tcl_cv_strtod_buggy,[
+ AC_TRY_RUN([
+ extern double strtod();
+ int main() {
+ char *infString="Inf", *nanString="NaN", *spaceString=" ";
+ char *term;
+ double value;
+ value = strtod(infString, &term);
+ if ((term != infString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(nanString, &term);
+ if ((term != nanString) && (term[-1] == 0)) {
+ exit(1);
+ }
+ value = strtod(spaceString, &term);
+ if (term == (spaceString+1)) {
+ exit(1);
+ }
+ exit(0);
+ }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
+ tcl_cv_strtod_buggy=buggy)])
+ if test "$tcl_cv_strtod_buggy" = buggy; then
+ AC_LIBOBJ([fixstrtod])
+ USE_COMPAT=1
+ AC_DEFINE(strtod, fixstrtod, [Do we want to use the strtod() in compat?])
+ fi
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_LINK_LIBS
+#
+# Search for the libraries needed to link the Tcl shell.
+# Things like the math library (-lm) and socket stuff (-lsocket vs.
+# -lnsl) are dealt with here.
+#
+# Arguments:
+# Requires the following vars to be set in the Makefile:
+# DL_LIBS
+# LIBS
+# MATH_LIBS
+#
+# Results:
+#
+# Subst's the following var:
+# TCL_LIBS
+# MATH_LIBS
+#
+# Might append to the following vars:
+# LIBS
+#
+# Might define the following vars:
+# HAVE_NET_ERRNO_H
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_TCL_LINK_LIBS], [
+ #--------------------------------------------------------------------
+ # On a few very rare systems, all of the libm.a stuff is
+ # already in libc.a. Set compiler flags accordingly.
+ # Also, Linux requires the "ieee" library for math to work
+ # right (and it must appear before "-lm").
+ #--------------------------------------------------------------------
+
+ AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
+ AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
+
+ #--------------------------------------------------------------------
+ # Interactive UNIX requires -linet instead of -lsocket, plus it
+ # needs net/errno.h to define the socket-related error codes.
+ #--------------------------------------------------------------------
+
+ AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
+ AC_CHECK_HEADER(net/errno.h, [
+ AC_DEFINE(HAVE_NET_ERRNO_H, 1, [Do we have <net/errno.h>?])])
+
+ #--------------------------------------------------------------------
+ # Check for the existence of the -lsocket and -lnsl libraries.
+ # The order here is important, so that they end up in the right
+ # order in the command line generated by make. Here are some
+ # special considerations:
+ # 1. Use "connect" and "accept" to check for -lsocket, and
+ # "gethostbyname" to check for -lnsl.
+ # 2. Use each function name only once: can't redo a check because
+ # autoconf caches the results of the last check and won't redo it.
+ # 3. Use -lnsl and -lsocket only if they supply procedures that
+ # aren't already present in the normal libraries. This is because
+ # IRIX 5.2 has libraries, but they aren't needed and they're
+ # bogus: they goof up name resolution if used.
+ # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
+ # To get around this problem, check for both libraries together
+ # if -lsocket doesn't work by itself.
+ #--------------------------------------------------------------------
+
+ tcl_checkBoth=0
+ AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
+ if test "$tcl_checkSocket" = 1; then
+ AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
+ LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
+ fi
+ if test "$tcl_checkBoth" = 1; then
+ tk_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
+ fi
+ AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
+ [LIBS="$LIBS -lnsl"])])
+
+ # Don't perform the eval of the libraries here because DL_LIBS
+ # won't be set until we call TEA_CONFIG_CFLAGS
+
+ TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
+ AC_SUBST(TCL_LIBS)
+ AC_SUBST(MATH_LIBS)
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_EARLY_FLAGS
+#
+# Check for what flags are needed to be passed so the correct OS
+# features are available.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# _ISOC99_SOURCE
+# _LARGEFILE64_SOURCE
+# _LARGEFILE_SOURCE64
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_TCL_EARLY_FLAG],[
+ AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
+ AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
+ AC_TRY_COMPILE([[#define ]$1[ 1
+]$2], $3,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
+ [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
+ if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
+ AC_DEFINE($1, 1, [Add the ]$1[ flag when building])
+ tcl_flags="$tcl_flags $1"
+ fi
+])
+
+AC_DEFUN([TEA_TCL_EARLY_FLAGS],[
+ AC_MSG_CHECKING([for required early compiler flags])
+ tcl_flags=""
+ TEA_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
+ [char *p = (char *)strtoll; char *q = (char *)strtoull;])
+ TEA_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
+ [struct stat64 buf; int i = stat64("/", &buf);])
+ TEA_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>],
+ [char *p = (char *)open64;])
+ if test "x${tcl_flags}" = "x" ; then
+ AC_MSG_RESULT([none])
+ else
+ AC_MSG_RESULT([${tcl_flags}])
+ fi
+])
+
+#--------------------------------------------------------------------
+# TEA_TCL_64BIT_FLAGS
+#
+# Check for what is defined in the way of 64-bit features.
+#
+# Arguments:
+# None
+#
+# Results:
+#
+# Might define the following vars:
+# TCL_WIDE_INT_IS_LONG
+# TCL_WIDE_INT_TYPE
+# HAVE_STRUCT_DIRENT64
+# HAVE_STRUCT_STAT64
+# HAVE_TYPE_OFF64_T
+#
+#--------------------------------------------------------------------
+
+AC_DEFUN([TEA_TCL_64BIT_FLAGS], [
+ AC_MSG_CHECKING([for 64-bit integer type])
+ AC_CACHE_VAL(tcl_cv_type_64bit,[
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
+ AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
+ tcl_type_64bit=__int64, tcl_type_64bit="long long")
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ AC_TRY_COMPILE(,[switch (0) {
+ case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
+ }],tcl_cv_type_64bit=${tcl_type_64bit})])
+ if test "${tcl_cv_type_64bit}" = none ; then
+ AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Are wide integers to be implemented with C 'long's?])
+ AC_MSG_RESULT([using long])
+ elif test "${tcl_cv_type_64bit}" = "__int64" \
+ -a "${TEA_PLATFORM}" = "windows" ; then
+ # We actually want to use the default tcl.h checks in this
+ # case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
+ AC_MSG_RESULT([using Tcl header defaults])
+ else
+ AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit},
+ [What type should be used to define wide integers?])
+ AC_MSG_RESULT([${tcl_cv_type_64bit}])
+
+ # Now check for auxiliary declarations
+ AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[
+ AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/dirent.h>],[struct dirent64 p;],
+ tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
+ if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_DIRENT64, 1, [Is 'struct dirent64' in <sys/types.h>?])
+ fi
+
+ AC_CACHE_CHECK([for struct stat64], tcl_cv_struct_stat64,[
+ AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
+],
+ tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
+ if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
+ AC_DEFINE(HAVE_STRUCT_STAT64, 1, [Is 'struct stat64' in <sys/stat.h>?])
+ fi
+
+ AC_CHECK_FUNCS(open64 lseek64)
+ AC_MSG_CHECKING([for off64_t])
+ AC_CACHE_VAL(tcl_cv_type_off64_t,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
+],
+ tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
+ dnl Define HAVE_TYPE_OFF64_T only when the off64_t type and the
+ dnl functions lseek64 and open64 are defined.
+ if test "x${tcl_cv_type_off64_t}" = "xyes" && \
+ test "x${ac_cv_func_lseek64}" = "xyes" && \
+ test "x${ac_cv_func_open64}" = "xyes" ; then
+ AC_DEFINE(HAVE_TYPE_OFF64_T, 1, [Is off64_t in <sys/types.h>?])
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ fi
+])
+
+##
+## Here ends the standard Tcl configuration bits and starts the
+## TEA specific functions
+##
+
+#------------------------------------------------------------------------
+# TEA_INIT --
+#
+# Init various Tcl Extension Architecture (TEA) variables.
+# This should be the first called TEA_* macro.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Defines and substs the following vars:
+# CYGPATH
+# EXEEXT
+# Defines only:
+# TEA_VERSION
+# TEA_INITED
+# TEA_PLATFORM (windows or unix)
+#
+# "cygpath" is used on windows to generate native path names for include
+# files. These variables should only be used with the compiler and linker
+# since they generate native path names.
+#
+# EXEEXT
+# Select the executable extension based on the host type. This
+# is a lightweight replacement for AC_EXEEXT that doesn't require
+# a compiler.
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_INIT], [
+ # TEA extensions pass this us the version of TEA they think they
+ # are compatible with.
+ TEA_VERSION="3.5"
+
+ AC_MSG_CHECKING([for correct TEA configuration])
+ if test x"${PACKAGE_NAME}" = x ; then
+ AC_MSG_ERROR([
+The PACKAGE_NAME variable must be defined by your TEA configure.in])
+ fi
+ if test x"$1" = x ; then
+ AC_MSG_ERROR([
+TEA version not specified.])
+ elif test "$1" != "${TEA_VERSION}" ; then
+ AC_MSG_RESULT([warning: requested TEA version "$1", have "${TEA_VERSION}"])
+ else
+ AC_MSG_RESULT([ok (TEA ${TEA_VERSION})])
+ fi
+ case "`uname -s`" in
+ *win32*|*WIN32*|*CYGWIN_NT*|*CYGWIN_9*|*CYGWIN_ME*|*MINGW32_*)
+ AC_CHECK_PROG(CYGPATH, cygpath, cygpath -w, echo)
+ EXEEXT=".exe"
+ TEA_PLATFORM="windows"
+ ;;
+ *)
+ CYGPATH=echo
+ EXEEXT=""
+ TEA_PLATFORM="unix"
+ ;;
+ esac
+
+ # Check if exec_prefix is set. If not use fall back to prefix.
+ # Note when adjusted, so that TEA_PREFIX can correct for this.
+ # This is needed for recursive configures, since autoconf propagates
+ # $prefix, but not $exec_prefix (doh!).
+ if test x$exec_prefix = xNONE ; then
+ exec_prefix_default=yes
+ exec_prefix=$prefix
+ fi
+
+ AC_SUBST(EXEEXT)
+ AC_SUBST(CYGPATH)
+
+ # This package name must be replaced statically for AC_SUBST to work
+ AC_SUBST(PKG_LIB_FILE)
+ # Substitute STUB_LIB_FILE in case package creates a stub library too.
+ AC_SUBST(PKG_STUB_LIB_FILE)
+
+ # We AC_SUBST these here to ensure they are subst'ed,
+ # in case the user doesn't call TEA_ADD_...
+ AC_SUBST(PKG_STUB_SOURCES)
+ AC_SUBST(PKG_STUB_OBJECTS)
+ AC_SUBST(PKG_TCL_SOURCES)
+ AC_SUBST(PKG_HEADERS)
+ AC_SUBST(PKG_INCLUDES)
+ AC_SUBST(PKG_LIBS)
+ AC_SUBST(PKG_CFLAGS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_SOURCES --
+#
+# Specify one or more source files. Users should check for
+# the right platform before adding to their list.
+# It is not important to specify the directory, as long as it is
+# in the generic, win or unix subdirectory of $(srcdir).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_SOURCES
+# PKG_OBJECTS
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_SOURCES], [
+ vars="$@"
+ for i in $vars; do
+ case $i in
+ [\$]*)
+ # allow $-var names
+ PKG_SOURCES="$PKG_SOURCES $i"
+ PKG_OBJECTS="$PKG_OBJECTS $i"
+ ;;
+ *)
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ AC_MSG_ERROR([could not find source file '$i'])
+ fi
+ PKG_SOURCES="$PKG_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
+ fi
+ PKG_OBJECTS="$PKG_OBJECTS $j"
+ ;;
+ esac
+ done
+ AC_SUBST(PKG_SOURCES)
+ AC_SUBST(PKG_OBJECTS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_STUB_SOURCES --
+#
+# Specify one or more source files. Users should check for
+# the right platform before adding to their list.
+# It is not important to specify the directory, as long as it is
+# in the generic, win or unix subdirectory of $(srcdir).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_STUB_SOURCES
+# PKG_STUB_OBJECTS
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_STUB_SOURCES], [
+ vars="$@"
+ for i in $vars; do
+ # check for existence - allows for generic/win/unix VPATH
+ if test ! -f "${srcdir}/$i" -a ! -f "${srcdir}/generic/$i" \
+ -a ! -f "${srcdir}/win/$i" -a ! -f "${srcdir}/unix/$i" \
+ ; then
+ AC_MSG_ERROR([could not find stub source file '$i'])
+ fi
+ PKG_STUB_SOURCES="$PKG_STUB_SOURCES $i"
+ # this assumes it is in a VPATH dir
+ i=`basename $i`
+ # handle user calling this before or after TEA_SETUP_COMPILER
+ if test x"${OBJEXT}" != x ; then
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.${OBJEXT}"
+ else
+ j="`echo $i | sed -e 's/\.[[^.]]*$//'`.\${OBJEXT}"
+ fi
+ PKG_STUB_OBJECTS="$PKG_STUB_OBJECTS $j"
+ done
+ AC_SUBST(PKG_STUB_SOURCES)
+ AC_SUBST(PKG_STUB_OBJECTS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_TCL_SOURCES --
+#
+# Specify one or more Tcl source files. These should be platform
+# independent runtime files.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_TCL_SOURCES
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_TCL_SOURCES], [
+ vars="$@"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ AC_MSG_ERROR([could not find tcl source file '${srcdir}/$i'])
+ fi
+ PKG_TCL_SOURCES="$PKG_TCL_SOURCES $i"
+ done
+ AC_SUBST(PKG_TCL_SOURCES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_HEADERS --
+#
+# Specify one or more source headers. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_HEADERS
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_HEADERS], [
+ vars="$@"
+ for i in $vars; do
+ # check for existence, be strict because it is installed
+ if test ! -f "${srcdir}/$i" ; then
+ AC_MSG_ERROR([could not find header file '${srcdir}/$i'])
+ fi
+ PKG_HEADERS="$PKG_HEADERS $i"
+ done
+ AC_SUBST(PKG_HEADERS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_INCLUDES --
+#
+# Specify one or more include dirs. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_INCLUDES
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_INCLUDES], [
+ vars="$@"
+ for i in $vars; do
+ PKG_INCLUDES="$PKG_INCLUDES $i"
+ done
+ AC_SUBST(PKG_INCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_LIBS --
+#
+# Specify one or more libraries. Users should check for
+# the right platform before adding to their list. For Windows,
+# libraries provided in "foo.lib" format will be converted to
+# "-lfoo" when using GCC (mingw).
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_LIBS
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_LIBS], [
+ vars="$@"
+ for i in $vars; do
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" = "yes" ; then
+ # Convert foo.lib to -lfoo for GCC. No-op if not *.lib
+ i=`echo "$i" | sed -e 's/^\([[^-]].*\)\.lib[$]/-l\1/i'`
+ fi
+ PKG_LIBS="$PKG_LIBS $i"
+ done
+ AC_SUBST(PKG_LIBS)
+])
+
+#------------------------------------------------------------------------
+# TEA_ADD_CFLAGS --
+#
+# Specify one or more CFLAGS. Users should check for
+# the right platform before adding to their list.
+#
+# Arguments:
+# one or more file names
+#
+# Results:
+#
+# Defines and substs the following vars:
+# PKG_CFLAGS
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_ADD_CFLAGS], [
+ PKG_CFLAGS="$PKG_CFLAGS $@"
+ AC_SUBST(PKG_CFLAGS)
+])
+
+#------------------------------------------------------------------------
+# TEA_PREFIX --
+#
+# Handle the --prefix=... option by defaulting to what Tcl gave
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# If --prefix or --exec-prefix was not specified, $prefix and
+# $exec_prefix will be set to the values given to Tcl when it was
+# configured.
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_PREFIX], [
+ if test "${prefix}" = "NONE"; then
+ prefix_default=yes
+ if test x"${TCL_PREFIX}" != x; then
+ AC_MSG_NOTICE([--prefix defaulting to TCL_PREFIX ${TCL_PREFIX}])
+ prefix=${TCL_PREFIX}
+ else
+ AC_MSG_NOTICE([--prefix defaulting to /usr/local])
+ prefix=/usr/local
+ fi
+ fi
+ if test "${exec_prefix}" = "NONE" -a x"${prefix_default}" = x"yes" \
+ -o x"${exec_prefix_default}" = x"yes" ; then
+ if test x"${TCL_EXEC_PREFIX}" != x; then
+ AC_MSG_NOTICE([--exec-prefix defaulting to TCL_EXEC_PREFIX ${TCL_EXEC_PREFIX}])
+ exec_prefix=${TCL_EXEC_PREFIX}
+ else
+ AC_MSG_NOTICE([--exec-prefix defaulting to ${prefix}])
+ exec_prefix=$prefix
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_SETUP_COMPILER_CC --
+#
+# Do compiler checks the way we want. This is just a replacement
+# for AC_PROG_CC in TEA configure.in files to make them cleaner.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets up CC var and other standard bits we need to make executables.
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_SETUP_COMPILER_CC], [
+ # Don't put any macros that use the compiler (e.g. AC_TRY_COMPILE)
+ # in this macro, they need to go into TEA_SETUP_COMPILER instead.
+
+ # If the user did not set CFLAGS, set it now to keep
+ # the AC_PROG_CC macro from adding "-g -O2".
+ if test "${CFLAGS+set}" != "set" ; then
+ CFLAGS=""
+ fi
+
+ AC_PROG_CC
+ AC_PROG_CPP
+
+ AC_PROG_INSTALL
+
+ #--------------------------------------------------------------------
+ # Checks to see if the make program sets the $MAKE variable.
+ #--------------------------------------------------------------------
+
+ AC_PROG_MAKE_SET
+
+ #--------------------------------------------------------------------
+ # Find ranlib
+ #--------------------------------------------------------------------
+
+ AC_PROG_RANLIB
+
+ #--------------------------------------------------------------------
+ # Determines the correct binary file extension (.o, .obj, .exe etc.)
+ #--------------------------------------------------------------------
+
+ AC_OBJEXT
+ AC_EXEEXT
+])
+
+#------------------------------------------------------------------------
+# TEA_SETUP_COMPILER --
+#
+# Do compiler checks that use the compiler. This must go after
+# TEA_SETUP_COMPILER_CC, which does the actual compiler check.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Sets up CC var and other standard bits we need to make executables.
+#------------------------------------------------------------------------
+AC_DEFUN([TEA_SETUP_COMPILER], [
+ # Any macros that use the compiler (e.g. AC_TRY_COMPILE) have to go here.
+ AC_REQUIRE([TEA_SETUP_COMPILER_CC])
+
+ #------------------------------------------------------------------------
+ # If we're using GCC, see if the compiler understands -pipe. If so, use it.
+ # It makes compiling go faster. (This is only a performance feature.)
+ #------------------------------------------------------------------------
+
+ if test -z "$no_pipe" -a -n "$GCC"; then
+ AC_MSG_CHECKING([if the compiler understands -pipe])
+ OLDCC="$CC"
+ CC="$CC -pipe"
+ AC_TRY_COMPILE(,, AC_MSG_RESULT([yes]), CC="$OLDCC"
+ AC_MSG_RESULT([no]))
+ fi
+
+ #--------------------------------------------------------------------
+ # Common compiler flag setup
+ #--------------------------------------------------------------------
+
+ AC_C_BIGENDIAN
+ if test "${TEA_PLATFORM}" = "unix" ; then
+ TEA_TCL_LINK_LIBS
+ TEA_MISSING_POSIX_HEADERS
+ # Let the user call this, because if it triggers, they will
+ # need a compat/strtod.c that is correct. Users can also
+ # use Tcl_GetDouble(FromObj) instead.
+ #TEA_BUGGY_STRTOD
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_MAKE_LIB --
+#
+# Generate a line that can be used to build a shared/unshared library
+# in a platform independent manner.
+#
+# Arguments:
+# none
+#
+# Requires:
+#
+# Results:
+#
+# Defines the following vars:
+# CFLAGS - Done late here to note disturb other AC macros
+# MAKE_LIB - Command to execute to build the Tcl library;
+# differs depending on whether or not Tcl is being
+# compiled as a shared library.
+# MAKE_SHARED_LIB Makefile rule for building a shared library
+# MAKE_STATIC_LIB Makefile rule for building a static library
+# MAKE_STUB_LIB Makefile rule for building a stub library
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_MAKE_LIB], [
+ if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes"; then
+ MAKE_STATIC_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} \${SHLIB_LD_LIBS} \${LDFLAGS_DEFAULT} -out:\[$]@ \$(PKG_OBJECTS)"
+ MAKE_STUB_LIB="\${STLIB_LD} -out:\[$]@ \$(PKG_STUB_OBJECTS)"
+ else
+ MAKE_STATIC_LIB="\${STLIB_LD} \[$]@ \$(PKG_OBJECTS)"
+ MAKE_SHARED_LIB="\${SHLIB_LD} -o \[$]@ \$(PKG_OBJECTS) \${SHLIB_LD_LIBS}"
+ MAKE_STUB_LIB="\${STLIB_LD} \[$]@ \$(PKG_STUB_OBJECTS)"
+ fi
+
+ if test "${SHARED_BUILD}" = "1" ; then
+ MAKE_LIB="${MAKE_SHARED_LIB} "
+ else
+ MAKE_LIB="${MAKE_STATIC_LIB} "
+ fi
+
+ #--------------------------------------------------------------------
+ # Shared libraries and static libraries have different names.
+ # Use the double eval to make sure any variables in the suffix is
+ # substituted. (@@@ Might not be necessary anymore)
+ #--------------------------------------------------------------------
+
+ if test "${TEA_PLATFORM}" = "windows" ; then
+ if test "${SHARED_BUILD}" = "1" ; then
+ # We force the unresolved linking of symbols that are really in
+ # the private libraries of Tcl and Tk.
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}`\""
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${TK_BIN_DIR}/${TK_STUB_LIB_FILE}`\""
+ fi
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ else
+ eval eval "PKG_LIB_FILE=${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build their own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ if test "$GCC" = "yes"; then
+ PKG_STUB_LIB_FILE=lib${PKG_STUB_LIB_FILE}
+ fi
+ # These aren't needed on Windows (either MSVC or gcc)
+ RANLIB=:
+ RANLIB_STUB=:
+ else
+ RANLIB_STUB="${RANLIB}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TCL_STUB_LIB_SPEC}"
+ if test x"${TK_BIN_DIR}" != x ; then
+ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${TK_STUB_LIB_SPEC}"
+ fi
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
+ RANLIB=:
+ else
+ eval eval "PKG_LIB_FILE=lib${PACKAGE_NAME}${UNSHARED_LIB_SUFFIX}"
+ fi
+ # Some packages build their own stubs libraries
+ eval eval "PKG_STUB_LIB_FILE=lib${PACKAGE_NAME}stub${UNSHARED_LIB_SUFFIX}"
+ fi
+
+ # These are escaped so that only CFLAGS is picked up at configure time.
+ # The other values will be substituted at make time.
+ CFLAGS="${CFLAGS} \${CFLAGS_DEFAULT} \${CFLAGS_WARNING}"
+ if test "${SHARED_BUILD}" = "1" ; then
+ CFLAGS="${CFLAGS} \${SHLIB_CFLAGS}"
+ fi
+
+ AC_SUBST(MAKE_LIB)
+ AC_SUBST(MAKE_SHARED_LIB)
+ AC_SUBST(MAKE_STATIC_LIB)
+ AC_SUBST(MAKE_STUB_LIB)
+ AC_SUBST(RANLIB_STUB)
+])
+
+#------------------------------------------------------------------------
+# TEA_LIB_SPEC --
+#
+# Compute the name of an existing object library located in libdir
+# from the given base name and produce the appropriate linker flags.
+#
+# Arguments:
+# basename The base name of the library without version
+# numbers, extensions, or "lib" prefixes.
+# extra_dir Extra directory in which to search for the
+# library. This location is used first, then
+# $prefix/$exec-prefix, then some defaults.
+#
+# Requires:
+# TEA_INIT and TEA_PREFIX must be called first.
+#
+# Results:
+#
+# Defines the following vars:
+# ${basename}_LIB_NAME The computed library name.
+# ${basename}_LIB_SPEC The computed linker flags.
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_LIB_SPEC], [
+ AC_MSG_CHECKING([for $1 library])
+
+ # Look in exec-prefix for the library (defined by TEA_PREFIX).
+
+ tea_lib_name_dir="${exec_prefix}/lib"
+
+ # Or in a user-specified location.
+
+ if test x"$2" != x ; then
+ tea_extra_lib_dir=$2
+ else
+ tea_extra_lib_dir=NONE
+ fi
+
+ for i in \
+ `ls -dr ${tea_extra_lib_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr ${tea_extra_lib_dir}/lib$1[[0-9]]* 2>/dev/null ` \
+ `ls -dr ${tea_lib_name_dir}/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr ${tea_lib_name_dir}/lib$1[[0-9]]* 2>/dev/null ` \
+ `ls -dr /usr/lib/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr /usr/lib/lib$1[[0-9]]* 2>/dev/null ` \
+ `ls -dr /usr/local/lib/$1[[0-9]]*.lib 2>/dev/null ` \
+ `ls -dr /usr/local/lib/lib$1[[0-9]]* 2>/dev/null ` ; do
+ if test -f "$i" ; then
+ tea_lib_name_dir=`dirname $i`
+ $1_LIB_NAME=`basename $i`
+ $1_LIB_PATH_NAME=$i
+ break
+ fi
+ done
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ $1_LIB_SPEC=\"`${CYGPATH} ${$1_LIB_PATH_NAME} 2>/dev/null`\"
+ else
+ # Strip off the leading "lib" and trailing ".a" or ".so"
+
+ tea_lib_name_lib=`echo ${$1_LIB_NAME}|sed -e 's/^lib//' -e 's/\.[[^.]]*$//' -e 's/\.so.*//'`
+ $1_LIB_SPEC="-L${tea_lib_name_dir} -l${tea_lib_name_lib}"
+ fi
+
+ if test "x${$1_LIB_NAME}" = x ; then
+ AC_MSG_ERROR([not found])
+ else
+ AC_MSG_RESULT([${$1_LIB_SPEC}])
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PRIVATE_TCL_HEADERS --
+#
+# Locate the private Tcl include files
+#
+# Arguments:
+#
+# Requires:
+# TCL_SRC_DIR Assumes that TEA_LOAD_TCLCONFIG has
+# already been called.
+#
+# Results:
+#
+# Substs the following vars:
+# TCL_TOP_DIR_NATIVE
+# TCL_GENERIC_DIR_NATIVE
+# TCL_UNIX_DIR_NATIVE
+# TCL_WIN_DIR_NATIVE
+# TCL_BMAP_DIR_NATIVE
+# TCL_TOOL_DIR_NATIVE
+# TCL_PLATFORM_DIR_NATIVE
+# TCL_BIN_DIR_NATIVE
+# TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TCL_HEADERS], [
+ AC_MSG_CHECKING([for Tcl private include files])
+
+ TCL_SRC_DIR_NATIVE=`${CYGPATH} ${TCL_SRC_DIR}`
+ TCL_TOP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}\"
+ TCL_GENERIC_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/generic\"
+ TCL_UNIX_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/unix\"
+ TCL_WIN_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/win\"
+ TCL_BMAP_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/bitmaps\"
+ TCL_TOOL_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/tools\"
+ TCL_COMPAT_DIR_NATIVE=\"${TCL_SRC_DIR_NATIVE}/compat\"
+
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCL_PLATFORM_DIR_NATIVE=${TCL_WIN_DIR_NATIVE}
+ else
+ TCL_PLATFORM_DIR_NATIVE=${TCL_UNIX_DIR_NATIVE}
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TCL_INCLUDES="-I${TCL_GENERIC_DIR_NATIVE} -I${TCL_PLATFORM_DIR_NATIVE}"
+ if test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ if test -d "${TCL_BIN_DIR}/Headers" -a -d "${TCL_BIN_DIR}/PrivateHeaders"; then
+ TCL_INCLUDES="-I\"${TCL_BIN_DIR}/Headers\" -I\"${TCL_BIN_DIR}/PrivateHeaders\" ${TCL_INCLUDES}"; else
+ TCL_INCLUDES="${TCL_INCLUDES} ${TCL_INCLUDE_SPEC} `echo "${TCL_INCLUDE_SPEC}" | sed -e 's/Headers/PrivateHeaders/'`"; fi
+ ;;
+ esac
+ fi
+
+ AC_SUBST(TCL_TOP_DIR_NATIVE)
+ AC_SUBST(TCL_GENERIC_DIR_NATIVE)
+ AC_SUBST(TCL_UNIX_DIR_NATIVE)
+ AC_SUBST(TCL_WIN_DIR_NATIVE)
+ AC_SUBST(TCL_BMAP_DIR_NATIVE)
+ AC_SUBST(TCL_TOOL_DIR_NATIVE)
+ AC_SUBST(TCL_PLATFORM_DIR_NATIVE)
+
+ AC_SUBST(TCL_INCLUDES)
+ AC_MSG_RESULT([Using srcdir found in tclConfig.sh: ${TCL_SRC_DIR}])
+])
+
+#------------------------------------------------------------------------
+# TEA_PUBLIC_TCL_HEADERS --
+#
+# Locate the installed public Tcl header files
+#
+# Arguments:
+# None.
+#
+# Requires:
+# CYGPATH must be set
+#
+# Results:
+#
+# Adds a --with-tclinclude switch to configure.
+# Result is cached.
+#
+# Substs the following vars:
+# TCL_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PUBLIC_TCL_HEADERS], [
+ AC_MSG_CHECKING([for Tcl public headers])
+
+ AC_ARG_WITH(tclinclude, [ --with-tclinclude directory containing the public Tcl header files], with_tclinclude=${withval})
+
+ AC_CACHE_VAL(ac_cv_c_tclh, [
+ # Use the value from --with-tclinclude, if it was given
+
+ if test x"${with_tclinclude}" != x ; then
+ if test -f "${with_tclinclude}/tcl.h" ; then
+ ac_cv_c_tclh=${with_tclinclude}
+ else
+ AC_MSG_ERROR([${with_tclinclude} directory does not contain tcl.h])
+ fi
+ else
+ if test "`uname -s`" = "Darwin"; then
+ # If Tcl was built as a framework, attempt to use
+ # the framework's Headers directory
+ case ${TCL_DEFS} in
+ *TCL_FRAMEWORK*)
+ list="`ls -d ${TCL_BIN_DIR}/Headers 2>/dev/null`"
+ ;;
+ esac
+ fi
+
+ # Look in the source dir only if Tcl is not installed,
+ # and in that situation, look there before installed locations.
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ list="$list `ls -d ${TCL_SRC_DIR}/generic 2>/dev/null`"
+ fi
+
+ # Check order: pkg --prefix location, Tcl's --prefix location,
+ # relative to directory of tclConfig.sh.
+
+ eval "temp_includedir=${includedir}"
+ list="$list \
+ `ls -d ${temp_includedir} 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
+ if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+ list="$list /usr/local/include /usr/include"
+ if test x"${TCL_INCLUDE_SPEC}" != x ; then
+ d=`echo "${TCL_INCLUDE_SPEC}" | sed -e 's/^-I//'`
+ list="$list `ls -d ${d} 2>/dev/null`"
+ fi
+ fi
+ for i in $list ; do
+ if test -f "$i/tcl.h" ; then
+ ac_cv_c_tclh=$i
+ break
+ fi
+ done
+ fi
+ ])
+
+ # Print a message based on how we determined the include path
+
+ if test x"${ac_cv_c_tclh}" = x ; then
+ AC_MSG_ERROR([tcl.h not found. Please specify its location with --with-tclinclude])
+ else
+ AC_MSG_RESULT([${ac_cv_c_tclh}])
+ fi
+
+ # Convert to a native path and substitute into the output files.
+
+ INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tclh}`
+
+ TCL_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
+
+ AC_SUBST(TCL_INCLUDES)
+])
+
+#------------------------------------------------------------------------
+# TEA_PRIVATE_TK_HEADERS --
+#
+# Locate the private Tk include files
+#
+# Arguments:
+#
+# Requires:
+# TK_SRC_DIR Assumes that TEA_LOAD_TKCONFIG has
+# already been called.
+#
+# Results:
+#
+# Substs the following vars:
+# TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PRIVATE_TK_HEADERS], [
+ AC_MSG_CHECKING([for Tk private include files])
+
+ TK_SRC_DIR_NATIVE=`${CYGPATH} ${TK_SRC_DIR}`
+ TK_TOP_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}\"
+ TK_UNIX_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/unix\"
+ TK_WIN_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/win\"
+ TK_GENERIC_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/generic\"
+ TK_XLIB_DIR_NATIVE=\"${TK_SRC_DIR_NATIVE}/xlib\"
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TK_PLATFORM_DIR_NATIVE=${TK_WIN_DIR_NATIVE}
+ else
+ TK_PLATFORM_DIR_NATIVE=${TK_UNIX_DIR_NATIVE}
+ fi
+ # We want to ensure these are substituted so as not to require
+ # any *_NATIVE vars be defined in the Makefile
+ TK_INCLUDES="-I${TK_GENERIC_DIR_NATIVE} -I${TK_PLATFORM_DIR_NATIVE}"
+ if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
+ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TK_INCLUDES="${TK_INCLUDES} -I${TK_XLIB_DIR_NATIVE}"
+ fi
+ if test "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ TK_INCLUDES="${TK_INCLUDES} -I${TK_SRC_DIR_NATIVE}/macosx"
+ fi
+ if test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use
+ # the framework's Headers and PrivateHeaders directories
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ if test -d "${TK_BIN_DIR}/Headers" -a -d "${TK_BIN_DIR}/PrivateHeaders"; then
+ TK_INCLUDES="-I\"${TK_BIN_DIR}/Headers\" -I\"${TK_BIN_DIR}/PrivateHeaders\" ${TK_INCLUDES}"; fi
+ ;;
+ esac
+ fi
+
+ AC_SUBST(TK_TOP_DIR_NATIVE)
+ AC_SUBST(TK_UNIX_DIR_NATIVE)
+ AC_SUBST(TK_WIN_DIR_NATIVE)
+ AC_SUBST(TK_GENERIC_DIR_NATIVE)
+ AC_SUBST(TK_XLIB_DIR_NATIVE)
+ AC_SUBST(TK_PLATFORM_DIR_NATIVE)
+
+ AC_SUBST(TK_INCLUDES)
+ AC_MSG_RESULT([Using srcdir found in tkConfig.sh: ${TK_SRC_DIR}])
+])
+
+#------------------------------------------------------------------------
+# TEA_PUBLIC_TK_HEADERS --
+#
+# Locate the installed public Tk header files
+#
+# Arguments:
+# None.
+#
+# Requires:
+# CYGPATH must be set
+#
+# Results:
+#
+# Adds a --with-tkinclude switch to configure.
+# Result is cached.
+#
+# Substs the following vars:
+# TK_INCLUDES
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PUBLIC_TK_HEADERS], [
+ AC_MSG_CHECKING([for Tk public headers])
+
+ AC_ARG_WITH(tkinclude, [ --with-tkinclude directory containing the public Tk header files.], with_tkinclude=${withval})
+
+ AC_CACHE_VAL(ac_cv_c_tkh, [
+ # Use the value from --with-tkinclude, if it was given
+
+ if test x"${with_tkinclude}" != x ; then
+ if test -f "${with_tkinclude}/tk.h" ; then
+ ac_cv_c_tkh=${with_tkinclude}
+ else
+ AC_MSG_ERROR([${with_tkinclude} directory does not contain tk.h])
+ fi
+ else
+ if test "`uname -s`" = "Darwin"; then
+ # If Tk was built as a framework, attempt to use
+ # the framework's Headers directory.
+ case ${TK_DEFS} in
+ *TK_FRAMEWORK*)
+ list="`ls -d ${TK_BIN_DIR}/Headers 2>/dev/null`"
+ ;;
+ esac
+ fi
+
+ # Look in the source dir only if Tk is not installed,
+ # and in that situation, look there before installed locations.
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
+ list="$list `ls -d ${TK_SRC_DIR}/generic 2>/dev/null`"
+ fi
+
+ # Check order: pkg --prefix location, Tk's --prefix location,
+ # relative to directory of tkConfig.sh, Tcl's --prefix location,
+ # relative to directory of tclConfig.sh.
+
+ eval "temp_includedir=${includedir}"
+ list="$list \
+ `ls -d ${temp_includedir} 2>/dev/null` \
+ `ls -d ${TK_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TK_BIN_DIR}/../include 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/include 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/../include 2>/dev/null`"
+ if test "${TEA_PLATFORM}" != "windows" -o "$GCC" = "yes"; then
+ list="$list /usr/local/include /usr/include"
+ fi
+ for i in $list ; do
+ if test -f "$i/tk.h" ; then
+ ac_cv_c_tkh=$i
+ break
+ fi
+ done
+ fi
+ ])
+
+ # Print a message based on how we determined the include path
+
+ if test x"${ac_cv_c_tkh}" = x ; then
+ AC_MSG_ERROR([tk.h not found. Please specify its location with --with-tkinclude])
+ else
+ AC_MSG_RESULT([${ac_cv_c_tkh}])
+ fi
+
+ # Convert to a native path and substitute into the output files.
+
+ INCLUDE_DIR_NATIVE=`${CYGPATH} ${ac_cv_c_tkh}`
+
+ TK_INCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
+
+ AC_SUBST(TK_INCLUDES)
+
+ if test "${TEA_WINDOWINGSYSTEM}" = "win32" \
+ -o "${TEA_WINDOWINGSYSTEM}" = "aqua"; then
+ # On Windows and Aqua, we need the X compat headers
+ AC_MSG_CHECKING([for X11 header files])
+ if test ! -r "${INCLUDE_DIR_NATIVE}/X11/Xlib.h"; then
+ INCLUDE_DIR_NATIVE="`${CYGPATH} ${TK_SRC_DIR}/xlib`"
+ TK_XINCLUDES=-I\"${INCLUDE_DIR_NATIVE}\"
+ AC_SUBST(TK_XINCLUDES)
+ fi
+ AC_MSG_RESULT([${INCLUDE_DIR_NATIVE}])
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_TCLSH
+# Determine the fully qualified path name of the tclsh executable
+# in the Tcl build directory or the tclsh installed in a bin
+# directory. This macro will correctly determine the name
+# of the tclsh executable even if tclsh has not yet been
+# built in the build directory. The tclsh found is always
+# associated with a tclConfig.sh file. This tclsh should be used
+# only for running extension test cases. It should never be
+# or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# TCLSH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_TCLSH], [
+ AC_MSG_CHECKING([for tclsh])
+ if test -f "${TCL_BIN_DIR}/Makefile" ; then
+ # tclConfig.sh is in Tcl build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="${TCL_BIN_DIR}/tclsh"
+ fi
+ else
+ # tclConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${TCL_DBGX}${EXEEXT}"
+ else
+ TCLSH_PROG="tclsh${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_DBGX}"
+ fi
+ list="`ls -d ${TCL_BIN_DIR}/../bin 2>/dev/null` \
+ `ls -d ${TCL_BIN_DIR}/.. 2>/dev/null` \
+ `ls -d ${TCL_PREFIX}/bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${TCLSH_PROG}" ; then
+ REAL_TCL_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ TCLSH_PROG="${REAL_TCL_BIN_DIR}/${TCLSH_PROG}"
+ fi
+ AC_MSG_RESULT([${TCLSH_PROG}])
+ AC_SUBST(TCLSH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PROG_WISH
+# Determine the fully qualified path name of the wish executable
+# in the Tk build directory or the wish installed in a bin
+# directory. This macro will correctly determine the name
+# of the wish executable even if wish has not yet been
+# built in the build directory. The wish found is always
+# associated with a tkConfig.sh file. This wish should be used
+# only for running extension test cases. It should never be
+# or generation of files (like pkgIndex.tcl) at build time.
+#
+# Arguments
+# none
+#
+# Results
+# Subst's the following values:
+# WISH_PROG
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PROG_WISH], [
+ AC_MSG_CHECKING([for wish])
+ if test -f "${TK_BIN_DIR}/Makefile" ; then
+ # tkConfig.sh is in Tk build directory
+ if test "${TEA_PLATFORM}" = "windows"; then
+ WISH_PROG="${TK_BIN_DIR}/wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+ else
+ WISH_PROG="${TK_BIN_DIR}/wish"
+ fi
+ else
+ # tkConfig.sh is in install location
+ if test "${TEA_PLATFORM}" = "windows"; then
+ WISH_PROG="wish${TK_MAJOR_VERSION}${TK_MINOR_VERSION}${TK_DBGX}${EXEEXT}"
+ else
+ WISH_PROG="wish${TK_MAJOR_VERSION}.${TK_MINOR_VERSION}${TK_DBGX}"
+ fi
+ list="`ls -d ${TK_BIN_DIR}/../bin 2>/dev/null` \
+ `ls -d ${TK_BIN_DIR}/.. 2>/dev/null` \
+ `ls -d ${TK_PREFIX}/bin 2>/dev/null`"
+ for i in $list ; do
+ if test -f "$i/${WISH_PROG}" ; then
+ REAL_TK_BIN_DIR="`cd "$i"; pwd`"
+ break
+ fi
+ done
+ WISH_PROG="${REAL_TK_BIN_DIR}/${WISH_PROG}"
+ fi
+ AC_MSG_RESULT([${WISH_PROG}])
+ AC_SUBST(WISH_PROG)
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_CONFIG --
+#
+# Locate the ${1}Config.sh file and perform a sanity check on
+# the ${1} compile flags. These are used by packages like
+# [incr Tk] that load *Config.sh files from more than Tcl and Tk.
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-$1=...
+#
+# Defines the following vars:
+# $1_BIN_DIR Full path to the directory containing
+# the $1Config.sh file
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_CONFIG], [
+ #
+ # Ok, lets find the $1 configuration
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-$1
+ #
+
+ if test x"${no_$1}" = x ; then
+ # we reset no_$1 in case something fails here
+ no_$1=true
+ AC_ARG_WITH($1, [ --with-$1 directory containing $1 configuration ($1Config.sh)], with_$1config=${withval})
+ AC_MSG_CHECKING([for $1 configuration])
+ AC_CACHE_VAL(ac_cv_c_$1config,[
+
+ # First check to see if --with-$1 was specified.
+ if test x"${with_$1config}" != x ; then
+ case ${with_$1config} in
+ */$1Config.sh )
+ if test -f ${with_$1config}; then
+ AC_MSG_WARN([--with-$1 argument should refer to directory containing $1Config.sh, not to $1Config.sh itself])
+ with_$1config=`echo ${with_$1config} | sed 's!/$1Config\.sh$!!'`
+ fi;;
+ esac
+ if test -f "${with_$1config}/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd ${with_$1config}; pwd)`
+ else
+ AC_MSG_ERROR([${with_$1config} directory doesn't contain $1Config.sh])
+ fi
+ fi
+
+ # then check for a private $1 installation
+ if test x"${ac_cv_c_$1config}" = x ; then
+ for i in \
+ ../$1 \
+ `ls -dr ../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ../../$1 \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ../../../$1 \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ../../../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../$1 \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]*.[[0-9]]* 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]][[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]] 2>/dev/null` \
+ `ls -dr ${srcdir}/../$1*[[0-9]].[[0-9]]* 2>/dev/null` \
+ ; do
+ if test -f "$i/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i; pwd)`
+ break
+ fi
+ if test -f "$i/unix/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i/unix; pwd)`
+ break
+ fi
+ done
+ fi
+
+ # check in a few common install locations
+ if test x"${ac_cv_c_$1config}" = x ; then
+ for i in `ls -d ${libdir} 2>/dev/null` \
+ `ls -d ${exec_prefix}/lib 2>/dev/null` \
+ `ls -d ${prefix}/lib 2>/dev/null` \
+ `ls -d /usr/local/lib 2>/dev/null` \
+ `ls -d /usr/contrib/lib 2>/dev/null` \
+ `ls -d /usr/lib 2>/dev/null` \
+ ; do
+ if test -f "$i/$1Config.sh" ; then
+ ac_cv_c_$1config=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+
+ if test x"${ac_cv_c_$1config}" = x ; then
+ $1_BIN_DIR="# no $1 configs found"
+ AC_MSG_WARN([Cannot find $1 configuration definitions])
+ exit 0
+ else
+ no_$1=
+ $1_BIN_DIR=${ac_cv_c_$1config}
+ AC_MSG_RESULT([found $$1_BIN_DIR/$1Config.sh])
+ fi
+ fi
+])
+
+#------------------------------------------------------------------------
+# TEA_LOAD_CONFIG --
+#
+# Load the $1Config.sh file
+#
+# Arguments:
+#
+# Requires the following vars to be set:
+# $1_BIN_DIR
+#
+# Results:
+#
+# Subst the following vars:
+# $1_SRC_DIR
+# $1_LIB_FILE
+# $1_LIB_SPEC
+#
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_LOAD_CONFIG], [
+ AC_MSG_CHECKING([for existence of ${$1_BIN_DIR}/$1Config.sh])
+
+ if test -f "${$1_BIN_DIR}/$1Config.sh" ; then
+ AC_MSG_RESULT([loading])
+ . ${$1_BIN_DIR}/$1Config.sh
+ else
+ AC_MSG_RESULT([file not found])
+ fi
+
+ #
+ # If the $1_BIN_DIR is the build directory (not the install directory),
+ # then set the common variable name to the value of the build variables.
+ # For example, the variable $1_LIB_SPEC will be set to the value
+ # of $1_BUILD_LIB_SPEC. An extension should make use of $1_LIB_SPEC
+ # instead of $1_BUILD_LIB_SPEC since it will work with both an
+ # installed and uninstalled version of Tcl.
+ #
+
+ if test -f ${$1_BIN_DIR}/Makefile ; then
+ AC_MSG_WARN([Found Makefile - using build library specs for $1])
+ $1_LIB_SPEC=${$1_BUILD_LIB_SPEC}
+ $1_STUB_LIB_SPEC=${$1_BUILD_STUB_LIB_SPEC}
+ $1_STUB_LIB_PATH=${$1_BUILD_STUB_LIB_PATH}
+ fi
+
+ AC_SUBST($1_VERSION)
+ AC_SUBST($1_BIN_DIR)
+ AC_SUBST($1_SRC_DIR)
+
+ AC_SUBST($1_LIB_FILE)
+ AC_SUBST($1_LIB_SPEC)
+
+ AC_SUBST($1_STUB_LIB_FILE)
+ AC_SUBST($1_STUB_LIB_SPEC)
+ AC_SUBST($1_STUB_LIB_PATH)
+])
+
+#------------------------------------------------------------------------
+# TEA_PATH_CELIB --
+#
+# Locate Keuchel's celib emulation layer for targeting Win/CE
+#
+# Arguments:
+# none
+#
+# Results:
+#
+# Adds the following arguments to configure:
+# --with-celib=...
+#
+# Defines the following vars:
+# CELIB_DIR Full path to the directory containing
+# the include and platform lib files
+#------------------------------------------------------------------------
+
+AC_DEFUN([TEA_PATH_CELIB], [
+ # First, look for one uninstalled.
+ # the alternative search directory is invoked by --with-celib
+
+ if test x"${no_celib}" = x ; then
+ # we reset no_celib in case something fails here
+ no_celib=true
+ AC_ARG_WITH(celib,[ --with-celib=DIR use Windows/CE support library from DIR], with_celibconfig=${withval})
+ AC_MSG_CHECKING([for Windows/CE celib directory])
+ AC_CACHE_VAL(ac_cv_c_celibconfig,[
+ # First check to see if --with-celibconfig was specified.
+ if test x"${with_celibconfig}" != x ; then
+ if test -d "${with_celibconfig}/inc" ; then
+ ac_cv_c_celibconfig=`(cd ${with_celibconfig}; pwd)`
+ else
+ AC_MSG_ERROR([${with_celibconfig} directory doesn't contain inc directory])
+ fi
+ fi
+
+ # then check for a celib library
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ for i in \
+ ../celib-palm-3.0 \
+ ../celib \
+ ../../celib-palm-3.0 \
+ ../../celib \
+ `ls -dr ../celib-*3.[[0-9]]* 2>/dev/null` \
+ ${srcdir}/../celib-palm-3.0 \
+ ${srcdir}/../celib \
+ `ls -dr ${srcdir}/../celib-*3.[[0-9]]* 2>/dev/null` \
+ ; do
+ if test -d "$i/inc" ; then
+ ac_cv_c_celibconfig=`(cd $i; pwd)`
+ break
+ fi
+ done
+ fi
+ ])
+ if test x"${ac_cv_c_celibconfig}" = x ; then
+ AC_MSG_ERROR([Cannot find celib support library directory])
+ else
+ no_celib=
+ CELIB_DIR=${ac_cv_c_celibconfig}
+ CELIB_DIR=`echo "$CELIB_DIR" | sed -e 's!\\\!/!g'`
+ AC_MSG_RESULT([found $CELIB_DIR])
+ fi
+ fi
+])
+
+
+# Local Variables:
+# mode: autoconf
+# End:
Added: external/tix-8.4.2.x/tests/Driver.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/Driver.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,317 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Driver.tcl,v 1.4 2002/12/15 04:21:53 idiscovery Exp $
+#
+# This is the "Test Driver" program that sources in each test script. It
+# is invoked by tests/Test.tcl or by "make tests" in unix/tk8.0 (in
+# Unix) or by a properly configured wish.exe program (in Windows).
+#
+catch {
+ cd [file dirname [info script]]
+}
+
+# Some parts of the test for a specific platform. The variable
+# tixPriv(test:platform) controls the tests for which platform should
+# be executed. This can be controlled by the TEST_PLATFORM environment
+# variable
+#
+set tixPriv(test:platform) unix
+if [info exists tcl_platform(platform)] {
+ if {$tcl_platform(platform) == "windows"} {
+ set tixPriv(test:platform) windows
+ }
+}
+
+if [info exists env(TEST_PLATFORM)] {
+ set tixPriv(test:platform) $env(TEST_PLATFORM)
+}
+
+global testConfig
+if {![info exists tix]} {
+ puts "TIX INITIALIZATION ERROR: tix not found"
+ exit -1
+}
+set testConfig(dynlib) ""
+
+# The following global arrays are used by these tests:
+#
+# testConfig
+# dynlib, VERBOSE, errCount
+# tix:
+# tixPriv:
+# test:platform
+# testapp
+# X, Y
+
+
+# --------------------------------------------------------- Driver:Test
+#
+proc Driver:Test {name f} {
+ global errorInfo testConfig
+
+ # destroy all child windows other than '.__top'
+ foreach w [winfo children .] {
+ if [string comp .__top $w] {
+ destroy $w
+ }
+ }
+
+ if {$testConfig(VERBOSE) >= 20} {
+ puts -----------------------------------------------------------
+ puts "Loading script $name"
+ } else {
+ puts $name
+ }
+
+ update
+ uplevel #0 source $f
+ Event-Initialize
+ catch {
+ wm title . [About]
+ if {$testConfig(VERBOSE) >= 20} {
+ puts " [About]"
+ puts "--------------------- starting ----------------------"
+ }
+ }
+
+ set code [catch {Test} error]
+
+ if $code {
+ if {$code == 1234} {
+ puts -nonewline "Test $f is aborted"
+ } else {
+ puts -nonewline "Test $f is aborted unexpectedly"
+ }
+ if {[info exists errorInfo] && ![tixStrEq $errorInfo ""]} {
+ puts " by the following error\n$errorInfo"
+ } else {
+ puts "."
+ }
+ }
+ Done
+}; # Driver:Test
+
+# --------------------------------------------------- Driver:GetTargets
+#
+# fileList: name of the file that contains a list of test targets
+# type: "dir" or "script"
+#
+proc Driver:GetTargets {fileList type} {
+ set fd [open $fileList {RDONLY}]
+ set data {}
+
+ while {![eof $fd]} {
+ set line [string trim [gets $fd]]
+ if [regexp ^# $line] {
+ continue
+ }
+ append data $line\n
+ }
+
+ close $fd
+ set files {}
+
+ foreach item $data {
+ set takeit 1
+
+ foreach cond [lrange $item 1 end] {
+ set inverse 0
+ set cond [string trim $cond]
+ if {[string index $cond 0] == "!"} {
+ set cond [string range $cond 1 end]
+ set inverse 1
+ }
+
+ set true 1
+ case [lindex $cond 0] {
+ c {
+ set cmd [lindex $cond 1]
+ if {[info command $cmd] != $cmd} {
+ if ![auto_load $cmd] {
+ set true 0
+ }
+ }
+ }
+ i {
+ if {[lsearch [image types] [lindex $cond 1]] == -1} {
+ set true 0
+ }
+ }
+ v {
+ set var [lindex $cond 1]
+ if ![uplevel #0 info exists [list $var]] {
+ set true 0
+ }
+ }
+ default {
+ # must be an expression
+ #
+ if ![uplevel #0 expr [list $cond]] {
+ set true 0
+ }
+ }
+ }
+
+ if {$inverse} {
+ set true [expr !$true]
+ }
+ if {!$true} {
+ set takeit 0
+ break
+ }
+ }
+
+ if {$takeit} {
+ lappend files [lindex $item 0]
+ }
+ }
+ return $files
+}; # Driver:GetTargets
+
+# --------------------------------------------------------- Driver:Main
+#
+proc Driver:Main {} {
+ global argv env
+
+ if [tixStrEq $argv "dont"] {
+ return
+ }
+
+ set argvfiles $argv
+ set env(WAITTIME) 200
+
+ set errCount 0
+
+ set PWD [pwd]
+ if {$argvfiles == {}} {
+ set argvfiles [Driver:GetTargets files dir]
+ }
+
+ foreach f $argvfiles {
+ Driver:Execute $f
+ cd $PWD
+ }
+}; # Driver:Main
+
+# ------------------------------------------------------ Driver:Execute
+#
+proc Driver:Execute {f} {
+ global testConfig
+
+ if [file isdir $f] {
+ raise .
+ set dir $f
+
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Entering directory $dir ..."
+ }
+ cd $dir
+
+ if [file exists pkginit.tcl] {
+ # call the package initialization file, which is
+ # something specific to the files in this directory
+ #
+ source pkginit.tcl
+ }
+ foreach f [Driver:GetTargets files script] {
+ set _PWD [pwd]
+ Driver:Test $dir/$f $f
+ cd $_PWD
+ }
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Leaving directory $dir ..."
+ }
+ } else {
+ set dir [file dirname $f]
+ if {$dir != {}} {
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Entering directory $dir ..."
+ }
+ cd $dir
+ if [file exists pkginit.tcl] {
+ # call the package initialization file, which is
+ # something specific to the files in this directory
+ #
+ source pkginit.tcl
+ }
+ set f [file tail $f]
+ }
+ set _PWD [pwd]
+ Driver:Test $f $f
+ cd $_PWD
+
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Leaving directory $dir ..."
+ }
+ }
+}; # Driver:Execute
+
+if [tixStrEq [tix platform] "windows"] {
+ # The following are a bunch of useful functions to make it more
+ # convenient to run the tests on Windows inside the Tix console
+ # window.
+ #
+
+ # do -- Execute a test.
+ proc do {f} {
+ set PWD [pwd]
+ Driver:Execute $f
+ cd $PWD
+ puts "% "
+ }
+
+ # rnew -- Read in all the files in the Tix library path that have
+ # been modified.
+ #
+ proc rnew {} {
+ global lastModified filesPatterns
+ foreach file [eval glob $filesPatterns] {
+ set mtime [file mtime $file]
+ if {$lastModified < $mtime} {
+ set lastModified $mtime
+ puts "sourcing $file"
+ uplevel #0 source [list $file]
+ }
+ }
+ }
+
+ # pk -- pack widgets filled and expanded
+ proc pk {args} {
+ eval pack $args -expand yes -fill both
+ }
+
+ # Initialize 'lastModified' so that rnew loads only newly modified
+ # files
+ #
+ set filesPatterns {../library/*.tcl Driver.tcl library/*.tcl}
+ set lastModified 0
+ foreach file [eval glob $filesPatterns] {
+ set mtime [file mtime $file]
+ if {$lastModified < $mtime} {
+ set lastModified $mtime
+ }
+ }
+
+ proc ei {} {
+ global errorInfo
+ puts $errorInfo
+ }
+}
+
+puts "tcl_version = $tcl_version, tcl_patchLevel = $tcl_patchLevel"
+puts "tcl_precision = $tcl_precision, tcl_library = $tcl_library"
+puts "tk_version = $tk_version, tk_patchLevel = $tk_patchLevel"
+puts "tix_version = $tix_version, tix_patchLevel = $tix_patchLevel"
+puts "tix_release = $tix_release"
+puts "tcl_platform = '[array get tcl_platform]'"
+
+uplevel #0 source library/TestLib.tcl
+uplevel #0 source library/CaseData.tcl
+wm title . "Test-driving Tix"
+Driver:Main
+
+puts "$testConfig(errCount) error(s) found"
+
+destroy .
+catch {update}
+exit 0
Added: external/tix-8.4.2.x/tests/Makefile.in
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/Makefile.in Tue Mar 18 19:38:59 2008
@@ -0,0 +1,202 @@
+# -*- mode: makefile; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Makefile.in,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+# This file is a Makefile for Tix. If it has the name
+# "Makefile.in" Then it is a template for a Makefile; to
+# generate the actual Makefile, run "./configure", which is a
+# configuration script generated by the "autoconf" program
+# (constructs like "@foo@" will get replaced in the actual
+# Makefile.
+#
+# See the file README for information about executing the test
+# suites.
+#
+# 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.
+#
+#
+ at SET_MAKE@
+
+BINSRC_DIR = @SRC_DIR@
+SRC_DIR = @SRC_DIR@
+LIBRARY_DIR = @SRC_DIR@/library
+DEMOS_DIR = @SRC_DIR@/demos
+MANUAL_DIR = @SRC_DIR@/man
+VPATH = @SRC_DIR@
+
+all: @TIX_TARGETS@ @TIX_TEST_LOAD@
+
+test: all
+
+unix-tk4.0:: tk40
+
+unix-tk4.1:: tk41
+
+unix-tk4.2:: tk42
+
+unix-itcl2.0:: itcl20
+
+unix-itcl2.1:: itcl21
+
+# There are no test for the following targets (they don't really need
+# tests)
+unix-et-tk4.0::
+
+unix-et-tk4.1::
+
+demos-c::
+
+# Some versions of make, like SGI's, use the following variable to
+# determine which shell to use for executing commands:
+SHELL = /bin/sh
+
+SUBSETS=
+
+ENVIRON_74 = TEST_TCL_LIBRARY=@TCL74_SRC_DIR@/library \
+ TEST_TK_LIBRARY=@TK40_SRC_DIR@/library \
+ TEST_ITCL_LIBRARY=@ITCL20_SRC_DIR@/itcl/library \
+ TEST_ITK_LIBRARY=@ITCL20_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL20_SRC_DIR@/iwidgets2.0.0 \
+ TIX_LIBRARY=@SRC_DIR@/library \
+ TEST_BINSRC_DIR=$(BINSRC_DIR) \
+ TEST_LDPATHS=""
+
+
+ENVIRON_75 = TEST_TCL_LIBRARY=@TCL75_SRC_DIR@/library \
+ TEST_TK_LIBRARY=@TK41_SRC_DIR@/library \
+ TEST_ITCL_LIBRARY=@ITCL20_SRC_DIR@/itcl/library \
+ TEST_ITK_LIBRARY=@ITCL20_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL20_SRC_DIR@/iwidgets2.0.0 \
+ TIX_LIBRARY=@SRC_DIR@/library \
+ TEST_BINSRC_DIR=$(BINSRC_DIR) \
+ TEST_LDPATHS=@TCL75_SRC_DIR@/unix:@TK41_SRC_DIR@/unix:$(BINSRC_DIR)/unix-tk4.1
+
+
+ENVIRON_76 = TEST_TCL_LIBRARY=@TCL76_SRC_DIR@/library \
+ TEST_TK_LIBRARY=@TK42_SRC_DIR@/library \
+ TEST_ITCL_LIBRARY=@ITCL20_SRC_DIR@/itcl/library \
+ TEST_ITK_LIBRARY=@ITCL20_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL20_SRC_DIR@/iwidgets2.0.0 \
+ TIX_LIBRARY=@SRC_DIR@/library \
+ TEST_BINSRC_DIR=$(BINSRC_DIR) \
+ TEST_LDPATHS=@TCL76_SRC_DIR@/unix:@TK42_SRC_DIR@/unix:$(BINSRC_DIR)/unix-tk4.2
+
+ENVIRON_ITCL_20 = TEST_TCL_LIBRARY=@ITCL20_SRC_DIR@/tcl7.4/library \
+ TEST_TK_LIBRARY=@ITCL20_SRC_DIR@/tk4.0/library \
+ TEST_ITCL_LIBRARY=@ITCL20_SRC_DIR@/itcl/library \
+ TEST_ITK_LIBRARY=@ITCL20_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL20_SRC_DIR@/iwidgets2.0.0 \
+ TIX_LIBRARY=@SRC_DIR@/library \
+ TEST_BINSRC_DIR=$(BINSRC_DIR) \
+ TEST_LDPATHS=""
+
+ENVIRON_ITCL_21 = TEST_TCL_LIBRARY=@ITCL21_SRC_DIR@/tcl7.5/library \
+ TEST_TK_LIBRARY=@ITCL21_SRC_DIR@/tk4.1/library \
+ TEST_ITCL_LIBRARY=@ITCL21_SRC_DIR@/itcl/library \
+ TEST_ITK_LIBRARY=@ITCL21_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL21_SRC_DIR@/iwidgets2.1.0 \
+ TIX_LIBRARY=@SRC_DIR@/library \
+ TEST_BINSRC_DIR=$(BINSRC_DIR) \
+ TEST_LDPATHS=@ITCL21_SRC_DIR@/itk/unix:@ITCL21_SRC_DIR@/itcl/unix:@ITCL21_SRC_DIR@/tcl7.5/unix:@ITCL21_SRC_DIR@/tk4.1/unix:$(BINSRC_DIR)/unix-itcl2.1
+
+tk40::
+ @$(ENVIRON_74) \
+ tclsh Test.tcl tk40 $(SUBSETS)
+
+tk41::
+ @$(ENVIRON_75) \
+ tclsh Test.tcl tk41 $(SUBSETS)
+
+tk42::
+ @$(ENVIRON_76) \
+ tclsh Test.tcl tk42 $(SUBSETS)
+
+itcl20::
+ @$(ENVIRON_ITCL_20) \
+ tclsh Test.tcl itcl20 $(SUBSETS)
+
+itcl21::
+ @$(ENVIRON_ITCL_21) \
+ tclsh Test.tcl itcl21 $(SUBSETS)
+
+load::
+ @$(ENVIRON_75) \
+ tclsh Test.tcl load $(SUBSETS)
+
+Makefile: Makefile.in
+ cd $(SRC_DIR); $(SHELL) config.status
+
+distclean:
+ - rm -f Makefile
+
+#----------------------------------------------------------------------
+#
+# Testing the files in the binary distribution
+#
+#----------------------------------------------------------------------
+
+dist: dist_tk40 dist_tk41 dist_itcl20 dist_itcl21
+
+BDIST=$(TIX_BIN_DIST_DIR)
+SDIST=$(TIX_SRC_DIST_DIR)
+
+ENV_TK40_DIST = \
+ TIX_LIBRARY=$(SDIST)/library \
+ TCL_LIBRARY=@TCL74_SRC_DIR@/library \
+ TK_LIBRARY=@TK40_SRC_DIR@/library \
+ LD_LIBRARY_PATH=$(SITE_LDPATH)
+
+ENV_TK41_DIST = \
+ TIX_LIBRARY=$(SDIST)/library \
+ TCL_LIBRARY=@TCL75_SRC_DIR@/library \
+ TK_LIBRARY=@TK41_SRC_DIR@/library \
+ LD_LIBRARY_PATH=$(BDIST)/unix-tk4.1:$(SITE_LDPATH)
+
+ENV_ITCL20_DIST = \
+ TIX_LIBRARY=$(SDIST)/library \
+ TCL_LIBRARY=@ITCL20_SRC_DIR@/tcl7.4/library \
+ TK_LIBRARY=@ITCL20_SRC_DIR@/tk4.0/library \
+ ITCL_LIBRARY=@ITCL20_SRC_DIR@/itcl/library \
+ ITK_LIBRARY=@ITCL20_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL20_SRC_DIR@/iwidgets2.0.0 \
+ LD_LIBRARY_PATH=$(SITE_LDPATH)
+
+ENV_ITCL21_DIST = \
+ TIX_LIBRARY=$(SDIST)/library \
+ TCL_LIBRARY=@ITCL21_SRC_DIR@/tcl7.5/library \
+ TK_LIBRARY=@ITCL21_SRC_DIR@/tk4.1/library \
+ ITCL_LIBRARY=@ITCL21_SRC_DIR@/itcl/library \
+ ITK_LIBRARY=@ITCL21_SRC_DIR@/itk/library \
+ IWIDGETS_LIBRARY=@ITCL21_SRC_DIR@/iwidgets2.1.0 \
+ LD_LIBRARY_PATH=$(BDIST)/unix-itcl2.1:$(SITE_LDPATH)
+
+dist_tk40:
+ @echo
+ @echo ======================== tk40_dist
+ @echo
+ -$(ENV_TK40_DIST) ldd $(BDIST)/unix-tk4.0/tixwish
+ $(ENV_TK40_DIST) $(BDIST)/unix-tk4.0/tixwish Driver.tcl $(SUBSETS)
+
+dist_tk41:
+ @echo
+ @echo ======================== tk41_dist
+ @echo
+ -$(ENV_TK41_DIST) ldd $(BDIST)/unix-tk4.1/tixwish
+ $(ENV_TK41_DIST) $(BDIST)/unix-tk4.1/tixwish Driver.tcl $(SUBSETS)
+
+dist_itcl20:
+ @echo
+ @echo ======================== itcl20_dist
+ @echo
+ -$(ENV_ITCL20_DIST) ldd $(BDIST)/unix-itcl2.0/itixwish
+ $(ENV_ITCL20_DIST) $(BDIST)/unix-itcl2.0/itixwish Driver.tcl $(SUBSETS)
+
+dist_itcl21:
+ @echo
+ @echo ======================== itcl21_dist
+ @echo
+ -$(ENV_ITCL21_DIST) ldd $(BDIST)/unix-itcl2.1/itixwish
+ $(ENV_ITCL21_DIST) $(BDIST)/unix-itcl2.1/itixwish Driver.tcl $(SUBSETS)
Added: external/tix-8.4.2.x/tests/README
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/README Tue Mar 18 19:38:59 2008
@@ -0,0 +1,29 @@
+# -*- mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+
+There are two set of tests in this directory:
+
+[1] The Tcltest-style tests (with the .test extension), which are not yet
+fully supported.
+[2] The old-style tests, which are invoked by the script Driver.tcl.
+
+The old-style tests will be rewritten to use the Tcltest-style.
+
+To execute all of the tests, simply do a "make test" in the win/ or
+unix/ build directories.
+
+To execute an individual test file:
+
+[1] .test files: simply source the file. E.g.,
+
+ cd unix
+ tixwish ../tests/basic.test
+
+[2] Old-style tests:
+
+ ../unix/tixwish Driver.tcl general/select.tcl
+
+ - or -
+
+ ..\win\tixwish.exe Driver.tcl general/select.tcl
+
+
Added: external/tix-8.4.2.x/tests/TODO.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/TODO.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,3 @@
+# -*- mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+
+[1] NoteBook active/inactive/disabled tabs drawing
Added: external/tix-8.4.2.x/tests/Test.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/Test.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,64 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Test.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+#! /bin/sh
+# the next line restarts using tclsh \
+exec tclsh "$0" "$@"
+
+# Test.tcl --
+#
+# This file executes the Tix test suite for the Unix platform.
+# Don't execute this file directly. Read the README file in this
+# directory first.
+#
+# 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.
+#
+
+set targets [lindex $argv 0]
+set argvfiles [lrange $argv 1 end]
+
+set env(WAITTIME) 200
+
+set genDirs {
+ general xpm hlist
+}
+
+set env(TCL_LIBRARY) $env(TEST_TCL_LIBRARY)
+set env(TK_LIBRARY) $env(TEST_TK_LIBRARY)
+set env(ITCL_LIBRARY) $env(TEST_ITCL_LIBRARY)
+set env(ITK_LIBRARY) $env(TEST_ITK_LIBRARY)
+set BINSRC_DIR $env(TEST_BINSRC_DIR)
+
+catch {
+ unset env(TIX_DEBUG_INTERACTIVE)
+}
+
+set load(bin) $BINSRC_DIR/../tk4.1/unix/wish
+set tk40(bin) $BINSRC_DIR/unix-tk4.0/tixwish
+set tk41(bin) $BINSRC_DIR/unix-tk4.1/tixwish
+set tk42(bin) $BINSRC_DIR/unix-tk4.2/tixwish
+set itcl20(bin) $BINSRC_DIR/unix-itcl2.0/itixwish
+set itcl21(bin) $BINSRC_DIR/unix-itcl2.1/itixwish
+
+if ![info exists env(LD_LIBRARY_PATH)] {
+ set env(LD_LIBRARY_PATH) ""
+}
+if [info exists env(TEST_LDPATHS)] {
+ set env(LD_LIBRARY_PATH) $env(TEST_LDPATHS):$env(LD_LIBRARY_PATH)
+}
+
+foreach t $targets {
+ upvar #0 $t target
+
+ puts "Executing ---\n"
+ puts "env TCL_LIBRARY=$env(TCL_LIBRARY) TK_LIBRARY=$env(TK_LIBRARY) ITCL_LIBRARY=$env(ITCL_LIBRARY) ITK_LIBRARY=$env(ITK_LIBRARY) LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH) TIX_LIBRARY=$env(TIX_LIBRARY) $target(bin)"
+ puts ""
+
+
+ puts "Testing target $t with executable $target(bin)"
+ eval exec $target(bin) Driver.tcl $argvfiles >@ stdout 2>@ stderr
+}
Added: external/tix-8.4.2.x/tests/all.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/all.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,89 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# all.tcl --
+#
+# This file contains a top-level script to run all of the Tk
+# tests. Execute it by invoking "source all.tcl" when running tktest
+# in this directory.
+#
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+# All rights reserved.
+#
+# Copied from Tk 8.3.2 with very minor change.
+# Original RCS Id: all.tcl,v 1.4 1999/04/21 21:53:29 rjohnson Exp
+# Tix RCS Id: $Id: all.tcl,v 1.6 2002/12/17 08:03:44 idiscovery Exp $
+
+package require Tix
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+set ::tcltest::testSingleFile false
+
+puts stdout "Tix $tix_patchLevel tests running in interp: [info nameofexecutable]"
+puts stdout "Tests running in working dir: $::tcltest::workingDir"
+if {[llength $::tcltest::skip] > 0} {
+ puts stdout "Skipping tests that match: $::tcltest::skip"
+}
+if {[llength $::tcltest::match] > 0} {
+ puts stdout "Only running tests that match: $::tcltest::match"
+}
+puts stdout "tcl_library = $tcl_library"
+puts stdout "tk_library = $tk_library"
+puts stdout "tix_library = $tix_library"
+
+# Use command line specified glob pattern (specified by -file or -f)
+# if one exists. Otherwise use *.test. If given, the file pattern
+# should be specified relative to the dir containing this file. If no
+# files are found to match the pattern, print an error message and exit.
+set fileIndex [expr {[lsearch $argv "-file"] + 1}]
+set fIndex [expr {[lsearch $argv "-f"] + 1}]
+if {($fileIndex < 1) || ($fIndex > $fileIndex)} {
+ set fileIndex $fIndex
+}
+if {$fileIndex > 0} {
+ set globPattern [file join $::tcltest::testsDir [lindex $argv $fileIndex]]
+ puts stdout "Sourcing files that match: $globPattern"
+} else {
+ set globPattern [file join $::tcltest::testsDir *.test]
+}
+set fileList [glob -nocomplain $globPattern]
+if {[llength $fileList] < 1} {
+ puts "Error: no files found matching $globPattern"
+ exit
+}
+
+global auto_path
+lappend auto_path [file dir [info script]]
+
+set timeCmd {clock format [clock seconds]}
+puts stdout "Tests began at [eval $timeCmd]"
+
+# source each of the specified tests
+foreach file [lsort $fileList] {
+ set tail [file tail $file]
+ if {[string match l.*.test $tail]} {
+ # This is an SCCS lockfile; ignore it
+ continue
+ }
+ puts stdout $tail
+ if {[catch {source $file} msg]} {
+ puts stdout $msg
+ }
+}
+
+# cleanup
+puts stdout "\nTests ended at [eval $timeCmd]"
+::tcltest::cleanupTests 1
+return
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: external/tix-8.4.2.x/tests/auto_loaded.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/auto_loaded.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,19 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# auto_loaded.tcl --
+#
+# This file is auto-loaded by various test code to test whether
+# the Tix code is compatible with Tcl autoloading.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: auto_loaded.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+
+proc tixTestClass_method:foo {w args} {
+ upvar #0 $w data
+
+ return returned_by_tixTestClass_method:foo
+}
+
Added: external/tix-8.4.2.x/tests/basic.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/basic.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,28 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# basic.test --
+#
+# This file is a Tcl script to test out Tix's basic behaviors.
+# It is organized in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: basic.test,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+
+package require Tix
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+test basic-1.1 {version check} {
+ list This Tix test suite expects Tix version $tix_version
+} {This Tix test suite expects Tix version 8.4}
+
+
+# cleanup
+::tcltest::cleanupTests
+return
+
Added: external/tix-8.4.2.x/tests/class.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/class.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,54 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# class.test --
+#
+# This file is a Tcl script to test out tixClass.c.
+# It is organized in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: class.test,v 1.4 2004/12/24 00:37:10 hobbs Exp $
+
+package require Tix
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+if {![info exists widgetTestClass1]} {
+ source [file join [pwd] [file dirname [info script]] widgetTestClass1.tcl]
+}
+
+test class-1.1 {Tix_InstanceCmd(): subwidget} {
+ widgetTestClass1 .test
+ set a [.test subwidget $longword]
+ destroy .test
+ list $a
+} [list .test.$longword]
+
+test class-2.1 {Tix_InstanceCmd(): subwidgets} {
+ widgetTestClass1 .test
+
+ set a [list [catch {
+ .test subwidgets
+ } msg] $msg]
+
+ destroy .test
+ set a
+} {1 {wrong # args: should be "tixPrimitive:subwidgets w type args"}}
+
+test class-2.2 {Tix_InstanceCmd(): subwidgets} {
+ widgetTestClass1 .test
+
+ set a [.test subwidgets -class Button]
+ destroy .test
+ expr {[lsearch $a .test.$longword] >= 0}
+} {1}
+
+# todo: subwidgets -group, -all -
+
+# cleanup
+::tcltest::cleanupTests
+return
Added: external/tix-8.4.2.x/tests/cleanup/cleanup.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/cleanup/cleanup.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,32 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: cleanup.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+# cleanup.tcl --
+#
+# This program tests whether whether there is any garbage left
+# after all the test files are executed. If so, either Tix has
+# resource leak or the test suite doesn't clean up properly.
+#
+# 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.
+#
+
+proc About {} {
+ return "Testing resource leaks"
+}
+
+proc Test {} {
+ global testConfig
+
+ if {$testConfig(VERBOSE) >= 20} {
+ foreach image [image names] {
+ puts "Warning: \[resource leak\] image $image of type [image type $image]"
+ foreach option [$image configure] {
+ puts " $option"
+ }
+ }
+ }
+}
Added: external/tix-8.4.2.x/tests/cleanup/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/cleanup/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1 @@
+cleanup.tcl
\ No newline at end of file
Added: external/tix-8.4.2.x/tests/defs.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/defs.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1101 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# defs.tcl --
+#
+# This file contains support code for the Tcl/Tk test suite.It is
+# It is normally sourced by the individual files in the test suite
+# before they run their tests. This improved approach to testing
+# was designed and initially implemented by Mary Ann May-Pumphrey
+# of Sun Microsystems.
+#
+# Copyright (c) 1990-1994 The Regents of the University of California.
+# Copyright (c) 1994-1996 Sun Microsystems, Inc.
+# Copyright (c) 1998-1999 by Scriptics Corporation.
+# All rights reserved.
+#
+# Copied from Tk 8.3.2 without change.
+# Original RCS Id: defs.tcl,v 1.7 1999/12/14 06:53:12 hobbs Exp
+# Tix RCS Id: $Id: defs.tcl,v 1.3 2002/11/13 21:12:17 idiscovery Exp $
+
+# Initialize wish shell
+
+if {[info exists tk_version]} {
+ tk appname tktest
+ wm title . tktest
+} else {
+
+ # Ensure that we have a minimal auto_path so we don't pick up extra junk.
+
+ set auto_path [list [info library]]
+}
+
+# create the "tcltest" namespace for all testing variables and procedures
+
+namespace eval tcltest {
+ set procList [list test cleanupTests dotests saveState restoreState \
+ normalizeMsg makeFile removeFile makeDirectory removeDirectory \
+ viewFile bytestring set_iso8859_1_locale restore_locale \
+ safeFetch threadReap]
+ if {[info exists tk_version]} {
+ lappend procList setupbg dobg bgReady cleanupbg fixfocus
+ }
+ foreach proc $procList {
+ namespace export $proc
+ }
+
+ # setup ::tcltest default vars
+ foreach {var default} {verbose b match {} skip {}} {
+ if {![info exists $var]} {
+ variable $var $default
+ }
+ }
+
+ # Tests should not rely on the current working directory.
+ # Files that are part of the test suite should be accessed relative to
+ # ::tcltest::testsDir.
+
+ set originalDir [pwd]
+ set tDir [file join $originalDir [file dirname [info script]]]
+ cd $tDir
+ variable testsDir [pwd]
+ cd $originalDir
+
+ # Count the number of files tested (0 if all.tcl wasn't called).
+ # The all.tcl file will set testSingleFile to false, so stats will
+ # not be printed until all.tcl calls the cleanupTests proc.
+ # The currentFailure var stores the boolean value of whether the
+ # current test file has had any failures. The failFiles list
+ # stores the names of test files that had failures.
+
+ variable numTestFiles 0
+ variable testSingleFile true
+ variable currentFailure false
+ variable failFiles {}
+
+ # Tests should remove all files they create. The test suite will
+ # check the current working dir for files created by the tests.
+ # ::tcltest::filesMade keeps track of such files created using the
+ # ::tcltest::makeFile and ::tcltest::makeDirectory procedures.
+ # ::tcltest::filesExisted stores the names of pre-existing files.
+
+ variable filesMade {}
+ variable filesExisted {}
+
+ # ::tcltest::numTests will store test files as indices and the list
+ # of files (that should not have been) left behind by the test files.
+
+ array set ::tcltest::createdNewFiles {}
+
+ # initialize ::tcltest::numTests array to keep track fo the number of
+ # tests that pass, fial, and are skipped.
+
+ array set numTests [list Total 0 Passed 0 Skipped 0 Failed 0]
+
+ # initialize ::tcltest::skippedBecause array to keep track of
+ # constraints that kept tests from running
+
+ array set ::tcltest::skippedBecause {}
+
+ # tests that use thread need to know which is the main thread
+
+ variable ::tcltest::mainThread 1
+ if {[info commands testthread] != {}} {
+ puts "Tk with threads enabled is known to have problems with X"
+ set ::tcltest::mainThread [testthread names]
+ }
+}
+
+# If there is no "memory" command (because memory debugging isn't
+# enabled), generate a dummy command that does nothing.
+
+if {[info commands memory] == ""} {
+ proc memory args {}
+}
+
+# ::tcltest::initConfig --
+#
+# Check configuration information that will determine which tests
+# to run. To do this, create an array ::tcltest::testConfig. Each
+# element has a 0 or 1 value. If the element is "true" then tests
+# with that constraint will be run, otherwise tests with that constraint
+# will be skipped. See the README file for the list of built-in
+# constraints defined in this procedure.
+#
+# Arguments:
+# none
+#
+# Results:
+# The ::tcltest::testConfig array is reset to have an index for
+# each built-in test constraint.
+
+proc ::tcltest::initConfig {} {
+
+ global tcl_platform tcl_interactive tk_version
+
+ catch {unset ::tcltest::testConfig}
+
+ # The following trace procedure makes it so that we can safely refer to
+ # non-existent members of the ::tcltest::testConfig array without causing an
+ # error. Instead, reading a non-existent member will return 0. This is
+ # necessary because tests are allowed to use constraint "X" without ensuring
+ # that ::tcltest::testConfig("X") is defined.
+
+ trace variable ::tcltest::testConfig r ::tcltest::safeFetch
+
+ proc ::tcltest::safeFetch {n1 n2 op} {
+ if {($n2 != {}) && ([info exists ::tcltest::testConfig($n2)] == 0)} {
+ set ::tcltest::testConfig($n2) 0
+ }
+ }
+
+ set ::tcltest::testConfig(unixOnly) \
+ [expr {$tcl_platform(platform) == "unix"}]
+ set ::tcltest::testConfig(macOnly) \
+ [expr {$tcl_platform(platform) == "macintosh"}]
+ set ::tcltest::testConfig(pcOnly) \
+ [expr {$tcl_platform(platform) == "windows"}]
+
+ set ::tcltest::testConfig(unix) $::tcltest::testConfig(unixOnly)
+ set ::tcltest::testConfig(mac) $::tcltest::testConfig(macOnly)
+ set ::tcltest::testConfig(pc) $::tcltest::testConfig(pcOnly)
+
+ set ::tcltest::testConfig(unixOrPc) \
+ [expr {$::tcltest::testConfig(unix) || $::tcltest::testConfig(pc)}]
+ set ::tcltest::testConfig(macOrPc) \
+ [expr {$::tcltest::testConfig(mac) || $::tcltest::testConfig(pc)}]
+ set ::tcltest::testConfig(macOrUnix) \
+ [expr {$::tcltest::testConfig(mac) || $::tcltest::testConfig(unix)}]
+
+ set ::tcltest::testConfig(nt) [expr {$tcl_platform(os) == "Windows NT"}]
+ set ::tcltest::testConfig(95) [expr {$tcl_platform(os) == "Windows 95"}]
+
+ # The following config switches are used to mark tests that should work,
+ # but have been temporarily disabled on certain platforms because they don't
+ # and we haven't gotten around to fixing the underlying problem.
+
+ set ::tcltest::testConfig(tempNotPc) [expr {!$::tcltest::testConfig(pc)}]
+ set ::tcltest::testConfig(tempNotMac) [expr {!$::tcltest::testConfig(mac)}]
+ set ::tcltest::testConfig(tempNotUnix) [expr {!$::tcltest::testConfig(unix)}]
+
+ # The following config switches are used to mark tests that crash on
+ # certain platforms, so that they can be reactivated again when the
+ # underlying problem is fixed.
+
+ set ::tcltest::testConfig(pcCrash) [expr {!$::tcltest::testConfig(pc)}]
+ set ::tcltest::testConfig(macCrash) [expr {!$::tcltest::testConfig(mac)}]
+ set ::tcltest::testConfig(unixCrash) [expr {!$::tcltest::testConfig(unix)}]
+
+ # Set the "fonts" constraint for wish apps
+
+ if {[info exists tk_version]} {
+ set ::tcltest::testConfig(fonts) 1
+ catch {destroy .e}
+ entry .e -width 0 -font {Helvetica -12} -bd 1
+ .e insert end "a.bcd"
+ if {([winfo reqwidth .e] != 37) || ([winfo reqheight .e] != 20)} {
+ set ::tcltest::testConfig(fonts) 0
+ }
+ destroy .e
+ catch {destroy .t}
+ text .t -width 80 -height 20 -font {Times -14} -bd 1
+ pack .t
+ .t insert end "This is\na dot."
+ update
+ set x [list [.t bbox 1.3] [.t bbox 2.5]]
+ destroy .t
+ if {[string match {{22 3 6 15} {31 18 [34] 15}} $x] == 0} {
+ set ::tcltest::testConfig(fonts) 0
+ }
+
+ # Test to see if we have are running Unix apps on Exceed,
+ # which won't return font failures (Windows-like), which is
+ # not what we want from ann X server (other Windows X servers
+ # operate as expected)
+
+ set ::tcltest::testConfig(noExceed) 1
+ if {$::tcltest::testConfig(unixOnly) && \
+ [catch {font actual "\{xyz"}] == 0} {
+ puts "Running X app on Exceed, skipping problematic font tests..."
+ set ::tcltest::testConfig(noExceed) 0
+ }
+ }
+
+ # Skip empty tests
+
+ set ::tcltest::testConfig(emptyTest) 0
+
+ # By default, tests that expost known bugs are skipped.
+
+ set ::tcltest::testConfig(knownBug) 0
+
+ # By default, non-portable tests are skipped.
+
+ set ::tcltest::testConfig(nonPortable) 0
+
+ # Some tests require user interaction.
+
+ set ::tcltest::testConfig(userInteraction) 0
+
+ # Some tests must be skipped if the interpreter is not in interactive mode
+
+ set ::tcltest::testConfig(interactive) $tcl_interactive
+
+ # Some tests must be skipped if you are running as root on Unix.
+ # Other tests can only be run if you are running as root on Unix.
+
+ set ::tcltest::testConfig(root) 0
+ set ::tcltest::testConfig(notRoot) 1
+ set user {}
+ if {$tcl_platform(platform) == "unix"} {
+ catch {set user [exec whoami]}
+ if {$user == ""} {
+ catch {regexp {^[^(]*\(([^)]*)\)} [exec id] dummy user}
+ }
+ if {($user == "root") || ($user == "")} {
+ set ::tcltest::testConfig(root) 1
+ set ::tcltest::testConfig(notRoot) 0
+ }
+ }
+
+ # Set nonBlockFiles constraint: 1 means this platform supports
+ # setting files into nonblocking mode.
+
+ if {[catch {set f [open defs r]}]} {
+ set ::tcltest::testConfig(nonBlockFiles) 1
+ } else {
+ if {[catch {fconfigure $f -blocking off}] == 0} {
+ set ::tcltest::testConfig(nonBlockFiles) 1
+ } else {
+ set ::tcltest::testConfig(nonBlockFiles) 0
+ }
+ close $f
+ }
+
+ # Set asyncPipeClose constraint: 1 means this platform supports
+ # async flush and async close on a pipe.
+ #
+ # Test for SCO Unix - cannot run async flushing tests because a
+ # potential problem with select is apparently interfering.
+ # (Mark Diekhans).
+
+ if {$tcl_platform(platform) == "unix"} {
+ if {[catch {exec uname -X | fgrep {Release = 3.2v}}] == 0} {
+ set ::tcltest::testConfig(asyncPipeClose) 0
+ } else {
+ set ::tcltest::testConfig(asyncPipeClose) 1
+ }
+ } else {
+ set ::tcltest::testConfig(asyncPipeClose) 1
+ }
+
+ # Test to see if we have a broken version of sprintf with respect
+ # to the "e" format of floating-point numbers.
+
+ set ::tcltest::testConfig(eformat) 1
+ if {[string compare "[format %g 5e-5]" "5e-05"] != 0} {
+ set ::tcltest::testConfig(eformat) 0
+ }
+
+ # Test to see if execed commands such as cat, echo, rm and so forth are
+ # present on this machine.
+
+ set ::tcltest::testConfig(unixExecs) 1
+ if {$tcl_platform(platform) == "macintosh"} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ($tcl_platform(platform) == "windows")} {
+ if {[catch {exec cat defs}] == 1} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec echo hello}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec sh -c echo hello}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec wc defs}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {$::tcltest::testConfig(unixExecs) == 1} {
+ exec echo hello > removeMe
+ if {[catch {exec rm removeMe}] == 1} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec sleep 1}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec fgrep unixExecs defs}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec ps}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec echo abc > removeMe}] == 0) && \
+ ([catch {exec chmod 644 removeMe}] == 1) && \
+ ([catch {exec rm removeMe}] == 0)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ } else {
+ catch {exec rm -f removeMe}
+ }
+ if {($::tcltest::testConfig(unixExecs) == 1) && \
+ ([catch {exec mkdir removeMe}] == 1)} {
+ set ::tcltest::testConfig(unixExecs) 0
+ } else {
+ catch {exec rm -r removeMe}
+ }
+ }
+}
+
+::tcltest::initConfig
+
+
+# ::tcltest::processCmdLineArgs --
+#
+# Use command line args to set the verbose, skip, and
+# match variables. This procedure must be run after
+# constraints are initialized, because some constraints can be
+# overridden.
+#
+# Arguments:
+# none
+#
+# Results:
+# ::tcltest::verbose is set to <value>
+
+proc ::tcltest::processCmdLineArgs {} {
+ global argv
+
+ # The "argv" var doesn't exist in some cases, so use {}
+ # The "argv" var doesn't exist in some cases.
+
+ if {(![info exists argv]) || ([llength $argv] < 2)} {
+ set flagArray {}
+ } else {
+ set flagArray $argv
+ }
+
+ if {[catch {array set flag $flagArray}]} {
+ puts stderr "Error: odd number of command line args specified:"
+ puts stderr " $argv"
+ exit
+ }
+
+ # Allow for 1-char abbreviations, where applicable (e.g., -match == -m).
+ # Note that -verbose cannot be abbreviated to -v in wish because it
+ # conflicts with the wish option -visual.
+
+ foreach arg {-verbose -match -skip -constraints} {
+ set abbrev [string range $arg 0 1]
+ if {([info exists flag($abbrev)]) && \
+ ([lsearch -exact $flagArray $arg] < \
+ [lsearch -exact $flagArray $abbrev])} {
+ set flag($arg) $flag($abbrev)
+ }
+ }
+
+ # Set ::tcltest::workingDir to [pwd].
+ # Save the names of files that already exist in ::tcltest::workingDir.
+
+ set ::tcltest::workingDir [pwd]
+ foreach file [glob -nocomplain [file join $::tcltest::workingDir *]] {
+ lappend ::tcltest::filesExisted [file tail $file]
+ }
+
+ # Set ::tcltest::verbose to the arg of the -verbose flag, if given
+
+ if {[info exists flag(-verbose)]} {
+ set ::tcltest::verbose $flag(-verbose)
+ }
+
+ # Set ::tcltest::match to the arg of the -match flag, if given
+
+ if {[info exists flag(-match)]} {
+ set ::tcltest::match $flag(-match)
+ }
+
+ # Set ::tcltest::skip to the arg of the -skip flag, if given
+
+ if {[info exists flag(-skip)]} {
+ set ::tcltest::skip $flag(-skip)
+ }
+
+ # Use the -constraints flag, if given, to turn on constraints that are
+ # turned off by default: userInteractive knownBug nonPortable. This
+ # code fragment must be run after constraints are initialized.
+
+ if {[info exists flag(-constraints)]} {
+ foreach elt $flag(-constraints) {
+ set ::tcltest::testConfig($elt) 1
+ }
+ }
+}
+
+::tcltest::processCmdLineArgs
+
+
+# ::tcltest::cleanupTests --
+#
+# Remove files and dirs created using the makeFile and makeDirectory
+# commands since the last time this proc was invoked.
+#
+# Print the names of the files created without the makeFile command
+# since the tests were invoked.
+#
+# Print the number tests (total, passed, failed, and skipped) since the
+# tests were invoked.
+#
+
+proc ::tcltest::cleanupTests {{calledFromAllFile 0}} {
+ set tail [file tail [info script]]
+
+ # Remove files and directories created by the :tcltest::makeFile and
+ # ::tcltest::makeDirectory procedures.
+ # Record the names of files in ::tcltest::workingDir that were not
+ # pre-existing, and associate them with the test file that created them.
+
+ if {!$calledFromAllFile} {
+
+ foreach file $::tcltest::filesMade {
+ if {[file exists $file]} {
+ catch {file delete -force $file}
+ }
+ }
+ set currentFiles {}
+ foreach file [glob -nocomplain [file join $::tcltest::workingDir *]] {
+ lappend currentFiles [file tail $file]
+ }
+ set newFiles {}
+ foreach file $currentFiles {
+ if {[lsearch -exact $::tcltest::filesExisted $file] == -1} {
+ lappend newFiles $file
+ }
+ }
+ set ::tcltest::filesExisted $currentFiles
+ if {[llength $newFiles] > 0} {
+ set ::tcltest::createdNewFiles($tail) $newFiles
+ }
+ }
+
+ if {$calledFromAllFile || $::tcltest::testSingleFile} {
+
+ # print stats
+
+ puts -nonewline stdout "$tail:"
+ foreach index [list "Total" "Passed" "Skipped" "Failed"] {
+ puts -nonewline stdout "\t$index\t$::tcltest::numTests($index)"
+ }
+ puts stdout ""
+
+ # print number test files sourced
+ # print names of files that ran tests which failed
+
+ if {$calledFromAllFile} {
+ puts stdout "Sourced $::tcltest::numTestFiles Test Files."
+ set ::tcltest::numTestFiles 0
+ if {[llength $::tcltest::failFiles] > 0} {
+ puts stdout "Files with failing tests: $::tcltest::failFiles"
+ set ::tcltest::failFiles {}
+ }
+ }
+
+ # if any tests were skipped, print the constraints that kept them
+ # from running.
+
+ set constraintList [array names ::tcltest::skippedBecause]
+ if {[llength $constraintList] > 0} {
+ puts stdout "Number of tests skipped for each constraint:"
+ foreach constraint [lsort $constraintList] {
+ puts stdout \
+ "\t$::tcltest::skippedBecause($constraint)\t$constraint"
+ unset ::tcltest::skippedBecause($constraint)
+ }
+ }
+
+ # report the names of test files in ::tcltest::createdNewFiles, and
+ # reset the array to be empty.
+
+ set testFilesThatTurded [lsort [array names ::tcltest::createdNewFiles]]
+ if {[llength $testFilesThatTurded] > 0} {
+ puts stdout "Warning: test files left files behind:"
+ foreach testFile $testFilesThatTurded {
+ puts "\t$testFile:\t$::tcltest::createdNewFiles($testFile)"
+ unset ::tcltest::createdNewFiles($testFile)
+ }
+ }
+
+ # reset filesMade, filesExisted, and numTests
+
+ set ::tcltest::filesMade {}
+ foreach index [list "Total" "Passed" "Skipped" "Failed"] {
+ set ::tcltest::numTests($index) 0
+ }
+
+ # exit only if running Tk in non-interactive mode
+
+ global tk_version tcl_interactive
+ if {[info exists tk_version] && !$tcl_interactive} {
+ exit
+ }
+ } else {
+
+ # if we're deferring stat-reporting until all files are sourced,
+ # then add current file to failFile list if any tests in this file
+ # failed
+
+ incr ::tcltest::numTestFiles
+ if {($::tcltest::currentFailure) && \
+ ([lsearch -exact $::tcltest::failFiles $tail] == -1)} {
+ lappend ::tcltest::failFiles $tail
+ }
+ set ::tcltest::currentFailure false
+ }
+}
+
+
+# test --
+#
+# This procedure runs a test and prints an error message if the test fails.
+# If ::tcltest::verbose has been set, it also prints a message even if the
+# test succeeds. The test will be skipped if it doesn't match the
+# ::tcltest::match variable, if it matches an element in
+# ::tcltest::skip, or if one of the elements of "constraints" turns
+# out not to be true.
+#
+# Arguments:
+# name - Name of test, in the form foo-1.2.
+# description - Short textual description of the test, to
+# help humans understand what it does.
+# constraints - A list of one or more keywords, each of
+# which must be the name of an element in
+# the array "::tcltest::testConfig". If any of these
+# elements is zero, the test is skipped.
+# This argument may be omitted.
+# script - Script to run to carry out the test. It must
+# return a result that can be checked for
+# correctness.
+# expectedAnswer - Expected result from script.
+
+proc ::tcltest::test {name description script expectedAnswer args} {
+ incr ::tcltest::numTests(Total)
+
+ # skip the test if it's name matches an element of skip
+
+ foreach pattern $::tcltest::skip {
+ if {[string match $pattern $name]} {
+ incr ::tcltest::numTests(Skipped)
+ return
+ }
+ }
+ # skip the test if it's name doesn't match any element of match
+
+ if {[llength $::tcltest::match] > 0} {
+ set ok 0
+ foreach pattern $::tcltest::match {
+ if {[string match $pattern $name]} {
+ set ok 1
+ break
+ }
+ }
+ if {!$ok} {
+ incr ::tcltest::numTests(Skipped)
+ return
+ }
+ }
+ set i [llength $args]
+ if {$i == 0} {
+ set constraints {}
+ } elseif {$i == 1} {
+
+ # "constraints" argument exists; shuffle arguments down, then
+ # make sure that the constraints are satisfied.
+
+ set constraints $script
+ set script $expectedAnswer
+ set expectedAnswer [lindex $args 0]
+ set doTest 0
+ if {[string match {*[$\[]*} $constraints] != 0} {
+
+ # full expression, e.g. {$foo > [info tclversion]}
+
+ catch {set doTest [uplevel #0 expr $constraints]}
+
+ } elseif {[regexp {[^.a-zA-Z0-9 ]+} $constraints] != 0} {
+
+ # something like {a || b} should be turned into
+ # $::tcltest::testConfig(a) || $::tcltest::testConfig(b).
+
+ regsub -all {[.a-zA-Z0-9]+} $constraints \
+ {$::tcltest::testConfig(&)} c
+ catch {set doTest [eval expr $c]}
+ } else {
+
+ # just simple constraints such as {unixOnly fonts}.
+
+ set doTest 1
+ foreach constraint $constraints {
+ if {![info exists ::tcltest::testConfig($constraint)]
+ || !$::tcltest::testConfig($constraint)} {
+ set doTest 0
+
+ # store the constraint that kept the test from running
+
+ set constraints $constraint
+ break
+ }
+ }
+ }
+ if {$doTest == 0} {
+ incr ::tcltest::numTests(Skipped)
+ if {[string first s $::tcltest::verbose] != -1} {
+ puts stdout "++++ $name SKIPPED: $constraints"
+ }
+
+ # add the constraint to the list of constraints the kept tests
+ # from running
+
+ if {[info exists ::tcltest::skippedBecause($constraints)]} {
+ incr ::tcltest::skippedBecause($constraints)
+ } else {
+ set ::tcltest::skippedBecause($constraints) 1
+ }
+ return
+ }
+ } else {
+ error "wrong # args: must be \"test name description ?constraints? script expectedAnswer\""
+ }
+ memory tag $name
+ set code [catch {uplevel $script} actualAnswer]
+ if {$code != 0 || [string compare $actualAnswer $expectedAnswer] != 0} {
+ incr ::tcltest::numTests(Failed)
+ set ::tcltest::currentFailure true
+ if {[string first b $::tcltest::verbose] == -1} {
+ set script ""
+ }
+ puts stdout "\n==== $name $description FAILED"
+ if {$script != ""} {
+ puts stdout "==== Contents of test case:"
+ puts stdout $script
+ }
+ if {$code != 0} {
+ if {$code == 1} {
+ puts stdout "==== Test generated error:"
+ puts stdout $actualAnswer
+ } elseif {$code == 2} {
+ puts stdout "==== Test generated return exception; result was:"
+ puts stdout $actualAnswer
+ } elseif {$code == 3} {
+ puts stdout "==== Test generated break exception"
+ } elseif {$code == 4} {
+ puts stdout "==== Test generated continue exception"
+ } else {
+ puts stdout "==== Test generated exception $code; message was:"
+ puts stdout $actualAnswer
+ }
+ } else {
+ puts stdout "---- Result was:\n$actualAnswer"
+ }
+ puts stdout "---- Result should have been:\n$expectedAnswer"
+ puts stdout "==== $name FAILED\n"
+ } else {
+ incr ::tcltest::numTests(Passed)
+ if {[string first p $::tcltest::verbose] != -1} {
+ puts stdout "++++ $name PASSED"
+ }
+ }
+}
+
+# ::tcltest::dotests --
+#
+# takes two arguments--the name of the test file (such
+# as "parse.test"), and a pattern selecting the tests you want to
+# execute. It sets ::tcltest::matching to the second argument, calls
+# "source" on the file specified in the first argument, and restores
+# ::tcltest::matching to its pre-call value at the end.
+#
+# Arguments:
+# file name of tests file to source
+# args pattern selecting the tests you want to execute
+#
+# Results:
+# none
+
+proc ::tcltest::dotests {file args} {
+ set savedTests $::tcltest::match
+ set ::tcltest::match $args
+ source $file
+ set ::tcltest::match $savedTests
+}
+
+proc ::tcltest::openfiles {} {
+ if {[catch {testchannel open} result]} {
+ return {}
+ }
+ return $result
+}
+
+proc ::tcltest::leakfiles {old} {
+ if {[catch {testchannel open} new]} {
+ return {}
+ }
+ set leak {}
+ foreach p $new {
+ if {[lsearch $old $p] < 0} {
+ lappend leak $p
+ }
+ }
+ return $leak
+}
+
+set ::tcltest::saveState {}
+
+proc ::tcltest::saveState {} {
+ uplevel #0 {set ::tcltest::saveState [list [info procs] [info vars]]}
+}
+
+proc ::tcltest::restoreState {} {
+ foreach p [info procs] {
+ if {[lsearch [lindex $::tcltest::saveState 0] $p] < 0} {
+ rename $p {}
+ }
+ }
+ foreach p [uplevel #0 {info vars}] {
+ if {[lsearch [lindex $::tcltest::saveState 1] $p] < 0} {
+ uplevel #0 "unset $p"
+ }
+ }
+}
+
+proc ::tcltest::normalizeMsg {msg} {
+ regsub "\n$" [string tolower $msg] "" msg
+ regsub -all "\n\n" $msg "\n" msg
+ regsub -all "\n\}" $msg "\}" msg
+ return $msg
+}
+
+# makeFile --
+#
+# Create a new file with the name <name>, and write <contents> to it.
+#
+# If this file hasn't been created via makeFile since the last time
+# cleanupTests was called, add it to the $filesMade list, so it will
+# be removed by the next call to cleanupTests.
+#
+proc ::tcltest::makeFile {contents name} {
+ set fd [open $name w]
+ fconfigure $fd -translation lf
+ if {[string index $contents [expr {[string length $contents] - 1}]] == "\n"} {
+ puts -nonewline $fd $contents
+ } else {
+ puts $fd $contents
+ }
+ close $fd
+
+ set fullName [file join [pwd] $name]
+ if {[lsearch -exact $::tcltest::filesMade $fullName] == -1} {
+ lappend ::tcltest::filesMade $fullName
+ }
+}
+
+proc ::tcltest::removeFile {name} {
+ file delete $name
+}
+
+# makeDirectory --
+#
+# Create a new dir with the name <name>.
+#
+# If this dir hasn't been created via makeDirectory since the last time
+# cleanupTests was called, add it to the $directoriesMade list, so it will
+# be removed by the next call to cleanupTests.
+#
+proc ::tcltest::makeDirectory {name} {
+ file mkdir $name
+
+ set fullName [file join [pwd] $name]
+ if {[lsearch -exact $::tcltest::filesMade $fullName] == -1} {
+ lappend ::tcltest::filesMade $fullName
+ }
+}
+
+proc ::tcltest::removeDirectory {name} {
+ file delete -force $name
+}
+
+proc ::tcltest::viewFile {name} {
+ global tcl_platform
+ if {($tcl_platform(platform) == "macintosh") || \
+ ($::tcltest::testConfig(unixExecs) == 0)} {
+ set f [open $name]
+ set data [read -nonewline $f]
+ close $f
+ return $data
+ } else {
+ exec cat $name
+ }
+}
+
+#
+# Construct a string that consists of the requested sequence of bytes,
+# as opposed to a string of properly formed UTF-8 characters.
+# This allows the tester to
+# 1. Create denormalized or improperly formed strings to pass to C procedures
+# that are supposed to accept strings with embedded NULL bytes.
+# 2. Confirm that a string result has a certain pattern of bytes, for instance
+# to confirm that "\xe0\0" in a Tcl script is stored internally in
+# UTF-8 as the sequence of bytes "\xc3\xa0\xc0\x80".
+#
+# Generally, it's a bad idea to examine the bytes in a Tcl string or to
+# construct improperly formed strings in this manner, because it involves
+# exposing that Tcl uses UTF-8 internally.
+
+proc ::tcltest::bytestring {string} {
+ encoding convertfrom identity $string
+}
+
+# Locate tcltest executable
+
+if {![info exists tk_version]} {
+ set tcltest [info nameofexecutable]
+
+ if {$tcltest == "{}"} {
+ set tcltest {}
+ }
+}
+
+set thisdir [file dirname [info script]]
+set ::tcltest::testConfig(stdio) 0
+catch {
+ catch {file delete -force [file join $thisdir tmp]}
+ set f [open [file join $thisdir tmp] w]
+ puts $f {
+ exit
+ }
+ close $f
+
+ set f [open "|[list $tcltest [file join $thisdir tmp]]" r]
+ close $f
+
+ set ::tcltest::testConfig(stdio) 1
+}
+catch {file delete -force [file join $thisdir tmp]}
+
+# Deliberately call the socket with the wrong number of arguments. The error
+# message you get will indicate whether sockets are available on this system.
+
+catch {socket} msg
+set ::tcltest::testConfig(socket) \
+ [expr {$msg != "sockets are not available on this system"}]
+
+#
+# Internationalization / ISO support procs -- dl
+#
+
+if {[info commands testlocale]==""} {
+
+ # No testlocale command, no tests...
+ # (it could be that we are a sub interp and we could just load
+ # the Tcltest package but that would interfere with tests
+ # that tests packages/loading in slaves...)
+
+ set ::tcltest::testConfig(hasIsoLocale) 0
+} else {
+ proc ::tcltest::set_iso8859_1_locale {} {
+ set ::tcltest::previousLocale [testlocale ctype]
+ testlocale ctype $::tcltest::isoLocale
+ }
+
+ proc ::tcltest::restore_locale {} {
+ testlocale ctype $::tcltest::previousLocale
+ }
+
+ if {![info exists ::tcltest::isoLocale]} {
+ set ::tcltest::isoLocale fr
+ switch $tcl_platform(platform) {
+ "unix" {
+
+ # Try some 'known' values for some platforms:
+
+ switch -exact -- $tcl_platform(os) {
+ "FreeBSD" {
+ set ::tcltest::isoLocale fr_FR.ISO_8859-1
+ }
+ HP-UX {
+ set ::tcltest::isoLocale fr_FR.iso88591
+ }
+ Linux -
+ IRIX {
+ set ::tcltest::isoLocale fr
+ }
+ default {
+
+ # Works on SunOS 4 and Solaris, and maybe others...
+ # define it to something else on your system
+ #if you want to test those.
+
+ set ::tcltest::isoLocale iso_8859_1
+ }
+ }
+ }
+ "windows" {
+ set ::tcltest::isoLocale French
+ }
+ }
+ }
+
+ set ::tcltest::testConfig(hasIsoLocale) \
+ [string length [::tcltest::set_iso8859_1_locale]]
+ ::tcltest::restore_locale
+}
+
+#
+# procedures that are Tk specific
+#
+
+if {[info exists tk_version]} {
+
+ # If the main window isn't already mapped (e.g. because the tests are
+ # being run automatically) , specify a precise size for it so that the
+ # user won't have to position it manually.
+
+ if {![winfo ismapped .]} {
+ wm geometry . +0+0
+ update
+ }
+
+ # The following code can be used to perform tests involving a second
+ # process running in the background.
+
+ # Locate the tktest executable
+
+ set ::tcltest::tktest [info nameofexecutable]
+ if {$::tcltest::tktest == "{}"} {
+ set ::tcltest::tktest {}
+ puts stdout \
+ "Unable to find tktest executable, skipping multiple process tests."
+ }
+
+ # Create background process
+
+ proc ::tcltest::setupbg args {
+ if {$::tcltest::tktest == ""} {
+ error "you're not running tktest so setupbg should not have been called"
+ }
+ if {[info exists ::tcltest::fd] && ($::tcltest::fd != "")} {
+ cleanupbg
+ }
+
+ # The following code segment cannot be run on Windows prior
+ # to Tk 8.1b3 due to a channel I/O bug (bugID 1495).
+
+ global tcl_platform
+ set ::tcltest::fd [open "|[list $::tcltest::tktest -geometry +0+0 -name tktest] $args" r+]
+ puts $::tcltest::fd "puts foo; flush stdout"
+ flush $::tcltest::fd
+ if {[gets $::tcltest::fd data] < 0} {
+ error "unexpected EOF from \"$::tcltest::tktest\""
+ }
+ if {[string compare $data foo]} {
+ error "unexpected output from background process \"$data\""
+ }
+ fileevent $::tcltest::fd readable bgReady
+ }
+
+ # Send a command to the background process, catching errors and
+ # flushing I/O channels
+
+ proc ::tcltest::dobg {command} {
+ puts $::tcltest::fd "catch [list $command] msg; update; puts \$msg; puts **DONE**; flush stdout"
+ flush $::tcltest::fd
+ set ::tcltest::bgDone 0
+ set ::tcltest::bgData {}
+ tkwait variable ::tcltest::bgDone
+ set ::tcltest::bgData
+ }
+
+ # Data arrived from background process. Check for special marker
+ # indicating end of data for this command, and make data available
+ # to dobg procedure.
+
+ proc ::tcltest::bgReady {} {
+ set x [gets $::tcltest::fd]
+ if {[eof $::tcltest::fd]} {
+ fileevent $::tcltest::fd readable {}
+ set ::tcltest::bgDone 1
+ } elseif {$x == "**DONE**"} {
+ set ::tcltest::bgDone 1
+ } else {
+ append ::tcltest::bgData $x
+ }
+ }
+
+ # Exit the background process, and close the pipes
+
+ proc ::tcltest::cleanupbg {} {
+ catch {
+ puts $::tcltest::fd "exit"
+ close $::tcltest::fd
+ }
+ set ::tcltest::fd ""
+ }
+
+ # Clean up focus after using generate event, which
+ # can leave the window manager with the wrong impression
+ # about who thinks they have the focus. (BW)
+
+ proc ::tcltest::fixfocus {} {
+ catch {destroy .focus}
+ toplevel .focus
+ wm geometry .focus +0+0
+ entry .focus.e
+ .focus.e insert 0 "fixfocus"
+ pack .focus.e
+ update
+ focus -force .focus.e
+ destroy .focus
+ }
+}
+
+# threadReap --
+#
+# Kill all threads except for the main thread.
+# Do nothing if testthread is not defined.
+#
+# Arguments:
+# none.
+#
+# Results:
+# Returns the number of existing threads.
+
+if {[info commands testthread] != {}} {
+ proc ::tcltest::threadReap {} {
+ testthread errorproc ThreadNullError
+ while {[llength [testthread names]] > 1} {
+ foreach tid [testthread names] {
+ if {$tid != $::tcltest::mainThread} {
+ catch {testthread send -async $tid {testthread exit}}
+ update
+ }
+ }
+ }
+ testthread errorproc ThreadError
+ return [llength [testthread names]]
+ }
+} else {
+ proc ::tcltest::threadReap {} {
+ return 1
+ }
+}
+
+# Need to catch the import because it fails if defs.tcl is sourced
+# more than once.
+
+catch {namespace import ::tcltest::*}
+return
Added: external/tix-8.4.2.x/tests/distyle.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/distyle.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,68 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# distyle.test --
+#
+# This file is a Tcl script to test out tixDiStyle.c.
+# It is organized in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: distyle.test,v 1.3 2002/11/13 21:12:17 idiscovery Exp $
+
+package require Tix
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+set longword XX
+for {set i 0} {$i < 10} {incr i} {
+ set longword $longword$longword
+}
+
+test distyle-1.1 {DeleteStyle()} {
+ set stylename [tixDisplayStyle text -stylename foo]
+ foo delete
+ list [catch {
+ foo config
+ } msg] $msg
+} {1 {invalid command name "foo"}}
+
+test distyle-1.2 {GetDItemStyle(), DeleteStyle()} {
+ set stylename [tixDisplayStyle text -stylename $longword]
+ $stylename delete
+ expr {"$stylename" == "$longword"}
+} {1}
+
+test distyle-1.3 {FindStyle()} {
+ set stylename [tixDisplayStyle text -stylename $longword]
+ set a [list [catch {
+ tixDisplayStyle text -stylename $longword
+ } msg] $msg]
+ $stylename delete
+ set a
+} [list 1 "style \"$longword\" already exists"]
+
+test distyle-2.1 {Tix_ItemStyleCmd()} {
+ set x [tixDisplayStyle text]
+ $x delete
+
+ set x
+} {tixStyle0}
+
+test distyle-2.1 {Tix_ItemStyleCmd()} {
+ set x [tixDisplayStyle text -stylename tixStyle1]
+ set a [list [catch {
+ set y [tixDisplayStyle text]
+ }]]
+ $x delete
+ $y delete
+
+ list $a $x $y
+} {0 tixStyle1 tixStyle2}
+
+# cleanup
+::tcltest::cleanupTests
+return
Added: external/tix-8.4.2.x/tests/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1,25 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# List of tests to execute.
+# Format:
+#
+# {<file/directory name> <Description> <List of conditions>}
+# {<file/directory name> <Description> <List of conditions>}
+# ...
+#
+# the conditions are AND'ed. Target is taken only if all conditions
+# are true
+
+{general }
+{xpm {i pixmap} }
+{hlist {c tixHList} }
+{load {c load} }
+{tlist {c tixTList} }
+{grid {c tixGrid} }
+{itcl {c @scope} }
+
+# This following subdirectory tests whether there is any garbage left
+# after all the test files are executed. If so, either Tix has
+# resource leak or the test suite doesn't clean up properly.
+#
+
+{cleanup }
Added: external/tix-8.4.2.x/tests/general/NoteBook.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/NoteBook.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,64 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: NoteBook.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+proc About {} {
+ return "Testing the notebook widgets"
+}
+
+proc NoteBookPageConfig {w pages} {
+ foreach page $pages {
+ Assert {"x[$w pagecget $page -label]" == "x$page"}
+ Assert {"x[$w pageconfigure $page -label]" == "x-label {} {} {} $page"}
+ $w pageconfigure $page -label foo
+ Assert {"x[$w pagecget $page -label]" == "xfoo"}
+ update
+ }
+}
+
+proc Test {} {
+ foreach class {tixListNoteBook tixNoteBook tixStackWindow} {
+ set w [$class .d]
+ pack $w
+ update
+
+ set pages {1 2 3 4 5 6 1111111112221}
+
+ foreach page $pages {
+ if {$class == "tixListNoteBook"} {
+ $w subwidget hlist add $page -itemtype imagetext \
+ -image [tix getimage folder] -text $page
+ }
+ set p [$w add $page -label $page]
+ for {set x 1} {$x < 10} {incr x} {
+ button $p.$x -text $x
+ pack $p.$x -fill x
+ }
+ }
+
+ foreach page $pages {
+ $w raise $page
+ Assert {"x[$w raised]" == "x$page"}
+ update
+ }
+
+ Assert {[string compare $pages [$w pages]] == 0}
+
+ # test the "hooking" of the notebook frame subwidget
+ #
+ #
+ if {$class == "tixNoteBook"} {
+ NoteBookPageConfig $w $pages
+ }
+
+ foreach page $pages {
+ Assert {"x[$w pagecget $page -raisecmd]" == "x"}
+# Assert {"x[$w pageconfigure $page -raisecmd]" == "x-raisecmd {} {} {} {}"}
+ $w pageconfigure $page -raisecmd "RaiseCmd $page"
+ Assert {"x[$w pagecget $page -raisecmd]" == "xRaiseCmd $page"}
+ update
+ }
+
+ destroy $w
+ }
+}
Added: external/tix-8.4.2.x/tests/general/api.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/api.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,258 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: api.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+# api.tcl --
+#
+# Performs a comprehensive test on all the Tix widgets and
+# commands. This test knows the types and arguments of many
+# common Tix widget methods. It calls each widget method and
+# ensure that it work as expected.
+#
+#
+# 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.
+#
+
+set depd(init) ""
+set info(init) "Initialization, find out all the widget classes"
+set depd(wcreate) "init"
+set info(wcreate) "Try to create each widget"
+set depd(method) "init wcreate"
+set info(method) "Try to call each public method of all widgets"
+set depd(config-state) "init wcreate method"
+set info(config-state) "Configuring -state of widgets"
+
+proc APITest:init {} {
+ global widCmd cmdNames auto_index testConfig
+
+ TestBlock api-1.1 {Find out all the widget classes} {
+ # (1) Stores all the Tix commands in the associative array
+ # cmdNames
+ #
+ foreach cmd [info commands tix*] {
+ if [regexp : $cmd] {
+ continue
+ }
+ set cmdNames($cmd) ""
+ }
+
+ foreach name [array names auto_index "tix*:AutoLoad"] {
+ if [regsub {:AutoLoad} $name "" cmd] {
+ set cmdNames($cmd) ""
+ }
+ }
+
+ # (3). Don't want to mess with the console routines
+ #
+ foreach name [array names cmdNames] {
+ if [string match tixCon* $name] {
+ catch {
+ unset cmdNames($name)
+ }
+ }
+ }
+
+ # (2) Find out the names of the widget creation commands
+ #
+ foreach cmd [lsort [array names cmdNames]] {
+ if [info exists $cmd\(superClass\)] {
+ if {[set $cmd\(superClass\)] == ""} {
+ continue
+ }
+ }
+ switch -regexp -- $cmd {
+ {(DoWhenIdle)|(:)} {
+ continue
+ }
+ }
+
+ if [info exists err] {
+ unset err
+ }
+
+ catch {
+ auto_load $cmd
+ }
+ catch {
+ if {[uplevel #0 set $cmd\(isWidget\)] == 1} {
+ if {$testConfig(VERBOSE) > 20} {
+ puts "Found widget class: $cmd"
+ }
+ set widCmd($cmd) ""
+ }
+ }
+ }
+ }
+}
+
+proc APITest:wcreate {} {
+ global widCmd testConfig
+
+ TestBlock api-2 {Find out all the widget classes} {
+ foreach cls [lsort [array names widCmd]] {
+ if {[uplevel #0 set $cls\(virtual\)] == 1} {
+ # This is a virtual base class. Skip it.
+ #
+ continue
+ }
+
+ TestBlock api-2.1-$cls "Create widget of class: $cls" {
+ $cls .c
+ if ![tixStrEq [winfo toplevel .c] .c] {
+ pack .c -expand yes -fill both
+ }
+ update
+ }
+
+ TestBlock api-2.2-$cls "Widget Deletion" {
+ catch {
+ destroy .c
+ }
+
+ frame .c
+ update idletasks
+ global .c
+ if {[info exists .c] && [array names .c] != "context"} {
+ catch {
+ parray .c
+ }
+ catch {
+ puts [set .c]
+ }
+ error "widget record has not been deleted properly"
+ }
+ }
+ catch {
+ destroy .c
+ }
+ }
+ }
+}
+
+proc APITest:method {} {
+ global widCmd testConfig
+
+ TestBlock api-3 {Call all the methods of a widget class} {
+
+ foreach cls [lsort [array names widCmd]] {
+ if {[uplevel #0 set $cls\(virtual\)] == 1} {
+ continue
+ }
+
+ TestBlock api-3.1-$cls "Widget class: $cls" {
+ $cls .c
+
+ upvar #0 $cls classRec
+ foreach method [lsort $classRec(methods)] {
+ TestBlock api-3.1.1 "method: $method" {
+ catch {
+ .c $method
+ }
+ }
+ }
+ }
+ catch {
+ destroy .c
+ }
+ }
+ }
+}
+
+proc APITest:config-state {} {
+ global widCmd testConfig
+
+ TestBlock api-4 {Call the config-state method} {
+
+ foreach cls [lsort [array names widCmd]] {
+ if {[uplevel #0 set $cls\(virtual\)] == 1} {
+ continue
+ }
+
+ $cls .c
+ catch {
+ pack .c
+ }
+ if [catch {.c cget -state}] {
+ destroy .c
+ continue
+ }
+
+ if [tixStrEq $cls tixBalloon] {
+ destroy .c
+ continue
+ }
+
+ TestBlock api-4.1-$cls "Class: $cls" {
+ .c config -state disabled
+ Assert {[tixStrEq [.c cget -state] "disabled"]}
+ update
+ Assert {[tixStrEq [.c cget -state] "disabled"]}
+
+ .c config -state normal
+ Assert {[tixStrEq [.c cget -state] "normal"]}
+ update
+ Assert {[tixStrEq [.c cget -state] "normal"]}
+
+
+ .c config -state disabled
+ Assert {[tixStrEq [.c cget -state] "disabled"]}
+ .c config -state normal
+ Assert {[tixStrEq [.c cget -state] "normal"]}
+
+ }
+ catch {
+ destroy .c; update
+ }
+ }
+ }
+}
+
+proc APITest {t {level 0}} {
+ global depd tested info
+
+ if {$level > 300} {
+ error "possibly circular dependency"
+ }
+
+ set tested(none) 1
+
+ if [info exist tested($t)] {
+ return
+ }
+ foreach dep $depd($t) {
+ if {![info exists tested($dep)]} {
+ APITest $dep [expr $level + 1]
+ }
+ }
+
+ if {$t == "all"} {
+ set tested($t) 1
+ return
+ } else {
+ update
+ eval APITest:$t
+ set tested($t) 1
+ }
+}
+
+proc About {} {
+ return "Tix API Testing Suite"
+}
+
+proc Test {} {
+ global depd env
+
+ if [info exists env(APT_SUBSET)] {
+ set tests $env(APT_SUBSET)
+ } else {
+ set tests [array names depd]
+ }
+
+ foreach test $tests {
+ APITest $test
+ }
+}
+
Added: external/tix-8.4.2.x/tests/general/cmderror.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/cmderror.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,53 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: cmderror.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+# cmderror.tcl --
+#
+# This program tests whether command handler errors are processed
+# properly by the Tix toolkit.
+#
+# 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.
+#
+
+proc About {} {
+ return "Testing command handler errors are processed properly"
+}
+
+proc Test {} {
+ global cmdHandlerCalled
+
+ if {![string compare [info command tixCmdErrorHandler] ""]} {
+ if ![auto_load tixCmdErrorHandler] {
+ TestAbort "toolkit error: procedure \"tixCmdErrorHandler\" not implemented"
+ }
+ }
+ rename tixCmdErrorHandler _default_tixCmdErrorHandler
+ proc tixCmdErrorHandler {msg} {
+ global cmdHandlerCalled
+ set cmdHandlerCalled 1
+ }
+
+ # We cause an error to occur in the -command handler of the combobox
+ # widget. Such an error shouldn't cause the operation to fail.
+ # See the programmer's documentation of tixCmdErrorHandler for details.
+ #
+ catch {
+ tixComboBox .c -command CmdNotFound
+ .c invoke
+ set cmdNotFailed 1
+ }
+ Assert {[info exists cmdNotFailed]}
+ Assert {[info exists cmdHandlerCalled]}
+
+ # Clean up
+ #
+ destroy .c
+ rename tixCmdErrorHandler ""
+ rename _default_tixCmdErrorHandler tixCmdErrorHandler
+ unset cmdHandlerCalled
+
+}
Added: external/tix-8.4.2.x/tests/general/combobox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/combobox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,111 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: combobox.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+# combobox.tcl --
+#
+# Tests the ComboBox 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.
+#
+
+proc About {} {
+ return "Testing the ComboBox widget."
+}
+
+proc cbTest_Command {args} {
+ global cbTest_selected
+
+ set cbTest_selected [tixEvent value]
+}
+
+proc cbTest_ListCmd {w} {
+ global counter
+
+ incr counter
+
+ $w subwidget listbox delete 0 end
+ $w subwidget listbox insert end 0
+ $w subwidget listbox insert end 1
+ $w subwidget listbox insert end 2
+}
+
+
+proc Test {} {
+ global cbTest_selected
+
+ for {set dropdown 1} {$dropdown >= 0} {incr dropdown -1} {
+
+ TestBlock combo-1.1 {Config -value} {
+ set w [tixComboBox .c -command cbTest_Command -dropdown $dropdown \
+ -editable true]
+ pack $w
+ update
+ set val "Testing some value .."
+ $w config -value $val
+ Assert {[tixStrEq "$cbTest_selected" $val]}
+ }
+
+ TestBlock combo-1.2 {selection from listbox} {
+ $w subwidget listbox insert end "entry 0"
+ $w subwidget listbox insert end "entry 1"
+ $w subwidget listbox insert end "entry 2"
+
+ for {set x 0} {$x <= 2} {incr x} {
+ Click [$w subwidget arrow]
+ update
+
+ if $dropdown {
+ ClickListboxEntry [$w subwidget listbox] $x single
+ } else {
+ ClickListboxEntry [$w subwidget listbox] $x single
+ ClickListboxEntry [$w subwidget listbox] $x double
+ }
+ update
+
+ Assert {[tixStrEq "$cbTest_selected" "entry $x"]}
+ }
+ }
+
+ TestBlock combo-1.3 {invokation by keyboard} {
+ set val "Testing by key with \\ slashes"
+ KeyboardString [$w subwidget entry] $val
+ KeyboardEvent [$w subwidget entry] <Return>
+ update
+
+ Assert {[tixStrEq "$cbTest_selected" "$val"]}
+ }
+
+ catch {
+ destroy $w
+ }
+ }
+
+ TestBlock combo-2.1 {-listcmd of ComboBox} {
+ global counter
+ set counter 0
+ tixComboBox .c -listcmd "cbTest_ListCmd .c"
+ pack .c -expand yes -fill both
+ update
+
+ Click [.c subwidget arrow]
+ update
+ Assert {$counter == 1}
+ Click [.c subwidget arrow]
+ update
+
+ Click [.c subwidget arrow]
+ update
+ Click [.c subwidget arrow]
+ update
+ Assert {$counter == 2}
+
+
+ Assert {[.c subwidget listbox get 0] == "0"}
+ Assert {[.c subwidget listbox get 1] == "1"}
+ Assert {[.c subwidget listbox get 2] == "2"}
+ }
+}
Added: external/tix-8.4.2.x/tests/general/dirbox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/dirbox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,285 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: dirbox.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
+#
+# dirbox.tcl --
+#
+# Tests the DirSelectBox and DirSelectDialog 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.
+#
+
+proc About {} {
+ return "Testing the DirSelectBox and DirSelectDialog widgets."
+}
+
+# Try to configure the directory of a widget and see if it satisfy all
+# the requirements:
+#
+# 1: Should return error for non-existant directory, preserving
+# the old directory
+#
+# 2: When given a non-normalized path, it should normalize it.
+#
+proc TestConfigDirectory {class spec pack} {
+ global errorInfo
+
+ set w .w
+
+ if [winfo exists $w] {
+ destroy $w
+ }
+
+ TestBlock config-dir-1.1 "Simple creating of $class" {
+ # Creation without the spec. The default value should be normalized
+ #
+
+ # The default value should always be an absolute path
+ #
+ $class .w
+ set value [$w cget $spec]
+ Assert {[tixFSIsNorm $value]} 0 cont
+ }
+ catch {
+ destroy .w
+ }
+
+ TestBlock config-dir-1.2 "Creation with arbitrary (perhaps invalid) path" {
+ foreach item [GetCases_FsNormDir] {
+ if [info exists errorInfo] {
+ set errorInfo ""
+ }
+
+ set text [lindex $item 0]
+ set want [lindex $item 1]
+ set wanterr [lindex $item 2]
+
+ set err [catch {
+ set w [$class .w $spec $text]
+ set got [$w cget -value]
+ }]
+ Assert {$err == $wanterr}
+ if {!$err} {
+ set want [tixFSDisplayName $want]
+ Assert {[tixStrEq $want $got]}
+ }
+
+ catch {
+ destroy .w
+ }
+ }
+ }
+
+ catch {
+ destroy .w
+ }
+
+ TestBlock config-dir-1.2 "Config with arbitrary (perhaps invalid) path" {
+ set w [$class .w]
+
+ foreach item [GetCases_FsNormDir] {
+ if [info exists errorInfo] {
+ set errorInfo ""
+ }
+
+ set text [lindex $item 0]
+ set want [lindex $item 1]
+ set wanterr [lindex $item 2]
+
+ set err [catch {
+ $w config $spec $text
+ set got [$w cget -value]
+ }]
+ Assert {$err == $wanterr}
+
+ if $err {
+ # Should hold the previous -value
+ #
+ set value [$w cget $spec]
+ Assert {[tixFSIsNorm $value]} 0 cont
+ } else {
+ set value [$w cget $spec]
+ Assert {[tixFSIsNorm $value]} 0 cont
+
+ set want [tixFSDisplayName $want]
+ Assert {[tixStrEq $want $got]}
+ }
+
+ if $pack {
+ pack $w -expand yes -fill both -padx 10 -pady 10
+ update idletasks
+ }
+ }
+ }
+
+ catch {
+ destroy $w
+ }
+}
+
+proc TestRand {max} {
+ global testRandSeed
+
+ if ![info exists testRandSeed] {
+ set testRandSeed [expr [lindex [time {cd [pwd]}] 0] * 47 + 147]
+ }
+
+ set x [expr ($testRandSeed + 47) * [lindex [time {cd [pwd]}] 0]]
+ set x [expr $x + 7 * $max]
+ set testRandSeed [expr ($x % $max) + $max]
+
+ return [expr $testRandSeed % $max]
+}
+
+# TestHListWildClick --
+#
+# Randomly click around an hlist widget
+#
+# Args:
+# hlist:widget The HList widget.
+# mode: Either "single" or "double", indicating which type
+# of mouse click is desired.
+# cmd: Command to call after each click.
+#
+proc TestHListWildClick {hlist mode cmd} {
+ # The percentage chance that we sould traverse to a child node
+ #
+ set chance 40
+
+ for {set x 0} {$x < 10} {incr x} {
+ set node [$hlist info children ""]
+ if [tixStrEq $node ""] {
+ return
+ }
+
+ while 1 {
+ set ran [TestRand 100]
+ if {$ran >= $chance} {
+ break
+ }
+ set children [$hlist info children $node]
+ if [tixStrEq $children ""] {
+ break
+ }
+ set node [lindex $children [expr $ran % [llength $children]]]
+ }
+
+ TestBlock wild-click-1.1 "clicking \"$node\" of HList" {
+ if {![regexp -nocase alex [$hlist info data $node]]} {
+ #
+ # dirty fix: "alex" may be an AFS mounted file. Reading this
+ # directory may start an FTP session, which may be slow like
+ # hell
+ #
+ ClickHListEntry $hlist $node $mode
+ eval $cmd [list $node]
+ }
+ }
+ }
+}
+
+
+proc DirboxTest_Cmd {args} {
+ global dirboxTest_selected
+
+ set dirboxTest_selected [tixEvent value]
+}
+
+proc DirboxTest_Compare {isDirBox w h node} {
+ global dirboxTest_selected
+
+ set selFile [$h info data $node]
+
+ Assert {[tixStrEq "$dirboxTest_selected" "$selFile"]}
+ set dirboxTest_selected ""
+
+ if {$isDirBox} {
+ set entry [$w subwidget dircbx subwidget combo subwidget entry]
+ set entText [$entry get]
+ Assert {[tixStrEq "$entText" "$selFile"]}
+ }
+}
+
+proc Test {} {
+ global dirboxTest_selected
+
+ #------------------------------------------------------------
+ # (1) DirList
+ #------------------------------------------------------------
+
+ TestBlock dirbox-1.1 {Generic testing of tixDirList} {
+ TestConfigDirectory tixDirList -value 1
+ }
+
+ TestBlock dirbox-1.2 {Wild click on the hlist subwidget} {
+ set dirboxTest_selected ""
+ set w [tixDirList .c -command DirboxTest_Cmd]
+ set h [$w subwidget hlist]
+ pack $w -expand yes -fill both
+ TestHListWildClick $h double "DirboxTest_Compare 0 $w $h"
+ }
+ catch {
+ destroy $w
+ }
+
+ #------------------------------------------------------------
+ # (2) DirTree
+ #------------------------------------------------------------
+
+ TestBlock dirbox-2.1 {Generic testing of tixDirTree} {
+# TestConfigDirectory tixDirTree -value 1
+ }
+
+ TestBlock dirbox-2.2 {Wild click on the hlist subwidget} {
+ set dirboxTest_selected ""
+ set w [tixDirTree .c -command DirboxTest_Cmd]
+ set h [$w subwidget hlist]
+ pack $w -expand yes -fill both
+# TestHListWildClick $h double "DirboxTest_Compare 0 $w $h"
+ }
+ catch {
+ destroy $w
+ }
+
+ #------------------------------------------------------------
+ # (3) DirBox
+ #------------------------------------------------------------
+
+ TestBlock dirbox-3.1 {Generic testing of tixDirSelectBox} {
+# TestConfigDirectory tixDirSelectBox -value 1
+ }
+
+ TestBlock dirbox-3.2 {Wild click on the hlist subwidget} {
+ set dirboxTest_selected ""
+ set w [tixDirSelectBox .c -command DirboxTest_Cmd]
+ set h [$w subwidget dirlist subwidget hlist]
+ pack $w -expand yes -fill both
+# TestHListWildClick $h double "DirboxTest_Compare 0 $w $h"
+ }
+ catch {
+ destroy $w
+ }
+
+ TestBlock dirbox-4.1 {-disablecallback option} {
+ global dirbox_called
+ tixDirList .c -command dirbox_callback
+ pack .c
+ set dirbox_called 0
+ .c config -disablecallback 1
+ .c config -value [pwd]
+ .c config -disablecallback 0
+ Assert {$dirbox_called == 0}
+ }
+ catch {
+ destroy .c
+ }
+}
+
+proc dirbox_callback {args} {
+ global dirbox_called
+ set dirbox_called 1
+}
+
Added: external/tix-8.4.2.x/tests/general/draw.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/draw.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,26 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: draw.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+#
+# draw.tcl --
+#
+# Test the drawing functions in Tix.
+#
+# 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.
+#
+
+proc About {} {
+ return "Test the drawing functions in Tix."
+}
+
+proc Test {} {
+ TestBlock draw-1.1 {tixTmpLine} {
+ tixTmpLine 0 50 300 50
+ tixTmpLine 0 50 300 50
+ tixTmpLine 0 50 300 50 .
+ tixTmpLine 0 50 300 50 .
+ }
+}
Added: external/tix-8.4.2.x/tests/general/event0.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/event0.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,104 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: event0.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing the event emulation routines in the test suite"
+}
+
+proc TestEntry_Invoke {w} {
+ global testEntry_Invoked testEntry_value1
+
+ set testEntry_Invoked 1
+ set testEntry_value1 [$w get]
+}
+
+proc Test {} {
+ global foo
+ set foo 0
+
+ TestBlock event0-1.1 {Typing return in an entry widget} {
+ global testEntry_Invoked testEntry_value0 testEntry_value1
+
+ set testEntry_Invoked 0
+ entry .e -textvariable testEntry_value0
+ set testEntry_value0 "Entering some text ..."
+ bind .e <Return> "TestEntry_Invoke .e"
+ pack .e
+ update
+
+ KeyboardEvent .e <Return>
+ update
+ Assert {$testEntry_Invoked == 1}
+ Assert {$testEntry_value0 == $testEntry_value1}
+ }
+
+ TestBlock event0-1.2 {Typing characters in an entry widget} {
+ set testEntry_value0 ""
+ set val "Typing the keyboard ..."
+
+ focus .e
+ .e delete 0 end
+ update
+ KeyboardString .e $val
+ update
+ Assert {[tixStrEq "$testEntry_value0" "$val"]}
+ }
+
+ TestBlock event0-1.3 {Typing characters and slashes in an entry widget} {
+ set testEntry_value0 ""
+ set val "Typing the \\ keyboard ..."
+
+ focus .e
+ .e delete 0 end
+ KeyboardString .e $val
+ update
+ Assert {[tixStrEq "$testEntry_value0" "$val"]}
+
+ destroy .e
+ }
+
+ TestBlock event0-1.4 {Testing ClickListboxEntry} {
+ listbox .l -selectmode single
+ .l insert end "index 0"
+ .l insert end "index 1"
+ .l insert end "index 2"
+
+ pack .l; update
+
+ for {set x 0} {$x <= 2} {incr x} {
+ ClickListboxEntry .l $x single
+ update
+ Assert {[.l index active] == $x}
+ Assert {[.l curselection] == $x}
+ }
+
+ destroy .l
+ update
+ }
+
+ TestBlock event0-1.5 {Clicking a button} {
+ button .b -command "set foo 1"
+ pack .b; update
+
+ Click .b
+ Assert {$foo == 1}
+ }
+
+ TestBlock event0-1.6 {Drag and selecting a combobox} {
+ tixComboBox .c
+ .c insert end 10
+ .c insert end 10
+ .c insert end 10
+ .c insert end 10
+ .c insert end 10
+ pack .c; update
+
+ HoldDown [.c subwidget arrow]
+ Drag [.c subwidget listbox] 10 10
+ Release [.c subwidget listbox] 10 10
+ Release [.c subwidget arrow] -30 30
+
+ Assert {[.c cget -value] == "10"}
+ }
+}
Added: external/tix-8.4.2.x/tests/general/filebox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/filebox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,137 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: filebox.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# filebox.tcl --
+#
+# Tests the File selection box and dialog 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.
+#
+
+proc About {} {
+ return "Testing the (Ex)FileSelectBox and (Ex)FileSelectDialog widgets."
+}
+
+proc FdTest_GetFile {args} {
+ global fdTest_selected
+
+ set fdTest_selected [tixEvent value]
+}
+
+proc Test {} {
+ global fdTest_fullPath
+
+ if [tixStrEq [tix platform] "unix"] {
+ set fdTest_fullPath /etc/passwd
+ } else {
+ set fdTest_fullPath C:\\Windows\\System.ini
+ }
+
+ Test_FileSelectBox
+ Test_FileSelectDialog
+
+ Test_ExFileSelectBox
+ Test_ExFileSelectDialog
+}
+
+proc Test_FileSelectBox {} {
+ global fdTest_selected fdTest_fullPath
+
+ TestBlock filebox-1.1 {FileSelectBox} {
+ set w [tixFileSelectBox .f -command FdTest_GetFile]
+ pack $w -expand yes -fill both
+ update
+
+ InvokeComboBoxByKey [$w subwidget selection] "$fdTest_fullPath"
+ Assert {[tixStrEq $fdTest_selected "$fdTest_fullPath"]}
+ }
+ catch {
+ destroy $w
+ }
+}
+
+proc Test_FileSelectDialog {} {
+ global fdTest_selected fdTest_fullPath
+
+ TestBlock filebox-2.1 {FileSelectDialog} {
+ set w [tixFileSelectDialog .f -command FdTest_GetFile]
+ $w popup
+ update
+
+ InvokeComboBoxByKey [$w subwidget fsbox subwidget selection] \
+ "$fdTest_fullPath"
+ Assert {[tixStrEq $fdTest_selected "$fdTest_fullPath"]}
+ }
+ catch {
+ destroy $w
+ }
+}
+
+proc Test_ExFileSelectBox {} {
+ global fdTest_selected fdTest_fullPath
+
+ TestBlock filebox-3.1 {ExFileSelectBox} {
+ set w [tixExFileSelectBox .f -command FdTest_GetFile]
+ pack $w -expand yes -fill both
+ update
+
+ $w subwidget file config -selection "$fdTest_fullPath" \
+ -value "$fdTest_fullPath"
+ Assert {[tixStrEq $fdTest_selected "$fdTest_fullPath"]}
+ }
+
+ TestBlock filebox-3.2 {Keyboard input in ExFileSelectBox entry subwidget} {
+ set dirCbx [$w subwidget dir]
+ set fileCbx [$w subwidget file]
+ set okBtn [$w subwidget ok]
+
+ foreach file {Foo bar "Foo Bar"} {
+ set fdTest_selected ""
+
+ InvokeComboBoxByKey $fileCbx $file
+ set fullPath [tixFSJoin [$dirCbx cget -value] $file]
+ update
+
+ Assert {[tixStrEq "$fdTest_selected" "$fullPath"]}
+ }
+ }
+
+ TestBlock filebox-3.3 {Keyboard and then press OK} {
+ foreach file {bar "Foo Bar"} {
+ set fdTest_selected ""
+
+ SetComboBoxByKey $fileCbx $file
+ Click $okBtn
+ set fullPath [tixFSJoin [$dirCbx cget -value] $file]
+ update
+
+ Assert {[tixStrEq "$fdTest_selected" "$fullPath"]}
+ }
+ }
+
+ catch {
+ destroy $w
+ }
+}
+
+proc Test_ExFileSelectDialog {} {
+ global fdTest_selected fdTest_fullPath
+
+ TestBlock filebox-4.1 {ExFileSelectDialog} {
+ set w [tixExFileSelectDialog .f -command FdTest_GetFile]
+ $w popup
+ update
+
+ InvokeComboBoxByKey [$w subwidget fsbox subwidget file] \
+ $fdTest_fullPath
+ Assert {[tixStrEq $fdTest_selected "$fdTest_fullPath"]}
+ }
+
+ catch {
+ destroy $w
+ }
+}
Added: external/tix-8.4.2.x/tests/general/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1,20 @@
+testtmpl.tcl
+api.tcl
+minterp.tcl
+options.tcl
+labentry.tcl
+event0.tcl
+fs.tcl
+oop.tcl
+optmenu.tcl
+select.tcl
+slistbox.tcl
+var1.tcl
+NoteBook.tcl
+mwm.tcl
+cmderror.tcl
+dirbox.tcl
+filebox.tcl
+combobox.tcl
+samples.tcl
+draw.tcl
Added: external/tix-8.4.2.x/tests/general/fs.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/fs.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,21 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: fs.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# fs.tcl
+#
+# Test the portable file handling ("FS") routines.
+#
+# 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.
+#
+
+proc About {} {
+ return "Testing portable file handling routines"
+}
+
+proc Test {} {
+ # These tests were all obsolete post-Tix 8.2
+}; # Test
Added: external/tix-8.4.2.x/tests/general/labentry.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/labentry.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,60 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: labentry.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# labentry.tcl
+#
+# Tests the TixLabelEntry 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.
+#
+
+proc About {} {
+ return "Testing the TixLabelEntry widget"
+}
+
+proc Test {} {
+ TestBlock labent-1.1 {LabelEntry focus management} {
+ set t [toplevel .t]
+
+ set w [tixLabelEntry .t.c -label "Stuff(c): "]
+ pack $w -padx 20 -pady 10
+ tixLabelEntry .t.d -label "Stuff(d): "
+ pack .t.d -padx 20 -pady 10
+ focus $w
+ update
+
+ set px [winfo pointerx $t]
+ set py [winfo pointery $t]
+ set W [winfo width $t]
+ set H [winfo height $t]
+
+ if {$W < 100} {
+ set W 100
+ }
+ if {$H < 100} {
+ set H 100
+ }
+
+ set mx [expr $px - $W / 2]
+ set my [expr $py - $H / 2]
+
+ # We must move the window under the cursor in order to test
+ # the current focus
+ #
+ wm geometry $t $W\x$H+$mx+$my
+ raise $t
+ update
+
+ # On some platforms (e.g. Red Hat Linux 5.2/x86), this fails
+ # because we get: LHS = .t.c, RHS = .t.c.frame.entry
+ # (not clear why).
+ #
+ Assert {[focus -lastfor $t] == [$w subwidget entry]}
+
+ destroy $t
+ }; # TestBlock
+}; # Test
Added: external/tix-8.4.2.x/tests/general/minterp.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/minterp.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,64 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: minterp.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# minterp.tcl
+#
+# Tests Tix running under multiple interpreters.
+#
+# 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.
+#
+
+proc About {} {
+ return "Tests Tix running under multiple interpreters."
+}
+
+proc Test {} {
+ global tix tcl_version
+ if ![string comp [info commands interp] ""] {
+ # Does not support multiple interpreters.
+ return
+ }
+
+ if {[lsearch [package names] Itcl] != -1} {
+ #
+ # multiple interpreters currently core dumps under itcl2.1
+ #
+# return
+ }
+
+ TestBlock minterp-1.1 {multiple interpreters} {
+ for {set x 0} {$x < 5} {incr x} {
+ global testConfig
+ interp create a
+ interp eval a "set dynlib [list $testConfig(dynlib)]"
+ if {[info exists tix(et)] && $tix(et) == 1} {
+ interp eval a {
+ catch {load "" Tk}
+ catch {load "" ITcl}
+ catch {load "" ITk}
+ catch {load "" Tclsam}
+ catch {load "" Tksam}
+ catch {load "" Tixsam}
+ }
+ } else {
+ interp eval a {
+ load "" Tk
+ load $dynlib Tix
+ }
+ }
+ interp eval a {
+ tixControl .d -label Test
+ tixComboBox .e -label Test
+ tixDirList .l
+ pack .l -expand yes -fill both
+ pack .d .e -expand yes -fill both
+ update
+ }
+ interp delete a
+ }
+ }
+}
Added: external/tix-8.4.2.x/tests/general/mwm.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/mwm.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: mwm.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# mwm.tcl --
+#
+# Test tixMwm command.
+#
+# 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.
+#
+
+proc About {} {
+ return "Testing tixMwm command"
+}
+
+proc Test {} {
+ if ![string compare [info command tixMwm] ""] {
+ puts "(OK) The tixMwm command is not available."
+ return
+ }
+ if ![tixMwm ismwmrunning .] {
+ puts "(OK) Mwm is not running on this display."
+ return
+ }
+
+ toplevel .d
+ toplevel .e
+
+ test {tixMwm protocol .d add MY_PRINT_HELLO {"Print Hello" _H Ctrl<Key>H}}
+ wm protocol .d MY_PRINT_HELLO {puts Hello}
+
+ test {tixMwm protocol .e add MY_PRINT_HELLO {"Print Hello" _H Ctrl<Key>H}}
+ wm protocol .e MY_PRINT_HELLO {puts Hello}
+
+ test {destroy .d}
+
+ test {tixMwm protocol .e add MY_PRINT_HELLO {"Print Hello" _H Ctrl<Key>H}}
+ wm protocol .e MY_PRINT_HELLO {puts Hello}
+
+ test {tixMwm protocol . delete MY_PRINT_HELLO}
+ wm protocol . MY_PRINT_HELLO {}
+
+ test {tixMwm protocol .e add MY_PRINT_HELLO {"Print Hello" _H Ctrl<Key>H}}
+ wm protocol .e MY_PRINT_HELLO {puts Hello}
+
+ test {destroy .e}
+}
Added: external/tix-8.4.2.x/tests/general/oop.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/oop.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,15 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: oop.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing OOP features"
+}
+
+proc Test {} {
+ test {tix} {arg}
+ test {tixWidgetClass} {arg}
+ test {tixClass} {arg}
+ test {tixNoteBook} {arg}
+ test {tixAppContext} {arg}
+}
Added: external/tix-8.4.2.x/tests/general/options.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/options.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,21 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: options.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing the option configuration of the Tix widgets"
+}
+
+proc Test {} {
+ test {tixComboBox .c -xxxxx} {missing}
+ test {tixComboBox .c -xxxxx xxx} {unknown}
+ test {tixComboBox .c -d xxx} {ambi}
+ test {tixComboBox .c -disab 0} {ambi}
+ test {tixComboBox .c -disablecal 0}
+ Assert {[.c cget -disablecallback] == 0}
+ Assert {[.c cget -disableca] == 0}
+ test {tixComboBox .d -histl 10}
+ Assert {[.d cget -histlimit] == 10}
+ Assert {[.d cget -histlim] == 10}
+ Assert {[.d cget -historylimit] == 10}
+}
Added: external/tix-8.4.2.x/tests/general/optmenu.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/optmenu.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,109 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: optmenu.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing Option Menu widget"
+}
+
+proc Test {} {
+ tixOptionMenu .p -label "From File Format : " -command "selectproc input" \
+ -disablecallback 1 \
+ -options {
+ label.width 19
+ label.anchor e
+ menubutton.width 15
+ }
+
+ pack .p
+
+ .p add command text -label "Plain Text"
+ .p add command post -label "PostScript"
+ .p add command format -label "Formatted Text"
+ .p add command html -label "HTML"
+ .p add separator sep
+ .p add command tex -label "LaTeX"
+ .p add command rtf -label "Rich Text Format"
+
+ update
+
+ foreach ent [.p entries] {
+ test {.p delete $ent}
+ }
+
+ Assert {[.p subwidget menubutton cget -text] == {}}
+
+ test {destroy .p}
+
+ # Testing deleting "sep" at the end
+ #
+ tixOptionMenu .p -label "From File Format : " -command "selectproc input" \
+ -disablecallback 1 \
+ -options {
+ label.width 19
+ label.anchor e
+ menubutton.width 15
+ }
+
+
+ pack .p
+
+ .p add command text -label "Plain Text"
+ .p add command post -label "PostScript"
+ .p add command format -label "Formatted Text"
+ .p add command html -label "HTML"
+ .p add separator sep
+ .p add command tex -label "LaTeX"
+ .p add command rtf -label "Rich Text Format"
+
+ test {.p delete text}
+ test {.p delete post}
+ test {.p delete html}
+ test {.p delete format}
+ test {.p delete tex}
+ test {.p delete rtf}
+ test {.p delete sep}
+
+ Assert {[.p subwidget menubutton cget -text] == {}}
+ test {destroy .p}
+
+ # Testing deleting "sep" as the second-last one
+ #
+ tixOptionMenu .p -label "From File Format : " -command "selectproc input" \
+ -disablecallback 1 \
+ -options {
+ label.width 19
+ label.anchor e
+ menubutton.width 15
+ }
+
+
+ pack .p
+
+ .p add command text -label "Plain Text"
+ .p add command post -label "PostScript"
+ .p add command format -label "Formatted Text"
+ .p add command html -label "HTML"
+ .p add separator sep
+ .p add command tex -label "LaTeX"
+ .p add command rtf -label "Rich Text Format"
+
+ test {.p delete text}
+ global .p
+ Assert {[info exists .p(text,type)] == 0}
+ Assert {[info exists .p(text,name)] == 0}
+ Assert {[info exists .p(text,label)] == 0}
+ test {.p delete post}
+ test {.p delete html}
+ test {.p delete format}
+ test {.p delete tex}
+
+ Assert {[.p cget -value] == "rtf"}
+ test {.p delete sep}
+ Assert {[.p cget -value] == "rtf"}
+ test {.p delete rtf}
+
+ Assert {[.p subwidget menubutton cget -text] == {}}
+
+ test {destroy .p}
+}
Added: external/tix-8.4.2.x/tests/general/pane.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/pane.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,33 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: pane.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# pane.tcl --
+#
+# Test the PanedWindow 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.
+#
+
+proc About {} {
+ return "Test the PanedWindow widget."
+}
+
+proc Test {} {
+ TestBlock pane-1.1 {tixPanedWindow -expand} {
+ tixPanedWindow .p -orient horizontal
+ pack .p -expand yes -fill both
+ set p1 [.p add pane1 -expand 0.3]
+ set p2 [.p add pane2 -expand 1]
+ set p3 [.p add pane3 -size 20]
+ .p config -width 300 -height 200
+ update
+ .p config -width 500
+ update
+ .p config -width 200
+ update
+ }
+}
Added: external/tix-8.4.2.x/tests/general/pkginit.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/pkginit.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,10 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: pkginit.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# pkginit.tcl --
+#
+#
+# This file contains the initialization code for all the test programs
+# in this directory.
+#
Added: external/tix-8.4.2.x/tests/general/samples.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/samples.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,77 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: samples.tcl,v 1.3 2002/11/13 21:12:18 idiscovery Exp $
+#
+# samples.tcl --
+#
+# Tests all the sample programs in the demo/samples directory.
+#
+#
+# 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.
+#
+
+proc About {} {
+ return "Testing all the sample programs in the demo/samples directory"
+}
+
+proc Test {} {
+ global samples_dir demo_dir tix_library
+
+ TestBlock samples-1.0 "Finding the demo directory" {
+ foreach dir "$tix_library/demos $tix_library/../demos ../../demos ../demos demos" {
+ if {[file exists $dir] && [file isdir $dir]} {
+ set pwd [pwd]
+ cd $dir
+ set demo_dir [pwd]
+ set samples_dir [pwd]/samples
+ cd $pwd
+ break
+ }
+ }
+ }
+
+ if {![info exists samples_dir]} {
+ puts "Cannot find demos directory. Sample tests are skipped"
+ return
+ } else {
+ puts "loading demos from $demo_dir"
+ }
+
+ TestBlock samples-1.1 "Running widget demo" {
+ if {[file exists [set file [file join $demo_dir tixwidgets.tcl]]]} {
+ uplevel #0 [list source $file]
+ tixDemo:SelfTest
+ }
+ }
+ if {![file exists [set file [file join $samples_dir AllSampl.tcl]]]} {
+ return
+ }
+ uplevel #0 [list source $file]
+
+ ForAllSamples root "" Test_Sample
+}
+
+
+proc Test_Sample {token type text dest} {
+ global samples_dir tix_demo_running
+
+ set tix_demo_running 1
+
+ if {$type == "f"} {
+ set w .sampl_top
+ TestBlock samples-2-$dest "Loading sample $dest" {
+ uplevel #0 source [list $samples_dir/$dest]
+ toplevel $w
+ wm geometry $w +100+100
+ wm title $w $text
+ RunSample $w
+ update
+ }
+ catch {
+ destroy $w
+ }
+ }
+}
Added: external/tix-8.4.2.x/tests/general/select.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/select.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: select.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing the TixSelect widget"
+}
+
+proc Test {} {
+ set dis [tix option get disabled_fg]
+ set norm [tix option get fg]
+
+ # Create with a normal state
+ #
+ #
+ tixSelect .foo -allowzero 0 -radio 1 -label "Foo:" \
+ -state normal
+ .foo add "1" -text "One"
+ .foo add "2" -text "Two"
+ pack .foo
+
+ Assert {[.foo subwidget label cget -foreground] == $norm}
+ .foo config -state normal
+ .foo config -state normal
+ Assert {[.foo subwidget label cget -foreground] == $norm}
+ .foo config -state disabled
+ Assert {[.foo subwidget label cget -foreground] == $dis}
+ .foo config -state normal
+ Assert {[.foo subwidget label cget -foreground] == $norm}
+
+ update
+ destroy .foo
+
+ tixSelect .foo -allowzero 0 -radio 1 -label "Foo:" \
+ -state disabled
+ .foo add "1" -text "One"
+ .foo add "2" -text "Two"
+ pack .foo
+
+ Assert {[.foo subwidget label cget -foreground] == $dis}
+ .foo config -state normal
+ Assert {[.foo subwidget label cget -foreground] == $norm}
+ .foo config -state normal
+ Assert {[.foo subwidget label cget -foreground] == $norm}
+ .foo config -state disabled
+ Assert {[.foo subwidget label cget -foreground] == $dis}
+ .foo config -state normal
+ Assert {[.foo subwidget label cget -foreground] == $norm}
+}
Added: external/tix-8.4.2.x/tests/general/slistbox.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/slistbox.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,20 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: slistbox.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing ScrolledListBox"
+}
+
+proc Test {} {
+ set w [tixScrolledListBox .listbox]
+ pack $w
+
+ foreach item {{1 1} 2 3 4 5 6} {
+ $w subwidget listbox insert end $item
+ }
+
+ Click [$w subwidget listbox] 30 30
+
+ destroy $w
+}
Added: external/tix-8.4.2.x/tests/general/testtmpl.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/testtmpl.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,32 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: testtmpl.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# testtmpl.tcl --
+#
+# Test Template:
+#
+# This program is used as the first test: see whether we can execute any
+# case at all.
+#
+# This program is also used as a template file for writing other test
+# cases.
+#
+# 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.
+#
+
+proc About {} {
+ return "Testing whether the test program starts up properly"
+}
+
+proc Test {} {
+ TestBlock testtmpl-1.1 {NULL test} {
+ #
+ # If this fails, we are in big trouble and probably none of the
+ # tests can pass. Abort all the tests
+ #
+ } 1 abortall
+}
Added: external/tix-8.4.2.x/tests/general/var1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/general/var1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,63 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: var1.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing -variable option with Tix widgets"
+}
+
+proc Test {} {
+ global foo bar arr
+
+ set classes {tixControl tixComboBox}
+ set value 1234
+
+ foreach class $classes {
+ set w [$class .foo]
+ pack $w
+ update idletasks
+
+ TestBlock var1-1.1 {$class: config -variable with initialized value} {
+ set bar $value
+ $w config -variable bar
+ update idletasks
+ Assert {[$w cget -value] == $value}
+ }
+
+ TestBlock var1-1.2 {$class: config -variable w/ uninitialized value} {
+ destroy $w
+ set w [$class .foo]
+ $w config -variable bar
+ Assert {[$w cget -value] == $bar}
+ }
+
+ TestBlock var1-1.2 {$class: config -variable} {
+ set foo 111
+ $w config -variable foo
+ update idletasks
+ Assert {[$w cget -value] == $foo}
+ }
+
+ TestBlock var1-1.2 {$class: config -value} {
+ $w config -value 123
+ Assert {[$w cget -value] == 123}
+ Assert {[set [$w cget -variable]] == 123}
+ }
+
+ TestBlock var1-1.2 {$class: config -variable on array variable} {
+ set arr(12) 1234
+ $w config -variable arr(12)
+ Assert {[$w cget -value] == $arr(12)}
+ }
+
+ TestBlock var1-1.2 {$class: config -value on array variable} {
+ $w config -value 12
+ Assert {[$w cget -value] == 12}
+ Assert {[set [$w cget -variable]] == 12}
+ }
+
+ catch {
+ destroy $w
+ }
+ }
+}
Added: external/tix-8.4.2.x/tests/grid.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/grid.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,78 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# grid.test --
+#
+# This file is a Tcl script to test out tixGrid.c and tixGrRC.c
+# It is organized in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: grid.test,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+
+package require Tix
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+set longword xx
+for {set i 0} {$i < 10} {incr i} {
+ set longword $longword$longword
+}
+
+proc format-$longword {args} {
+ global format_called
+
+ set format_called 1
+}
+
+test grid-1.1 {Tix_GrCallFormatCmd()} {
+ set format_called 0
+ tixGrid .grid -formatcmd format-$longword
+ pack .grid
+ update idletasks
+ destroy .grid
+ set format_called
+} {1}
+
+
+test grrc-1.1 {Tix_GrRCSize} {
+ tixGrid .grid
+
+ set a [list [catch {
+ .grid size row xx
+ } msg] $msg]
+
+ destroy .grid
+ set a
+} {1 {unknown option "xx"; must be an integer or "default"}}
+
+test grrc-1.2 {Tix_GrRCSize(): sprintf} {
+ tixGrid .grid
+
+ set a [list [catch {
+ .grid size row default -pad
+ } msg] $msg]
+
+ destroy .grid
+ set a
+} {1 {value missing for option "-pad"}}
+
+test grrc-1.3 {Tix_GrRCSize(): sprintf} {
+ tixGrid .grid
+
+ set a [list [catch {
+ .grid size row 123 -pad
+ } msg] $msg]
+
+ destroy .grid
+ set a
+} {1 {value missing for option "-pad"}}
+
+
+# cleanup
+::tcltest::cleanupTests
+return
+
Added: external/tix-8.4.2.x/tests/grid/Grid.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/grid/Grid.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,159 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: Grid.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# This tests the Grid widget.
+#
+#
+#
+proc About {} {
+ return "Basic tests for the Grid widget"
+}
+
+proc Test {} {
+ TestBlock grid-1.1 {Grid creation} {
+ test {tixGrid} {args}
+ test {tixGrid .g -ff} {unknown}
+ test {tixGrid .g -width} {missing}
+
+ Assert {[info command .g] == {}}
+ Assert {![winfo exists .g]}
+ }
+
+ TestBlock grid-1.2 {Grid creation} {
+ set g [tixGrid .g]
+ pack $g -expand yes -fill both
+ update
+ destroy $g
+ }
+
+ TestBlock grid-2.1 {Grid widget commands} {
+ set g [tixGrid .g]
+ pack $g -expand yes -fill both
+ test {$g} {args}
+ set foo ""
+ }
+ TestBlock grid-2.2 {Grid widget commands} {
+ $g config -selectmode browse
+ Assert {[tixStrEq [$g cget -selectmode] browse]}
+ }
+
+ #----------------------------------------
+ # Sites
+ #----------------------------------------
+ foreach cmd {anchor dragsite dropsite} {
+ TestBlock grid-3.1 "Grid \"$cmd\" widget command" {
+ test1 {$g $cmd} \
+ "wrong # args: should be \".g $cmd option ?x y?\""
+ }
+ TestBlock grid-3.2 "Grid \"$cmd\" widget command" {
+ test1 {$g $cmd foo} \
+ {wrong option "foo", must be clear, get or set}
+ }
+ TestBlock grid-3.3 "Grid \"$cmd\" widget command" {
+ test1 {$g $cmd clear bar} \
+ "wrong # of arguments, must be: .g $cmd clear"
+ }
+ TestBlock grid-3.4 "Grid \"$cmd\" widget command" {
+ test1 {$g $cmd set 0 0 bar} \
+ "wrong # args: should be \".g $cmd option ?x y?\""
+ }
+ TestBlock grid-3.5 "Grid \"$cmd\" widget command" {
+ test1 {$g $cmd set xxx 0} \
+ {expected integer but got "xxx"}
+ }
+ TestBlock grid-3.6 "Grid \"$cmd\" widget command" {
+ test1 {$g $cmd set 0 xxx} \
+ {expected integer but got "xxx"}
+ }
+ foreach selunit {row column cell} {
+ TestBlock grid-3.7 "Grid \"$cmd\" widget command" {
+ $g config -selectunit $selunit
+ $g $cmd set 0 0
+ update
+ }
+ }
+ TestBlock grid-3.8 "Grid \"$cmd\" widget command" {
+ $g $cmd set 0 0
+ Assert {[tixStrEq [$g $cmd get] "0 0"]}
+ }
+ TestBlock grid-3.9 "Grid \"$cmd\" widget command" {
+ $g $cmd set -20 -0
+ Assert {[tixStrEq [$g $cmd get] "0 0"]}
+ }
+ TestBlock grid-3.10 "Grid \"$cmd\" widget command" {
+ $g $cmd set 10000000 100000000
+ Assert {[tixStrEq [$g $cmd get] "10000000 100000000"]}
+ }
+ }
+
+ #----------------------------------------
+ # set
+ #----------------------------------------
+ TestBlock grid-4.1 {Grid "set" widget command} {
+ test {$g set} {args}
+ test {$g set 0 0 -foo} {missing}
+ test {$g set 0 0 -foo bar} {unknown}
+ test {$g set 0 0 -itemtype foo} {unknown}
+ test {$g set 0 0 -itemtype imagetext -image foo} {image}
+ test {$g set 0 0 -itemtype imagetext -text Hello -image \
+ [tix getimage folder]
+ }
+ update
+ }
+
+ TestBlock grid-4.2 {Grid "set" widget command} {
+ for {set x 0} {$x < 19} {incr x} {
+ for {set y 0} {$y < 13} {incr y} {
+ $g set $x $y -itemtype imagetext -text ($x,$y) \
+ -image [tix getimage folder]
+ }
+ }
+ update
+ }
+
+ TestBlock grid-4.3 {Grid "unset" widget command} {
+ for {set x 0} {$x < 23} {incr x} {
+ for {set y 0} {$y < 19} {incr y} {
+ $g unset $x $y
+ }
+ }
+ update
+ }
+
+
+ #----------------------------------------
+ # delete
+ #----------------------------------------
+ TestBlock grid-5.1 {Grid "delete" widget command} {
+ for {set x 0} {$x < 19} {incr x} {
+ for {set y 0} {$y < 13} {incr y} {
+ $g set $x $y -itemtype imagetext -text ($x,$y) \
+ -image [tix getimage folder]
+ }
+ }
+ foreach index {0 1 3 2 6 3 1 1 max 19 13 max} {
+ $g delete row $index
+ $g delete col $index
+ update
+ }
+ }
+ #----------------------------------------
+ # move
+ #----------------------------------------
+ TestBlock grid-6.1 {Grid "move" widget command} {
+ for {set x 0} {$x < 19} {incr x} {
+ for {set y 0} {$y < 13} {incr y} {
+ $g set $x $y -itemtype imagetext -text ($x,$y) \
+ -image [tix getimage folder]
+ }
+ }
+ foreach index {0 1 3 2 6 3 1 1 max 19 13 max} {
+ $g move row $index $index 3
+ $g move col $index $index -2
+ update
+ }
+ }
+
+}
+
Added: external/tix-8.4.2.x/tests/grid/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/grid/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1 @@
+Grid.tcl
\ No newline at end of file
Added: external/tix-8.4.2.x/tests/hlist/DirList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/hlist/DirList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,49 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: DirList.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
+#
+# This file tests the pixmap image reader
+#
+
+proc About {} {
+ return "This file performs test on the DirList widget"
+}
+
+proc Test {} {
+ set w .dirlist
+
+ tixDirList $w
+ pack $w
+
+ set h [$w subwidget hlist]
+
+ # If we didn't specifi -value, the DirList should display the
+ # current directory
+ Assert {[string equal [$w cget -value] [pwd]]}
+
+ # After changing the directory, the selection and anchor should change as
+ # well
+ set root [$h info children ""]
+ ClickHListEntry $h $root single
+ Assert {[string equal [$w cget -value] [$h info data $root]]}
+ Assert {[string equal [$h info selection] $root]}
+ Assert {[string equal [$h info anchor] $root]}
+
+ if {$::tcl_platform(platform) eq "windows"} {
+ set dir1 C:\\Windows
+ set dir2 C:\\Backup
+ } else {
+ set dir1 /etc
+ set dir2 /etc
+ }
+
+ foreach dir [list $dir1 $dir2] {
+ if ![file exists $dir] {
+ continue
+ }
+
+ $w config -value $dir
+ Assert {[string equal [$w cget -value] $dir]}
+ Assert {[string equal [$h info data [$h info anchor]] $dir]}
+ }
+}
Added: external/tix-8.4.2.x/tests/hlist/HLHdr.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/hlist/HLHdr.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,98 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: HLHdr.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# This tests the "header" functions in HList
+#
+#
+# Assumptions:
+# (1) add command OK
+#
+
+proc test {cmd {result {}} {ret {}}} {
+ if [catch {set ret [uplevel 1 $cmd]} err] {
+ set done 0
+ foreach r $result {
+ if [regexp $r $err] {
+ puts "error message OK: $err"
+ set done 1
+ break
+ }
+ }
+ if {!$done} {
+ error $err
+ }
+ } else {
+ puts "execution OK: $cmd"
+ }
+ return $ret
+}
+
+set h [tixHList .h -header 1 -columns 2]
+pack $h -expand yes -fill both
+$h add hello -text hello
+$h add noind -text hello
+
+test {$h header} {args}
+test {$h header bad} {unknown}
+
+# Test for create
+#
+#
+
+test {$h header create} {args}
+test {$h header create 3} {{exist}}
+test {$h header create 1 -itemtype} {missing}
+test {$h header create 1 -itemtype bad} {unknown}
+test {$h header create 1 -itemtype imagetext -text Hello -image [tix getimage folder]}
+
+
+# Test for cget
+#
+test {$h header cget} {args}
+test {$h header cget 0 -text} {does not have}
+test {$h header cget 1} {args}
+test {$h header cget 3 -text} {exist}
+test {$h header cget 1 arg arg} {args}
+test {$h header cget 1 -bad} {{unknown}}
+test {$h header cget 1 -text}
+
+# Test for config
+#
+test {$h header config} {args}
+test {$h header config 3 -text} {exist}
+test {$h header config 0 -text} {does not have}
+test {$h header config 1 -bad} {{unknown}}
+test {$h header config 1}
+test {$h header config 1 -text}
+test {$h header config 1 -text Hi}
+
+# Test for size
+#
+test {$h header size} {args}
+test {$h header size 0 0} {args}
+test {$h header size 4} {exist}
+test {$h header size 0} {not have}
+test {puts [$h header size 1]}
+
+
+# Test for exist
+#
+test {$h header exist} {args}
+test {$h header exist hello hi} {args}
+test {$h header exist 4} {exist}
+test {puts [$h header exist 0]}
+test {puts [$h header exist 1]}
+
+# Test for delete
+#
+test {$h header delete} {args}
+test {$h header delete hello hi} {args}
+test {$h header delete 4} {exist}
+test {$h header delete 0} {not have}
+test {$h header delete 1}
+
+# just do it again ..
+#
+test {$h header create 1 -itemtype imagetext -text Hello -image [tix getimage folder]}
+
Added: external/tix-8.4.2.x/tests/hlist/HLInd.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/hlist/HLInd.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,55 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: HLInd.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc Test {} {
+ set h [tixHList .h -indicator 1 -indent 20]
+ pack $h -expand yes -fill both
+ button .b -text close -command "Done forced"
+ pack .b
+
+ $h add hello -text hello
+ $h add noind -text hello
+
+ test {$h indicator} {args}
+ test {$h indicator bad} {unknown}
+
+ # Test for create
+ #
+ #
+
+ test {$h indicator create} {args}
+ test {$h indicator create xyz} {{not found}}
+ test {$h indicator create hello -itemtype} {missing}
+ test {$h indicator create hello -itemtype bad} {unknown}
+ test {$h indicator create hello -itemtype imagetext \
+ -image [tix getimage plus]}
+
+ # Test for cget
+ #
+ test {$h indicator cget} {args}
+ test {$h indicator cget hello} {args}
+ test {$h indicator cget hello arg arg} {args}
+ test {$h indicator cget noind -text} {{does not have}}
+ test {$h indicator cget hello -bad} {{unknown}}
+ test {$h indicator cget hello -image}
+
+ # Test for size
+ #
+ test {$h indicator size} {args}
+ test {$h indicator size hello hi} {args}
+ test {$h indicator size bad} {{not found}}
+ test {$h indicator size noind} {{does not have}}
+ test {set x [$h indicator size hello]}
+ test {$h indicator cget hello -image} {{does not}}
+
+ # Test for delete
+ #
+ test {$h indicator delete} {args}
+ test {$h indicator delete hello hi} {args}
+ test {$h indicator delete bad} {{not found}}
+ test {$h indicator delete hello}
+ test {$h indicator cget hello -image} {{does not}}
+
+ update
+}
Added: external/tix-8.4.2.x/tests/hlist/HList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/hlist/HList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,80 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: HList.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# HList.tcl --
+#
+# General HList test.
+#
+# 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.
+#
+
+proc About {} {
+ return "General tests for the HList widget"
+}
+
+
+proc Test {} {
+ set h [tixHList .h -selectmode single]
+ pack $h -expand yes -fill both
+
+ #
+ PutP "Testing the selection command"
+ #
+
+ for {set x 0} {$x < 40} {incr x} {
+ $h add foo$x -text Foo$x
+ }
+ update
+
+ test {$h selection set} {arg}
+ test {$h selection set foo1}
+
+ test {$h selection get foo} {arg}
+ Assert {[tixStrEq [$h selection get] "foo1"]}
+ Assert {[tixStrEq [$h selection get] [$h info selection]]}
+
+ #
+ PutP "Testing the info bbox command"
+ #
+ $h config -browsecmd "HLTest_BrowseCmd $h"
+ global hlTest_selected
+ for {set x 0} {$x <= 3} {incr x} {
+ set ent foo[expr $x * 8]
+ $h see $ent
+ update
+
+ set bbox [$h info bbox $ent]
+ Assert {![tixStrEq "$bbox" ""]}
+
+ set hlTest_selected ""
+ Click $h [lindex $bbox 0] [lindex $bbox 1]
+ update
+ Assert {[tixStrEq "$hlTest_selected" "$ent"]}
+
+ set hlTest_selected ""
+ Click $h [lindex $bbox 2] [lindex $bbox 3]
+ update
+ Assert {[tixStrEq "$hlTest_selected" "$ent"]}
+ }
+
+ #
+ PutP "Testing the ClickHListEntry test function"
+ #
+ for {set x 0} {$x <= 3} {incr x} {
+ set hlTest_selected ""
+ set ent foo[expr $x * 8]
+ ClickHListEntry $h $ent
+ update
+ Assert {[tixStrEq "$hlTest_selected" "$ent"]}
+ }
+}
+
+proc HLTest_BrowseCmd {w args} {
+ global hlTest_selected
+
+ set hlTest_selected [tixEvent value]
+}
Added: external/tix-8.4.2.x/tests/hlist/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/hlist/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1,3 @@
+HLInd.tcl
+DirList.tcl
+items.tcl
\ No newline at end of file
Added: external/tix-8.4.2.x/tests/hlist/items.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/hlist/items.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,44 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: items.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# items.tcl --
+#
+# Test the handling of DisplayStyle and DisplayItem.
+#
+# 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.
+#
+
+proc About {} {
+ return "Test the handling of DisplayStyle and DisplayItem."
+}
+
+proc Test {} {
+ TestBlock items-1.1 {tixTmpLine} {
+ tixHList .c
+ set style [tixDisplayStyle text -refwindow .c -font fixed]
+ .c add a -itemtype text -style $style -text Hello
+ .c add b -itemtype text -text Hello
+
+ tixHList .d
+ .d add a -itemtype text -style $style -text Hello
+ .d add b -itemtype text -text Hello
+
+ pack .c .d -expand yes -fill both
+ update
+
+ destroy .c
+ update
+ Assert {[string comp [info command $style] ""] == 0}
+ }
+
+ catch {
+ destroy .c
+ }
+ catch {
+ destroy .d
+ }
+}
Added: external/tix-8.4.2.x/tests/itcl.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,91 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# itcl.test --
+#
+# This file tests interaction between Tix and [incr tcl]/[incr tk].
+# It is organized in the standard fashion for Tcl
+# tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: itcl.test,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+
+package require Tix
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+if {[catch {package require Itcl} msg] || [catch {package require Itk} msg]} {
+ puts "itcl/itk not installed on your system: $msg"
+ puts "tests in [info script] skipped"
+ ::tcltest::cleanupTests
+ return
+}
+
+test itcl-1.1 {variable scope} {
+ # Tests:
+ # - Creating a tix widget inside the scope of an itcl method
+ # - Sharing global variable with itcl
+ itcl::class ::foo {
+ inherit itk::Widget
+
+ constructor {args} {
+ itk_component add lab {
+ label $itk_interior.lab \
+ -textvariable ::choice($this)
+ }
+
+ itk_component add tixwidget {
+ tixOptionMenu $itk_interior.tixwidget \
+ -label "File format" \
+ -variable ::choice($this) \
+ -command "$this foocmd"
+ }
+
+ foreach cmd {HTML PostScript ASCII} {
+ $itk_component(tixwidget) add command $cmd
+ }
+
+ pack $itk_component(lab) $itk_component(tixwidget) \
+ -anchor e \
+ -padx 10 \
+ -pady 10 \
+ -fill x
+
+ eval itk_initialize $args
+ }
+ common choice
+
+ method foocmd {args} {
+ #puts $args
+ }
+ method set_format {format} {
+ set ::choice($this) $format
+ }
+ }
+ itk::usual TixOptionMenu {
+ }
+
+ foo .xy
+ pack .xy
+
+ .xy set_format ASCII
+ lappend list $choice(::.xy)
+
+ .xy component tixwidget config -value PostScript
+ lappend list $choice(::.xy)
+
+ .xy component tixwidget config -value HTML
+ lappend list $choice(::.xy)
+
+ set list
+} {ASCII PostScript HTML}
+
+
+# cleanup
+::tcltest::cleanupTests
+return
+
Added: external/tix-8.4.2.x/tests/itcl/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1,5 @@
+general.tcl
+scope1.tcl
+namesp.tcl
+itk.tcl
+
Added: external/tix-8.4.2.x/tests/itcl/general.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl/general.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,13 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: general.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# ITcl general test
+#
+
+proc About {} {
+ return "This file performs general test on Tix w/ ITcl 2.0"
+}
+
+proc Test {} {
+}
Added: external/tix-8.4.2.x/tests/itcl/itk.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl/itk.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,28 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: itk.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# This file tests the pixmap image reader
+#
+
+proc About {} {
+ return "This file performs tests with ITK mega widgets"
+}
+
+proc Test {} {
+ frame .f
+ pack .f
+ tixPanedWindow .f.tpw
+ pack .f.tpw -side left -expand yes -fill both
+ set p1 [.f.tpw add t1 -min 20 -size 120 ]
+ set p2 [.f.tpw add t2 -min 20 -size 80 ]
+ frame $p1.t1
+ frame $p2.t2
+ pack $p1.t1 $p2.t2
+ tixScrolledListBox $p1.t1.list
+ tixScrolledListBox $p2.t2.list
+ pack $p1.t1.list $p2.t2.list
+
+ Combobox .ibox -labeltext "ItkBox" -items {one two three}
+ pack .ibox
+}
Added: external/tix-8.4.2.x/tests/itcl/namesp.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl/namesp.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,26 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: namesp.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# This file tests the pixmap image reader
+#
+
+proc About {} {
+ return "This file performs test on name space"
+}
+
+proc Test {} {
+ namespace mySpace {
+ variable hsl ".hsl"
+ proc creatHSL {} {
+ global hsl
+ tixScrolledHList $hsl
+ }
+ proc packHSL {} {
+ global hsl
+ pack $hsl
+ }
+ }
+ mySpace::creatHSL
+ mySpace::packHSL
+}
Added: external/tix-8.4.2.x/tests/itcl/pkginit.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl/pkginit.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,6 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: pkginit.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+#@scope :: {lappend auto_path $env(IWIDGETS_LIBRARY)}
+#@scope :: {source "$env(IWIDGETS_LIBRARY)/init.iwidgets"}
Added: external/tix-8.4.2.x/tests/itcl/scope1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/itcl/scope1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,58 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: scope1.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "Testing creation of Tix widgets inside ITCL classes"
+}
+
+proc Test {} {
+ class foo {
+ inherit itk::Widget
+
+ constructor {args} {
+ itk_component add lab {
+ label $itk_interior.lab \
+ -textvariable [code choice($this)]
+ }
+
+ itk_component add le {
+ tixOptionMenu $itk_interior.le \
+ -label "File format" \
+ -variable [code choice($this)] \
+ -command "$this foocmd"
+ }
+
+ foreach cmd {HTML PostScript ASCII} {
+ $itk_component(le) add command $cmd
+ }
+
+ pack $itk_component(lab) $itk_component(le) \
+ -anchor e \
+ -padx 10 \
+ -pady 10 \
+ -fill x
+
+ eval itk_initialize $args
+ }
+ common choice
+
+ method foocmd {args} {
+ puts $args
+ }
+ method set_format {format} {
+ set choice($this) $format
+ }
+ }
+ usual TixOptionMenu {
+ }
+
+ foo .xy
+ pack .xy
+ .xy set_format ASCII
+ update
+ .xy component le config -value PostScript
+ update
+ .xy component le config -value HTML
+}
+
Added: external/tix-8.4.2.x/tests/library/CaseData.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/library/CaseData.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,152 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: CaseData.tcl,v 1.4 2004/03/28 02:44:57 hobbs Exp $
+#
+# CaseData.tcl --
+#
+# Contains data for test cases
+#
+# 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.
+#
+
+# GetHomeDirs --
+#
+# Returns a list of user names (prefixed with tilde) and their
+# home directories
+#
+proc GetHomeDirs {} {
+ set tryList {root ftp admin operator man john ioi}
+ if [catch {
+ lappend tryList [exec whoami]
+ }] {
+ catch {
+ lappend tryList [exec logname]
+ }
+ }
+
+
+ set list {}
+ foreach user $tryList {
+ if [info exists done($user)] {
+ continue
+ }
+ set expanded [tixFile tilde ~$user]
+ if ![tixStrEq $expanded ~$user] {
+ lappend list [list ~$user $expanded]
+ }
+ set done($user) 1
+ }
+ return $list
+}
+
+# GetCases_FsNormDir --
+#
+# Returns a set of test cases for verifying whether a non-normalized
+# directory is properly notmalized
+#
+proc GetCases_FsNormDir {} {
+
+ if [tixStrEq [tix platform] unix] {
+ # PATHNAME to TEST expected result Causes error for
+ # file normalize?
+ #----------------------------------------------------------------
+ set list {
+ {. "" 1}
+ {foo "" 1}
+ {~nosuchuser "" 1}
+ {~nosuchuser/../ "" 1}
+ {/ / 0}
+ {/// / 0}
+ {/./ / 0}
+ {/./. / 0}
+ {/./. / 0}
+ {/././.././../ / 0}
+ {/etc /etc 0}
+ {/etc/../etc /etc 0}
+ {/etc/../etc/./ /etc 0}
+ {/etc/../etc/./ /etc 0}
+ {/etc/../usr/./lib /usr/lib 0}
+ }
+ foreach userInfo [GetHomeDirs] {
+ lappend list [list [lindex $userInfo 0] [lindex $userInfo 1] 0]
+ }
+ } else {
+ set list [list \
+ [list . "" 1] \
+ [list foo "" 1] \
+ [list .. "" 1] \
+ [list ..\\foo "" 1] \
+ [list ..\\dat\\. "" 1] \
+ [list C: "" 1] \
+ [list C:\\ C: 0] \
+ [list c:\\ C: 0] \
+ [list C:\\\\ C: 0] \
+ [list C:\\ C: 0] \
+ [list C:\\. C: 0] \
+ [list C:\\Windows C:\\Windows 0] \
+ [list C:\\Windows\\System C:\\Windows\\System 0] \
+ [list C:\\Windows\\.. C: 0] \
+ ]
+ }
+
+ return $list
+}
+
+# GetCases_FSNorm --
+#
+# Returns a set of test cases for testing the tixFSNorm command.
+#
+proc GetCases_FSNorm {} {
+ global tixPriv
+
+ if [tixStrEq [tix platform] unix] {
+ # PATHNAME to TEST context <---------- Expected Result ----------------------------------->
+ # path vpath(todo) files(todo) patterns(todo)
+ #----------------------------------------------------------------
+ set list {
+ {. / / }
+ {./ / / }
+ {./////./ / / }
+ {.. / / }
+ {../ / / }
+ {../.. / / }
+ {../../../ / / }
+ {/etc / /etc }
+ {/etc///../etc/// / /etc }
+ {/etc///../etc///.. / / }
+ {/etc///../etc///../ / / }
+ {/etc/. / /etc }
+ {/./etc/. / /etc }
+ {/./././etc/. / /etc }
+ {/usr/./././local/./lib//// / /usr/local/lib }
+ {./././././etc/ / /etc }
+ {/etc/../etc / /etc }
+ {/etc/../etc/../etc / /etc }
+ {/etc/../etc/../ / / }
+ {~foobar/foo / /~foobar }
+ {~foobar/foo/ / /~foobar/foo }
+ }
+ } else {
+ set p $tixPriv(WinPrefix)
+
+ set list [list \
+ [list . $p\\C: $p\\C: ] \
+ [list .\\. $p\\C: $p\\C: ] \
+ [list .\\Windows $p\\C: $p\\C:\\Windows ] \
+ [list .\\Windows\\..\\ $p\\C: $p\\C: ] \
+ [list tmp\\ $p\\C: $p\\C:\\tmp ] \
+ [list "no such file" $p\\C: $p\\C: ] \
+ [list "autoexec.bat" $p\\C: $p\\C: ] \
+ [list "ignore/slash\\dd" $p\\C: $p\\C:\\ignore/slash ] \
+ [list "has space\\" $p\\C: "$p\\C:\\has space" ] \
+ [list "has space" $p\\C: "$p\\C:" ] \
+ ]
+ # ToDo:
+ # (1) xx\xx\C: + .. should be xx\xx
+ # (2) xx\xx\C: + D: should be xx\xx\D:
+ }
+ return $list
+}
Added: external/tix-8.4.2.x/tests/library/TestLib.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/library/TestLib.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,646 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: TestLib.tcl,v 1.3 2004/03/28 02:44:57 hobbs Exp $
+#
+# TestLib.tcl
+#
+# Procedures used by the Tix test suite.
+#
+# 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.
+#
+set testapp(tix,w,normal) {
+ tixButtonBox tixComboBox tixControl tixDirList tixDirTree
+ tixExDirSelectBox tixExFileSelectBox tixFileSelectBox tixFileEntry
+ tixLabelEntry tixLabelFrame tixNoteBook tixOptionMenu
+ tixPanedWindow tixScrolledHList tixScrolledListBox
+ tixScrolledTList tixScrolledText tixScrolledWindow tixSelect
+ tixStdButtonBox tixTree
+}
+set testapp(tix,w,shell) {
+ tixBalloon tixDialogShell tixExFileSelectDialog tixFileSelectDialog
+ tixPopupMenu tixStdDialogShell
+}
+set testapp(tix,w,base) {
+ tixLabelWidget
+ tixPrimitive
+ tixScrolledWidget
+ tixShell
+ tixStackWindow
+ tixVResize tixVStack tixVTree
+}
+set testapp(tix,w,unsupported) {
+ tixMDIMenuBar
+ tixMDIWindow
+ tixMwmClient
+ tixResizeHandle
+ tixSimpleDialog
+ tixStatusBar
+}
+
+# testConfig(VERBOSE) is the "Verbosity level" of the test suite.
+#
+# 0 -- No messages except name of each test
+# 10 -- Print number of each test block
+# 15 -- Print number and name of each test block
+# 20 -- Print all kinds of messages
+# 30 -- level 20, plus when error occurs, print stack trace.
+#
+if [info exists env(TEST_VERBOSE)] {
+ if [catch {
+ set testConfig(VERBOSE) [expr "int($env(TEST_VERBOSE) + 0)"]
+ }] {
+ set testConfig(VERBOSE) 10
+ }
+} else {
+ set testConfig(VERBOSE) 0
+}
+
+set testConfig(errCount) 0
+
+#----------------------------------------------------------------------
+#
+# General assertion and evaluation
+#
+#----------------------------------------------------------------------
+
+# -------------------------------------------------------------- Assert
+#
+# Evaulates an assertion. Output error message if assertion fails
+#
+proc Assert {cond {printErrInfo 0} {abortMode abortfile}} {
+ global errorInfo testConfig
+ if [info exists errorInfo] {
+ set errorInfo ""
+ }
+ uplevel 1 [list \
+ if !($cond) [list \
+ TestError "Failed Assertion \"$cond\"\n \
+ evaluated as \"[uplevel 1 subst -nocommand [list $cond]]\"\
+ :: [uplevel 1 subst [list $cond]]" $printErrInfo $abortMode
+ ] \
+ ]
+}; # Assert
+
+# ----------------------------------------------------------- TestAbort
+#
+# Aborts a single test file.
+#
+proc TestAbort {msg} {
+ error $msg
+}; # TestAbort
+
+# ---------------------------------------------------------------- test
+#
+# Try to evaluate a command.
+#
+proc test {cmd {result {}} {ret {}}} {
+ global testConfig
+
+ if [catch {set ret [uplevel 1 $cmd]} err] {
+ set done 0
+ foreach r $result {
+ if [regexp $r $err] {
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Passed (Error message is expected):"
+ puts " command = \"$cmd\""
+ puts " expected error = \"$result\""
+ puts " actual error = $err"
+ }
+ set done 1
+ break
+ }
+ }
+ if {!$done} {
+ error $err
+ }
+ } else {
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Passed (Execution OK):\n command = \"$cmd\""
+ }
+ }
+ return $ret
+}; # test
+
+# --------------------------------------------------------------- test1
+#
+# Try to evaluate a command and make sure its error result is the same
+# as $result.
+#
+proc test1 {cmd {result {}}} {
+ global testConfig
+
+ set ret ""
+ if [catch {set ret [uplevel 1 $cmd]} err] {
+ if ![tixStrEq $err $result] {
+ error $err
+ } else {
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Passed (Error message is expected):"
+ puts " command = \"$cmd\""
+ puts " expected error = \"$result\""
+ }
+ }
+ } else {
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "Passed (Execution OK):\n command = \"$cmd\""
+ }
+ }
+ return $ret
+}; # test1
+
+#----------------------------------------------------------------------
+#
+# Mouse event emulation routines
+#
+#----------------------------------------------------------------------
+
+# ------------------------------------------------------------- GetRoot
+#
+# Converts window coordinates to root-window coordinates
+#
+proc GetRoot {w x y} {
+ upvar X X
+ upvar Y Y
+
+ set x0 [winfo rootx $w]
+ set y0 [winfo rooty $w]
+
+ set X [expr $x0 + $x]
+ set Y [expr $y0 + $y]
+}; # GetRoot
+
+# ---------------------------------------------------------- MouseEvent
+#
+# ? simulates mouse event ?
+#
+proc MouseEvent {w type x y args} {
+ set tags [bindtags $w]
+ GetRoot $w $x $y
+
+ lappend args %q
+ lappend args $w
+ lappend args %W
+ lappend args $w
+ lappend args %x
+ lappend args $x
+ lappend args %y
+ lappend args $y
+ lappend args %X
+ lappend args $X
+ lappend args %Y
+ lappend args $Y
+
+ set found 0
+ foreach t $tags {
+ set cmd [string trim [bind $t $type]]
+
+ if {$cmd != ""} {
+ set found 1
+ }
+ foreach {sub val} $args {
+ regsub -all $sub $cmd $val cmd
+ }
+ uplevel #0 $cmd
+ }
+ if {$found == 0} {
+ global testConfig
+ if $testConfig(VERBOSE) {
+ puts "(testlib warning): $w has no bindings for $type"
+ }
+ }
+ return $found
+}; # MouseEvent
+
+# ------------------------------------------------------ KeyboardString
+#
+# Send a string to the widget via a list of key strokes.
+#
+# NOTE: To ensure that an entry widget content is exactly $string, you
+# need to first erase old contents with "$entry delete 0 end"
+#
+proc KeyboardString {w string} {
+ set tags [bindtags $w]
+
+ lappend args %q
+ lappend args $w
+ lappend args %W
+ lappend args $w
+
+ set found 0
+
+ foreach c [split $string ""] {
+ foreach t $tags {
+ set cmd [string trim [bind $t <KeyPress>]]
+
+ if {$cmd != ""} {
+ set found 1
+ }
+ set list $args
+ lappend list %A
+ lappend list [list $c]
+
+ foreach {sub val} $list {
+ regsub -all $sub $cmd $val cmd
+ }
+
+ # This is really weird: If our char is '\', the lappend line
+ # makes it a quoted \\, but the previous regsub converts it
+ # back to a single quote. So we use regsub again to make it
+ # a \\ again. But that's not enough, because uplevel will
+ # change it back to a single quote and will eventually mess
+ # us up. Hence we use 4 slashes here!
+ #
+ regsub -all {[\\]} $cmd {\\\\} cmd
+ uplevel #0 $cmd
+ }
+ }
+ if {$found == 0} {
+ puts "warning: widget $w has no bindings for $type"
+ }
+ return $found
+}; # KeyboardString
+
+# ------------------------------------------------------- KeyboardEvent
+#
+# Send a special keyboard event to the widget. E.g., <Return>, <space>,
+# <Escape>, <BackSpace> etc. To send ASCII character strings, use
+# KeyboardString
+#
+proc KeyboardEvent {w type} {
+ set tags [bindtags $w]
+
+ lappend args %q
+ lappend args $w
+ lappend args %W
+ lappend args $w
+
+ set found 0
+ foreach t $tags {
+ set cmd [string trim [bind $t $type]]
+
+ if {$cmd != ""} {
+ set found 1
+ }
+ foreach {sub val} $args {
+ regsub -all $sub $cmd $val cmd
+ }
+ uplevel #0 $cmd
+ }
+ if {$found == 0} {
+ puts "warning: widget $w has no bindings for $type"
+ }
+ return $found
+}; # KeyboardEvent
+
+# ----------------------------------------------------- Event-Initialize
+#
+# Initialize event data; called from Driver.tcl/Driver:Test
+#
+proc Event-Initialize {} {
+ global app
+
+ set app(X) -1000
+ set app(Y) -1000
+ set app(curWid) {}
+}; # Event-Initialize
+
+# ------------------------------------------------------------ InWidget
+#
+# test if point is within window
+#
+proc InWidget {w} {
+ global app
+
+ set a [tixWithinWindow $w $app(X) $app(Y)]
+ # insert debug print here
+ return $a
+}; # InWidget
+
+# --------------------------------------------------------------- Leave
+#
+# simulate <Leave> event
+#
+proc Leave {w {x -10} {y -10} args} {
+ global app
+
+ eval MouseEvent $w <Leave> $x $y $args
+}; # Leave
+
+# ------------------------------------------------------------ B1-Leave
+#
+# simulate <Leave> event (?identical to Leave?)
+#
+proc B1-Leave {w {x -10} {y -10} args} {
+ global app
+
+ eval MouseEvent $w <Leave> $x $y $args
+}; # B1-Leave
+
+# ---------------------------------------------------------- RecordRoot
+#
+# Converts event coordinates to root-window coordinates and records them
+#
+proc RecordRoot {w x y} {
+ global app
+
+ GetRoot $w $x $y
+ set app(X) $X
+ set app(Y) $Y
+}; # RecordRoot
+
+# --------------------------------------------------------------- Enter
+#
+# simulate <Enter> event
+#
+proc Enter {w {x -1} {y -1} args} {
+ global app
+
+ if {$y == -1} {
+ set x [expr [winfo width $w] / 2]
+ set y [expr [winfo height $w] / 2]
+ }
+
+ if {$app(curWid) != {} && [winfo exists $app(curWid)]} {
+ Leave $app(curWid)
+ }
+ RecordRoot $w $x $y
+
+ eval MouseEvent $w <Enter> $x $y $args
+ set app(curWid) $w
+}; # Enter
+
+# ---------------------------------------------------------------- Drag
+#
+# simulate <Drag> event
+#
+proc Drag {w {x -1} {y -1} args} {
+ global app
+
+ if {$y == -1} {
+ set x [expr [winfo width $w] / 2]
+ set y [expr [winfo height $w] / 2]
+ }
+
+ if {![InWidget $w]} {
+ B1-Leave $w $x $y
+ }
+
+ eval MouseEvent $w <B1-Motion> $x $y $args
+}; # Drag
+
+# ------------------------------------------------------------- Release
+#
+# simulate <ButtonRelease-1> event
+#
+proc Release {w {x -1} {y -1} args} {
+ global app
+
+ if {$y == -1} {
+ set x [expr [winfo width $w] / 2]
+ set y [expr [winfo height $w] / 2]
+ }
+ eval MouseEvent $w <ButtonRelease-1> $x $y $args
+}; # Release
+
+# ------------------------------------------------------------ HoldDown
+#
+# simulate <ButtonPress-1> event (assumming button was not already down)
+#
+proc HoldDown {w {x -1} {y -1} args} {
+ global app
+
+ if {$y == -1} {
+ set x [expr [winfo width $w] / 2]
+ set y [expr [winfo height $w] / 2]
+ }
+ if {![InWidget $w]} {
+ Enter $w $x $y
+ }
+
+ if {![eval MouseEvent $w <ButtonPress-1> $x $y $args]} {
+ eval MouseEvent $w <1> $x $y $args
+ }
+}; # HoldDown
+
+# --------------------------------------------------------------- Click
+#
+# simulate <ButtonRelease-1> event
+#
+proc Click {w {x -1} {y -1} args} {
+ global app
+
+ if {$y == -1} {
+ set x [expr [winfo width $w] / 2]
+ set y [expr [winfo height $w] / 2]
+ }
+ eval HoldDown $w $x $y $args
+ eval MouseEvent $w <ButtonRelease-1> $x $y $args
+}; # Click
+
+# -------------------------------------------------------------- Double
+#
+# simulate <Double-1> event
+#
+proc Double {w {x -1} {y -1} args} {
+ global app
+
+ if {$y == -1} {
+ set x [expr [winfo width $w] / 2]
+ set y [expr [winfo height $w] / 2]
+ }
+ eval MouseEvent $w <Double-1> $x $y $args
+}; # Double
+
+# --------------------------------------------------- ClickListboxEntry
+#
+# Simulate the event where a listbox entry is clicked.
+#
+# Args:
+# w pathname of listbox
+# index index of entry to be clicked.
+# mode "single" ==> single click, "double" ==> double click
+#
+proc ClickListboxEntry {w index {mode single}} {
+ $w see $index
+ set bbox [$w bbox $index]
+ set x1 [lindex $bbox 0]
+ set y1 [lindex $bbox 1]
+
+ if {$mode == "single"} {
+ Click $w $x1 $y1
+ } else {
+ Double $w $x1 $y1
+ }
+}; # ClickListboxEntry
+
+# ----------------------------------------------------- ClickHListEntry
+#
+# Simulate the event where an HList entry is clicked.
+#
+# Args:
+# w pathname of HList
+# index index of entry to be clicked.
+# mode "single" ==> single click, "double" ==> double click
+#
+proc ClickHListEntry {w index {mode single}} {
+ $w see $index
+ update
+ set bbox [$w info bbox $index]
+ set x1 [lindex $bbox 0]
+ set y1 [lindex $bbox 1]
+
+ if {$mode == "single"} {
+ Click $w $x1 $y1
+ } else {
+ Double $w $x1 $y1
+ }
+}; # ClickHListEntry
+
+# ------------------------------------------------- InvokeComboBoxByKey
+#
+# Simulate the event when the user types in a string into the
+# entry subwidget of a ComboBox widget and then type Return
+#
+proc InvokeComboBoxByKey {w string} {
+ set ent [$w subwidget entry]
+ $ent delete 0 end
+ KeyboardString $ent $string
+ KeyboardEvent $ent <Return>
+ update
+}; # InvokeComboBoxByKey
+
+# ---------------------------------------------------- SetComboBoxByKey
+#
+# Simulate the event when the user types in a string into the
+# entry subwidget of a ComboBox widget, *without* a subsequent
+# Return keystroke.
+#
+proc SetComboBoxByKey {w string} {
+ set ent [$w subwidget entry]
+ $ent delete 0 end
+ KeyboardString $ent $string
+ update
+}; # SetComboBoxByKey
+
+#----------------------------------------------------------------------
+#
+# main routines
+#
+#----------------------------------------------------------------------
+
+# ---------------------------------------------------------------- Done
+proc Done {args} {
+ global testConfig
+
+ if {$testConfig(VERBOSE) >= 20} {
+ puts "--------------------- done ----------------------------"
+ }
+}; # Done
+
+# ---------------------------------------------------------------- Wait
+proc Wait {msecs} {
+ global Test:timer
+ set Test:timer 0
+ after $msecs uplevel #0 set Test:timer 1
+ tkwait variable Test:timer
+}; # Wait
+
+#----------------------------------------------------------------------
+#
+# Messages
+#
+#----------------------------------------------------------------------
+
+# ---------------------------------------------------------------- PutP
+proc PutP {msg} {
+ puts $msg
+}; # PutP
+
+# ----------------------------------------------------------- TestError
+#
+# Handle an error
+#
+proc TestError {msg {printErrInfo 0} {abortMode cont}} {
+ global testConfig
+ puts " $msg"
+ case $abortMode {
+ cont {
+ if {$printErrInfo || $testConfig(VERBOSE) >= 30} {
+ global errorInfo
+ puts "\$errorInfo = $errorInfo"
+ }
+ return
+ }
+ abortfile {
+ return -code 1234
+ }
+ abortall {
+ global errorInfo
+ puts "Aborting all test files because of error:"
+ puts $errorInfo
+ exit 1
+ }
+ }
+}; # TestError
+
+# ----------------------------------------------------------- TestBlock
+#
+# Performs a block of test. A block is mainly used to group
+# together tests that are dependent on each other. TestBlocks
+# may be nested.
+#
+# Args:
+# name: Textual name of the test. E.g.: button-1.1
+# description: Short description of the test. "Pressing button"
+# printErrInfo: If an error occurs, should the errorInfo be printed
+# to the console. (Normally only a one-liner error
+# message is printed).
+# aMode:
+# cont -- skip this block and go to the next block
+# abortfile -- skip all other blocks in this file
+# abortall -- skip all the Tix tests.
+#
+proc TestBlock {name description script {printErrInfo 0} {aMode cont}} {
+ global testConfig
+
+ # without this, we get a failure in the "Clicking a button" test of
+ # general/event0.tcl because, Click-->HoldDown-->InWidget returns
+ # true and so the Enter command never gets invoked.
+ #
+ Event-Initialize
+
+ set code [catch {uplevel 1 $script} result]
+
+ if {$testConfig(VERBOSE) >= 15} {
+ set des "($description)"
+ } else {
+ set des ""
+ }
+
+ if {$code != 0} {
+ incr testConfig(errCount)
+ puts stdout "---- $name FAILED $des"
+ puts "Script is"
+ foreach line [split $script \n] {
+ regsub "^\[[format %s \ \n\t]\]*" $line "" line
+ puts " $line"
+ }
+ puts "Error message:"
+ TestError $result $printErrInfo $aMode
+ puts stdout "----"
+ } elseif $testConfig(VERBOSE) {
+ puts stdout "++++ $name PASSED $des"
+ }
+}; # TestBlock
+
+#----------------------------------------------------------------------
+#
+# general initialization
+#
+#----------------------------------------------------------------------
+
+# place main window in predictable spot
+wm geometry . +0+0
Added: external/tix-8.4.2.x/tests/library/TestLib.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/library/TestLib.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,56 @@
+# -*- mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# $Id: TestLib.txt,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+
+HIGH LEVEL INTERFACE FOR INTERACTIVE TESTING
+--------------------------------------------
+Click:
+
+ Simulates a the event when a user moves the mouse pointer into
+ the widget (if the cursor is still outside of the widget), press
+ the button and release it.
+
+
+Double:
+
+ Simulates a the event when a user moves the mouse pointer into
+ the widget (if the cursor is still outside of the widget), double-click
+ the button and release it.
+
+
+MESSAGE PRINTING
+----------------
+
+PutP
+
+ Prints a progress message.
+
+PutTitle
+
+ Prints the title of a test file
+
+PutSubTitle
+
+ Print the title of a part of a test file
+
+PutSubSubTitle
+
+ One more level than PutSubTitle
+
+TestWarn
+
+ Print a warning message. This will be counted in the final report.
+
+TestError {msg {printErrInfo 0} {abortMode cont}}
+
+ Print an error message. abortMode controls how the error affects
+ other test cases:
+
+ cont: simply print the message and continue
+ abortfile: skip other test cases in this file
+ abortall: abort the all other tests and exit the test
+ program.
+
+ printErrInfo specifies whether the "$errorInfo" variable should be
+ printed.
+
+
Added: external/tix-8.4.2.x/tests/library/load-init.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/library/load-init.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,11 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: load-init.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+#
+#
+#
+
+puts -nonewline "trying to load the Tix dynamic library ... "
+load ../../unix-tk4.1/libtix.so Tix
+puts "done"
Added: external/tix-8.4.2.x/tests/load/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/load/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1 @@
+general.tcl
Added: external/tix-8.4.2.x/tests/load/general.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/load/general.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,26 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: general.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+# This file tests the pixmap image reader
+#
+
+proc About {} {
+ return "This file performs general test on Tix w/ Tk 4.1 dynamic loading"
+}
+
+proc Test {} {
+ if [tixStrEq [info commands tix] tix] {
+ return
+ }
+
+ if ![file exists ../../unix-tk4.1/libtix.so] {
+ puts "File ../../unix-tk4.1/libtix.so doesn't exist."
+ puts "Dynamic loading skipped."
+ return
+ }
+
+ test {load ../../unix-tk4.1/libtix.so Tix}
+ test {tixComboBox .c}
+ test {pack .c}
+}
Added: external/tix-8.4.2.x/tests/load/pkginit.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/load/pkginit.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,4 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: pkginit.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
Added: external/tix-8.4.2.x/tests/method.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/method.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,53 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# method.test --
+#
+# Tests code in tixMethod.c. It is organized in the standard
+# fashion for Tcl tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: method.test,v 1.4 2004/12/24 00:37:21 hobbs Exp $
+
+
+package require Tix
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+tixClass tixTestClass_method {
+ -superclass {}
+ -classname TixTestClass_Method
+ -method {
+ cget configure foo bar
+ }
+ -flag {
+ -x -y
+ }
+ -configspec {
+ {-x 0}
+ {-y 0}
+ }
+}
+
+proc tixTestClass_method:Constructor {args} {}
+
+test method-1.1 {auto-load method} {
+ catch {
+ # Make sure this method needs to be auto-loaded again
+
+ rename tixTestClass_method:foo {}
+ }
+
+ tixTestClass_method xx
+ set a [list [catch {xx foo} msg] $msg]
+ rename xx {}
+ set a
+} {0 returned_by_tixTestClass_method:foo}
+
+# cleanup
+::tcltest::cleanupTests
+return
+
Added: external/tix-8.4.2.x/tests/namesp.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/namesp.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,187 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# namesp.test --
+#
+# This file is a Tcl script to test out Tix's behavior under
+# namespaces. It is organized in the standard fashion for Tcl
+# tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: namesp.test,v 1.3 2002/11/13 21:12:17 idiscovery Exp $
+
+
+# TODO:
+# Invoke tix methods inside namespace
+# Invoke tix var traces inside namesp
+# Invoke tix -commands inside namesp
+# Invoke delayed actions (e.g., browsecmd) inside namesp
+# more more more tests
+
+package require Tix
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+tixClass tixTestClass {
+ -superclass {}
+ -classname TixTestClass
+ -method {
+ cget configure foo bar
+ }
+ -flag {
+ -x -y
+ }
+ -configspec {
+ {-x 0}
+ {-y 0}
+ }
+}
+
+proc tixTestClass:Constructor {args} {}
+
+proc tixTestClass:foo {w args} {
+ upvar #0 $w data
+
+ return [list $data(-x) and me too]
+}
+
+test namesp-1.1.1 {create widget in namespace} {
+ #
+ # widget command should be created in global name space
+ #
+
+ namespace eval ::myNameSpace {
+ tixScrolledHList .sl
+ }
+ set a [info command ::.sl]
+ destroy .sl
+ set a
+} {::.sl}
+
+test namesp-1.1.2 {create class instance in namespace} {
+ #
+ # instance command should be created in global name space
+ #
+
+ namespace eval ::myNameSpace {
+ tixTestClass xx
+ }
+ set a [info command ::xx]
+ rename xx ""
+ set a
+} {::xx}
+
+test namesp-1.2.1 {create widget in namespace} {
+ #
+ # widget variable should be created in global name space
+ #
+
+ namespace eval ::myNameSpace {
+ tixScrolledHList .sl
+ }
+ set a [list [catch {set ::.sl} msg] $msg]
+ destroy .sl
+ set a
+} {1 {can't read "::.sl": variable is array}}
+
+test namesp-1.2.2 {create class instance in namespace} {
+ #
+ # instance variable should be created in global name space
+ #
+
+ namespace eval ::myNameSpace {
+ tixTestClass xx
+ }
+ set a [list [catch {set ::xx} msg] $msg]
+ rename xx {}
+ set a
+} {1 {can't read "::xx": variable is array}}
+
+test namesp-1.3.2 {class instance variable} {
+ #
+ # instance variable should be created in global name space
+ #
+
+ namespace eval ::myNameSpace {
+ tixTestClass xx -x 10 -y 10
+ }
+ set a [list [catch {set ::xx(-x)} msg] $msg]
+ rename xx {}
+ set a
+} {0 10}
+
+test namesp-1.4.2 {class instance method} {
+ tixTestClass xx -x 10 -y 10
+ namespace eval ::myNameSpace {
+ set ::a [list [catch {xx foo} msg] $msg]
+ }
+ rename xx {}
+ set a
+} {0 {10 and me too}}
+
+test namesp-1.5.2 {class instance cget} {
+ tixTestClass xx -x 1234
+
+ namespace eval ::myNameSpace {
+ set ::a [list [catch {xx cget -x} msg] $msg]
+ }
+ rename xx {}
+ set a
+} {0 1234}
+
+test namesp-1.6.2 {class instance configure} {
+ tixTestClass xx -x 1234
+
+ namespace eval ::myNameSpace {
+ xx config -x 2345
+ }
+ set ::a [list [catch {xx cget -x} msg] $msg]
+ rename xx {}
+ set a
+} {0 2345}
+
+test namesp-2.1.1 {invalid widget name} {
+ list [catch {tixScrolledHList ::.sl} msg] $msg
+} {1 {invalid widget name "::.sl": may not contain substring "::"}}
+
+test namesp-2.1.2 {invalid instance name} {
+ list [catch {tixTestClass ::.sl} msg] $msg
+} {1 {invalid instance name "::.sl": may not contain substring "::"}}
+
+test namesp-2.2 {invalid widget name} {
+ list [catch {tixScrolledHList .sl::xx} msg] $msg
+} {1 {invalid widget name ".sl::xx": may not contain substring "::"}}
+
+test namesp-3.1.1 {declare class inside namespace} {
+ namespace eval ::myNameSpace {
+ tixClass tixTestClass2 {
+ -superclass {}
+ -classname TixTestClass
+ -method {
+ foo bar
+ }
+ -flag {
+ -x -y
+ }
+ -configspec {
+ {-x 0}
+ {-y 0}
+ }
+ }
+ }
+ set a [list [catch {info commands ::tixTestClass2} msg] $msg]
+ set b [list [catch {set ::tixTestClass2} msg] $msg]
+ set c [list [catch {set ::tixTestClass2(className)} msg] $msg]
+
+ list $a $b $c
+} {{0 ::tixTestClass2} {1 {can't read "::tixTestClass2": variable is array}} {0 tixTestClass2}}
+
+
+
+# cleanup
+::tcltest::cleanupTests
+return
+
Added: external/tix-8.4.2.x/tests/option.test
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/option.test Tue Mar 18 19:38:59 2008
@@ -0,0 +1,52 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# option.test --
+#
+# This file is a Tcl script to test out tixOption.c.
+# It is organized in the standard fashion for Tcl tests.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: option.test,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+
+package require Tix
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ source [file join [pwd] [file dirname [info script]] defs.tcl]
+}
+
+if {![info exists widgetTestClass1]} {
+ source [file join [pwd] [file dirname [info script]] widgetTestClass1.tcl]
+}
+
+set longword [widgetTestClass1_longword]
+
+test option-1.1 {Tix_CallConfigMethod()} {
+ widgetTestClass1 .test
+ set a [.test config -$longword]
+ destroy .test
+ set a
+} [list -$longword $longword $longword $longword $longword]
+
+test option-1.2 {Tix_CallConfigMethod()} {
+ widgetTestClass1 .test
+ .test config -$longword 1234
+ set a [.test config -$longword]
+ destroy .test
+ set a
+} [list -$longword $longword $longword $longword 1234]
+
+test option-1.3 {Tix_CallConfigMethod()} {
+ widgetTestClass1 .test
+ .test config -x$longword 1234
+ set a [.test config -x$longword]
+ destroy .test
+ set a
+} [list -x$longword x$longword x$longword x$longword 1234-x$longword]
+
+
+# cleanup
+::tcltest::cleanupTests
+return
Added: external/tix-8.4.2.x/tests/tclIndex
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/tclIndex Tue Mar 18 19:38:59 2008
@@ -0,0 +1,16 @@
+# Tcl autoload index file, version 2.0
+# Hand-generated for testing puurpose.
+#
+# Typically each line is a command that
+# sets an element in the auto_index array, where the
+# element name is the name of a command and the value is
+# a script that loads the command.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: tclIndex,v 1.3 2002/12/11 07:14:12 idiscovery Exp $
+
+set auto_index(tixTestClass_method:foo) [list source [file join $dir auto_loaded.tcl]]
Added: external/tix-8.4.2.x/tests/tlist/TList.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/tlist/TList.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,41 @@
+#
+# $Id: TList.tcl,v 1.1.1.1 2000/05/17 11:08:53 idiscovery Exp $
+#
+# This tests the TList widget.
+#
+#
+# Assumptions:
+# None
+#
+proc About {} {
+ return "Basic tests for the TList widget"
+}
+
+proc Test {} {
+
+ #
+ # Test the creation
+ #
+ test {tixTList} {args}
+ test {tixTList .t -ff} {unknown}
+ test {tixTList .t -width} {missing}
+
+ if {[info command .t] != {}} {
+ error "widget not destroyed when creation failed"
+ }
+
+ set t [tixTList .t]
+ test {$t} {args}
+
+ #
+ # Test the "insert" command
+ #
+ test {$t insert} {args}
+ test {$t insert 0 -foo} {missing}
+ test {$t insert 0 -foo bar} {unknown}
+ test {$t insert 0 -itemtype foo} {unknown}
+ test {$t insert 0 -itemtype text -image foo} {unknown}
+ test {$t insert 0 -itemtype text -text Hello}
+
+ pack $t
+}
Added: external/tix-8.4.2.x/tests/tlist/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/tlist/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1 @@
+TList.tcl
\ No newline at end of file
Added: external/tix-8.4.2.x/tests/widgetTestClass1.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/widgetTestClass1.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,47 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+# widgetTestClass1.test --
+#
+# This class is used by several test files in this
+# directory.
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: widgetTestClass1.tcl,v 1.2 2002/11/13 21:12:17 idiscovery Exp $
+
+set longword xx
+for {set i 0} {$i < 10} {incr i} {
+ set longword $longword$longword
+}
+
+tixWidgetClassEx widgetTestClass1 {
+ -classname WidgetTestClass1
+ -superclass tixFileEntry
+ -flag {
+ -$longword -x$longword
+ }
+ -configspec {
+ {-$longword $longword $longword $longword}
+ {-x$longword x$longword x$longword x$longword}
+ }
+}
+
+proc widgetTestClass1:ConstructFramedWidget {w frame} {
+ upvar #0 $w data
+ set longword [widgetTestClass1_longword]
+
+ tixChainMethod $w ConstructFramedWidget $frame
+
+ set data(w:$longword) [button $w.$longword]
+}
+
+proc widgetTestClass1_longword {} [list return $longword]
+
+proc widgetTestClass1:config-x$longword {w value} {
+ upvar #0 $w data
+ set longword [widgetTestClass1_longword]
+
+ set data(-x$longword) $value-x$longword
+}
Added: external/tix-8.4.2.x/tests/xpm/2cpp.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/2cpp.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,11 @@
+/* XPM */
+static char * folder_xpm[] = {
+"4 4 3 2",
+ "AA c black",
+".. c white",
+"XY c yellow",
+"AAAAAAXY",
+"XYAAAAAA",
+"..AA..AA",
+"..AAAA..",
+};
Added: external/tix-8.4.2.x/tests/xpm/brace.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/brace.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,19 @@
+/* XPM */
+static char * tmp [] = {
+/* width height ncolors cpp [x_hot y_hot] */
+"10 10 2 1 -1 -1",
+/* colors */
+" s iconColor1 m black c gray",
+"} s iconColor2 m white c white",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+" ",
+"}}}}}}}}}}",
+"}}}}}}}}}}",
+"}}}}}}}}}}",
+"}}}}}}}}}}",
+"}}}}}}}}}}"};
+
Added: external/tix-8.4.2.x/tests/xpm/comments.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/comments.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,21 @@
+/* XPM */
+static char * tmp [] = {
+/* width height ncolors cpp [x_hot y_hot] */
+/* width height ncolors cpp [x_hot y_hot] */ /* Some comments */
+"10 10 2 1 -1 -1",
+/* colors */
+" s iconColor1 m black c gray",
+"} s iconColor2 m white c white",
+/* pixels */
+" ",
+" ",
+" ",
+" ",
+ /* Some comments */
+" ",
+"}}}}}}}}}}",
+"}}}}}}}}}}",
+"}}}}}}}}}}" /* Some comments */,
+"}}}}}}}}}}",
+"}}}}}}}}}}" /* Some comments */};
+
Added: external/tix-8.4.2.x/tests/xpm/compound.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/compound.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,50 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: compound.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "the compound image type"
+}
+
+proc Test {} {
+ set num 3
+ # Test for create
+ #
+ #
+ test {image create compound -foo} {missing}
+ test {image create compound -window} {missing}
+ test {image create compound -window foo} {path name}
+ test {set image1 [image create compound -window .b]} {path name}
+
+ for {set i 0} {$i < $num} {incr i} {
+ button .b$i
+ pack .b$i
+ }
+
+ # (0) Empty image
+ #
+ test {set image0 [image create compound -window .b0]}
+
+ # (1) Simple image
+ #
+ test {set image1 [image create compound -window .b1]}
+
+ $image1 add line
+ $image1 add text -text Hello
+
+ # (2) Two lines
+ #
+ test {set image2 [image create compound -window .b2]}
+
+ $image2 add line
+ $image2 add text -text "Line One"
+ $image2 add line
+ $image2 add text -text "Line Two"
+
+
+ # Display them
+ #
+ for {set i 0} {$i < $num} {incr i} {
+ .b$i config -image [set image$i]
+ }
+}
Added: external/tix-8.4.2.x/tests/xpm/f-badcol.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/f-badcol.xpm Tue Mar 18 19:38:59 2008
@@ -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 foooo",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/f-badpix.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/f-badpix.xpm Tue Mar 18 19:38:59 2008
@@ -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. ",
+"............. ",
+".XBBBBBBXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXBBXXX. ",
+".XXBBBBBBXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXNNXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/f-commt.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/f-commt.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,32 @@
+/* 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
+
+asd
+a
+sd
+as
+da
+sd
+asad
+
+
+ */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/f-missline.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/f-missline.xpm Tue Mar 18 19:38:59 2008
@@ -0,0 +1,19 @@
+/* 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 foooo",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/f-ok.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/f-ok.xpm Tue Mar 18 19:38:59 2008
@@ -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. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/f-shortln.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/f-shortln.xpm Tue Mar 18 19:38:59 2008
@@ -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. ",
+".XX",
+".XXXXXXXXXXX. ",
+".XXXXXXXXXXX. ",
+".XX. ",
+".XX. ",
+".XX. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/files
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/files Tue Mar 18 19:38:59 2008
@@ -0,0 +1,2 @@
+xpm.tcl
+compound.tcl
\ No newline at end of file
Added: external/tix-8.4.2.x/tests/xpm/folder.xpm
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/folder.xpm Tue Mar 18 19:38:59 2008
@@ -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. ",
+"............. "};
Added: external/tix-8.4.2.x/tests/xpm/xpm.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tests/xpm/xpm.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,149 @@
+# -*- mode: TCL; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
+#
+# $Id: xpm.tcl,v 1.2 2002/11/13 21:12:18 idiscovery Exp $
+#
+proc About {} {
+ return "the pixmap image reader"
+}
+
+proc Test {} {
+
+ set data {
+/* XPM */
+static char * folder_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"16 12 4 1",
+/* colors */
+" s None c None",
+". c black",
+"X c #f0ff80",
+"+ c red",
+/* pixels */
+" .... ",
+" .XXXX. ",
+" .XXXXXX. ",
+"............. ",
+".XXXXXXXXXXX. ",
+".XXXXX+XXXXX. ",
+".XXXXX+XXXXX. ",
+".XX+++++++XX. ",
+".XXXXX+XXXXX. ",
+".XXXXX+XXXXX. ",
+".XXXXXXXXXXX. ",
+"............. "};
+ }
+
+set data1 {
+/* XPM */
+static char * news4_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"45 34 6 1",
+/* colors */
+" s None c None",
+". c black",
+"X c lemon chiffon",
+"o c tan",
+"O c blue",
+"+ c dark slate grey",
+/* pixels */
+" ",
+" ",
+" . ",
+" .X. ",
+" ..XX. ",
+" .XXX.X. ",
+" .XXX.XX. ",
+" .XXX.XXXX. ",
+" ..XXX.XXX.XX. ",
+" .XX...XXX.o..X. ",
+" .XX.OO.XX.oooo.X.. ",
+" .XXX..O.X.oo..oo..X.. ",
+" ..XXX.X..XX..o...oo.XXX. ",
+" .XXXX.XXXXX.XX.oo...XXXXX. ",
+" .XX..XXXX..XXXX.o.XXXX.XXX. ",
+" .X.X.XXXX.XXX.XX..XXX..XXXX. ",
+" ..X.XXXXX.XX..XXXXXXX.XXXX.XX. ",
+" .X.X.XXX.XX.XXXX.XXX.XXXX.XXX. ",
+" .X.X.X.XX.XXXX.XXXXXXX..XXX.. ",
+" .X.X.XX.XXX..XX.XXXX.XXX...+ ",
+" ++.X.X.XXXX.XXX.XXXX.XXX..++ ",
+" ++++.X.X.XX.XX..XXX.XXXX..++ ",
+" +++++.X.X.XXX.XXXX.XXX...++ ",
+" +++++.X.X.X.XXX..XXX..+++ ",
+" +++++.X.X.XXX.XXXX..++ ",
+" +++++.X.X.X.XXX...++ ",
+" ++++.X.X.XXX..+++ ",
+" ++++.X.X.X..++ ",
+" +++.XX...++ ",
+" ++...+++ ",
+" ++++ ",
+" ",
+" ",
+" "};
+}
+
+
+ # Test for create
+ #
+ #
+
+ # Good pixmap
+ #
+ test {set pixmap1 [image create pixmap -file f-ok.xpm]}
+
+ # With some comments
+ #
+ test {set pixmap2 [image create pixmap -file f-commt.xpm]}
+
+ # Bad color (should use "black" by default)
+ #
+ test {set pixmap3 [image create pixmap -file f-badcol.xpm]}
+
+ # Shortened lines (should show garbage, shouldn't core dump)
+ #
+ test {set pixmap4 [image create pixmap -file f-shortln.xpm]}
+
+ # Two chars per pixel
+ #
+ test {set pixmap5 [image create pixmap -file 2cpp.xpm]}
+
+ # Bad pixel (should show garbage for undefined pixels)
+ #
+ test {set pixmap6 [image create pixmap -file f-badpix.xpm]}
+
+
+ # Data switch
+ #
+ test {set pixmap7 [image create pixmap -data $data]}
+
+
+ # Missing one line
+ #
+ test {image create pixmap -file f-missline.xpm} {File For}
+
+ # Multi-word color names
+ #
+ test {set pixmap8 [image create pixmap -data $data1]}
+
+ # Brace used as pixel value
+ #
+ test {set pixmap9 [image create pixmap -file brace.xpm]}
+
+ # Many /* ... */ comments
+ #
+ test {set pixmap10 [image create pixmap -file brace.xpm]}
+
+ set num 10
+ for {set i 1} {$i < $num} {incr i} {
+ button .b$i -image [set pixmap$i] -bg red
+ pack .b$i
+ }
+
+ update
+
+ for {set i 1} {$i < $num} {incr i} {
+ destroy .b$i
+ image delete [set pixmap$i]
+ }
+
+}
Added: external/tix-8.4.2.x/tools/README.html
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/README.html Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+<HTML>
+<!-- $Id: README.html,v 1.2 2002/01/25 08:47:52 idiscovery Exp $ -->
+<HEAD>
+<TITLE>Tix Tools</TITLE>
+</HEAD>
+<BODY>
+
+<Center><H2>Tix Tools</H2></Center>
+
+<h3><a href="tix-man2html.tcl">tix-man2html.tcl</a> -- Man pages to HTML</A>
+Convert Ousterhout format man pages into highly crosslinked hypertext.
+
+<h3><a href="hanno.tcl">hanno.tcl</a> -- An HTML Annotation Program</h3>
+
+ <code>hanno.tcl</code> automatically generates a "Last Modified"
+tag for HTML files. It recursively traverses all sub-directories
+and generates a "Last Modified" tag for each HTML file according
+to the file's last modification date. Please read the file for
+available options.
+
+<h3><a href="tcltrim">tcltrim</a></h3>
+
+ <code>tcltrim</code> trims all comments and white spaces from TCL
+ files.
+
+<h3><a href="tixindex">tixindex</a></h3>
+
+ <code>tixindex</code> builds the tclIndex file for the Tix widget
+ implementation files. You must use this program to index the Tix
+ librarys instead of the normal TCL <code>auto_mkindex</code>
+ command.
+
+
+<h3><a href="color.tcl">color.tcl</a></h3>
+
+ <code>color.tcl</code> displays all the available colors in your X
+ display. This program requires <code>tixwish</code>.
+</BODY>
+</HTML>
\ No newline at end of file
Added: external/tix-8.4.2.x/tools/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,35 @@
+
+ Tix Tools
+
+ [1]tix-man2html.tcl -- Man pages to HTML Convert Ousterhout format man pages
+ into highly crosslinked hypertext.
+
+ [2]hanno.tcl -- An HTML Annotation Program
+
+ hanno.tcl automatically generates a "Last Modified" tag for HTML
+ files. It recursively traverses all sub-directories and generates a
+ "Last Modified" tag for each HTML file according to the file's last
+ modification date. Please read the file for available options.
+
+ [3]tcltrim
+
+ tcltrim trims all comments and white spaces from TCL files.
+
+ [4]tixindex
+
+ tixindex builds the tclIndex file for the Tix widget implementation
+ files. You must use this program to index the Tix librarys instead of
+ the normal TCL auto_mkindex command.
+
+ [5]color.tcl
+
+ color.tcl displays all the available colors in your X display. This
+ program requires tixwish.
+
+References
+
+ 1. file://localhost/path/to/tix/tools/tix-man2html.tcl
+ 2. file://localhost/path/to/tix/tools/hanno.tcl
+ 3. file://localhost/path/to/tix/tools/tcltrim
+ 4. file://localhost/path/to/tix/tools/tixindex
+ 5. file://localhost/path/to/tix/tools/color.tcl
Added: external/tix-8.4.2.x/tools/hanno.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/hanno.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,69 @@
+#
+# $Id: hanno.tcl,v 1.1.1.1 2000/05/17 11:08:53 idiscovery Exp $
+#
+#!/bin/sh
+# the next line restarts using tixwish \
+exec tclsh7.6 "$0" "$@"
+
+# Options
+#
+# -v : Verbose mode. Print out what hanno is doing.
+#
+set verbose 0
+
+if {[info exists env(TIX_VERBOSE)] && $env(TIX_VERBOSE) == 1} {
+ set verbose 1
+}
+
+if {[lsearch -glob $argv -v*] != -1} {
+ set verbose 1
+}
+
+set files [exec find . -name *.html -print]
+
+foreach file $files {
+ if {$verbose} {
+ puts "\[html anno]: checking $file"
+ }
+ set output {}
+ set src [open $file RDONLY]
+
+ set changed 1
+
+ while {![eof $src]} {
+ set line [gets $src]
+
+ if {[regexp -nocase {[ \t]*\<hr>\<i>Last modified.*} $line]} {
+ # Do nothing
+ } elseif {[regexp -nocase {[ \t]*\<i>Serial.*\</i>} $line]} {
+ if {[scan $line "<i>Serial %d</i>" lastmtime] == 1} {
+ if {[expr [file mtime $file] - $lastmtime] >= 10} {
+ set changed 1
+ } else {
+ set changed 0
+ }
+ }
+ } else {
+ append output $line\n
+ }
+ }
+ close $src
+
+ if {$changed == 1} {
+ if {$verbose} {
+ puts "\[html anno]: modifying tag of $file"
+ }
+
+ set date [clock format [file mtime $file]]
+
+ set des [open $file {WRONLY TRUNC}]
+ puts -nonewline $des $output
+
+ # Somehow the "seek" is necessary
+ #
+ seek $des -1 current
+ puts $des "<hr><i>Last modified $date </i> --- "
+ puts $des "<i>Serial [file mtime $file]</i>"
+ close $des
+ }
+}
Added: external/tix-8.4.2.x/tools/man2html-fixindex.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/man2html-fixindex.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,133 @@
+# man2html-fixindex.tcl
+#
+# Updates the index file generated by tix-man2html.tcl
+# in a format more suitable for Tix
+#
+# This program is dependent on the specific HTML format
+# generated by ./tix-man2html.tcl.
+#
+# $Id: man2html-fixindex.tcl,v 1.1 2001/01/22 08:18:35 ioilam Exp $
+
+set root [lindex $argv 0]
+set file [file join $root contents.htm]
+set fd [open $file RDONLY]
+set data [read $fd]
+close $fd
+
+#
+# Remove the link about Tix Commands
+#
+regsub "<DT><A HREF=\"TixCmd\[^\n\]*\n" $data "" data
+
+set std {
+ tixGrid
+ tixHList
+ tixInputOnly
+ tixNBFrame
+ tixTList
+}
+set mega {
+ tixBalloon
+ tixButtonBox
+ tixCheckList
+ tixComboBox
+ tixControl
+ tixDirList
+ tixDirSelectDialog
+ tixDirTree
+ tixExFileSelectBox
+ tixExFileSelectDialog
+ tixFileEntry
+ tixFileSelectBox
+ tixFileSelectDialog
+ tixLabelEntry
+ tixLabelFrame
+ tixListNoteBook
+ tixMeter
+ tixNoteBook
+ tixOptionMenu
+ tixPanedWindow
+ tixPopupMenu
+ tixScrolledHList
+ tixScrolledListBox
+ tixScrolledText
+ tixScrolledWindow
+ tixSelect
+ tixStdButtonBox
+ tixTree
+}
+set img {
+ compound
+ pixmap
+}
+set other {
+ tixDestroy
+ tixDisplayStyle
+ tixForm
+ tixMwm
+ tix
+ tixGetBoolean
+ tixGetInt
+ tixUtils
+}
+set progs {
+ tixwish
+}
+
+#
+# returns the links to the list of man pages in an HTML table.
+#
+proc section {name dir list} {
+ set tab_width 4
+
+ append html <b>$name</b>\n
+ append html <blockquote>\n
+ append html {<TABLE>}
+
+ set tab_height [expr ([llength $list] + $tab_width - 1) / $tab_width]
+ for {set i 0} {$i < $tab_height} {incr i} {
+ append html {<TR>}
+ for {set j 0} {$j < $tab_width} {incr j} {
+ set idx [expr ($j * $tab_height) + $i]
+ append html <TD>
+ if {$idx < [llength $list]} {
+ set page [lindex $list $idx]
+ append html "<A HREF=$dir/$page.htm>$page</A>"
+ } else {
+ append html ""
+ }
+ append html </TD>
+ }
+ append html </TR>
+ }
+
+ append html </TABLE>
+ append html </blockquote>\n
+ append html \n
+ return $html
+}
+
+#
+# Add Tix commands to the page with better categorization.
+#
+
+append tixdata {
+ <blockquote>
+
+ <b><a href=TixCmd/TixIntro.htm#M3>
+ Introduction to the Tix Library</a></b>
+
+ </blockquote>
+}
+append tixdata [section {Tix Standard Widgets} TixCmd $std]
+append tixdata [section {Tix Mega Widgets} TixCmd $mega]
+append tixdata [section {Tix Image Types} TixCmd $img]
+append tixdata [section {Tix Core Commands} TixCmd $other]
+append tixdata [section {Tix User Programs} UserCmd $progs]
+
+regsub </H3> $data </H3>$tixdata data
+
+set fd [open $file {WRONLY TRUNC CREAT}]
+puts -nonewline $fd $data
+close $fd
+
Added: external/tix-8.4.2.x/tools/tcltrim
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/tcltrim Tue Mar 18 19:38:59 2008
@@ -0,0 +1,24 @@
+#!/usr/local/bin/tclsh
+
+foreach source $argv {
+ set target [file rootname $source].tt
+
+ set src [open $source RDONLY]
+ set tgt [open $target {RDWR CREAT TRUNC}]
+
+ while {[eof $src] == 0} {
+ set line [string trim [gets $src]]
+
+ if {$line == ""} {
+ continue
+ }
+ if {[string index $line 0] == "#"} {
+ continue
+ }
+ puts $tgt $line
+ }
+
+ close $src
+ close $tgt
+}
+
Added: external/tix-8.4.2.x/tools/tix-man2html.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/tix-man2html.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,1813 @@
+set tix_version 8.2.0
+
+package require Tcl 8.0
+
+# $Id: tix-man2html.tcl,v 1.4 2001/12/09 05:06:29 idiscovery Exp $
+#
+# Convert Ousterhout format man pages into highly crosslinked
+# hypertext.
+#
+# Along the way detect many unmatched font changes and other odd
+# things.
+#
+# Note well, this program is a hack rather than a piece of software
+# engineering. In that sense it's probably a good example of things
+# that a scripting language, like Tcl, can do well. It is offered as
+# an example of how someone might convert a specific set of man pages
+# into hypertext, not as a general solution to the problem. If you
+# try to use this, you'll be very much on your own.
+#
+# Copyright (c) 1995-1997 Roger E. Critchlow Jr
+#
+# 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.
+#
+# Revisions:
+# May 15, 1995 - initial release
+# May 16, 1995 - added a back to home link to toplevel table of
+# contents.
+# May 18, 1995 - broke toplevel table of contents into separate
+# pages for each section, and broke long table of contents
+# into a one page for each man page.
+# Mar 10, 1996 - updated for tcl7.5b3/tk4.1b3
+# Apr 14, 1996 - incorporated command line parsing from Tom Tromey,
+# <tromey at creche.cygnus.com> -- thanks Tom.
+# - updated for tcl7.5/tk4.1 final release.
+# - converted to same copyright as the man pages.
+# Sep 14, 1996 - made various modifications for tcl7.6b1/tk4.2b1
+# Oct 18, 1996 - added tcl7.6/tk4.2 to the list of distributions.
+# Oct 22, 1996 - major hacking on indentation code and elsewhere.
+# Mar 4, 1997 -
+# May 28, 1997 - added tcl8.0b1/tk8.0b1 to the list of distributions
+# - cleaned source for tclsh8.0 execution
+# - renamed output files for windoze installation
+# - added spaces to tables
+# Oct 24, 1997 - moved from 8.0b1 to 8.0 release
+# Jan 19, 2001 - added Tix support
+
+set Version "0.20"
+
+proc parse_command_line {} {
+ global argv Version
+
+ # These variables determine where the man pages come from and where
+ # the converted pages go to.
+ global tcltkdir tixdir tkdir tcldir webdir
+
+ # Set defaults based on original code.
+ set tcltkdir ../..
+ set tkdir {}
+ set tcldir {}
+ set webdir ../man/html
+
+ # Directory names for Tcl, Tk and Tix, in priority order.
+ set tclDirList {tcl8.3.3 tcl8.3.2 tcl8.2.3 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl}
+ set tkDirList {tk8.3.3 tk8.3.2 tk8.2.3 tk8.3 tk8.2 tk8.1 tk8.0 tk}
+ set tixDirList {tix-8.2.0 tix}
+
+ # Handle arguments a la GNU:
+ # --version
+ # --help
+ # --srcdir=/path
+ # --htmldir=/path
+
+ foreach option $argv {
+ switch -glob -- $option {
+ --version {
+ puts "tcltk-man-html $Version"
+ exit 0
+ }
+
+ --help {
+ puts "usage: tcltk-man-html \[OPTION\] ...\n"
+ puts " --help print this help, then exit"
+ puts " --version print version number, then exit"
+ puts " --srcdir=DIR find tcl and tk source below DIR"
+ puts " --htmldir=DIR put generated HTML in DIR"
+ exit 0
+ }
+
+ --srcdir=* {
+ # length of "--srcdir=" is 9.
+ set tcltkdir [string range $option 9 end]
+ }
+
+ --htmldir=* {
+ # length of "--htmldir=" is 10
+ set webdir [string range $option 10 end]
+ }
+
+ default {
+ puts stderr "tcltk-man-html: unrecognized option -- `$option'"
+ exit 1
+ }
+ }
+ }
+
+ # Find Tcl.
+ foreach dir $tclDirList {
+ if {[file isdirectory $tcltkdir/$dir]} then {
+ set tcldir $dir
+ break
+ }
+ }
+ if {$tcldir == ""} then {
+ puts stderr "tcltk-man-html: couldn't find Tcl below $tcltkdir"
+ exit 1
+ }
+
+ # Find Tk.
+ foreach dir $tkDirList {
+ if {[file isdirectory $tcltkdir/$dir]} then {
+ set tkdir $dir
+ break
+ }
+ }
+ if {$tkdir == ""} then {
+ puts stderr "tcltk-man-html: couldn't find Tk below $tcltkdir"
+ exit 1
+ }
+
+ # Find Tix.
+ foreach dir $tixDirList {
+ if {[file isdirectory $tcltkdir/$dir]} then {
+ set tixdir $dir
+ break
+ }
+ }
+ if {$tixdir == ""} then {
+ puts stderr "tcltk-man-html: couldn't find Tix below $tcltkdir"
+ exit 1
+ }
+
+ # the title for the man pages overall
+ global overall_title env tix_version
+
+ if {[info exists env(WITH_TCL_TK)]} {
+ set overall_title "[capitalize tix$tix_version]/[capitalize $tcldir]/[capitalize $tkdir] Reference Manual"
+ } else {
+ set overall_title "[capitalize tix$tix_version] Reference Manual"
+ }
+}
+
+proc capitalize {string} {
+ return [string toupper $string 0]
+}
+
+##
+##
+##
+set manual(report-level) 1
+
+proc manerror {msg} {
+ global manual
+ set name {}
+ set subj {}
+ if {[info exists manual(name)]} {
+ set name $manual(name)
+ }
+ if {[info exists manual(section)] && [string length $manual(section)]} {
+ puts stderr "$name: $manual(section): $msg"
+ } else {
+ puts stderr "$name: $msg"
+ }
+}
+
+proc manreport {level msg} {
+ global manual
+ if {$level < $manual(report-level)} {
+ manerror $msg
+ }
+}
+
+proc fatal {msg} {
+ global manual
+ manerror $msg
+ exit 1
+}
+##
+## parsing
+##
+proc unquote arg {
+ return [string map [list \" {}] $arg]
+}
+
+proc parse-directive {line codename restname} {
+ upvar $codename code $restname rest
+ return [regexp {^(\.[.a-zA-Z0-9]*) *(.*)} $line all code rest]
+}
+
+proc process-text {text} {
+ global manual
+ # preprocess text
+ set text [string map [list \
+ {\&} "\t" \
+ {&} {&} \
+ {\\} {\} \
+ {\e} {\} \
+ {\ } { } \
+ {\|} { } \
+ {\0} { } \
+ {\%} {} \
+ "\\\n" "\n" \
+ \" {"} \
+ {<} {<} \
+ {>} {>} \
+ {\(+-} {±} \
+ {\fP} {\fR} \
+ {\.} . \
+ ] $text]
+ regsub -all {\\o'o\^'} $text {\ô} text; # o-circumflex in re_syntax.n
+ regsub -all {\\-\\\|\\-} $text -- text; # two hyphens
+ regsub -all -- {\\-\\\^\\-} $text -- text; # two hyphens
+ regsub -all {\\-} $text - text; # a hyphen
+ regsub -all "\\\\\n" $text "\\&\#92;\n" text; # backslashed newline
+ while {[regexp {\\} $text]} {
+ # C R
+ if {[regsub {^([^\\]*)\\fC([^\\]*)\\fR(.*)$} $text {\1<TT>\2</TT>\3} text]} continue
+ # B R
+ if {[regsub {^([^\\]*)\\fB([^\\]*)\\fR(.*)$} $text {\1<B>\2</B>\3} text]} continue
+ # B I
+ if {[regsub {^([^\\]*)\\fB([^\\]*)\\fI(.*)$} $text {\1<B>\2</B>\\fI\3} text]} continue
+ # I R
+ if {[regsub {^([^\\]*)\\fI([^\\]*)\\fR(.*)$} $text {\1<I>\2</I>\3} text]} continue
+ # I B
+ if {[regsub {^([^\\]*)\\fI([^\\]*)\\fB(.*)$} $text {\1<I>\2</I>\\fB\3} text]} continue
+ # B B, I I, R R
+ if {[regsub {^([^\\]*)\\fB([^\\]*)\\fB(.*)$} $text {\1\\fB\2\3} ntext]
+ || [regsub {^([^\\]*)\\fI([^\\]*)\\fI(.*)$} $text {\1\\fI\2\3} ntext]
+ || [regsub {^([^\\]*)\\fR([^\\]*)\\fR(.*)$} $text {\1\\fR\2\3} ntext]} {
+ manerror "process-text: impotent font change: $text"
+ set text $ntext
+ continue
+ }
+ # unrecognized
+ manerror "process-text: uncaught backslash: $text"
+ set text [string map [list "\\" "#92;"] $text]
+ }
+ return $text
+}
+##
+## pass 2 text input and matching
+##
+proc open-text {} {
+ global manual
+ set manual(text-length) [llength $manual(text)]
+ set manual(text-pointer) 0
+}
+proc more-text {} {
+ global manual
+ return [expr {$manual(text-pointer) < $manual(text-length)}]
+}
+proc next-text {} {
+ global manual
+ if {[more-text]} {
+ set text [lindex $manual(text) $manual(text-pointer)]
+ incr manual(text-pointer)
+ return $text
+ }
+ manerror "read past end of text"
+ error "fatal"
+}
+proc is-a-directive {line} {
+ return [expr {[string first . $line] == 0}]
+}
+proc split-directive {line opname restname} {
+ upvar $opname op $restname rest
+ set op [string range $line 0 2]
+ set rest [string trim [string range $line 3 end]]
+}
+proc next-op-is {op restname} {
+ global manual
+ upvar $restname rest
+ if {[more-text]} {
+ set text [lindex $manual(text) $manual(text-pointer)]
+ if {[string equal -length 3 $text $op]} {
+ set rest [string range $text 4 end]
+ incr manual(text-pointer)
+ return 1
+ }
+ }
+ return 0
+}
+proc backup-text {n} {
+ global manual
+ if {$manual(text-pointer)-$n >= 0} {
+ incr manual(text-pointer) -$n
+ }
+}
+proc match-text args {
+ global manual
+ set nargs [llength $args]
+ if {$manual(text-pointer) + $nargs > $manual(text-length)} {
+ return 0
+ }
+ set nback 0
+ foreach arg $args {
+ if {![more-text]} {
+ backup-text $nback
+ return 0
+ }
+ set arg [string trim $arg]
+ set targ [string trim [lindex $manual(text) $manual(text-pointer)]]
+ if {[string equal $arg $targ]} {
+ incr nback
+ incr manual(text-pointer)
+ continue
+ }
+ if {[regexp {^@([_a-zA-Z0-9]+)$} $arg all name]} {
+ upvar $name var
+ set var $targ
+ incr nback
+ incr manual(text-pointer)
+ continue
+ }
+ if {[regexp {^(\.[a-zA-Z][a-zA-Z])@([_a-zA-Z0-9]+)$} $arg all op name]\
+ && [string equal $op [lindex $targ 0]]} {
+ upvar $name var
+ set var [lrange $targ 1 end]
+ incr nback
+ incr manual(text-pointer)
+ continue
+ }
+ backup-text $nback
+ return 0
+ }
+ return 1
+}
+proc expand-next-text {n} {
+ global manual
+ return [join [lrange $manual(text) $manual(text-pointer) \
+ [expr {$manual(text-pointer)+$n-1}]] \n\n]
+}
+##
+## pass 2 output
+##
+proc man-puts {text} {
+ global manual
+ lappend manual(output-$manual(wing-file)-$manual(name)) $text
+}
+
+##
+## build hypertext links to tables of contents
+##
+proc long-toc {text} {
+ global manual
+ set here M[incr manual(section-toc-n)]
+ set there L[incr manual(long-toc-n)]
+ lappend manual(section-toc) "<DD><A HREF=\"$manual(name).htm#$here\" NAME=\"$there\">$text</A>"
+ return "<A NAME=\"$here\">$text</A>"
+}
+proc option-toc {name class switch} {
+ global manual
+ if {[string equal $manual(section) "WIDGET-SPECIFIC OPTIONS"] ||
+ [string equal $manual(section) "CONFIGURATION OPTIONS"] ||
+ [regexp ITEMS $manual(section)]} {
+ # link the defined option into the long table of contents
+ set link [long-toc "$switch, $name, $class"]
+ regsub -- "$switch, $name, $class" $link "$switch" link
+ return $link
+ } elseif {[string equal $manual(name):$manual(section) \
+ "options:DESCRIPTION"]} {
+ # link the defined standard option to the long table of
+ # contents and make a target for the standard option references
+ # from other man pages.
+ set first [lindex $switch 0]
+ set here M$first
+ set there L[incr manual(long-toc-n)]
+ set manual(standard-option-$first) "<A HREF=\"$manual(name).htm#$here\">$switch, $name, $class</A>"
+ lappend manual(section-toc) "<DD><A HREF=\"$manual(name).htm#$here\" NAME=\"$there\">$switch, $name, $class</A>"
+ return "<A NAME=\"$here\">$switch</A>"
+ } else {
+ error "option-toc in $manual(name) section $manual(section)"
+ }
+}
+proc std-option-toc {name} {
+ global manual
+ if {[info exists manual(standard-option-$name)]} {
+ lappend manual(section-toc) <DD>$manual(standard-option-$name)
+ return $manual(standard-option-$name)
+ }
+ set here M[incr manual(section-toc-n)]
+ set there L[incr manual(long-toc-n)]
+ set other M$name
+ lappend manual(section-toc) "<DD><A HREF=\"options.htm#$other\">$name</A>"
+ return "<A HREF=\"options.htm#$other\">$name</A>"
+}
+##
+## process the widget option section
+## in widget and options man pages
+##
+proc output-widget-options {rest} {
+ global manual
+ man-puts <DL>
+ lappend manual(section-toc) <DL>
+ backup-text 1
+ set para {}
+ while {[next-op-is .OP rest]} {
+ switch -exact [llength $rest] {
+ 3 {
+ set switch [lindex $rest 0]
+ set name [lindex $rest 1]
+ set class [lindex $rest 2]
+ }
+ 5 {
+ set switch [lrange $rest 0 2]
+ set name [lindex $rest 3]
+ set class [lindex $rest 4]
+ }
+ default {
+ fatal "bad .OP $rest"
+ }
+ }
+ if {![regexp {^(<.>)([-a-zA-Z0-9 ]+)(</.>)$} $switch all oswitch switch cswitch]} {
+ if {![regexp {^(<.>)([-a-zA-Z0-9 ]+) or ([-a-zA-Z0-9 ]+)(</.>)$} $switch all oswitch switch1 switch2 cswitch]} {
+ error "not Switch: $switch"
+ } else {
+ set switch "$switch1$cswitch or $oswitch$switch2"
+ }
+ }
+ if {![regexp {^(<.>)([a-zA-Z0-9]*)(</.>)$} $name all oname name cname]} {
+ error "not Name: $name"
+ }
+ if {![regexp {^(<.>)([a-zA-Z0-9]*)(</.>)$} $class all oclass class cclass]} {
+ error "not Class: $class"
+ }
+ man-puts "$para<DT>Command-Line Name: $oswitch[option-toc $name $class $switch]$cswitch"
+ man-puts "<DT>Database Name: $oname$name$cname"
+ man-puts "<DT>Database Class: $oclass$class$cclass"
+ man-puts <DD>[next-text]
+ set para <P>
+ }
+ man-puts </DL>
+ lappend manual(section-toc) </DL>
+}
+
+##
+## process .RS lists
+##
+proc output-RS-list {} {
+ global manual
+ if {[next-op-is .IP rest]} {
+ output-IP-list .RS .IP $rest
+ if {[match-text .RE .sp .RS @rest .IP @rest2]} {
+ man-puts <P>$rest
+ output-IP-list .RS .IP $rest2
+ }
+ if {[match-text .RE .sp .RS @rest .RE]} {
+ man-puts <P>$rest
+ return
+ }
+ if {[next-op-is .RE rest]} {
+ return
+ }
+ }
+ man-puts <DL><P><DD>
+ while {[more-text]} {
+ set line [next-text]
+ if {[is-a-directive $line]} {
+ split-directive $line code rest
+ switch -exact $code {
+ .RE {
+ break
+ }
+ .SH {
+ manerror "unbalanced .RS at section end"
+ backup-text 1
+ break
+ }
+ default {
+ output-directive $line
+ }
+ }
+ } else {
+ man-puts $line
+ }
+ }
+ man-puts </DL>
+}
+
+##
+## process .IP lists which may be plain indents,
+## numeric lists, or definition lists
+##
+proc output-IP-list {context code rest} {
+ global manual
+ if {[string equal $rest {}]} {
+ # blank label, plain indent, no contents entry
+ man-puts <DL><P><DD>
+ while {[more-text]} {
+ set line [next-text]
+ if {[is-a-directive $line]} {
+ split-directive $line code rest
+ if {[string equal $code ".IP"] && [string equal $rest {}]} {
+ man-puts "<P>"
+ continue
+ }
+ if {[lsearch {.br .DS .RS} $code] >= 0} {
+ output-directive $line
+ } else {
+ backup-text 1
+ break
+ }
+ } else {
+ man-puts $line
+ }
+ }
+ man-puts </DL>
+ } else {
+ # labelled list, make contents
+ if {[string compare $context ".SH"]} {
+ man-puts <P>
+ }
+ man-puts <DL>
+ lappend manual(section-toc) <DL>
+ backup-text 1
+ set accept_RE 0
+ while {[more-text]} {
+ set line [next-text]
+ if {[is-a-directive $line]} {
+ split-directive $line code rest
+ switch -exact $code {
+ .IP {
+ if {$accept_RE} {
+ output-IP-list .IP $code $rest
+ continue
+ }
+ if {[string equal $manual(section) "ARGUMENTS"] || \
+ [regexp {^\[[0-9]+\]$} $rest]} {
+ man-puts "<P><DT>$rest<DD>"
+ } else {
+ set canlink 0
+ if {[regexp {<B>([A-Za-z0-9_]+)</B>} $rest \
+ foo ref]} {
+ if {"$foo" == "$rest"} {
+ set canlink 1
+ }
+ }
+ set outtext "<P><DT>[long-toc $rest]<DD>"
+ if {$canlink} {
+ regsub ">$rest</A>" $outtext \
+ "></A><B>[cross-reference $ref]</B>" \
+ outtext
+ }
+ man-puts $outtext
+ }
+ if {[string equal $manual(name):$manual(section) \
+ "selection:DESCRIPTION"]} {
+ if {[match-text .RE @rest .RS .RS]} {
+ man-puts <DT>[long-toc $rest]<DD>
+ }
+ }
+ }
+ .sp -
+ .br -
+ .DS -
+ .CS {
+ output-directive $line
+ }
+ .RS {
+ if {[match-text .RS]} {
+ output-directive $line
+ incr accept_RE 1
+ } elseif {[match-text .CS]} {
+ output-directive .CS
+ incr accept_RE 1
+ } elseif {[match-text .PP]} {
+ output-directive .PP
+ incr accept_RE 1
+ } elseif {[match-text .DS]} {
+ output-directive .DS
+ incr accept_RE 1
+ } else {
+ output-directive $line
+ }
+ }
+ .LP {
+ man-puts "<P>$rest"
+ }
+ .PP {
+ if {[match-text @rest1 .br @rest2 .RS]} {
+ # yet another nroff kludge as above
+ man-puts "<P><DT>[long-toc $rest1]"
+ man-puts "<DT>[long-toc $rest2]<DD>"
+ incr accept_RE 1
+ } elseif {[match-text @rest .RE]} {
+ # gad, this is getting ridiculous
+ if { ! $accept_RE} {
+ man-puts "</DL><P>$rest<DL>"
+ backup-text 1
+ break
+ } else {
+ man-puts "<P>$rest"
+ incr accept_RE -1
+ }
+ } elseif {$accept_RE} {
+ output-directive $line
+ } else {
+ backup-text 1
+ break
+ }
+ }
+ .RE {
+ if { ! $accept_RE} {
+ backup-text 1
+ break
+ }
+ incr accept_RE -1
+ }
+ default {
+ backup-text 1
+ break
+ }
+ }
+ } else {
+ man-puts $line
+ }
+ }
+ man-puts <P></DL>
+ lappend manual(section-toc) </DL>
+ if {$accept_RE} {
+ manerror "missing .RE in output-IP-list"
+ }
+ }
+}
+##
+## handle the NAME section lines
+## there's only one line in the NAME section,
+## consisting of a comma separated list of names,
+## followed by a hyphen and a short description.
+##
+proc output-name {line} {
+ global manual
+ # split name line into pieces
+ regexp {^([^-]+) - (.*)$} $line all head tail
+ # output line to manual page untouched
+ man-puts $line
+ # output line to long table of contents
+ lappend manual(section-toc) <DL><DD>$line</DL>
+ # separate out the names for future reference
+ foreach name [split $head ,] {
+ set name [string trim $name]
+ if {[llength $name] > 1} {
+ manerror "name has a space: {$name}\nfrom: $line"
+ }
+ lappend manual(wing-toc) $name
+ lappend manual(name-$name) $manual(wing-file)/$manual(name)
+ }
+}
+##
+## build a cross-reference link if appropriate
+##
+proc cross-reference {ref} {
+ global manual
+
+ regsub {[(][31n][)]} $ref "" ref
+
+ if {[string match Tcl_* $ref]} {
+ set lref $ref
+ } elseif {[string match Tk_* $ref]} {
+ set lref $ref
+ } elseif {[string equal $ref "Tcl"]} {
+ set lref $ref
+ } elseif {[regexp -nocase tix $ref]} {
+ set lref $ref
+ } else {
+ set lref [string tolower $ref]
+ }
+
+ ##
+ ## nothing to reference
+ ##
+ if { ! [info exists manual(name-$lref)]} {
+ foreach name {array file history info interp string trace
+ after clipboard grab image option pack place selection tk tkwait update winfo wm} {
+ if {[regexp "^$name \[a-z0-9]*\$" $lref] && \
+ [string compare $manual(tail) "$name.n"] && \
+ [info exists manual(name-$name)]} {
+ return "<A HREF=\"../$manual(name-$name).htm\">$ref</A>"
+ }
+ }
+ if {[lsearch {stdin stdout stderr end} $lref] >= 0} {
+ # no good place to send these
+ # tcl tokens?
+ # also end
+ }
+ return $ref
+ }
+ ##
+ ## would be a self reference
+ ##
+ foreach name $manual(name-$lref) {
+ if {[lsearch $name $manual(wing-file)/$manual(name)] >= 0} {
+ return $ref
+ }
+ }
+ ##
+ ## multiple choices for reference
+ ##
+ if {[llength $manual(name-$lref)] > 1} {
+ set tcl_i [lsearch -glob $manual(name-$lref) *TclCmd*]
+ set tcl_ref [lindex $manual(name-$lref) $tcl_i]
+ set tk_i [lsearch -glob $manual(name-$lref) *TkCmd*]
+ set tk_ref [lindex $manual(name-$lref) $tk_i]
+ if {$tcl_i >= 0 && "$manual(wing-file)" == {TclCmd} || "$manual(wing-file)" == {TclLib}} {
+ return "<A HREF=\"../$tcl_ref.htm\">$ref</A>"
+ }
+ if {$tk_i >= 0 && "$manual(wing-file)" == {TkCmd} || "$manual(wing-file)" == {TkLib}} {
+ return "<A HREF=\"../$tk_ref.htm\">$ref</A>"
+ }
+ if {"$lref" == {exit} && "$manual(tail)" == {tclsh.1} && $tcl_i >= 0} {
+ return "<A HREF=\"../$tcl_ref.htm\">$ref</A>"
+ }
+ puts stderr "multiple cross reference to $ref in $manual(name-$lref) from $manual(wing-file)/$manual(tail)"
+ return $ref
+ }
+ ##
+ ## exceptions, sigh, to the rule
+ ##
+ switch $manual(tail) {
+ canvas.n {
+ if {$lref == {focus}} {
+ upvar tail tail
+ set clue [string first command $tail]
+ if {$clue < 0 || $clue > 5} {
+ return $ref
+ }
+ }
+ if {[lsearch {bitmap image text} $lref] >= 0} {
+ return $ref
+ }
+ }
+ checkbutton.n -
+ radiobutton.n {
+ if {[lsearch {image} $lref] >= 0} {
+ return $ref
+ }
+ }
+ menu.n {
+ if {[lsearch {checkbutton radiobutton} $lref] >= 0} {
+ return $ref
+ }
+ }
+ options.n {
+ if {[lsearch {bitmap image set} $lref] >= 0} {
+ return $ref
+ }
+ }
+ regexp.n {
+ if {[lsearch {string} $lref] >= 0} {
+ return $ref
+ }
+ }
+ source.n {
+ if {[lsearch {text} $lref] >= 0} {
+ return $ref
+ }
+ }
+ history.n {
+ if {[lsearch {exec} $lref] >= 0} {
+ return $ref
+ }
+ }
+ return.n {
+ if {[lsearch {error continue break} $lref] >= 0} {
+ return $ref
+ }
+ }
+ scrollbar.n {
+ if {[lsearch {set} $lref] >= 0} {
+ return $ref
+ }
+ }
+ }
+ ##
+ ## return the cross reference
+ ##
+ return "<A HREF=\"../$manual(name-$lref).htm\">$ref</A>"
+}
+##
+## reference generation errors
+##
+proc reference-error {msg text} {
+ global manual
+ puts stderr "$manual(tail): $msg: {$text}"
+ return $text
+}
+##
+## insert as many cross references into this text string as are appropriate
+##
+proc insert-cross-references {text} {
+ global manual
+ ##
+ ## we identify cross references by:
+ ## ``quotation''
+ ## <B>emboldening</B>
+ ## Tcl_ prefix
+ ## Tk_ prefix
+ ## [a-zA-Z0-9]+ manual entry
+ ## and we avoid messing with already anchored text
+ ##
+ ##
+ ## find where each item lives
+ ##
+ array set offset [list \
+ anchor [string first {<A } $text] \
+ end-anchor [string first {</A>} $text] \
+ quote [string first {``} $text] \
+ end-quote [string first {''} $text] \
+ bold [string first {<B>} $text] \
+ end-bold [string first {</B>} $text] \
+ tcl [string first {Tcl_} $text] \
+ tk [string first {Tk_} $text] \
+ Tcl1 [string first {Tcl manual entry} $text] \
+ Tcl2 [string first {Tcl overview manual entry} $text] \
+ ]
+ ##
+ ## accumulate a list
+ ##
+ foreach name [array names offset] {
+ if {$offset($name) >= 0} {
+ set invert($offset($name)) $name
+ lappend offsets $offset($name)
+ }
+ }
+ ##
+ ## if nothing, then we're done.
+ ##
+ if { ! [info exists offsets]} {
+ return $text
+ }
+ ##
+ ## sort the offsets
+ ##
+ set offsets [lsort -integer $offsets]
+ ##
+ ## see which we want to use
+ ##
+ switch -exact $invert([lindex $offsets 0]) {
+ anchor {
+ if {$offset(end-anchor) < 0} { return [reference-error {Missing end anchor} $text]; }
+ set head [string range $text 0 $offset(end-anchor)]
+ set tail [string range $text [expr $offset(end-anchor)+1] end]
+ return $head[insert-cross-references $tail]
+ }
+ quote {
+ if {$offset(end-quote) < 0} { return [reference-error {Missing end quote} $text]; }
+ if {"$invert([lindex $offsets 1])" == {tk}} { set offsets [lreplace $offsets 1 1]; }
+ if {"$invert([lindex $offsets 1])" == {tcl}} { set offsets [lreplace $offsets 1 1]; }
+ switch -exact $invert([lindex $offsets 1]) {
+ end-quote {
+ set head [string range $text 0 [expr $offset(quote)-1]]
+ set body [string range $text [expr $offset(quote)+2] [expr $offset(end-quote)-1]]
+ set tail [string range $text [expr $offset(end-quote)+2] end]
+ return $head``[cross-reference $body]''[insert-cross-references $tail]
+ }
+ bold -
+ anchor {
+ set head [string range $text 0 [expr $offset(end-quote)+1]]
+ set tail [string range $text [expr $offset(end-quote)+2] end]
+ return $head[insert-cross-references $tail]
+ }
+ }
+ return [reference-error {Uncaught quote case} $text]
+ }
+ bold {
+ if {$offset(end-bold) < 0} { return $text; }
+ if {"$invert([lindex $offsets 1])" == {tk}} { set offsets [lreplace $offsets 1 1]; }
+ if {"$invert([lindex $offsets 1])" == {tcl}} { set offsets [lreplace $offsets 1 1]; }
+ switch -exact $invert([lindex $offsets 1]) {
+ end-bold {
+ set head [string range $text 0 [expr $offset(bold)-1]]
+ set body [string range $text [expr $offset(bold)+3] [expr $offset(end-bold)-1]]
+ set tail [string range $text [expr $offset(end-bold)+4] end]
+ return $head<B>[cross-reference $body]</B>[insert-cross-references $tail]
+ }
+ anchor {
+ set head [string range $text 0 [expr $offset(end-bold)+3]]
+ set tail [string range $text [expr $offset(end-bold)+4] end]
+ return $head[insert-cross-references $tail]
+ }
+ }
+ return [reference-error {Uncaught bold case} $text]
+ }
+ tk {
+ set head [string range $text 0 [expr $offset(tk)-1]]
+ set tail [string range $text $offset(tk) end]
+ if { ! [regexp {^(Tk_[a-zA-Z0-9_]+)(.*)$} $tail all body tail]} { return [reference-error {Tk regexp failed} $text]; }
+ return $head[cross-reference $body][insert-cross-references $tail]
+ }
+ tcl {
+ set head [string range $text 0 [expr $offset(tcl)-1]]
+ set tail [string range $text $offset(tcl) end]
+ if { ! [regexp {^(Tcl_[a-zA-Z0-9_]+)(.*)$} $tail all body tail]} { return [reference-error {Tcl regexp failed} $text]; }
+ return $head[cross-reference $body][insert-cross-references $tail]
+ }
+ Tcl1 -
+ Tcl2 {
+ set off [lindex $offsets 0]
+ set head [string range $text 0 [expr $off-1]]
+ set body Tcl
+ set tail [string range $text [expr $off+3] end]
+ return $head[cross-reference $body][insert-cross-references $tail]
+ }
+ end-anchor -
+ end-bold -
+ end-quote {
+ return [reference-error "Out of place $invert([lindex $offsets 0])" $text]
+ }
+ }
+}
+##
+## process formatting directives
+##
+proc output-directive {line} {
+ global manual
+ # process format directive
+ split-directive $line code rest
+ switch -exact $code {
+ .BS -
+ .BE {
+ # man-puts <HR>
+ }
+ .SH {
+ # drain any open lists
+ # announce the subject
+ set manual(section) $rest
+ # start our own stack of stuff
+ set manual($manual(name)-$manual(section)) {}
+ lappend manual(has-$manual(section)) $manual(name)
+ man-puts "<H3>[long-toc $manual(section)]</H3>"
+ # some sections can simply free wheel their way through the text
+ # some sections can be processed in their own loops
+ switch -exact $manual(section) {
+ NAME {
+ if {[lsearch {CrtImgType.3 CrtItemType.3 CrtPhImgFmt.3} $manual(tail)] >= 0} {
+ # these manual pages have two NAME sections
+ if {[info exists manual($manual(tail)-NAME)]} {
+ return
+ }
+ set manual($manual(tail)-NAME) 1
+ }
+ set names {}
+ while {1} {
+ set line [next-text]
+ if {[is-a-directive $line]} {
+ backup-text 1
+ output-name [join $names { }]
+ return
+ } else {
+ lappend names [string trim $line]
+ }
+ }
+ }
+ SYNOPSIS {
+ lappend manual(section-toc) <DL>
+ while {1} {
+ if {[next-op-is .nf rest]
+ || [next-op-is .br rest]
+ || [next-op-is .fi rest]} {
+ continue
+ }
+ if {[next-op-is .SH rest]
+ || [next-op-is .BE rest]
+ || [next-op-is .SO rest]} {
+ backup-text 1
+ break
+ }
+ if {[next-op-is .sp rest]} {
+ #man-puts <P>
+ continue
+ }
+ set more [next-text]
+ if {[is-a-directive $more]} {
+ manerror "in SYNOPSIS found $more"
+ backup-text 1
+ break
+ } else {
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ if {[lsearch {TclLib TkLib} $manual(wing-file)] < 0} {
+ lappend manual(section-toc) <DD>$more
+ }
+ }
+ }
+ }
+ lappend manual(section-toc) </DL>
+ return
+ }
+ {SEE ALSO} {
+ while {[more-text]} {
+ if {[next-op-is .SH rest]} {
+ backup-text 1
+ return
+ }
+ set more [next-text]
+ if {[is-a-directive $more]} {
+ manerror "$more"
+ backup-text 1
+ return
+ }
+ set nmore {}
+ foreach cr [split $more ,] {
+ set cr [string trim $cr]
+ if { ! [regexp {^<B>.*</B>$} $cr]} {
+ set cr <B>$cr</B>
+ }
+ if {[regexp {^<B>(.*)\([13n]\)</B>$} $cr all name]} {
+ set cr <B>$name</B>
+ }
+ lappend nmore $cr
+ }
+ man-puts [join $nmore {, }]
+ }
+ return
+ }
+ KEYWORDS {
+ while {[more-text]} {
+ if {[next-op-is .SH rest]} {
+ backup-text 1
+ return
+ }
+ set more [next-text]
+ if {[is-a-directive $more]} {
+ manerror "$more"
+ backup-text 1
+ return
+ }
+ set keys {}
+ foreach key [split $more ,] {
+ set key [string trim $key]
+ lappend manual(keyword-$key) [list $manual(name) $manual(wing-file)/$manual(name).htm]
+ set initial [string toupper [string index $key 0]]
+ lappend keys "<A href=\"../Keywords/$initial.htm\#$key\">$key</A>"
+ }
+ man-puts [join $keys {, }]
+ }
+ return
+ }
+ }
+ if {[next-op-is .IP rest]} {
+ output-IP-list .SH .IP $rest
+ return
+ }
+ if {[next-op-is .PP rest]} {
+ return
+ }
+ return
+ }
+ .SO {
+ if {[match-text @stuff .SE]} {
+ output-directive {.SH STANDARD OPTIONS}
+ set opts {}
+ foreach line [split $stuff \n] {
+ foreach option [split $line \t] {
+ lappend opts $option
+ }
+ }
+ man-puts <DL>
+ lappend manual(section-toc) <DL>
+ foreach option [lsort $opts] {
+ man-puts "<DT><B>[std-option-toc $option]</B>"
+ }
+ man-puts </DL>
+ lappend manual(section-toc) </DL>
+ } else {
+ manerror "unexpected .SO format:\n[expand-next-text 2]"
+ }
+ }
+ .OP {
+ output-widget-options $rest
+ return
+ }
+ .IP {
+ output-IP-list .IP .IP $rest
+ return
+ }
+ .PP {
+ man-puts <P>
+ }
+ .RS {
+ output-RS-list
+ return
+ }
+ .RE {
+ manerror "unexpected .RE"
+ return
+ }
+ .br {
+ man-puts <BR>
+ return
+ }
+ .DE {
+ manerror "unexpected .DE"
+ return
+ }
+ .DS {
+ if {[next-op-is .ta rest]} {
+
+ }
+ if {[match-text @stuff .DE]} {
+ man-puts <PRE>$stuff</PRE>
+ } elseif {[match-text .fi @ul1 @ul2 .nf @stuff .DE]} {
+ man-puts "<PRE>[lindex $ul1 1][lindex $ul2 1]\n$stuff</PRE>"
+ } else {
+ manerror "unexpected .DS format:\n[expand-next-text 2]"
+ }
+ return
+ }
+ .CS {
+ if {[next-op-is .ta rest]} {
+
+ }
+ if {[match-text @stuff .CE]} {
+ man-puts <PRE>$stuff</PRE>
+ } else {
+ manerror "unexpected .CS format:\n[expand-next-text 2]"
+ }
+ return
+ }
+ .CE {
+ manerror "unexpected .CE"
+ return
+ }
+ .sp {
+ man-puts <P>
+ }
+ .ta {
+ # these are tab stop settings for short tables
+ switch -exact $manual(name):$manual(section) {
+ {bind:MODIFIERS} -
+ {bind:EVENT TYPES} -
+ {bind:BINDING SCRIPTS AND SUBSTITUTIONS} -
+ {expr:OPERANDS} -
+ {expr:MATH FUNCTIONS} -
+ {history:DESCRIPTION} -
+ {history:HISTORY REVISION} -
+ {switch:DESCRIPTION} -
+ {upvar:DESCRIPTION} {
+ return; # fix.me
+ }
+ default {
+ manerror "ignoring $line"
+ }
+ }
+ }
+ .nf {
+ if {[match-text @more .fi]} {
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ }
+ } elseif {[match-text .RS @more .RE .fi]} {
+ man-puts <DL><DD>
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ }
+ man-puts </DL>
+ } elseif {[match-text .RS @more .RS @more2 .RE .RE .fi]} {
+ man-puts <DL><DD>
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ }
+ man-puts <DL><DD>
+ foreach more2 [split $more2 \n] {
+ man-puts $more2<BR>
+ }
+ man-puts </DL></DL>
+ } elseif {[match-text .RS @more .RS @more2 .RE @more3 .RE .fi]} {
+ man-puts <DL><DD>
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ }
+ man-puts <DL><DD>
+ foreach more2 [split $more2 \n] {
+ man-puts $more2<BR>
+ }
+ man-puts </DL><DD>
+ foreach more3 [split $more3 \n] {
+ man-puts $more3<BR>
+ }
+ man-puts </DL>
+ } elseif {[match-text .sp .RS @more .RS @more2 .sp .RE .RE .fi]} {
+ man-puts <P><DL><DD>
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ }
+ man-puts <DL><DD>
+ foreach more2 [split $more2 \n] {
+ man-puts $more2<BR>
+ }
+ man-puts </DL></DL><P>
+ } elseif {[match-text .RS .sp @more .sp .RE .fi]} {
+ man-puts <P><DL><DD>
+ foreach more [split $more \n] {
+ man-puts $more<BR>
+ }
+ man-puts </DL><P>
+ } else {
+ manerror "ignoring $line"
+ }
+ }
+ .fi {
+ manerror "ignoring $line"
+ }
+ .na -
+ .ad -
+ .UL -
+ .ne {
+ manerror "ignoring $line"
+ }
+ default {
+ manerror "unrecognized format directive: $line"
+ }
+ }
+}
+##
+## merge copyright listings
+##
+proc merge-copyrights {l1 l2} {
+ foreach copyright [concat $l1 $l2] {
+ if {[regexp {^Copyright +\(c\) +([0-9]+) +(by +)?([A-Za-z].*)$} $copyright all date by who]} {
+ lappend dates($who) $date
+ continue
+ }
+ if {[regexp {^Copyright +\(c\) +([0-9]+)-([0-9]+) +(by +)?([A-Za-z].*)$} $copyright all from to by who]} {
+ for {set date $from} {$date <= $to} {incr date} {
+ lappend dates($who) $date
+ }
+ continue
+ }
+ if {[regexp {^Copyright +\(c\) +([0-9]+), *([0-9]+) +(by +)?([A-Za-z].*)$} $copyright all date1 date2 by who]} {
+ lappend dates($who) $date1 $date2
+ continue
+ }
+ puts "oops: $copyright"
+ }
+ foreach who [array names dates] {
+ set list [lsort $dates($who)]
+ if {[llength $list] == 1 || [lindex $list 0] == [lrange $list end end]} {
+ lappend merge "Copyright (c) [lindex $list 0] $who"
+ } else {
+ lappend merge "Copyright (c) [lindex $list 0]-[lrange $list end end] $who"
+ }
+ }
+ return [lsort $merge]
+}
+
+proc makedirhier {dir} {
+ if { ! [file isdirectory $dir]} {
+ makedirhier [file dirname $dir]
+ if { ! [file isdirectory $dir]} {
+ if {[catch {exec mkdir $dir} error]} {
+ error "cannot create directory $dir: $error"
+ }
+ }
+ }
+}
+
+##
+## foreach of the man directories specified by args
+## convert manpages into hypertext in the directory
+## specified by html.
+##
+proc make-man-pages {html args} {
+ global env manual overall_title
+ makedirhier $html
+ if { ! [file isdirectory $html]} {
+ exec mkdir $html
+ }
+ set manual(short-toc-n) 1
+ set manual(short-toc-fp) [open $html/contents.htm w]
+ puts $manual(short-toc-fp) "<HTML><HEAD><TITLE>$overall_title</TITLE></HEAD>"
+ puts $manual(short-toc-fp) {<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">}
+ puts $manual(short-toc-fp) "<HR><H3>$overall_title</H3><HR><DL>"
+ set manual(merge-copyrights) {}
+ foreach arg $args {
+ set manual(wing-glob) [lindex $arg 0]
+ set manual(wing-name) [lindex $arg 1]
+ set manual(wing-file) [lindex $arg 2]
+ set manual(wing-description) [lindex $arg 3]
+ set manual(wing-copyrights) {}
+ makedirhier $html/$manual(wing-file)
+ set manual(wing-toc-fp) [open $html/$manual(wing-file)/contents.htm w]
+ # whistle
+ puts stderr "scanning section $manual(wing-name)"
+ # put the entry for this section into the short table of contents
+ puts $manual(short-toc-fp) "<DT><A HREF=\"$manual(wing-file)/contents.htm\">$manual(wing-name)</A><DD>$manual(wing-description)"
+ # initialize the wing table of contents
+ puts $manual(wing-toc-fp) "<HTML><HEAD><TITLE>$manual(wing-name) Manual</TITLE></HEAD>"
+ puts $manual(wing-toc-fp) {<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">}
+ puts $manual(wing-toc-fp) "<HR><H3>$manual(wing-name)</H3><HR>"
+ # initialize the short table of contents for this section
+ set manual(wing-toc) {}
+ # initialize the man directory for this section
+ makedirhier $html/$manual(wing-file)
+ # initialize the long table of contents for this section
+ set manual(long-toc-n) 1
+ # get the manual pages for this section
+ set manual(pages) [lsort [glob $manual(wing-glob)]]
+ if {[lsearch -glob $manual(pages) */options.n] >= 0} {
+ set n [lsearch $manual(pages) */options.n]
+ set manual(pages) "[lindex $manual(pages) $n] [lreplace $manual(pages) $n $n]"
+ }
+ # set manual(pages) [lrange $manual(pages) 0 5]
+ foreach manual(page) $manual(pages) {
+ # whistle
+ puts stderr "scanning page $manual(page)"
+ set manual(tail) [file tail $manual(page)]
+ set manual(name) [file root $manual(tail)]
+ set manual(section) {}
+ if {[lsearch {case pack-old menubar} $manual(name)] >= 0} {
+ # obsolete
+ manerror "discarding $manual(name)"
+ continue
+ }
+ set manual(infp) [open "$manual(page)"]
+ set manual(text) {}
+ set manual(partial-text) {}
+ foreach p {.RS .DS .CS .SO} {
+ set manual($p) 0
+ }
+ set manual(stack) {}
+ set manual(section) {}
+ set manual(section-toc) {}
+ set manual(section-toc-n) 1
+ set manual(copyrights) {}
+ lappend manual(all-pages) $manual(wing-file)/$manual(tail)
+ manreport 100 "$manual(name)"
+ while {[gets $manual(infp) line] >= 0} {
+ manreport 100 $line
+ if {[regexp {^[`'][/\\]} $line]} {
+ if {[regexp {Copyright \(c\).*$} $line copyright]} {
+ lappend manual(copyrights) $copyright
+ }
+ # comment
+ continue
+ }
+ if {"$line" == {'}} {
+ # comment
+ continue
+ }
+ if {[parse-directive $line code rest]} {
+ switch -exact $code {
+ .ad -
+ .na -
+ .so -
+ .ne -
+ .AS -
+ .VE -
+ .VS -
+ . {
+ # ignore
+ continue
+ }
+ }
+ if {"$manual(partial-text)" != {}} {
+ lappend manual(text) [process-text $manual(partial-text)]
+ set manual(partial-text) {}
+ }
+ switch -exact $code {
+ .SH {
+ if {[llength $rest] == 0} {
+ gets $manual(infp) rest
+ }
+ lappend manual(text) ".SH [unquote $rest]"
+ }
+ .TH {
+ lappend manual(text) "$code [unquote $rest]"
+ }
+ .HS -
+ .UL -
+ .ta {
+ lappend manual(text) "$code [unquote $rest]"
+ }
+ .BS -
+ .BE -
+ .br -
+ .fi -
+ .sp -
+ .nf {
+ if {"$rest" != {}} {
+ manerror "unexpected argument: $line"
+ }
+ lappend manual(text) $code
+ }
+ .AP {
+ lappend manual(text) [concat .IP [process-text "[lindex $rest 0] \\fB[lindex $rest 1]\\fR ([lindex $rest 2])"]]
+ }
+ .IP {
+ regexp {^(.*) +[0-9]+$} $rest all rest
+ lappend manual(text) ".IP [process-text [unquote [string trim $rest]]]"
+ }
+ .TP {
+ set next [gets $manual(infp)]
+ if {"$next" != {'}} {
+ lappend manual(text) ".IP [process-text $next]"
+ }
+ }
+ .OP {
+ lappend manual(text) [concat .OP [process-text \
+ "\\fB[lindex $rest 0]\\fR \\fB[lindex $rest 1]\\fR \\fB[lindex $rest 2]\\fR"]]
+ }
+ .PP {
+ lappend manual(text) {.PP}
+ }
+ .LP {
+ lappend manual(text) {.LP}
+ }
+ .RS {
+ incr manual(.RS)
+ lappend manual(text) $code
+ }
+ .RE {
+ incr manual(.RS) -1
+ lappend manual(text) $code
+ }
+ .SO {
+ incr manual(.SO)
+ lappend manual(text) $code
+ }
+ .SE {
+ incr manual(.SO) -1
+ lappend manual(text) $code
+ }
+ .DS {
+ incr manual(.DS)
+ lappend manual(text) $code
+ }
+ .DE {
+ incr manual(.DS) -1
+ lappend manual(text) $code
+ }
+ .CS {
+ incr manual(.CS)
+ lappend manual(text) $code
+ }
+ .CE {
+ incr manual(.CS) -1
+ lappend manual(text) $code
+ }
+ .de {
+ while {[gets $manual(infp) line] >= 0} {
+ if {[regexp {^\.\.} $line]} {
+ break
+ }
+ }
+ }
+ .. {
+ error "found .. outside of .de"
+ }
+ default {
+ manerror "unrecognized format directive: $line"
+ }
+ }
+ } else {
+ if {"$manual(partial-text)" == {}} {
+ set manual(partial-text) $line
+ } else {
+ append manual(partial-text) \n$line
+ }
+ }
+ }
+ if {"$manual(partial-text)" != {}} {
+ lappend manual(text) [process-text $manual(partial-text)]
+ }
+ close $manual(infp)
+ # fixups
+ if {$manual(.RS) != 0} {
+ if {"$manual(name)" != {selection}} {
+ puts "unbalanced .RS .RE"
+ }
+ }
+ if {$manual(.DS) != 0} {
+ puts "unbalanced .DS .DE"
+ }
+ if {$manual(.CS) != 0} {
+ puts "unbalanced .CS .CE"
+ }
+ if {$manual(.SO) != 0} {
+ puts "unbalanced .SO .SE"
+ }
+ # output conversion
+ open-text
+ if {[next-op-is .HS rest]} {
+ set manual($manual(name)-title) "[lrange $rest 1 end] [lindex $rest 0] manual page"
+ while {[more-text]} {
+ set line [next-text]
+ if {[is-a-directive $line]} {
+ output-directive $line
+ } else {
+ man-puts $line
+ }
+ }
+ man-puts <HR><PRE>
+ foreach copyright $manual(copyrights) {
+ man-puts "<A HREF=\"../copyright.htm\">Copyright</A> © [lrange $copyright 2 end]"
+ }
+ man-puts "<A HREF=\"../copyright.htm\">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>"
+ set manual(wing-copyrights) [merge-copyrights $manual(wing-copyrights) $manual(copyrights)]
+ } elseif {[next-op-is .TH rest]} {
+ set manual($manual(name)-title) "[lrange $rest 4 end] - [lindex $rest 0] manual page"
+ while {[more-text]} {
+ set line [next-text]
+ if {[is-a-directive $line]} {
+ output-directive $line
+ } else {
+ man-puts $line
+ }
+ }
+ man-puts <HR><PRE>
+ foreach copyright $manual(copyrights) {
+ man-puts "<A HREF=\"../copyright.htm\">Copyright</A> © [lrange $copyright 2 end]"
+ }
+ man-puts "<A HREF=\"../copyright.htm\">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>"
+ set manual(wing-copyrights) [merge-copyrights $manual(wing-copyrights) $manual(copyrights)]
+ } else {
+ manerror "no .HS or .TH record found"
+ }
+ #
+ # make the long table of contents for this page
+ #
+ set manual(toc-$manual(wing-file)-$manual(name)) [concat <DL> $manual(section-toc) </DL><HR>]
+ }
+
+ #
+ # make the wing table of contents for the section
+ #
+ set width 0
+ foreach name $manual(wing-toc) {
+ if {[string length $name] > $width} {
+ set width [string length $name]
+ }
+ }
+ set perline [expr 120 / $width]
+ set nrows [expr ([llength $manual(wing-toc)]+$perline)/$perline]
+ set n 0
+ catch {unset rows}
+ foreach name [lsort $manual(wing-toc)] {
+ set tail $manual(name-$name)
+ if {[llength $tail] > 1} {
+ manerror "$name is defined in more than one file: $tail"
+ set tail [lindex $tail [expr [llength $tail]-1]]
+ }
+ set tail [file tail $tail]
+ append rows([expr $n%$nrows]) "<td> <a href=\"$tail.htm\">$name</a>"
+ incr n
+ }
+ puts $manual(wing-toc-fp) <table>
+ foreach row [lsort -integer [array names rows]] {
+ puts $manual(wing-toc-fp) <tr>$rows($row)</tr>
+ }
+ puts $manual(wing-toc-fp) </table>
+
+ #
+ # insert wing copyrights
+ #
+ puts $manual(wing-toc-fp) "<HR><PRE>"
+ foreach copyright $manual(wing-copyrights) {
+ puts $manual(wing-toc-fp) "<A HREF=\"../copyright.htm\">Copyright</A> © [lrange $copyright 2 end]"
+ }
+ puts $manual(wing-toc-fp) "<A HREF=\"../copyright.htm\">Copyright</A> © 1995-1997 Roger E. Critchlow Jr."
+ puts $manual(wing-toc-fp) "</PRE></FONT></BODY></HTML>"
+ close $manual(wing-toc-fp)
+ set manual(merge-copyrights) [merge-copyrights $manual(merge-copyrights) $manual(wing-copyrights)]
+ }
+
+ ##
+ ## build the keyword index.
+ ##
+ proc strcasecmp {a b} { return [string compare -nocase $a $b] }
+ set keys [lsort -command strcasecmp [array names manual keyword-*]]
+ makedirhier $html/Keywords
+ catch {eval exec rm -f [glob $html/Keywords/*]}
+ puts $manual(short-toc-fp) {<DT><A HREF="Keywords/contents.htm">Keywords</A><DD>The keywords from the Tcl/Tk man pages.}
+ set keyfp [open $html/Keywords/contents.htm w]
+ puts $keyfp "<HTML><HEAD><TITLE>Tcl/Tk Keywords</TITLE></HEAD>"
+ puts $keyfp {<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">}
+ puts $keyfp "<HR><H3>Tcl/Tk Keywords</H3><HR><H2>"
+ foreach a {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} {
+ puts $keyfp "<A HREF=\"$a.htm\">$a</A>"
+ set afp [open $html/Keywords/$a.htm w]
+ puts $afp "<HTML><HEAD><TITLE>Tcl/Tk Keywords - $a</TITLE></HEAD>"
+ puts $afp {<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+ <FONT FACE="Tahoma, Arial, Helvetica">}
+ puts $afp "<HR><H3>Tcl/Tk Keywords - $a</H3><HR><H2>"
+ foreach b {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} {
+ puts $afp "<A HREF=\"$b.htm\">$b</A>"
+ }
+ puts $afp "</H2><HR><DL>"
+ foreach k $keys {
+ if {[regexp -nocase -- "^keyword-$a" $k]} {
+ set k [string range $k 8 end]
+ puts $afp "<DT><A NAME=\"$k\">$k</A><DD>"
+ set refs {}
+ foreach man $manual(keyword-$k) {
+ set name [lindex $man 0]
+ set file [lindex $man 1]
+ lappend refs "<A HREF=\"../$file\">$name</A>"
+ }
+ puts $afp [join $refs {, }]
+ }
+ }
+ puts $afp "</DL><HR><PRE>"
+ # insert merged copyrights
+ foreach copyright $manual(merge-copyrights) {
+ puts $afp "<A HREF=\"copyright.htm\">Copyright</A> © [lrange $copyright 2 end]"
+ }
+ puts $afp "<A HREF=\"copyright.htm\">Copyright</A> © 1995-1997 Roger E. Critchlow Jr."
+ puts $afp "</PRE></FONT></BODY></HTML>"
+ close $afp
+ }
+ puts $keyfp "</H2><HR><PRE>"
+
+ # insert merged copyrights
+ foreach copyright $manual(merge-copyrights) {
+ puts $keyfp "<A HREF=\"copyright.htm\">Copyright</A> © [lrange $copyright 2 end]"
+ }
+ puts $keyfp "<A HREF=\"copyright.htm\">Copyright</A> © 1995-1997 Roger E. Critchlow Jr."
+ puts $keyfp </PRE></FONT></BODY></HTML>
+ close $keyfp
+
+ ##
+ ## finish off short table of contents
+ ##
+ puts $manual(short-toc-fp) {<DT><A HREF="http://www.elf.org">Source</A><DD>More information about these man pages.}
+ puts $manual(short-toc-fp) "</DL><HR><PRE>"
+ # insert merged copyrights
+ foreach copyright $manual(merge-copyrights) {
+ puts $manual(short-toc-fp) "<A HREF=\"copyright.htm\">Copyright</A> © [lrange $copyright 2 end]"
+ }
+ puts $manual(short-toc-fp) "<A HREF=\"copyright.htm\">Copyright</A> © 1995-1997 Roger E. Critchlow Jr."
+ puts $manual(short-toc-fp) "</PRE></FONT></BODY></HTML>"
+ close $manual(short-toc-fp)
+
+ ##
+ ## output man pages
+ ##
+ unset manual(section)
+ foreach path $manual(all-pages) {
+ set manual(wing-file) [file dirname $path]
+ set manual(tail) [file tail $path]
+ set manual(name) [file root $manual(tail)]
+ set text $manual(output-$manual(wing-file)-$manual(name))
+ set ntext 0
+ foreach item $text {
+ incr ntext [llength [split $item \n]]
+ incr ntext
+ }
+ set toc $manual(toc-$manual(wing-file)-$manual(name))
+ set ntoc 0
+ foreach item $toc {
+ incr ntoc [llength [split $item \n]]
+ incr ntoc
+ }
+ puts stderr "rescanning page $manual(name) $ntoc/$ntext"
+ set manual(outfp) [open $html/$manual(wing-file)/$manual(name).htm w]
+ puts $manual(outfp) "<HTML><HEAD><TITLE>$manual($manual(name)-title)</TITLE></HEAD>"
+ puts $manual(outfp) {
+<BODY BGCOLOR="#ffffff" TEXT="#000000" LINK="#0000ff" VLINK="#800000" ALINK="#800080">
+<FONT FACE="Tahoma, Arial, Helvetica">}
+ if {($ntext > 60) && ($ntoc > 32) || [lsearch {
+ Hash LinkVar SetVar TraceVar ConfigWidg CrtImgType CrtItemType
+ CrtPhImgFmt DoOneEvent GetBitmap GetColor GetCursor GetDash
+ GetJustify GetPixels GetVisual ParseArgv QueueEvent
+ } $manual(tail)] >= 0} {
+ foreach item $toc {
+ puts $manual(outfp) $item
+ }
+ }
+ foreach item $text {
+ puts $manual(outfp) [insert-cross-references $item]
+ }
+ puts $manual(outfp) {</FONT></BODY></HTML>}
+ close $manual(outfp)
+ }
+ return {}
+}
+
+set usercmddesc {The interpreters which implement Tcl and Tk.}
+set tclcmddesc {The commands which the <B>tclsh</B> interpreter implements.}
+set tkcmddesc {The additional commands which the <B>wish</B> interpreter implements.}
+set tixcmddesc {The additional commands which the <B>Tix</B> extension implements.}
+set tcllibdesc {The C functions which a Tcl extended C program may use.}
+set tklibdesc {The additional C functions which a Tk extended C program may use.}
+
+parse_command_line
+
+proc addfile {file} {
+ global testfiles
+ if {![info exists testfiles]} {
+ set testfiles $file
+ } else {
+ append testfiles ,$file
+ }
+}
+
+addfile TixIntro.n
+#-addfile compound.n
+#-addfile pixmap.n
+#-addfile tix.n
+#-addfile tixBalloon.n
+#-addfile tixButtonBox.n
+#-addfile tixCheckList.n
+#-addfile tixComboBox.n
+#-addfile tixControl.n
+#-addfile tixDestroy.n
+#-addfile tixDirList.n
+#-addfile tixDirSelectDialog.n
+#-addfile tixDirTree.n
+#-addfile tixDisplayStyle.n
+#-addfile tixExFileSelectBox.n
+#-addfile tixExFileSelectDialog.n
+#-addfile tixFileEntry.n
+#-addfile tixFileSelectBox.n
+#-addfile tixFileSelectDialog.n
+#-addfile tixForm.n
+#-addfile tixGetBoolean.n
+#-addfile tixGetInt.n
+#-addfile tixGrid.n
+#-addfile tixHList.n
+#-addfile tixInputOnly.n
+#-addfile tixLabelEntry.n
+#-addfile tixLabelFrame.n
+#-addfile tixListNoteBook.n
+#-addfile tixMeter.n
+#-addfile tixMwm.n
+#-addfile tixNBFrame.n
+#-addfile tixNoteBook.n
+#-addfile tixOptionMenu.n
+#-addfile tixPanedWindow.n
+#-addfile tixPopupMenu.n
+#-addfile tixScrolledHList.n
+#-addfile tixScrolledListBox.n
+#-addfile tixScrolledText.n
+#-addfile tixScrolledWindow.n
+#-addfile tixSelect.n
+#-addfile tixStdButtonBox.n
+#-addfile tixTList.n
+#-addfile tixTree.n
+#-addfile tixUtils.n
+
+if {[info exists env(TEST_ONLY)]} {
+ #
+ # Only test one or a few files
+ #
+ if {[catch {
+ make-man-pages $webdir \
+ "$tcltkdir/$tkdir/doc/{button.n,image.n,options.n} {Tk Commands} TkCmd {$tkcmddesc}" \
+ "$tcltkdir/$tixdir/man/{$testfiles} {Tix Commands} TixCmd {$tixcmddesc}" \
+ } error]} {
+ puts $error\n$errorInfo
+ }
+} elseif {[info exists env(WITH_TCL_TK)]} {
+ #
+ # Full distribution: all Tcl, Tk and Tix man pages
+ #
+ if {[catch {
+ make-man-pages $webdir \
+ "$tcltkdir/{$tkdir,$tcldir,$tixdir}/doc/*.1 {Tcl/Tk Applications} UserCmd {$usercmddesc}" \
+ "$tcltkdir/$tcldir/doc/*.n {Tcl Commands} TclCmd {$tclcmddesc}" \
+ "$tcltkdir/$tkdir/doc/*.n {Tk Commands} TkCmd {$tkcmddesc}" \
+ "$tcltkdir/$tcldir/doc/*.3 {Tcl Library} TclLib {$tcllibdesc}" \
+ "$tcltkdir/$tkdir/doc/*.3 {Tk Library} TkLib {$tklibdesc}" \
+ "$tcltkdir/$tixdir/man/*.n {Tix Commands} TixCmd {$tixcmddesc}"\
+ } error]} {
+ puts $error\n$errorInfo
+ }
+} else {
+ #
+ # Standard distribution: all Tix man pages and select Tcl/Tk pages
+ #
+ if {[catch {
+ make-man-pages $webdir \
+ "$tcltkdir/$tkdir/doc/{options.n} {Tk Commands} TkCmd {$tkcmddesc}" \
+ "$tcltkdir/$tkdir/doc/{ConfigWidg.3} {Tk Library} TkLib {$tklibdesc}"\
+ "$tcltkdir/$tixdir/man/*.n {Tix Commands} TixCmd {$tixcmddesc}"\
+ "$tcltkdir/$tixdir/man/*.1 {Applications} UserCmd {$usercmddesc}" \
+ } error]} {
+ puts $error\n$errorInfo
+ }
+}
Added: external/tix-8.4.2.x/tools/tixindex
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/tixindex Tue Mar 18 19:38:59 2008
@@ -0,0 +1,66 @@
+#!/bin/sh
+# the next line restarts using tclsh \
+exec tclsh "$0" "$@"
+
+proc tixAutoMkIndex {dir args} {
+ global errorCode errorInfo
+ set oldDir [pwd]
+ cd $dir
+ set dir [pwd]
+ append index "# Tcl autoload index file, version 2.0\n"
+ append index "# This file is generated by the \"tixindex\" program,\n"
+ append index "# *NOT* by the \"auto_mkindex\" command,\n"
+ append index "# and sourced to set up indexing information for one or\n"
+ append index "# more commands. Typically each line is a command that\n"
+ append index "# sets an element in the auto_index array, where the\n"
+ append index "# element name is the name of a command and the value is\n"
+ append index "# a script that loads the command.\n\n"
+ foreach file [eval glob $args] {
+ set f ""
+ set error [catch {
+ set f [open $file]
+ while {[gets $f line] >= 0} {
+ if [regexp {^tixClass[ ]+([^ ]*)} $line match className] {
+ append index "set [list auto_index($className)]"
+ append index " \"source {\$dir/$file}\"\n"
+ append index "set [list auto_index($className:AutoLoad)]"
+ append index " \"source {\$dir/$file}\"\n"
+ set isClass($className) 1
+ }
+ if [regexp {^tixWidgetClass[ ]+([^ ]*)} $line match className] {
+ append index "set [list auto_index($className)]"
+ append index " \"source {\$dir/$file}\"\n"
+ append index "set [list auto_index($className:AutoLoad)]"
+ append index " \"source {\$dir/$file}\"\n"
+ set isClass($className) 1
+ }
+
+ if [regexp {^proc[ ]+([^ ]*)} $line match procName] {
+ set prefix [lindex [split $procName :] 0]
+ if {![info exists isClass($prefix)]} {
+ append index "set [list auto_index($procName)]"
+ append index " \"source {\$dir/$file}\"\n"
+ }
+ }
+ }
+ close $f
+ } msg]
+ if $error {
+ set code $errorCode
+ set info $errorInfo
+ catch {close $f}
+ cd $oldDir
+ error $msg $info $code
+ }
+ }
+ set f [open tclIndex w]
+ puts $f $index nonewline
+ close $f
+ cd $oldDir
+}
+
+if {$argv == {}} {
+ eval tixAutoMkIndex . *.tcl
+} else {
+ eval tixAutoMkIndex . $argv
+}
Added: external/tix-8.4.2.x/tools/winsetup.iss
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/tools/winsetup.iss Tue Mar 18 19:38:59 2008
@@ -0,0 +1,103 @@
+; -*- mode: text; fill-column: 75; tab-width: 8; coding: iso-latin-1-dos -*-
+;
+; $Id: winsetup.iss,v 1.1 2002/01/31 21:35:19 idiscovery Exp $
+;
+; winsetup.iss --
+;
+; Inno Setup Script for creating Win32 installer program for
+; the Tix library.
+;
+; Copyright (c) 2000-2001 Tix Project Group.
+;
+; See the file "license.terms" for information on usage and redistribution
+; of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+
+[Messages]
+
+[Setup]
+MinVersion=4.0.950,4.0.1381
+AppCopyright=Copyright © 2001, Tix Project Group
+AppName=Tix Widgets 8.2.0
+AppVerName=Tix Widgets 8.2.0
+AppVersion=8.2.0
+EnableDirDoesntExistWarning=true
+InfoBeforeFile=WinBin.txt
+OutputDir=.
+OutputBaseFilename=tix-8.2.0b3
+LicenseFile=..\license.terms
+AppPublisherURL=http://tix.sourceforge.net
+AppSupportURL=http://tix.sourceforge.net
+AppUpdatesURL=http://tix.sourceforge.net
+DefaultGroupName=Tix 8.2.0
+DefaultDirName={pf}\Tcl
+UsePreviousAppDir=yes
+DirExistsWarning=no
+AllowRootDirectory=true
+AlwaysShowGroupOnReadyPage=yes
+BackSolid=yes
+BackColor=$0000FF
+
+[Types]
+Name: "full"; Description: "Full installation"
+Name: "compact"; Description: "Compact installation"
+Name: "custom"; Description: "Custom installation"; Flags: iscustom
+
+[Components]
+Name: "main"; Description: "Main Files"; Types: full compact custom; Flags: fixed
+Name: "demos"; Description: "Tix Demo Files"; Types: full
+;;Name: "html"; Description: "Tix Manual Pages"; Types: full
+Name: "pdf"; Description: "Tix User Guide"; Types: full
+
+[Icons]
+Name: {group}\tixwish; Filename: {app}\bin\tixwish82.exe; WorkingDir: {app}
+Name: {group}\Tix Demo; Filename: "{app}\bin\tixwish82.exe"; Parameters: """{app}\lib\tix8.2\demos\tixwidgets.tcl"""; WorkingDir: {app}\bin; Components: demos
+Name: {group}\Tix User Manual;Filename: {app}\docs\pdf\TixUser.pdf; Components: pdf
+Name: {group}\Tix Programming Guide; Filename: {app}\docs\pguide-tix4.0.pdf; Components: pdf
+Name: {group}\Release Notes; Filename: {app}\lib\tix8.2\Release-8.2.0.txt
+
+[Run]
+Filename: "{app}\lib\tix8.2\Release-8.2.0.txt"; Description: "View the Release notes"; Flags: postinstall shellexec skipifsilent unchecked
+Filename: "{app}\bin\tixwish82.exe"; Description: "Launch Demos"; Parameters: """{app}\lib\tix8.2\demos\tixwidgets.tcl"""; WorkingDir: {app}\bin; Flags: postinstall nowait skipifsilent; Components: demos
+
+[LangOptions]
+LanguageName=English
+LanguageID=$0409
+DialogFontName=MS Shell Dlg
+DialogFontSize=8
+DialogFontStandardHeight=13
+TitleFontName=Arial
+TitleFontSize=29
+WelcomeFontName=Verdana
+WelcomeFontSize=12
+CopyrightFontName=Arial
+CopyrightFontSize=8
+
+[Files]
+Source: ..\win\Release\tixwish82.exe; DestDir: {app}\bin
+Source: ..\win\Release\tixwishc82.exe; DestDir: {app}\bin
+Source: ..\win\Release\tix82.dll; DestDir: {app}\bin
+Source: ..\win\Release\tix82.lib; DestDir: {app}\lib
+Source: ..\library\*.tcl; DestDir: {app}\lib\tix8.2
+Source: ..\library\tclIndex; DestDir: {app}\lib\tix8.2
+Source: ..\license.terms; DestDir: {app}\lib\tix8.2
+Source: ..\docs\Release-8.2.0.txt; DestDir: {app}\lib\tix8.2
+
+;
+; This must appear below the line above. We are overridding the
+; file ..\library\pkgIndex.tcl with ..\win\Release\pkgIndex.tcl.src
+;
+Source: ..\win\Release\pkgIndex.tcl.src; DestDir: {app}\lib\tix8.2; DestName: "pkgIndex.tcl"
+Source: ..\library\pref\*.*; DestDir: {app}\lib\tix8.2\pref
+Source: ..\library\bitmaps\*.*; DestDir: {app}\lib\tix8.2\bitmaps
+Source: ..\demos\*.*; DestDir: {app}\lib\tix8.2\demos; Components: demos
+Source: ..\demos\bitmaps\*.*; DestDir: {app}\lib\tix8.2\demos\bitmaps; Components: demos
+Source: ..\demos\samples\*.*; DestDir: {app}\lib\tix8.2\demos\samples; Components: demos
+;
+; Docs
+;
+Source: ..\docs\pdf\TixUser.pdf; DestDir: {app}\doc; Components: pdf
+Source: ..\docs\pdf\pguide-tix4.0.pdf; DestDir: {app}\doc; Components: pdf
+
+[Dirs]
+
+
Added: external/tix-8.4.2.x/unix/.cvsignore
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/.cvsignore Tue Mar 18 19:38:59 2008
@@ -0,0 +1,13 @@
+config.log
+config.cache
+config.status
+Makefile
+tixwish8.1
+tixwish8.1g
+tixwish8.2
+tixwish8.2g
+pkgIndex.tcl
+tixConfig.sh
+mkIndex.tcl
+tixBitmaps.h
+tixSamLib.h
Added: external/tix-8.4.2.x/unix/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,98 @@
+$Id: README.txt,v 1.4 2004/10/02 01:25:52 hobbs Exp $
+
+ --- Build Tix binaries for the Unix platforms ---
+
+Before you start
+================
+
+ The Tix home page is at
+
+ http://tix.sourceforge.net/
+
+ This site also has more information in case you get stuck, such as
+ who to contact for questions.
+
+Required Tcl/Tk versions
+========================
+
+ You need Tcl/Tk 8.2 or later. Prior versions are no longer
+ supported. Tcl 8.4 is the recommended version.
+
+Install the Tcl/Tk/Tix sources
+==============================
+
+ Tix is a standard Tcl Extension Architecture (TEA) based extension.
+ You must have Tcl and Tk on your system prior to building Tix.
+
+Run the Tix configure script
+============================
+
+ To see the options for the Tix configure script:
+
+ cd /src/tix/
+ ./configure --help
+
+ Tix builds as a stubs-enabled shared extension to Tcl/Tk by default.
+
+ You may want to set the --prefix and --exec-prefix options if
+ you want to install Tix in a directory other than /usr/local.
+
+ If you have several versions of Tcl/Tk sources installed in your
+ source directory, you can use the --with-tcl and --with-tk options
+ to choose which version to build Tix with.
+
+Build Tix
+=========
+
+ After you run the configure script, you'd get a Makefile for
+ building Tix. Then, just invoke the "make" command to build the
+ Tix binaries.
+
+ cd /src/tix/
+ make
+
+Test Tix
+========
+
+ You may want to run the Tix regression test suite to see if things
+ work as expected:
+
+ cd /src/tix/
+ make tests
+
+ You can also run the Tix widget demos:
+
+ cd /src/tix/
+ make rundemos
+
+Install Tix
+===========
+
+ When you're satisfied with the Tix build, you can install it by
+ invoking:
+
+ cd /src/tix/
+ make install
+
+ This by default will install the Tix files into the following
+ places:
+
+ /usr/local/lib/tix8.4/libtix8.4.so shared library
+ /usr/local/lib/tix8.4/*.tcl script library
+ /usr/local/man/mann/*.n man pages
+
+ The installation directory may be set using the --prefix and
+ --exec-prefix options to the configure script.
+
+ You may also need to install Tcl and Tk if you haven't already
+ done so.
+
+Test the installation
+=====================
+
+ To make sure everything works after "make install", do this:
+
+ env TIX_LIBRARY=/set/correct/path wish /src/tix/tests/all.tcl
+
+ This will ensure Tcl/Tk and Tix can work without any environment
+ settings.
Added: external/tix-8.4.2.x/unix/tixUnixDefault.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixDefault.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,269 @@
+/*
+ * tixUnixDefault.h --
+ *
+ * This file defines the defaults for all options for all of
+ * the Tix widgets.
+ *
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixUnixDefault.h,v 1.3 2000/12/24 06:43:07 ioilam Exp $
+ */
+
+#ifndef TIX_WIN_DEFAULT
+#define TIX_WIN_DEFAULT
+
+/*
+ * The following were defined in Windows versions of Tk 8.0+ but
+ * not in the Unix versions.
+ */
+#ifndef CTL_FONT
+#define CTL_FONT "Helvetica -12 bold"
+#endif
+#ifndef NORMAL_FG
+#define NORMAL_FG BLACK
+#endif
+#ifndef TEXT_FG
+#define TEXT_FG NORMAL_FG
+#endif
+#ifndef SELECT_FG
+#define SELECT_FG NORMAL_FG
+#endif
+#ifndef MENU_BG
+#define MENU_BG NORMAL_BG
+#endif
+#ifndef MENU_FG
+#define MENU_FG NORMAL_FG
+#endif
+#ifndef HIGHLIGHT
+#define HIGHLIGHT NORMAL_FG
+#endif
+
+#define CTL_BOLD_FONT "Helvetica -12 bold"
+#define TIX_EDITOR_BG NORMAL_BG
+#define TIX_BORDER_WIDTH "2"
+#define TIX_HIGHLIGHT_THICKNESS "1"
+
+/*
+ * Compound image
+ */
+#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 TIX_EDITOR_BG
+#define DEF_HLIST_BG_MONO WHITE
+#define DEF_HLIST_BORDER_WIDTH TIX_BORDER_WIDTH
+#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_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 TIX_HIGHLIGHT_THICKNESS
+#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 SELECT_BG
+#define DEF_HLIST_SELECT_FG_COLOR SELECT_FG
+#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 "0"
+#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 TIX_BORDER_WIDTH
+#define DEF_HLISTHEADER_RELIEF "raised"
+
+/*
+ * tixNBFrame widget
+ */
+#define DEF_NOTEBOOKFRAME_INACTIVE_BG_COLOR NORMAL_BG
+#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 TIX_BORDER_WIDTH
+#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 "raised"
+#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 "3"
+
+/*
+ * TList widget
+ */
+#define DEF_TLIST_BG_COLOR TIX_EDITOR_BG
+#define DEF_TLIST_BG_MONO WHITE
+#define DEF_TLIST_BORDER_WIDTH TIX_BORDER_WIDTH
+#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 TIX_HIGHLIGHT_THICKNESS
+#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 SELECT_BG
+#define DEF_TLIST_SELECT_FG_COLOR SELECT_FG
+#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 "0"
+#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 ""
+
+/*
+ * Grid widget
+ */
+#define DEF_GRID_BG_COLOR NORMAL_BG
+#define DEF_GRID_BG_MONO WHITE
+#define DEF_GRID_BORDER_WIDTH TIX_BORDER_WIDTH
+#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 CTL_FONT
+#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 TIX_HIGHLIGHT_THICKNESS
+#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 "0"
+#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 ""
+
+/*----------------------------------------------------------------------
+ *
+ * default options for Text Display Items/Styles
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define DEF_TEXTITEM_STYLE ""
+#define DEF_TEXTITEM_TEXT ""
+#define DEF_TEXTITEM_UNDERLINE "-1"
+#define DEF_TEXTITEM_TYPE "text"
+
+#define DEF_TEXTSTYLE_NORMAL_FG_COLOR NORMAL_FG
+#define DEF_TEXTSTYLE_NORMAL_FG_MONO BLACK
+#define DEF_TEXTSTYLE_NORMAL_BG_COLOR TIX_EDITOR_BG
+#define DEF_TEXTSTYLE_NORMAL_BG_MONO WHITE
+
+#define DEF_TEXTSTYLE_ACTIVE_FG_COLOR NORMAL_FG
+#define DEF_TEXTSTYLE_ACTIVE_FG_MONO WHITE
+#define DEF_TEXTSTYLE_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_TEXTSTYLE_ACTIVE_BG_MONO BLACK
+
+#define DEF_TEXTSTYLE_SELECTED_FG_COLOR SELECT_FG
+#define DEF_TEXTSTYLE_SELECTED_FG_MONO WHITE
+#define DEF_TEXTSTYLE_SELECTED_BG_COLOR SELECT_BG
+#define DEF_TEXTSTYLE_SELECTED_BG_MONO BLACK
+
+#define DEF_TEXTSTYLE_DISABLED_FG_COLOR BLACK
+#define DEF_TEXTSTYLE_DISABLED_FG_MONO BLACK
+#define DEF_TEXTSTYLE_DISABLED_BG_COLOR TIX_EDITOR_BG
+#define DEF_TEXTSTYLE_DISABLED_BG_MONO WHITE
+
+#define DEF_TEXTSTYLE_PADX "2"
+#define DEF_TEXTSTYLE_PADY "2"
+#define DEF_TEXTSTYLE_FONT CTL_FONT
+#define DEF_TEXTSTYLE_JUSTIFY "left"
+#define DEF_TEXTSTYLE_WLENGTH "0"
+#define DEF_TEXTSTYLE_ANCHOR "w"
+
+#endif /* TIX_WIN_DEFAULT */
Added: external/tix-8.4.2.x/unix/tixUnixDraw.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixDraw.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,484 @@
+/*
+ * tixUnixDraw.c --
+ *
+ * Implement the Unix specific function calls for drawing.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixUnixDraw.c,v 1.6 2005/03/25 20:15:53 hobbs Exp $
+ */
+
+#include <tixPort.h>
+#include <tixUnixInt.h>
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpDrawTmpLine --
+ *
+ * Draws a "temporary" line between the two points. The line can be
+ * removed by calling the function again with the same parameters.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpDrawTmpLine(x1, y1, x2, y2, tkwin)
+ int x1;
+ int y1;
+ int x2;
+ int y2;
+ Tk_Window tkwin;
+{
+ GC gc;
+ XGCValues values;
+ unsigned long valuemask = GCForeground | GCSubwindowMode | GCFunction;
+ Window winId; /* The Window to draw into. */
+ Tk_Window toplevel; /* Toplevel containing the tkwin. */
+ int rootx1, rooty1; /* Root x and y of the toplevel window. */
+ int rootx2, rooty2;
+
+ for (toplevel=tkwin; !Tk_IsTopLevel(toplevel);
+ toplevel=Tk_Parent(toplevel)) {
+ ;
+ }
+
+ Tk_GetRootCoords(toplevel, &rootx1, &rooty1);
+ rootx2 = rootx1 + Tk_Width(toplevel) - 1;
+ rooty2 = rooty1 + Tk_Height(toplevel) - 1;
+
+ if (x1 >= rootx1 && x2 <= rootx2 && y1 >= rooty1 && y2 <= rooty2) {
+ /*
+ * The line is completely inside the toplevel containing
+ * tkwin. It's better to draw into this window because on some
+ * X servers, especially PC X Servers running on Windows,
+ * drawing into the root window shows no effect.
+ */
+ winId = Tk_WindowId(toplevel);
+ x1 -= rootx1;
+ y1 -= rooty1;
+ x2 -= rootx1;
+ y2 -= rooty1;
+ } else {
+ winId = XRootWindow(Tk_Display(tkwin), Tk_ScreenNumber(tkwin));
+ }
+
+ values.foreground = 0xff;
+ values.subwindow_mode = IncludeInferiors;
+ values.function = GXxor;
+
+ gc = XCreateGC(Tk_Display(tkwin), winId, valuemask, &values);
+ XDrawLine(Tk_Display(tkwin), winId, gc, x1, y1, x2, y2);
+ XFreeGC(Tk_Display(tkwin), gc);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpDrawAnchorLines --
+ *
+ * See comments near Tix_DrawAnchorLines.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpDrawAnchorLines(display, drawable, gc, x, y, w, h)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ int x;
+ int y;
+ int w;
+ int h;
+{
+ int n;
+ int draw = 1;
+
+ /*
+ * TODO: (perf) use XDrawPoints to reduce the number of X calls.
+ */
+ if (w < 2 || h < 2) {
+ /*
+ * Area too small to show effect. Don't bother
+ */
+ return;
+ }
+
+ for (n=0; n<w; n++, draw = !draw) {
+ if (draw) {
+ XDrawPoint(display, drawable, gc, x+n, y);
+ }
+ }
+
+ for (n=1; n<h; n++, draw = !draw) {
+ if (draw) {
+ XDrawPoint(display, drawable, gc, x+w-1, y+n);
+ }
+ }
+
+ for (n=1; n<w; n++, draw = !draw) {
+ if (draw) {
+ XDrawPoint(display, drawable, gc, x+w-n-1, y+h-1);
+ }
+ }
+
+ for (n=1; n<h-1; n++, draw = !draw) {
+ if (draw) {
+ XDrawPoint(display, drawable, gc, x, y+h-n-1);
+ }
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpStartSubRegionDraw --
+ *
+ * This function is used by the Tix DItem code to implement
+ * clipped rendering -- if a DItem is larger than the region
+ * where the DItem is displayed (with the Tix_DItemDisplay
+ * function), we clip the DItem so that all the rendering
+ * happens inside the region.
+ *
+ * If you're wondering why the SubReg API is necessary at all,
+ * please consult the file tixWinDraw.c.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Some infomation is saved in subRegPtr for use by the
+ * TixpSubRegDrawXXX functions.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpStartSubRegionDraw(display, drawable, gc, subRegPtr, origX, origY,
+ x, y, width, height, needWidth, needHeight)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ TixpSubRegion * subRegPtr;
+ int origX;
+ int origY;
+ int x;
+ int y;
+ int width;
+ int height;
+ int needWidth;
+ int needHeight;
+{
+ if ((width < needWidth) || (height < needHeight)) {
+ subRegPtr->rectUsed = 1;
+ subRegPtr->origX = origX;
+ subRegPtr->origY = origY;
+ subRegPtr->rect.x = (short)x;
+ subRegPtr->rect.y = (short)y;
+ subRegPtr->rect.width = (short)width;
+ subRegPtr->rect.height = (short)height;
+#ifndef MAC_OSX_TK
+ XSetClipRectangles(display, gc, origX, origY, &subRegPtr->rect,
+ 1, Unsorted);
+#else
+ subRegPtr->pixmap = Tk_GetPixmap(display, drawable, width, height,
+ 32);
+
+ if (subRegPtr->pixmap != None) {
+ XCopyArea(display, drawable, subRegPtr->pixmap, gc, x, y,
+ width, height, 0, 0);
+ }
+#endif
+ } else {
+ subRegPtr->rectUsed = 0;
+#ifdef MAC_OSX_TK
+ subRegPtr->pixmap = None;
+#endif
+ }
+}
+
+void
+TixpSubRegSetClip(display, subRegPtr, gc)
+ Display *display;
+ TixpSubRegion * subRegPtr;
+ GC gc;
+{
+#ifndef MAC_OSX_TK
+ if (subRegPtr->rectUsed) {
+ XSetClipRectangles(display, gc, subRegPtr->origX, subRegPtr->origY,
+ &subRegPtr->rect, 1, Unsorted);
+ }
+
+#endif
+}
+
+void
+TixpSubRegUnsetClip(display, subRegPtr, gc)
+ Display *display;
+ TixpSubRegion * subRegPtr;
+ GC gc;
+{
+#ifndef MAC_OSX_TK
+ XRectangle rect;
+
+ if (subRegPtr->rectUsed) {
+ rect.x = 0;
+ rect.y = 0;
+ rect.width = 20000;
+ rect.height = 20000;
+ XSetClipRectangles(display, gc, 0, 0, &rect, 1, Unsorted);
+ }
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixpEndSubRegionDraw --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpEndSubRegionDraw(display, drawable, gc, subRegPtr)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ TixpSubRegion * subRegPtr;
+{
+#ifndef MAC_OSX_TK
+ TixpSubRegUnsetClip(display, subRegPtr, gc);
+#else
+ if (subRegPtr->pixmap != None) {
+ XCopyArea(display, subRegPtr->pixmap, drawable, gc, 0, 0,
+ subRegPtr->rect.width, subRegPtr->rect.height,
+ subRegPtr->rect.x, subRegPtr->rect.y);
+ Tk_FreePixmap(display, subRegPtr->pixmap);
+ subRegPtr->pixmap = None;
+ }
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpSubRegDisplayText --
+ *
+ * Display a text string on one or more lines in a sub region.
+ *
+ * Results:
+ * See TkDisplayText
+ *
+ * Side effects:
+ * See TkDisplayText
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpSubRegDisplayText(display, drawable, gc, subRegPtr, font, string,
+ numChars, x, y, length, justify, underline)
+ Display *display; /* X display to use for drawing text. */
+ Drawable drawable; /* Window or pixmap in which to draw the
+ * text. */
+ GC gc; /* Graphics context to use for drawing text. */
+ TixpSubRegion * subRegPtr; /* Information about the subregion */
+ TixFont font; /* Font that determines geometry of text
+ * (should be same as font in gc). */
+ CONST84 char *string; /* String to display; may contain embedded
+ * newlines. */
+ int numChars; /* Number of characters to use from string. */
+ int x, y; /* Pixel coordinates within drawable of
+ * upper left corner of display area. */
+ int length; /* Line length in pixels; used to compute
+ * word wrap points and also for
+ * justification. Must be > 0. */
+ Tk_Justify justify; /* How to justify lines. */
+ int underline; /* Index of character to underline, or < 0
+ * for no underlining. */
+{
+#ifdef MAC_OSX_TK
+ if (subRegPtr->pixmap != None) {
+ TixDisplayText(display, subRegPtr->pixmap, font, string,
+ numChars, x - subRegPtr->x, y - subRegPtr->y,
+ length, justify, underline, gc);
+ } else
+#endif
+ {
+ TixDisplayText(display, drawable, font, string,
+ numChars, x, y, length, justify, underline, gc);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpSubRegFillRectangle --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+void
+TixpSubRegFillRectangle(display, drawable, gc, subRegPtr, x, y, width, height)
+ Display *display; /* X display to use for drawing rectangle. */
+ Drawable drawable; /* Window or pixmap in which to draw the
+ * rectangle. */
+ GC gc; /* Graphics context to use for drawing. */
+ TixpSubRegion * subRegPtr; /* Information about the subregion */
+ int x, y; /* Pixel coordinates within drawable of
+ * upper left corner of display area. */
+ int width, height; /* Size of the rectangle. */
+{
+#ifdef MAC_OSX_TK
+ if (subRegPtr->pixmap != None) {
+ XFillRectangle(display, subRegPtr->pixmap, gc,
+ x - subRegPtr->x, y - subRegPtr->y, width, height);
+ } else
+#endif
+ {
+ XFillRectangle(display, drawable, gc, x, y,
+ (unsigned) width, (unsigned) height);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpSubRegDrawImage --
+ *
+ * Draws a Tk image in a subregion.
+ *----------------------------------------------------------------------
+ */
+void
+TixpSubRegDrawImage(subRegPtr, image, imageX, imageY, width, height,
+ drawable, drawableX, drawableY)
+ TixpSubRegion * subRegPtr;
+ Tk_Image image;
+ int imageX;
+ int imageY;
+ int width;
+ int height;
+ Drawable drawable;
+ int drawableX;
+ int drawableY;
+{
+#ifdef MAC_OSX_TK
+ if (subRegPtr->pixmap != None) {
+ drawableX -= subRegPtr->x;
+ drawableY -= subRegPtr->y;
+ Tk_RedrawImage(image, imageX, imageY, width, height, subRegPtr->pixmap,
+ drawableX, drawableY);
+ } else
+#endif
+ {
+ if (subRegPtr->rectUsed) {
+ /*
+ * We need to do the clipping by hand because Tk_RedrawImage()
+ * Does not take in a GC so we can't set its clip region.
+ */
+
+ if (drawableX < subRegPtr->rect.x) {
+ width -= subRegPtr->rect.x - drawableX;
+ imageX += subRegPtr->rect.x - drawableX;
+ drawableX = subRegPtr->rect.x;
+ }
+ if (drawableX + width > subRegPtr->rect.x + subRegPtr->rect.width) {
+ width = subRegPtr->rect.x - drawableX + subRegPtr->rect.width;
+ }
+
+ if (drawableY < subRegPtr->rect.y) {
+ height -= subRegPtr->rect.y - drawableY;
+ imageY += subRegPtr->rect.y - drawableY;
+ drawableY = subRegPtr->rect.y;
+ }
+ if (drawableY + height > subRegPtr->rect.y + subRegPtr->rect.height) {
+ height = subRegPtr->rect.y - drawableY + subRegPtr->rect.height;
+ }
+ }
+
+ Tk_RedrawImage(image, imageX, imageY, width, height, drawable,
+ drawableX, drawableY);
+ }
+}
+
+void
+TixpSubRegDrawBitmap(display, drawable, gc, subRegPtr, bitmap, src_x, src_y,
+ width, height, dest_x, dest_y, plane)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ TixpSubRegion * subRegPtr;
+ Pixmap bitmap;
+ int src_x, src_y;
+ int width, height;
+ int dest_x, dest_y;
+ unsigned long plane;
+{
+#ifdef MAC_OSX_TK
+ XSetClipOrigin(display, gc, dest_x, dest_y);
+ if (subRegPtr->pixmap != None) {
+ XCopyPlane(display, bitmap, subRegPtr->pixmap, gc, src_x, src_y,
+ width, height, dest_x - subRegPtr->x, dest_y - subRegPtr->y,
+ plane);
+ } else {
+#endif
+ XCopyPlane(display, bitmap, drawable, gc, src_x, src_y,
+ (unsigned) width, (unsigned) height, dest_x, dest_y, plane);
+#ifdef MAC_OSX_TK
+ }
+ XSetClipOrigin(display, gc, 0, 0);
+#endif
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpSubRegDrawAnchorLines --
+ *
+ * Draw anchor lines inside the given sub region.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpSubRegDrawAnchorLines(display, drawable, gc, subRegPtr, x, y, w, h)
+ Display *display; /* Display to draw on. */
+ Drawable drawable; /* Drawable to draw on. */
+ GC gc; /* Use the foreground color of this GC. */
+ TixpSubRegion * subRegPtr; /* Describes the subregion. */
+ int x; /* x pos of top-left corner of anchor rect */
+ int y; /* y pos of top-left corner of anchor rect */
+ int w; /* width of anchor rect */
+ int h; /* height of anchor rect */
+{
+#ifdef MAC_OSX_TK
+ if (subRegPtr->pixmap != None) {
+ x -= subRegPtr->x;
+ y -= subRegPtr->y;
+ TixpDrawAnchorLines(display, subRegPtr->pixmap, gc, x, y, w, h);
+ } else
+#endif
+ {
+ TixpDrawAnchorLines(display, drawable, gc, x, y, w, h);
+ }
+}
Added: external/tix-8.4.2.x/unix/tixUnixInt.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixInt.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,23 @@
+
+/* $Id: tixUnixInt.h,v 1.1.1.1 2000/05/17 11:08:54 idiscovery Exp $ */
+
+/*
+ * tixUnixInt.h
+ *
+ * Internal header file for Tix on the Unix 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_UNIX_INT_H_
+#define _TIX_UNIX_INT_H_
+
+#ifndef _TIX_INT_H_
+#include "tixInt.h"
+#endif
+
+#endif /* _TIX_UNIX_INT_H_ */
Added: external/tix-8.4.2.x/unix/tixUnixMwm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixMwm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,909 @@
+
+/* $Id: tixUnixMwm.c,v 1.2 2005/03/25 20:15:53 hobbs Exp $ */
+
+/*
+ * tixUnixMwm.c --
+ *
+ * Communicating with the Motif window 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.
+ *
+ */
+
+#include <tkInt.h>
+#include <tixPort.h>
+#include <tixInt.h>
+#ifndef MAC_OSX_TK
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xproto.h>
+#include <X11/Xutil.h>
+
+
+#ifdef HAS_MOTIF_INC
+#include <Xm/MwmUtil.h>
+#else
+
+/*
+ * This section is provided for the machines that don't have the Motif
+ * header files installed.
+ */
+
+#define MWM_DECOR_ALL (1L << 0)
+#define MWM_DECOR_BORDER (1L << 1)
+#define MWM_DECOR_RESIZEH (1L << 2)
+#define MWM_DECOR_TITLE (1L << 3)
+#define MWM_DECOR_MENU (1L << 4)
+#define MWM_DECOR_MINIMIZE (1L << 5)
+#define MWM_DECOR_MAXIMIZE (1L << 6)
+
+#define MWM_HINTS_DECORATIONS (1L << 1)
+
+#define PROP_MOTIF_WM_HINTS_ELEMENTS 5
+#define PROP_MWM_HINTS_ELEMENTS PROP_MOTIF_WM_HINTS_ELEMENTS
+
+/* atom name for _MWM_HINTS property */
+#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS"
+#define _XA_MWM_HINTS _XA_MOTIF_WM_HINTS
+
+#define _XA_MOTIF_WM_MENU "_MOTIF_WM_MENU"
+#define _XA_MWM_MENU _XA_MOTIF_WM_MENU
+
+#define _XA_MOTIF_WM_INFO "_MOTIF_WM_INFO"
+#define _XA_MWM_INFO _XA_MOTIF_WM_INFO
+
+#define PROP_MOTIF_WM_INFO_ELEMENTS 2
+#define PROP_MWM_INFO_ELEMENTS PROP_MOTIF_WM_INFO_ELEMENTS
+
+typedef struct
+{
+ CARD32 flags;
+ CARD32 functions;
+ CARD32 decorations;
+ INT32 inputMode;
+ CARD32 status;
+} PropMotifWmHints;
+
+typedef PropMotifWmHints PropMwmHints;
+
+typedef struct
+{
+ CARD32 flags;
+ CARD32 wmWindow;
+} PropMotifWmInfo;
+
+typedef PropMotifWmInfo PropMwmInfo;
+
+#endif /* HAS_MOTIF_INC */
+
+#define MWM_DECOR_UNKNOWN (-1)
+#define MWM_DECOR_EVERYTHING (MWM_DECOR_BORDER |\
+ MWM_DECOR_RESIZEH |\
+ MWM_DECOR_TITLE |\
+ MWM_DECOR_MENU |\
+ MWM_DECOR_MINIMIZE |\
+ MWM_DECOR_MAXIMIZE)
+
+typedef struct _Tix_MwmInfo {
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ PropMwmHints prop; /* not used */
+ Atom mwm_hints_atom;
+ Tcl_HashTable protocols;
+ unsigned int isremapping : 1;
+ unsigned int resetProtocol : 1;
+ unsigned int addedMwmMsg : 1;
+} Tix_MwmInfo;
+
+typedef struct Tix_MwmProtocol {
+ Atom protocol;
+ char * name;
+ char * menuMessage;
+ size_t messageLen;
+ unsigned int active : 1;
+} Tix_MwmProtocol;
+
+
+/* Function declaration */
+
+static void AddMwmProtocol _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_MwmInfo *wmPtr, CONST84 char * name, CONST84 char * message));
+static void ActivateMwmProtocol _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_MwmInfo *wmPtr, CONST84 char * name));
+static void DeactivateMwmProtocol _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_MwmInfo *wmPtr, CONST84 char * name));
+static void DeleteMwmProtocol _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_MwmInfo *wmPtr, CONST84 char * name));
+static Tix_MwmInfo * GetMwmInfo _ANSI_ARGS_((Tcl_Interp *interp,
+ Tk_Window tkwin));
+static Tix_MwmProtocol* GetMwmProtocol _ANSI_ARGS_((Tcl_Interp * interp,
+ Tix_MwmInfo * wmPtr, Atom protocol));
+static int IsMwmRunning _ANSI_ARGS_((Tcl_Interp * interp,
+ Tix_MwmInfo*wmPtr));
+static int MwmDecor _ANSI_ARGS_((Tcl_Interp * interp,
+ CONST84 char * string));
+static int MwmProtocol _ANSI_ARGS_((Tcl_Interp * interp,
+ Tix_MwmInfo * wmPtr, int argc, CONST84 char ** argv));
+static void QueryMwmHints _ANSI_ARGS_((Tix_MwmInfo * wmPtr));
+static void RemapWindow _ANSI_ARGS_((ClientData clientData));
+static void RemapWindowWhenIdle _ANSI_ARGS_((
+ Tix_MwmInfo * wmPtr));
+static void ResetProtocols _ANSI_ARGS_((ClientData clientData));
+static void ResetProtocolsWhenIdle _ANSI_ARGS_((
+ Tix_MwmInfo * wmPtr));
+static int SetMwmDecorations _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_MwmInfo*wmPtr, int argc, CONST84 char ** argv));
+static int SetMwmTransientFor _ANSI_ARGS_((Tcl_Interp *interp,
+ Tix_MwmInfo*wmPtr, TkWindow *mainWindow, int argc,
+ CONST84 char ** argv));
+static void StructureProc _ANSI_ARGS_((ClientData clientData,
+ XEvent *eventPtr));
+
+/* Local variables */
+
+static Tcl_HashTable mwmTable;
+
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Tix_MwmCmd --
+ *
+ * This procedure is invoked to process the "mwm" Tcl command.
+ * See the user documentation for details on what it does.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+/* ARGSUSED */
+int
+Tix_MwmCmd(clientData, interp, argc, argv)
+ ClientData clientData; /* Main window associated with
+ * interpreter. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int argc; /* Number of arguments. */
+ CONST84 char **argv; /* Argument strings. */
+{
+ Tk_Window tkwin = (Tk_Window) clientData;
+ TkWindow *winPtr;
+ char c;
+ size_t length;
+ Tix_MwmInfo * wmPtr;
+
+ if (argc < 3) {
+ Tcl_AppendResult(interp, "wrong # args: should be \"",
+ argv[0], " option pathname ?arg ...?\"", (char *) NULL);
+ return TCL_ERROR;
+ }
+ c = argv[1][0];
+ length = strlen(argv[1]);
+
+ if (!(winPtr = (TkWindow *) Tk_NameToWindow(interp, argv[2], tkwin))) {
+ return TCL_ERROR;
+ }
+ if (!Tk_IsTopLevel(winPtr)) {
+ Tcl_AppendResult(interp, argv[2], " is not a toplevel window.", NULL);
+ return TCL_ERROR;
+ }
+ if (!(wmPtr=GetMwmInfo(interp, (Tk_Window) winPtr))) {
+ return TCL_ERROR;
+ }
+
+ if ((c == 'd') && (strncmp(argv[1], "decorations", length) == 0)) {
+ return SetMwmDecorations(interp, wmPtr, argc-3, argv+3);
+ }
+ else if ((c == 'i') && (strncmp(argv[1], "ismwmrunning", length) == 0)) {
+ if (IsMwmRunning(interp, wmPtr)) {
+ Tcl_AppendResult(interp, "1", NULL);
+ } else {
+ Tcl_AppendResult(interp, "0", NULL);
+ }
+ return TCL_OK;
+ }
+ else if ((c == 'p') && (strncmp(argv[1], "protocol", length) == 0)) {
+ return MwmProtocol(interp, wmPtr, argc-3, argv+3);
+ }
+ else if ((c == 't') && (strncmp(argv[1], "transientfor", length) == 0)) {
+ return SetMwmTransientFor(interp, wmPtr, winPtr, argc-3, argv+3);
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown or ambiguous option \"",
+ argv[1], "\": must be decorations, ismwmrunning, protocol ",
+ "or transientfor",
+ NULL);
+ return TCL_ERROR;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ * TixMwmProtocolHandler --
+ *
+ * A generic X event handler that handles the events from the Mwm
+ * Window manager.
+ *
+ * Results:
+ * True iff the event has been handled.
+ *
+ * Side effects:
+ * None.
+ *----------------------------------------------------------------------
+ */
+
+int
+TixMwmProtocolHandler(clientData, eventPtr)
+ ClientData clientData;
+ XEvent *eventPtr;
+{
+ TkWindow *winPtr;
+ Window handlerWindow;
+
+ if (eventPtr->type != ClientMessage) {
+ return 0;
+ }
+
+ handlerWindow = eventPtr->xany.window;
+ winPtr = (TkWindow *) Tk_IdToWindow(eventPtr->xany.display, handlerWindow);
+ if (winPtr != NULL) {
+ if (eventPtr->xclient.message_type ==
+ Tk_InternAtom((Tk_Window) winPtr,"_MOTIF_WM_MESSAGES")) {
+ TkWmProtocolEventProc(winPtr, eventPtr);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static int
+MwmDecor(interp, string)
+ Tcl_Interp * interp;
+ CONST84 char * string;
+{
+ size_t len = strlen(string);
+
+ if (strncmp(string, "-all", len) == 0) {
+ return MWM_DECOR_ALL;
+ } else if (strncmp(string, "-border", len) == 0) {
+ return MWM_DECOR_BORDER;
+ } else if (strncmp(string, "-resizeh", len) == 0) {
+ return MWM_DECOR_RESIZEH;
+ } else if (strncmp(string, "-title", len) == 0) {
+ return MWM_DECOR_TITLE;
+ } else if (strncmp(string, "-menu", len) == 0) {
+ return MWM_DECOR_MENU;
+ } else if (strncmp(string, "-minimize", len) == 0) {
+ return MWM_DECOR_MINIMIZE;
+ } else if (strncmp(string, "-maximize", len) == 0) {
+ return MWM_DECOR_MAXIMIZE;
+ } else {
+ Tcl_AppendResult(interp, "unknown decoration \"", string, "\"", NULL);
+ return -1;
+ }
+}
+
+
+static void
+QueryMwmHints(wmPtr)
+ Tix_MwmInfo * wmPtr;
+{
+ Atom actualType;
+ int actualFormat;
+ unsigned long numItems, bytesAfter;
+
+ wmPtr->prop.flags = MWM_HINTS_DECORATIONS;
+
+ if (XGetWindowProperty(Tk_Display(wmPtr->tkwin),Tk_WindowId(wmPtr->tkwin),
+ wmPtr->mwm_hints_atom, 0, PROP_MWM_HINTS_ELEMENTS,
+ False, wmPtr->mwm_hints_atom, &actualType, &actualFormat, &numItems,
+ &bytesAfter, (unsigned char **) & wmPtr->prop) == Success) {
+
+ if ((actualType != wmPtr->mwm_hints_atom) || (actualFormat != 32) ||
+ (numItems <= 0)) {
+ /* It looks like this window doesn't have a _XA_MWM_HINTS
+ * property. Let's give the default value
+ */
+ wmPtr->prop.decorations = MWM_DECOR_EVERYTHING;
+ }
+ } else {
+ /* We get an error somehow. Pretend that the decorations are all
+ */
+ wmPtr->prop.decorations = MWM_DECOR_EVERYTHING;
+ }
+}
+
+static void
+RemapWindow(clientData)
+ ClientData clientData;
+{
+ Tix_MwmInfo * wmPtr = (Tix_MwmInfo *)clientData;
+
+ Tk_UnmapWindow(wmPtr->tkwin);
+ Tk_MapWindow(wmPtr->tkwin);
+ wmPtr->isremapping = 0;
+}
+
+static void
+RemapWindowWhenIdle(wmPtr)
+ Tix_MwmInfo * wmPtr;
+{
+ if (!wmPtr->isremapping) {
+ wmPtr->isremapping = 1;
+ Tk_DoWhenIdle(RemapWindow, (ClientData)wmPtr);
+ }
+}
+
+/*
+ * SetMwmDecorations --
+ *
+ *
+ */
+static
+int SetMwmDecorations(interp, wmPtr, argc, argv)
+ Tcl_Interp *interp;
+ Tix_MwmInfo*wmPtr;
+ int argc;
+ CONST84 char ** argv;
+{
+ int i;
+ int decor;
+ char buff[40];
+
+ if (argc == 0 || argc == 1) {
+ /*
+ * Query the existing settings
+ */
+ QueryMwmHints(wmPtr);
+
+ if (argc == 0) {
+ /*
+ * Query all hints
+ */
+ sprintf(buff, "-border %d",
+ ((wmPtr->prop.decorations & MWM_DECOR_BORDER)!=0));
+ Tcl_AppendElement(interp, buff);
+
+ sprintf(buff, "-resizeh %d",
+ ((wmPtr->prop.decorations &MWM_DECOR_RESIZEH)!=0));
+ Tcl_AppendElement(interp, buff);
+
+ sprintf(buff, "-title %d",
+ ((wmPtr->prop.decorations & MWM_DECOR_TITLE)!=0));
+ Tcl_AppendElement(interp, buff);
+
+ sprintf(buff, "-menu %d",
+ ((wmPtr->prop.decorations & MWM_DECOR_MENU)!=0));
+ Tcl_AppendElement(interp, buff);
+
+ sprintf(buff, "-minimize %d",
+ ((wmPtr->prop.decorations&MWM_DECOR_MINIMIZE)!=0));
+ Tcl_AppendElement(interp, buff);
+
+ sprintf(buff, "-maximize %d",
+ ((wmPtr->prop.decorations&MWM_DECOR_MAXIMIZE)!=0));
+ Tcl_AppendElement(interp, buff);
+
+ return TCL_OK;
+ } else {
+ /*
+ * Query only one hint
+ */
+ if ((decor = MwmDecor(interp, argv[0])) == MWM_DECOR_UNKNOWN) {
+ return TCL_ERROR;
+ }
+
+ if (wmPtr->prop.decorations & decor) {
+ Tcl_AppendResult(interp, "1", NULL);
+ } else {
+ Tcl_AppendResult(interp, "0", NULL);
+ }
+ return TCL_OK;
+ }
+ } else {
+ if (argc %2) {
+ Tcl_AppendResult(interp, "value missing for option \"",
+ argv[argc-1], "\"", NULL);
+ return TCL_ERROR;
+ }
+
+ for (i=0; i<argc; i+=2) {
+ int value;
+
+ if ((decor = MwmDecor(interp, argv[i])) == MWM_DECOR_UNKNOWN) {
+ return TCL_ERROR;
+ }
+
+ if (Tcl_GetBoolean(interp, argv[i+1], &value) != TCL_OK) {
+ return TCL_ERROR;
+ }
+
+ if (value) {
+ wmPtr->prop.decorations |= decor;
+ }
+ else {
+ wmPtr->prop.decorations &= ~decor;
+ }
+
+ if (decor == MWM_DECOR_ALL) {
+ if (value) {
+ wmPtr->prop.decorations |= MWM_DECOR_EVERYTHING;
+ } else {
+ wmPtr->prop.decorations &= ~MWM_DECOR_EVERYTHING;
+ }
+ }
+ }
+
+ wmPtr->prop.flags = MWM_HINTS_DECORATIONS;
+ XChangeProperty(Tk_Display(wmPtr->tkwin), Tk_WindowId(wmPtr->tkwin),
+ wmPtr->mwm_hints_atom, wmPtr->mwm_hints_atom, 32, PropModeReplace,
+ (unsigned char *) &wmPtr->prop, PROP_MWM_HINTS_ELEMENTS);
+
+ if (Tk_IsMapped(wmPtr->tkwin)) {
+ /* Needs unmap/map to refresh */
+ RemapWindowWhenIdle(wmPtr);
+ }
+ return TCL_OK;
+ }
+}
+
+static int MwmProtocol(interp, wmPtr, argc, argv)
+ Tcl_Interp * interp;
+ Tix_MwmInfo * wmPtr;
+ int argc;
+ CONST84 char ** argv;
+{
+ size_t len;
+
+ if (argc == 0) {
+ Tcl_HashSearch hSearch;
+ Tcl_HashEntry * hashPtr;
+ Tix_MwmProtocol * ptPtr;
+
+ /* Iterate over all the entries in the hash table */
+ for (hashPtr = Tcl_FirstHashEntry(&wmPtr->protocols, &hSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hSearch)) {
+
+ ptPtr = (Tix_MwmProtocol *)Tcl_GetHashValue(hashPtr);
+ Tcl_AppendElement(interp, ptPtr->name);
+ }
+ return TCL_OK;
+ }
+
+ len = strlen(argv[0]);
+ if (strncmp(argv[0], "add", len) == 0 && argc == 3) {
+ AddMwmProtocol(interp, wmPtr, argv[1], argv[2]);
+ }
+ else if (strncmp(argv[0], "activate", len) == 0 && argc == 2) {
+ ActivateMwmProtocol(interp, wmPtr, argv[1]);
+ }
+ else if (strncmp(argv[0], "deactivate", len) == 0 && argc == 2) {
+ DeactivateMwmProtocol(interp, wmPtr, argv[1]);
+ }
+ else if (strncmp(argv[0], "delete", len) == 0 && argc == 2) {
+ DeleteMwmProtocol(interp, wmPtr, argv[1]);
+ }
+ else {
+ Tcl_AppendResult(interp, "unknown option \"", argv[0],
+ "\" should be add, activate, deactivate or delete", NULL);
+ return TCL_ERROR;
+ }
+
+ return TCL_OK;
+}
+
+
+static void AddMwmProtocol(interp, wmPtr, name, message)
+ Tcl_Interp *interp;
+ Tix_MwmInfo *wmPtr;
+ CONST84 char * name;
+ CONST84 char * message;
+{
+ Atom protocol;
+ Tix_MwmProtocol *ptPtr;
+
+ protocol = Tk_InternAtom(wmPtr->tkwin, name);
+ ptPtr = GetMwmProtocol(interp, wmPtr, protocol);
+
+ if (ptPtr->menuMessage != NULL) {
+ /* This may happen if "protocol add" called twice for the same name */
+ ckfree(ptPtr->menuMessage);
+ }
+
+ if (ptPtr->name == NULL) {
+ ptPtr->name = tixStrDup(name);
+ }
+ ptPtr->menuMessage = tixStrDup(message);
+ ptPtr->messageLen = strlen(message);
+ ptPtr->active = 1;
+
+ ResetProtocolsWhenIdle(wmPtr);
+}
+
+static void ActivateMwmProtocol(interp, wmPtr, name)
+ Tcl_Interp *interp;
+ Tix_MwmInfo *wmPtr;
+ CONST84 char * name;
+{
+ Atom protocol;
+ Tix_MwmProtocol *ptPtr;
+
+ protocol = Tk_InternAtom(wmPtr->tkwin, name);
+ ptPtr = GetMwmProtocol(interp, wmPtr, protocol);
+ ptPtr->active = 1;
+
+ ResetProtocolsWhenIdle(wmPtr);
+}
+
+static void DeactivateMwmProtocol(interp, wmPtr, name)
+ Tcl_Interp *interp;
+ Tix_MwmInfo *wmPtr;
+ CONST84 char * name;
+{
+ Atom protocol;
+ Tix_MwmProtocol *ptPtr;
+
+ protocol = Tk_InternAtom(wmPtr->tkwin, name);
+ ptPtr = GetMwmProtocol(interp, wmPtr, protocol);
+ ptPtr->active = 0;
+
+ ResetProtocolsWhenIdle(wmPtr);
+}
+
+/*
+ * Any "wm protocol" event handlers for the deleted protocol are
+ * *not* automatically deleted. It is the application programmer's
+ * responsibility to delete them using
+ *
+ * wm protocol SOME_JUNK_PROTOCOL {}
+ */
+static void DeleteMwmProtocol(interp, wmPtr, name)
+ Tcl_Interp *interp;
+ Tix_MwmInfo *wmPtr;
+ CONST84 char * name;
+{
+ Atom protocol;
+ Tix_MwmProtocol *ptPtr;
+ Tcl_HashEntry * hashPtr;
+
+ protocol = Tk_InternAtom(wmPtr->tkwin, name);
+ hashPtr = Tcl_FindHashEntry(&wmPtr->protocols, (char*)protocol);
+
+ if (hashPtr) {
+ ptPtr = (Tix_MwmProtocol *)Tcl_GetHashValue(hashPtr);
+ ckfree(ptPtr->name);
+ ckfree(ptPtr->menuMessage);
+ ckfree((char*)ptPtr);
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+
+ ResetProtocolsWhenIdle(wmPtr);
+}
+
+
+static void
+ResetProtocolsWhenIdle(wmPtr)
+ Tix_MwmInfo * wmPtr;
+{
+ if (!wmPtr->resetProtocol) {
+ wmPtr->resetProtocol = 1;
+ Tk_DoWhenIdle(ResetProtocols, (ClientData)wmPtr);
+ }
+}
+
+static void ResetProtocols(clientData)
+ ClientData clientData;
+{
+ Tix_MwmInfo * wmPtr = (Tix_MwmInfo *) clientData;
+ int numProtocols = wmPtr->protocols.numEntries;
+ Atom * atoms, mwm_menu_atom, motif_msgs;
+ Tcl_HashSearch hSearch;
+ Tcl_HashEntry * hashPtr;
+ Tix_MwmProtocol * ptPtr;
+ int n;
+ Tcl_DString dString;
+
+ atoms = (Atom*)ckalloc(numProtocols * sizeof(Atom));
+ Tcl_DStringInit(&dString);
+
+ /* Iterate over all the entries in the hash table */
+ for (hashPtr = Tcl_FirstHashEntry(&wmPtr->protocols, &hSearch), n=0;
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hSearch)) {
+ char tmp[100];
+
+ ptPtr = (Tix_MwmProtocol *)Tcl_GetHashValue(hashPtr);
+ if (ptPtr->active) {
+ atoms[n++] = ptPtr->protocol;
+ }
+
+ Tcl_DStringAppend(&dString, ptPtr->menuMessage, (int)ptPtr->messageLen);
+ sprintf(tmp, " f.send_msg %d\n", (int)(ptPtr->protocol));
+ Tcl_DStringAppend(&dString, tmp, (int)strlen(tmp));
+ }
+
+ /* Atoms for managing the MWM messages */
+ mwm_menu_atom = Tk_InternAtom(wmPtr->tkwin, _XA_MWM_MENU);
+ motif_msgs = Tk_InternAtom(wmPtr->tkwin, "_MOTIF_WM_MESSAGES");
+
+ /* The _MOTIF_WM_MESSAGES atom must be in the wm_protocols. Otherwise
+ * Mwm refuese to enable our menu items
+ */
+ if (!wmPtr->addedMwmMsg) {
+ Tix_GlobalVarEval(wmPtr->interp, "wm protocol ",
+ Tk_PathName(wmPtr->tkwin), " _MOTIF_WM_MESSAGES {;}", NULL);
+ wmPtr->addedMwmMsg = 1;
+ }
+
+ /*
+ * These are the extra MWM protocols defined by this application.
+ */
+ XChangeProperty(Tk_Display(wmPtr->tkwin), Tk_WindowId(wmPtr->tkwin),
+ motif_msgs, XA_ATOM, 32, PropModeReplace,
+ (unsigned char *)atoms, n);
+
+ /*
+ * Update the MWM menu items
+ */
+ XChangeProperty(Tk_Display(wmPtr->tkwin), Tk_WindowId(wmPtr->tkwin),
+ mwm_menu_atom, mwm_menu_atom, 8, PropModeReplace,
+ (unsigned char *)dString.string, dString.length+1);
+
+ Tcl_DStringFree(&dString);
+ ckfree((char*)atoms);
+
+ /* Done ! */
+ wmPtr->resetProtocol = 0;
+ if (Tk_IsMapped(wmPtr->tkwin)) {
+ /* Needs unmap/map to refresh */
+ RemapWindowWhenIdle(wmPtr);
+ }
+}
+
+
+static
+int SetMwmTransientFor(interp, wmPtr, mainWindow, argc, argv)
+ Tcl_Interp *interp;
+ Tix_MwmInfo*wmPtr;
+ TkWindow *mainWindow;
+ int argc;
+ CONST84 char ** argv;
+{
+ Atom transfor_atom;
+ TkWindow * master;
+
+ transfor_atom = Tk_InternAtom(wmPtr->tkwin, "WM_TRANSIENT_FOR");
+ if (argc == 0) {
+ return TCL_OK;
+ } else if (argc == 1) {
+ master = (TkWindow *) Tk_NameToWindow(interp, argv[0],
+ (Tk_Window)mainWindow);
+ if (master == NULL) {
+ return TCL_ERROR;
+ }
+ XChangeProperty(Tk_Display(wmPtr->tkwin), Tk_WindowId(wmPtr->tkwin),
+ transfor_atom, XA_WINDOW, 32, PropModeReplace,
+ (unsigned char *)&master->window, 1);
+ return TCL_OK;
+ } else {
+ return TCL_ERROR;
+ }
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * StructureProc --
+ *
+ * Gets called in response to StructureNotify events in toplevels
+ * operated by the tixMwm command.
+ *
+ * Results:
+ * none
+ *
+ * Side effects:
+ * The Tix_MwmInfo for the toplevel is deleted when the toplevel
+ * is destroyed.
+ *
+ *----------------------------------------------------------------------
+ */
+static void
+StructureProc(clientData, eventPtr)
+ ClientData clientData; /* Our information about window
+ * referred to by eventPtr. */
+ XEvent *eventPtr; /* Describes what just happened. */
+{
+ register Tix_MwmInfo * wmPtr = (Tix_MwmInfo *) clientData;
+ Tcl_HashEntry *hashPtr;
+
+ if (eventPtr->type == DestroyNotify) {
+ Tcl_HashSearch hSearch;
+ Tix_MwmProtocol * ptPtr;
+
+ /* Delete all protocols in the hash table associated with
+ * this toplevel
+ */
+ for (hashPtr = Tcl_FirstHashEntry(&wmPtr->protocols, &hSearch);
+ hashPtr;
+ hashPtr = Tcl_NextHashEntry(&hSearch)) {
+
+ ptPtr = (Tix_MwmProtocol *)Tcl_GetHashValue(hashPtr);
+ ckfree(ptPtr->name);
+ ckfree(ptPtr->menuMessage);
+ ckfree((char*)ptPtr);
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+
+ Tcl_DeleteHashTable(&wmPtr->protocols);
+
+ /*
+ * Delete info about this toplevel in the table of all toplevels
+ * controlled by tixMwm
+ */
+ hashPtr = Tcl_FindHashEntry(&mwmTable, (char*)wmPtr->tkwin);
+ if (hashPtr != NULL) {
+ Tcl_DeleteHashEntry(hashPtr);
+ }
+
+ if (wmPtr->resetProtocol) {
+ Tk_CancelIdleCall(ResetProtocols, (ClientData)wmPtr);
+ wmPtr->resetProtocol = 0;
+ }
+
+ ckfree((char*)wmPtr);
+ }
+}
+
+static Tix_MwmInfo *
+GetMwmInfo(interp, tkwin)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+{
+ static inited = 0;
+ Tcl_HashEntry *hashPtr;
+ int isNew;
+
+ if (!inited) {
+ Tcl_InitHashTable(&mwmTable, TCL_ONE_WORD_KEYS);
+ inited = 1;
+ }
+
+ hashPtr = Tcl_CreateHashEntry(&mwmTable, (char*)tkwin, &isNew);
+
+ if (!isNew) {
+ return (Tix_MwmInfo *)Tcl_GetHashValue(hashPtr);
+ }
+ else {
+ Tix_MwmInfo * wmPtr;
+
+ wmPtr = (Tix_MwmInfo*) ckalloc(sizeof(Tix_MwmInfo));
+ wmPtr->interp = interp;
+ wmPtr->tkwin = tkwin;
+ wmPtr->isremapping = 0;
+ wmPtr->resetProtocol = 0;
+ wmPtr->addedMwmMsg = 0;
+ if (Tk_WindowId(wmPtr->tkwin) == 0) {
+ Tk_MakeWindowExist(wmPtr->tkwin);
+ }
+ wmPtr->mwm_hints_atom = Tk_InternAtom(wmPtr->tkwin, _XA_MWM_HINTS);
+
+ Tcl_InitHashTable(&wmPtr->protocols, TCL_ONE_WORD_KEYS);
+
+ QueryMwmHints(wmPtr);
+
+ Tcl_SetHashValue(hashPtr, (char*)wmPtr);
+
+ Tk_CreateEventHandler(tkwin, StructureNotifyMask,
+ StructureProc, (ClientData)wmPtr);
+
+ return wmPtr;
+ }
+}
+
+static Tix_MwmProtocol *
+GetMwmProtocol(interp, wmPtr, protocol)
+ Tcl_Interp * interp;
+ Tix_MwmInfo * wmPtr;
+ Atom protocol;
+{
+ Tcl_HashEntry * hashPtr;
+ int isNew;
+ Tix_MwmProtocol * ptPtr;
+
+ hashPtr = Tcl_CreateHashEntry(&wmPtr->protocols, (char*)protocol, &isNew);
+ if (!isNew) {
+ ptPtr = (Tix_MwmProtocol *)Tcl_GetHashValue(hashPtr);
+ } else {
+ ptPtr = (Tix_MwmProtocol *)ckalloc(sizeof(Tix_MwmProtocol));
+
+ ptPtr->protocol = protocol;
+ ptPtr->name = NULL;
+ ptPtr->menuMessage = NULL;
+
+ Tcl_SetHashValue(hashPtr, (char*)ptPtr);
+ }
+
+ return ptPtr;
+}
+
+
+static int
+IsMwmRunning(interp, wmPtr)
+ Tcl_Interp *interp;
+ Tix_MwmInfo*wmPtr;
+{
+ Atom motif_wm_info_atom;
+ Atom actual_type;
+ int actual_format;
+ unsigned long num_items, bytes_after;
+ PropMotifWmInfo *prop = 0;
+ Window root;
+
+ root = XRootWindow(Tk_Display(wmPtr->tkwin),Tk_ScreenNumber(wmPtr->tkwin));
+ motif_wm_info_atom = Tk_InternAtom(wmPtr->tkwin, _XA_MOTIF_WM_INFO);
+
+ /*
+ * If mwm is running, it will store info in the _XA_MOTIF_WM_INFO
+ * atom in the root window
+ */
+ XGetWindowProperty (Tk_Display(wmPtr->tkwin),
+ root, motif_wm_info_atom, 0, (long)PROP_MOTIF_WM_INFO_ELEMENTS,
+ 0, motif_wm_info_atom, &actual_type, &actual_format,
+ &num_items, &bytes_after, (unsigned char **) &prop);
+
+ if ((actual_type != motif_wm_info_atom) || (actual_format != 32) ||
+ (num_items < PROP_MOTIF_WM_INFO_ELEMENTS)) {
+
+ /*
+ * The _XA_MOTIF_WM_INFO doesn't exist for the root window.
+ * Persumably Mwm is not running.
+ */
+ if (prop) {
+ XFree((char *)prop);
+ }
+ return(0);
+ }
+ else {
+ /*
+ * We still need to verify that the wm_window is indeed a child of
+ * the root window.
+ */
+ Window wm_window = (Window) prop->wmWindow;
+ Window top, parent, *children;
+ unsigned int num_children, i;
+ int returnVal = 0;
+
+ if (XQueryTree(Tk_Display(wmPtr->tkwin), root, &top, &parent,
+ &children, &num_children)) {
+
+ for (returnVal = 0, i = 0; i < num_children; i++) {
+ if (children[i] == wm_window) {
+ /*
+ * is indeed a window of this root: mwm is rinning
+ */
+ returnVal = 1;
+ break;
+ }
+ }
+ }
+
+ if (prop) {
+ XFree((char *)prop);
+ }
+ if (children) {
+ XFree((char *)children);
+ }
+
+ return (returnVal);
+ }
+}
+#endif
Added: external/tix-8.4.2.x/unix/tixUnixPort.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixPort.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+
+/* $Id: tixUnixPort.h,v 1.3 2005/03/25 20:15:53 hobbs Exp $ */
+
+/*
+ * tixUnixPort.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_UNIXPORT_H_
+#define _TIX_UNIXPORT_H_
+
+struct _TixpSubRegion {
+#ifdef MAC_OSX_TK
+ Pixmap pixmap;
+ int x, y;
+#endif
+ XRectangle rect;
+ int rectUsed;
+ int origX;
+ int origY;
+};
+
+#ifdef UCHAR_SUPPORTED
+typedef unsigned char UNSIGNED_CHAR;
+#else
+typedef char UNSIGNED_CHAR;
+#endif
+
+#endif /* _TIX_UNIXPORT_H_ */
Added: external/tix-8.4.2.x/unix/tixUnixWm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixWm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,61 @@
+
+/* $Id: tixUnixWm.c,v 1.2 2005/03/25 20:15:53 hobbs Exp $ */
+
+/*
+ * tixUnixWm.c --
+ *
+ * Implement the Windows specific function calls for window management.
+ *
+ * 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.
+ *
+ */
+
+#include "tixUnixInt.h"
+
+int
+TixpSetWindowParent(interp, tkwin, newParent, parentId)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ Tk_Window newParent;
+ int parentId;
+{
+ return TCL_OK;
+}
+
+#ifdef MAC_OSX_TK
+#include "tkInt.h"
+/*
+ *----------------------------------------------------------------------
+ *
+ * XLowerWindow --
+ *
+ * Change the stacking order of a window.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * Changes the stacking order of the specified window.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+XLowerWindow(
+ Display* display, /* Display. */
+ Window window) /* Window. */
+{
+ TkWindow *winPtr = *((TkWindow **) window);
+
+ display->request++;
+ if (Tk_IsTopLevel(winPtr) && !Tk_IsEmbedded(winPtr)) {
+ TkWmRestackToplevel(winPtr, Below, NULL);
+ } else {
+ /* TODO: this should generate damage */
+ }
+ return 0;
+}
+#endif
Added: external/tix-8.4.2.x/unix/tixUnixXpm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/unix/tixUnixXpm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,313 @@
+
+/* $Id: tixUnixXpm.c,v 1.4 2006/11/15 22:18:36 hobbs Exp $ */
+
+/*
+ * tixUnixImgXpm.c --
+ *
+ * Implement the Windows specific function calls for the pixmap
+ * image type.
+ *
+ * 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.
+ *
+ */
+
+#include <tixPort.h>
+#include <tixUnixInt.h>
+#include <tixImgXpm.h>
+#include <X11/Xutil.h>
+
+#if !defined(WIN32) && !defined(MAC_OSX_TK)
+#define TkPutImage(colors, ncolors, display, pixels, gc, image, destx, desty, srcx, srcy, width, height) \
+ XPutImage(display, pixels, gc, image, destx, desty, srcx, \
+ srcy, width, height);
+#endif
+
+typedef struct PixmapData {
+ Pixmap mask; /* Mask: only display pixmap pixels where
+ * there are 1's here. */
+ GC gc; /* Graphics context for displaying pixmap.
+ * None means there was an error while
+ * setting up the instance, so it cannot
+ * be displayed. */
+} PixmapData;
+
+
+/*----------------------------------------------------------------------
+ * TixpInitPixmapInstance --
+ *
+ * Initializes the platform-specific data of a pixmap instance
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpInitPixmapInstance(masterPtr, instancePtr)
+ PixmapMaster *masterPtr; /* Pointer to master for image. */
+ PixmapInstance *instancePtr;/* The pixmap instance. */
+{
+ PixmapData * dataPtr;
+
+ dataPtr = (PixmapData *)ckalloc(sizeof(PixmapData));
+ dataPtr->mask = None;
+ dataPtr->gc = None;
+
+ instancePtr->clientData = (ClientData)dataPtr;
+}
+
+#ifdef MAC_OSX_TK
+static int
+MacPutPixel(image, x, y, pixel)
+ XImage *image;
+ int x, y;
+ unsigned long pixel;
+{
+ unsigned char *destPtr = &(image->data[(y * image->bytes_per_line)
+ + ((x * image->bits_per_pixel) / NBBY)]);
+ int i=0;
+
+ switch (image->bits_per_pixel) {
+ case 32:
+
+ destPtr[i++] = 0;
+ case 24:
+
+ destPtr[i++] = (unsigned char) ((pixel >> 16) & 0xff);
+ destPtr[i++] = (unsigned char) ((pixel >> 8) & 0xff);
+ destPtr[i++] = (unsigned char) (pixel & 0xff);
+ break;
+ }
+ return 0;
+}
+#endif
+/*----------------------------------------------------------------------
+ * TixpXpmAllocTmpBuffer --
+ *
+ * Allocate a temporary space to draw the image.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpXpmAllocTmpBuffer(masterPtr, instancePtr, imagePtr, maskPtr)
+ PixmapMaster * masterPtr;
+ PixmapInstance * instancePtr;
+ XImage ** imagePtr;
+ XImage ** maskPtr;
+{
+ int pad;
+ XImage * image = NULL, * mask = NULL;
+ Display *display = Tk_Display(instancePtr->tkwin);
+ int depth;
+
+ depth = Tk_Depth(instancePtr->tkwin);
+
+ if (depth > 16) {
+ pad = 32;
+ } else if (depth > 8) {
+ pad = 16;
+ } else {
+ pad = 8;
+ }
+
+ /*
+ * Create the XImage structures to store the temporary image
+ */
+ image = XCreateImage(display, Tk_Visual(instancePtr->tkwin),
+ (unsigned) depth, ZPixmap, 0, 0,
+ (unsigned) masterPtr->size[0], (unsigned) masterPtr->size[1],
+ pad, 0);
+ image->data =
+ (char *)ckalloc((unsigned) image->bytes_per_line * masterPtr->size[1]);
+#ifdef MAC_OSX_TK
+ image->f.put_pixel = MacPutPixel;
+#endif
+
+ mask = XCreateImage(display, Tk_Visual(instancePtr->tkwin),
+ 1, XYPixmap, 0, 0,
+ (unsigned) masterPtr->size[0], (unsigned) masterPtr->size[1],
+ pad, 0);
+
+ mask->data =
+ (char *)ckalloc((unsigned) mask->bytes_per_line * masterPtr->size[1]);
+#ifdef MAC_OSX_TK
+ mask->f.put_pixel = MacPutPixel;
+#endif
+
+ *imagePtr = image;
+ *maskPtr = mask;
+}
+
+void
+TixpXpmFreeTmpBuffer(masterPtr, instancePtr, image, mask)
+ PixmapMaster * masterPtr;
+ PixmapInstance * instancePtr;
+ XImage * image;
+ XImage * mask;
+{
+ if (image) {
+ ckfree((char*)image->data);
+ image->data = NULL;
+ XDestroyImage(image);
+ }
+ if (mask) {
+ ckfree((char*)mask->data);
+ mask->data = NULL;
+ XDestroyImage(mask);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpXpmSetPixel --
+ *
+ * Sets the pixel at the given (x,y) coordinate to be the given
+ * color.
+ *----------------------------------------------------------------------
+ */
+void
+TixpXpmSetPixel(instancePtr, image, mask, x, y, colorPtr, isTranspPtr)
+ PixmapInstance * instancePtr;
+ XImage * image;
+ XImage * mask;
+ int x;
+ int y;
+ XColor * colorPtr;
+ int * isTranspPtr;
+{
+ if (colorPtr != NULL) {
+ XPutPixel(image, x, y, colorPtr->pixel);
+ XPutPixel(mask, x, y, 1);
+ } else {
+ XPutPixel(mask, x, y, 0);
+ *isTranspPtr = 1;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpXpmRealizePixmap --
+ *
+ * On Unix: Create the pixmap from the buffer.
+ * On Windows: Free the mask if there are no transparent pixels.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpXpmRealizePixmap(masterPtr, instancePtr, image, mask, isTransp)
+ PixmapMaster * masterPtr;
+ PixmapInstance * instancePtr;
+ XImage * image;
+ XImage * mask;
+ int isTransp;
+{
+ Display *display = Tk_Display(instancePtr->tkwin);
+ int depth = Tk_Depth(instancePtr->tkwin);
+ PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
+ unsigned int gcMask;
+ XGCValues gcValues;
+ GC gc;
+
+ instancePtr->pixmap = Tk_GetPixmap(display,
+ Tk_WindowId(instancePtr->tkwin),
+ masterPtr->size[0], masterPtr->size[1], depth);
+
+ gc = Tk_GetGC(instancePtr->tkwin, 0, NULL);
+
+ TkPutImage(0, 0, display, instancePtr->pixmap,
+ gc, image, 0, 0, 0, 0,
+ (unsigned) masterPtr->size[0], (unsigned) masterPtr->size[1]);
+
+ Tk_FreeGC(display, gc);
+
+ if (isTransp) {
+ /*
+ * There are transparent pixels. We need a mask.
+ */
+ dataPtr->mask = Tk_GetPixmap(display,
+ Tk_WindowId(instancePtr->tkwin),
+ masterPtr->size[0], masterPtr->size[1], 1);
+ gc = XCreateGC(display, dataPtr->mask, 0, NULL);
+ TkPutImage(0, 0, display, dataPtr->mask,
+ gc, mask, 0, 0, 0, 0,
+ (unsigned) masterPtr->size[0], (unsigned) masterPtr->size[1]);
+ XFreeGC(display, gc);
+ } else {
+ dataPtr->mask = None;
+ }
+
+ /*
+ * Allocate a GC for drawing this instance (mask is not used if there
+ * is no transparent pixels inside the image).
+ */
+ if (dataPtr->mask != None) {
+ gcMask = GCGraphicsExposures|GCClipMask;
+ } else {
+ gcMask = GCGraphicsExposures;
+ }
+ gcValues.graphics_exposures = False;
+ gcValues.clip_mask = dataPtr->mask;
+
+ gc = Tk_GetGC(instancePtr->tkwin, gcMask, &gcValues);
+ dataPtr->gc = gc;
+}
+
+void
+TixpXpmFreeInstanceData(instancePtr, delete, display)
+ PixmapInstance *instancePtr;/* Pixmap instance. */
+ int delete; /* Should the instance data structure
+ * be deleted as well? */
+ Display *display; /* Display containing window that used image.*/
+{
+ PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
+
+ if (dataPtr->mask != None) {
+ Tk_FreePixmap(display, dataPtr->mask);
+ dataPtr->mask = None;
+ }
+ if (dataPtr->gc != None) {
+ Tk_FreeGC(display, dataPtr->gc);
+ dataPtr->gc = None;
+ }
+ if (delete) {
+ ckfree((char*)dataPtr);
+ instancePtr->clientData = NULL;
+ }
+}
+
+void
+TixpXpmDisplay(clientData, display, drawable, imageX, imageY, width,
+ height, drawableX, drawableY)
+ ClientData clientData; /* Pointer to PixmapInstance structure for
+ * for instance to be displayed. */
+ Display *display; /* Display on which to draw image. */
+ Drawable drawable; /* Pixmap or window in which to draw image. */
+ int imageX, imageY; /* Upper-left corner of region within image
+ * to draw. */
+ int width, height; /* Dimensions of region within image to draw.*/
+ int drawableX, drawableY; /* Coordinates within drawable that
+ * correspond to imageX and imageY. */
+{
+ PixmapInstance *instancePtr = (PixmapInstance *) clientData;
+ PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
+
+ /*
+ * If there's no graphics context, it means that an error occurred
+ * while creating the image instance so it can't be displayed.
+ */
+ if (dataPtr->gc == None) {
+ return;
+ }
+
+ /*
+ * We always use clipping: modify the clip origin within
+ * the graphics context to line up with the image's origin.
+ * Then draw the image and reset the clip origin.
+ */
+ XSetClipOrigin(display, dataPtr->gc, drawableX - imageX,
+ drawableY - imageY);
+ XCopyArea(display, instancePtr->pixmap, drawable, dataPtr->gc,
+ imageX, imageY, (unsigned) width, (unsigned) height,
+ drawableX, drawableY);
+ XSetClipOrigin(display, dataPtr->gc, 0, 0);
+}
Added: external/tix-8.4.2.x/win/README.txt
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/README.txt Tue Mar 18 19:38:59 2008
@@ -0,0 +1,130 @@
+RCS $Id: README.txt,v 1.7 2004/10/02 01:25:52 hobbs Exp $
+
+ --- Build Tix binaries for the Win32 platform ---
+
+Before you start
+================
+
+ If you are not familiar with Windows or do not have a working
+ win32 compiler, you can download a Tix windows binary from
+
+ http://tix.sourceforge.net/
+
+ This site also has more information in case you get stuck, such as
+ who to contact for questions.
+
+Required Tcl/Tk versions
+========================
+
+ You need Tcl/Tk 8.2 or later. Prior versions are no longer
+ supported. Tcl 8.4 is the recommended version.
+
+Supported Compilers
+===================
+
+ * MSVC++ 6: use makefile.vc
+ * cygwin + mingw/gcc | MSVC: use ../configure
+
+ If you don't want to pay for the VC++ compiler, you can get Cygwin
+ from http://www.cygwin.com/. mingw/gcc is the recommended Windows
+ gcc variant.
+
+ No other compilers are currently supported.
+ Please post your patches to http://tix.sourceforge.net.
+
+Customizing your build
+======================
+
+ The recommended method of customizing your build is to create a file
+ called "Makefile" in this directory. Set the MAKE variables that you
+ want to modify. Then, include the makefile.vc.
+
+ You can look at the top of the makefile for the variables that you can
+ modify.
+
+ For example, if you use VC++, and you want to change the version
+ of Tcl/Tk to build with, create a Makefile like this:
+
+ ------------------------------------------------------------------
+ # My own makefile ...
+ TCL_MAJOR = 8
+ TCL_MINOR = 4
+ TCL_PATCH = 7
+ !include "makefile.vc"
+ ------------------------------------------------------------------
+
+ The advantage of this method is you can reuse your customization
+ Makefile across different Tix source releases without doing the
+ same modifications again and again.
+
+Building the binaries
+=====================
+
+ + First, you need to download the Tcl/Tk sources and install them to
+ along with Tix inside the same directory. You can download Tcl/Tk from
+
+ http://www.tcl.tk/
+
+ + If you use VC++: build both Tcl and Tk using the win/makefile.vc
+ files that come with Tcl and Tk.
+
+ + If you use Cygwin, download the Tcl binary distribution of the
+ same version as the Tcl/Tk sources from
+ http://www.tcl.tk/ and install it on your PC.
+
+ + Create the customization Makefile for Tix as mentioned above.
+
+ + Execute your favorite MAKE program in this directory.
+ E.g., if you use VC++:
+
+ cd win
+ nmake
+
+ If you use Cygwin:
+
+ cd win
+ make
+
+ This should produce various .DLL and .EXE files in the Release or
+ Debug subdirectories.
+
+Testing your build
+==================
+
+ Run the following command in this directory to run the Tix
+ regression test suite.
+
+ nmake test -- with VC++, or
+ make test -- with Cygwin
+
+ Run the following command in this directory to run the Tix
+ widget demos.
+
+ nmake rundemos -- with VC++, or
+ make rundemos -- with Cygwin
+
+
+Installing Tix
+==============
+
+ The makefiles in this directory has a crude method of installing
+ Tix on your local machine. E.g.,
+
+ nmake install
+
+ The default installation directory is C:\Tcl. You can customize this
+ location by setting the INSTALL_DIR variable in your customization
+ Makefile.
+
+ Nevertheless, if you're planning a wide distribution of Tix across
+ many PC's, you probably need to create an installer program or use
+ more advanced administrator tools.
+
+Using Tix in your Tcl scripts
+=============================
+
+ Once Tix is installed properly on your machine, simple execute the
+ "package require Tix" command in your Tcl scripts to access the
+ Tix features.
+
+ See the file ../demos/widget for examples.
Added: external/tix-8.4.2.x/win/example.vc6
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/example.vc6 Tue Mar 18 19:38:59 2008
@@ -0,0 +1,38 @@
+
+# Where the Tcl and Tk. They must be in the same directory
+# If you want to run "nmake tests", this *must* be an absolute filename.
+
+SRC_ROOT = ..\..
+
+# Set the TCL version. The TK version are assumed to be equal. The default
+# is 8.4.7.
+
+TCL_MAJOR = 8
+TCL_MINOR = 4
+TCL_PATCH = 7
+
+# Uncomment the following if you had compiled Tcl with debugging symbols
+#TCL_DBGX = d
+
+# Uncomment the following if you had compiled Tk with debugging symbols
+#TK_DBGX = d
+
+# Comment this out if you don't want to compile with stubs
+USESTUBS = 1
+
+# Comment this out if you want to compile with debugging symbols
+NODEBUG = 1
+
+# Where to install Tix. By default it installs at the default Tcl
+# installation directory C:\Tcl
+INSTALL_DIR = C:\Progra~1\Tcl
+
+# TOOLS32 = location of VC++ 32-bit development tools.
+# TOOLS32_rc = location of VC++ rc program
+#
+# Visual C++ 6.0
+#
+TOOLS32 = c:\Program Files\Microsoft Visual Studio\VC98
+TOOLS32_rc = c:\Program Files\Microsoft Visual Studio\Common\MSDev98
+
+!include "makefile.vc"
Added: external/tix-8.4.2.x/win/make_pkgIndex.tcl
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/make_pkgIndex.tcl Tue Mar 18 19:38:59 2008
@@ -0,0 +1,27 @@
+# make_pkgIndex.tcl
+#
+# Creates a pkgIndex.tcl file for in the Windows installation
+# directory
+#
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and redistribution
+# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#
+# $Id: make_pkgIndex.tcl,v 1.3 2006/04/11 19:19:28 hobbs Exp $
+
+if {[llength $argv] != 3} {
+ puts "usage: $argv0 <pkgIndex.tcl> <tix dll name> <tix version>"
+ exit -1
+}
+
+set fd [open [lindex $argv 0] {WRONLY TRUNC CREAT}]
+puts -nonewline $fd "package ifneeded Tix [lindex $argv 2] "
+puts -nonewline $fd "\[list load \"\[file join \[file dirname "
+puts -nonewline $fd "\[file dirname \$dir\]\] bin "
+puts -nonewline $fd "[file tail [lindex $argv 1]]\]\" Tix\]"
+puts $fd ""
+puts -nonewline $fd "package ifneeded wm_default 1.0 "
+puts -nonewline $fd "\[list source \[file join \$dir pref WmDefault.tcl\]\]"
+puts $fd ""
+close $fd
Added: external/tix-8.4.2.x/win/makefile.vc
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/makefile.vc Tue Mar 18 19:38:59 2008
@@ -0,0 +1,445 @@
+# -*- mode: makefile; fill-column: 75; tab-width: 8; coding: iso-latin-1-dos -*-
+# $Id: makefile.vc,v 1.20 2006/11/16 22:33:32 hobbs Exp $
+#
+#----------------------------------------------------------------------
+# makefile.vc --
+#
+# Visual C++ 6.0 makefile for Tix.
+#
+# This makefile builds the Tix DLL and EXE files. You can also
+# use this makefile to install Tix in your local machine (see
+# common.mak) for details.
+#
+# This makefile requires Tcl/Tk versions 8.2 or later.
+#
+# Copyright (c) 1993-1999 Ioi Kim Lam.
+# Copyright (c) 2000-2001 Tix Project Group.
+#
+# See the file "license.terms" for information on usage and
+# redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+#----------------------------------------------------------------------
+
+#
+# XXX makefile.vc no longer maintained - it *may* work ... or not
+# XXX use the toplevel configure/make with msys or cygwin on Windows
+#
+
+######################################################################
+# Customization section:
+#
+# Normally you shouldn't modify this file directory to customize
+# the make procedure. See README.txt in this directory for a better
+# way.
+#
+######################################################################
+
+# Where the Tcl and Tk. They must be in the same directory
+
+!IFNDEF SRC_ROOT
+SRC_ROOT = ..\..
+!ENDIF
+
+# Set the TCL version. The TK version are assumed to be equal. The default
+# is 8.3.3.
+
+!IFNDEF TCL_MAJOR
+TCL_MAJOR = 8
+!ENDIF
+!IFNDEF TCL_MINOR
+TCL_MINOR = 4
+!ENDIF
+!IFNDEF TCL_PATCH
+TCL_PATCH = 7
+!ENDIF
+
+TK_MAJOR = $(TCL_MAJOR)
+TK_MINOR = $(TCL_MINOR)
+TK_PATCH = $(TCL_PATCH)
+
+# Uncomment the following if you had compiled Tcl with debugging symbols
+
+!IFNDEF TCL_DBGX
+#TCL_DBGX = d
+!ENDIF
+
+# Uncomment the following if you had compiled Tk with debugging symbols
+
+!IFNDEF TK_DBGX
+#TK_DBGX = d
+!ENDIF
+
+# TOOLS32 = location of VC++ 32-bit development tools.
+# TOOLS32_rc = location of VC++ rc program
+
+!IFNDEF TOOLS32
+#
+# Visual C++ 6.0
+#
+TOOLS32 = c:\Program Files\Microsoft Visual Studio\VC98
+TOOLS32_rc = c:\Program Files\Microsoft Visual Studio\Common\MSDev98
+!ENDIF
+
+# Set this to the appropriate value of /MACHINE: for your platform
+
+!IFNDEF MACHINE
+MACHINE = IX86
+!ENDIF
+
+# Comment this out if you don't want to compile with stubs
+
+!IFNDEF USESTUBS
+USESTUBS = 1
+!ENDIF
+
+# Comment this out if you want to compile with debugging symbols
+
+!IFNDEF NODEBUG
+NODEBUG = 1
+!ENDIF
+
+# Where to install Tix. By default it installs at the default Tcl
+# installation directory C:\Tcl
+
+!IFNDEF INSTALLDIR
+INSTALLDIR = C:\Tcl
+!ENDIF
+
+
+######################################################################
+# Do not modify below this line
+######################################################################
+default: all
+
+######################################################################
+# Development tool specific definitions
+######################################################################
+
+#
+# Build tools
+#
+
+cc32 = "$(TOOLS32)\bin\cl.exe"
+link32 = "$(TOOLS32)\bin\link.exe"
+include32 = -I"$(TOOLS32)\include"
+
+RMDIR = $(TCL_DIR)\win\rmd.bat
+MKDIR = $(TCL_DIR)\win\mkd.bat
+RM = del
+
+#
+# Link flags
+#
+
+!IF "$(NODEBUG)" == "1"
+ldebug = /RELEASE
+!ELSE
+ldebug = -debug:full -debugtype:cv
+!ENDIF
+
+# declarations common to all linker options
+lcommon = /NODEFAULTLIB /RELEASE /NOLOGO
+
+# declarations for use on Intel i386, i486, and Pentium systems
+!IF "$(MACHINE)" == "IX86"
+DLLENTRY = @12
+lflags = $(lcommon) /MACHINE:$(MACHINE)
+!ELSE
+lflags = $(lcommon) /MACHINE:$(MACHINE)
+!ENDIF
+
+dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
+
+baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib
+winlibs = $(baselibs) gdi32.lib comdlg32.lib
+
+#
+# Compile flags
+#
+
+# makefile.vc in Tk claims -O2 is buggy and so uses -Ot, so we do the same)
+
+!IF "$(NODEBUG)" == "1"
+optflags = -Oti -Gs -GD
+!ELSE
+optflags = -Od -Zi
+!ENDIF
+
+cvarsdll = -D_X86_=1 -DWIN32 -D_WIN32 -D_MT -D_DLL
+cflagsdll = $(cvarsdll) -c -W3 -nologo -Fp$(TMPDIR)\ -YX -MD \
+ $(optflags)
+
+######################################################################
+# Project specific definitions
+######################################################################
+
+TIX_MAJOR = 8
+TIX_MINOR = 4
+TIX_PATCH = 2
+
+ROOT = ..
+WINDIR = $(ROOT)\win
+GENERICDIR = $(ROOT)\generic
+DOTVERSION = $(TIX_MAJOR).$(TIX_MINOR).$(TIX_PATCH)
+
+#
+# Choose to build with stubs or not
+#
+
+!IF ("$(TCL_MAJOR)" == "8") && ("$(TCL_MINOR)" == "0")
+
+#
+# Tcl 8.0 does not support stubs
+#
+
+STUBS_CFLAGS =
+DLLDEPENDS = $(TK_LIB) $(TCL_LIB)
+
+!ELSE
+
+#
+# Tcl 8.1 or later support stubs
+#
+
+!IF "$(USESTUBS)" == "1"
+STUBS_CFLAGS = -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1
+DLLDEPENDS = $(TK_STUBLIB) $(TCL_STUBLIB)
+!ELSE
+STUBS_CFLAGS =
+DLLDEPENDS = $(TK_LIB) $(TCL_LIB)
+!ENDIF
+
+!ENDIF
+
+#
+# Debugging options and where to output .obj and .dll files
+#
+
+!IF "$(NODEBUG)" == "1"
+DBGX =
+TMPDIR = Release
+!ELSE
+DBGX = d
+TMPDIR = Debug
+!ENDIF
+
+#
+# File and dir names for Tcl
+#
+
+!IF "$(TCL_DBGX)" != "d"
+TCL_TMPDIR = Release
+!ELSE
+TCL_TMPDIR = Debug
+!ENDIF
+
+!IF "$(TCL_PATCH)" == ""
+TCL_DIR = $(SRC_ROOT)\tcl$(TCL_MAJOR).$(TCL_MINOR)
+TK_DIR = $(SRC_ROOT)\tk$(TCL_MAJOR).$(TCL_MINOR)
+!ELSE
+TCL_DIR = $(SRC_ROOT)\tcl$(TCL_MAJOR).$(TCL_MINOR).$(TCL_PATCH)
+TK_DIR = $(SRC_ROOT)\tk$(TCL_MAJOR).$(TCL_MINOR)
+!ENDIF
+
+TCL_LIBDIR = $(TCL_DIR)\win\$(TCL_TMPDIR)
+TCL_LIB = $(TCL_LIBDIR)\tcl$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).lib
+TCL_DLL = $(TCL_LIBDIR)\tcl$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).dll
+TCL_STUBLIB = $(TCL_LIBDIR)\tclstub$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).lib
+TCLSH_EXE = $(TCL_LIBDIR)\tclsh$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).exe
+
+TK_LIBDIR = $(TK_DIR)\win\$(TK_TMPDIR)
+TK_LIB = $(TK_LIBDIR)\tk$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).lib
+TK_DLL = $(TK_LIBDIR)\tk$(TCL_MAJOR)$(TCL_MINOR)$(TCL_DBGX).dll
+
+#
+# File and dir names for Tk
+#
+
+!IF "$(TK_DBGX)" == "d"
+TK_TMPDIR = Debug
+!ELSE
+TK_TMPDIR = Release
+!ENDIF
+
+!IF "$(TK_PATCH)" == ""
+TK_DIR = $(SRC_ROOT)\tk$(TK_MAJOR).$(TK_MINOR)
+!ELSE
+TK_DIR = $(SRC_ROOT)\tk$(TK_MAJOR).$(TK_MINOR).$(TK_PATCH)
+!ENDIF
+
+TK_LIBDIR = $(TK_DIR)\win\$(TK_TMPDIR)
+TK_LIB = $(TK_LIBDIR)\tk$(TK_MAJOR)$(TK_MINOR)$(TK_DBGX).lib
+TK_STUBLIB = $(TK_LIBDIR)\tkstub$(TK_MAJOR)$(TK_MINOR)$(TK_DBGX).lib
+
+#
+# File and dir names for Tix
+#
+
+TIX_LIB = $(TMPDIR)\tix$(TIX_MAJOR)$(TIX_MINOR)$(DBGX).lib
+TIX_DLL = $(TMPDIR)\tix$(TIX_MAJOR)$(TIX_MINOR)$(DBGX).dll
+TIX_PKGIDX = $(TMPDIR)\pkgIndex.tcl.src
+
+TIX_DEFINES = -D__WIN32__
+TIX_INCLUDES = $(include32) \
+ -I$(ROOT)\win -I$(ROOT)\generic \
+ -I$(TK_DIR)\generic -I$(TK_DIR)\win -I$(TK_DIR)\xlib \
+ -I$(TCL_DIR)\generic -I$(TCL_DIR)\win
+TIX_CFLAGS = $(cflagsdll) $(TIX_INCLUDES) $(TIX_DEFINES)
+
+######################################################################
+# Project specific targets
+######################################################################
+
+all: $(TMPDIR) $(TIX_DLL) $(TIX_PKGIDX)
+
+$(TMPDIR):
+ -$(MKDIR) $@
+
+#
+# Object files
+#
+
+TIX_DLL_OBJS = \
+ $(TMPDIR)\tixClass.obj \
+ $(TMPDIR)\tixCmds.obj \
+ $(TMPDIR)\tixCompat.obj \
+ $(TMPDIR)\tixDiImg.obj \
+ $(TMPDIR)\tixDiITxt.obj \
+ $(TMPDIR)\tixDiStyle.obj \
+ $(TMPDIR)\tixDItem.obj \
+ $(TMPDIR)\tixDiText.obj \
+ $(TMPDIR)\tixDiWin.obj \
+ $(TMPDIR)\tixError.obj \
+ $(TMPDIR)\tixForm.obj \
+ $(TMPDIR)\tixFormMisc.obj \
+ $(TMPDIR)\tixGeometry.obj \
+ $(TMPDIR)\tixGrid.obj \
+ $(TMPDIR)\tixGrData.obj \
+ $(TMPDIR)\tixGrRC.obj \
+ $(TMPDIR)\tixGrFmt.obj \
+ $(TMPDIR)\tixGrSel.obj \
+ $(TMPDIR)\tixGrUtl.obj \
+ $(TMPDIR)\tixHLCol.obj \
+ $(TMPDIR)\tixHLHdr.obj \
+ $(TMPDIR)\tixHLInd.obj \
+ $(TMPDIR)\tixHList.obj \
+ $(TMPDIR)\tixImgCmp.obj \
+ $(TMPDIR)\tixImgXpm.obj \
+ $(TMPDIR)\tixInit.obj \
+ $(TMPDIR)\tixList.obj \
+ $(TMPDIR)\tixMethod.obj \
+ $(TMPDIR)\tixNBFrame.obj \
+ $(TMPDIR)\tixOption.obj \
+ $(TMPDIR)\tixSmpLs.obj \
+ $(TMPDIR)\tixScroll.obj \
+ $(TMPDIR)\tixTList.obj \
+ $(TMPDIR)\tixUtils.obj \
+ $(TMPDIR)\tixWCmpt.obj \
+ $(TMPDIR)\tixWidget.obj \
+ $(TMPDIR)\tixWinDraw.obj \
+ $(TMPDIR)\tixWinXpm.obj \
+ $(TMPDIR)\tixWinWm.obj
+
+#
+# .EXE and .DLL files
+#
+
+# (ToDo) $(TIX_DLL) doesn't have resources to define its icon, etc.
+#
+$(TIX_DLL): $(TIX_DLL_OBJS)
+ $(link32) $(ldebug) $(dlllflags) $(DLLDEPENDS) $(winlibs) \
+ -out:$@ @<<
+ $(TIX_DLL_OBJS)
+<<
+
+$(TIX_PKGIDX): make_pkgIndex.tcl makefile.vc
+ set TCL_LIBRARY=$(TCL_DIR)\library
+ $(TCLSH_EXE) make_pkgIndex.tcl $@ $(TIX_DLL) $(DOTVERSION)
+
+#
+# Implicit rules
+#
+
+{$(GENERICDIR)}.c{$(TMPDIR)}.obj:
+ $(cc32) $(TIX_CFLAGS) $(STUBS_CFLAGS) -DBUILD_tix -Fo$@ $<
+
+{$(WINDIR)}.c{$(TMPDIR)}.obj:
+ $(cc32) $(TIX_CFLAGS) $(STUBS_CFLAGS) -DBUILD_tix -Fo$@ $<
+
+######################################################################
+# Test:
+######################################################################
+oldtest:
+ set TCL_LIBRARY=$(TCL_DIR)\library
+ set TK_LIBRARY=$(TK_DIR)\library
+ @echo "===================================================="
+ @echo "running old-style tests"
+ @echo "===================================================="
+ $(TIX_EXE_C) ../tests/Driver.tcl
+
+newtest:
+ set TCL_LIBRARY=$(TCL_DIR)\library
+ set TK_LIBRARY=$(TK_DIR)\library
+ @echo "===================================================="
+ @echo "running new-style tests"
+ @echo "===================================================="
+ set TIX_LIBRARY=$(ROOT)\library
+ $(TIX_EXE_C) ..\tests\all.tcl
+
+copydlls::
+ copy /y $(TCL_DLL) $(TMPDIR)
+ copy /y $(TK_DLL) $(TMPDIR)
+
+test: copydlls oldtest newtest
+tests: copydlls oldtest newtest
+
+rundemos:
+ set TCL_LIBRARY=$(TCL_DIR)\library
+ set TK_LIBRARY=$(TK_DIR)\library
+ set TIX_LIBRARY=$(ROOT)\library
+ $(WISH) ..\demos\widget
+
+######################################################################
+# Clean up
+######################################################################
+
+clean:
+ -del $(TIX_LIB)
+ -del $(TIX_DLL)
+ -del $(TIX_PKGIDX)
+ -del $(TMPDIR)\*.obj
+ -del $(TMPDIR)\*.exp
+ -del $(TMPDIR)\*.res
+ -del $(TMPDIR)\*.def
+ -del $(TMPDIR)\*.pch
+ -del $(TMPDIR)\*.pdb
+ -del $(TMPDIR)\*.lib
+ -del *.pdb
+
+######################################################################
+# Install
+######################################################################
+
+LIB_INSTALL_DIR = $(INSTALL_DIR)\lib\tix$(DOTVERSION)
+INCLUDE_INSTALL_DIR = $(INSTALL_DIR)\include
+
+install: all
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)"
+ @echo installing $(TIX_DLL)
+ @copy "$(TIX_DLL)" "$(LIB_INSTALL_DIR)"
+ @echo installing $(TIX_LIB)
+ @copy "$(TIX_LIB)" "$(LIB_INSTALL_DIR)"
+ @echo installing library files
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)"
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)\pref"
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)\bitmaps"
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)\demos"
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)\demos\bitmaps"
+ -@$(MKDIR) "$(LIB_INSTALL_DIR)\demos\samples"
+ xcopy "$(ROOT)\library" "$(LIB_INSTALL_DIR)"
+ copy "$(TIX_PKGIDX)" "$(LIB_INSTALL_DIR)\pkgIndex.tcl"
+ xcopy "$(ROOT)\library\pref" "$(LIB_INSTALL_DIR)\pref"
+ xcopy "$(ROOT)\library\bitmaps" "$(LIB_INSTALL_DIR)\bitmaps"
+ xcopy "$(ROOT)\demos" "$(LIB_INSTALL_DIR)\demos"
+ xcopy "$(ROOT)\demos\samples" "$(LIB_INSTALL_DIR)\demos\samples"
+ xcopy "$(ROOT)\demos\bitmaps" "$(LIB_INSTALL_DIR)\demos\bitmaps"
+
Added: external/tix-8.4.2.x/win/tixWCmpt.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWCmpt.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,39 @@
+
+/* $Id: tixWCmpt.c,v 1.3 2004/03/28 02:44:57 hobbs Exp $ */
+
+/*
+ * tixWCmpt.c --
+ *
+ * Windows compatibility module: implements missing functions in Windows.
+ */
+
+#include <tixPort.h>
+#include <tixInt.h>
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * DllEntryPoint --
+ *
+ * This wrapper function is used by Windows to invoke the
+ * initialization code for the DLL. If we are compiling
+ * with Visual C++, this routine will be renamed to DllMain.
+ * routine.
+ *
+ * Results:
+ * Returns TRUE;
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+BOOL APIENTRY
+DllEntryPoint(hInst, reason, reserved)
+ HINSTANCE hInst; /* Library instance handle. */
+ DWORD reason; /* Reason this function is being called. */
+ LPVOID reserved; /* Not used. */
+{
+ return TRUE;
+}
Added: external/tix-8.4.2.x/win/tixWinDefault.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWinDefault.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,243 @@
+/*
+ * tixWinDefault.h --
+ *
+ * This file defines the defaults for all options for all of
+ * the Tix widgets.
+ *
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixWinDefault.h,v 1.3 2000/12/24 06:48:27 ioilam Exp $
+ */
+
+#ifndef TIX_WIN_DEFAULT
+#define TIX_WIN_DEFAULT
+
+#define CTL_BOLD_FONT "{MS Sans Serif} 8 bold"
+#define TIX_EDITOR_BG "SystemWindow"
+#define TIX_BORDER_WIDTH "2"
+#define TIX_HIGHLIGHT_THICKNESS "0"
+
+/*
+ * Compound image
+ */
+#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 TIX_EDITOR_BG
+#define DEF_HLIST_BG_MONO WHITE
+#define DEF_HLIST_BORDER_WIDTH TIX_BORDER_WIDTH
+#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_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 TIX_HIGHLIGHT_THICKNESS
+#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 SELECT_BG
+#define DEF_HLIST_SELECT_FG_COLOR SELECT_FG
+#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 "0"
+#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 TIX_BORDER_WIDTH
+#define DEF_HLISTHEADER_RELIEF "raised"
+
+/*
+ * tixNBFrame widget
+ */
+#define DEF_NOTEBOOKFRAME_INACTIVE_BG_COLOR NORMAL_BG
+#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 TIX_BORDER_WIDTH
+#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 "raised"
+#define DEF_NOTEBOOKFRAME_SLAVE "1"
+#define DEF_NOTEBOOKFRAME_TAKE_FOCUS "1"
+#define DEF_NOTEBOOKFRAME_WIDTH "10"
+#define DEF_NOTEBOOKFRAME_TABPADX "5"
+#define DEF_NOTEBOOKFRAME_TABPADY "2"
+
+/*
+ * tixTList.h
+ */
+#define DEF_TLIST_BG_COLOR TIX_EDITOR_BG
+#define DEF_TLIST_BG_MONO WHITE
+#define DEF_TLIST_BORDER_WIDTH TIX_BORDER_WIDTH
+#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 TIX_HIGHLIGHT_THICKNESS
+#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 SELECT_BG
+#define DEF_TLIST_SELECT_FG_COLOR SELECT_FG
+#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 "0"
+#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 ""
+
+/*
+ * Grid widget
+ */
+#define DEF_GRID_BG_COLOR NORMAL_BG
+#define DEF_GRID_BG_MONO WHITE
+#define DEF_GRID_BORDER_WIDTH TIX_BORDER_WIDTH
+#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 CTL_FONT
+#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 TIX_HIGHLIGHT_THICKNESS
+#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 SELECT_BG
+#define DEF_GRID_SELECT_FG_COLOR SELECT_FG
+#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 "0"
+#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 ""
+
+/*----------------------------------------------------------------------
+ *
+ * default options for Text Display Items/Styles
+ *
+ *----------------------------------------------------------------------
+ */
+
+#define DEF_TEXTITEM_STYLE ""
+#define DEF_TEXTITEM_TEXT ""
+#define DEF_TEXTITEM_UNDERLINE "-1"
+#define DEF_TEXTITEM_TYPE "text"
+
+#define DEF_TEXTSTYLE_NORMAL_FG_COLOR NORMAL_FG
+#define DEF_TEXTSTYLE_NORMAL_FG_MONO BLACK
+#define DEF_TEXTSTYLE_NORMAL_BG_COLOR TIX_EDITOR_BG
+#define DEF_TEXTSTYLE_NORMAL_BG_MONO WHITE
+
+#define DEF_TEXTSTYLE_ACTIVE_FG_COLOR NORMAL_FG
+#define DEF_TEXTSTYLE_ACTIVE_FG_MONO WHITE
+#define DEF_TEXTSTYLE_ACTIVE_BG_COLOR ACTIVE_BG
+#define DEF_TEXTSTYLE_ACTIVE_BG_MONO BLACK
+
+#define DEF_TEXTSTYLE_SELECTED_FG_COLOR SELECT_FG
+#define DEF_TEXTSTYLE_SELECTED_FG_MONO WHITE
+#define DEF_TEXTSTYLE_SELECTED_BG_COLOR SELECT_BG
+#define DEF_TEXTSTYLE_SELECTED_BG_MONO BLACK
+
+#define DEF_TEXTSTYLE_DISABLED_FG_COLOR BLACK
+#define DEF_TEXTSTYLE_DISABLED_FG_MONO BLACK
+#define DEF_TEXTSTYLE_DISABLED_BG_COLOR TIX_EDITOR_BG
+#define DEF_TEXTSTYLE_DISABLED_BG_MONO WHITE
+
+#define DEF_TEXTSTYLE_PADX "2"
+#define DEF_TEXTSTYLE_PADY "2"
+#define DEF_TEXTSTYLE_FONT CTL_FONT
+#define DEF_TEXTSTYLE_JUSTIFY "left"
+#define DEF_TEXTSTYLE_WLENGTH "0"
+#define DEF_TEXTSTYLE_ANCHOR "w"
+
+#endif /* TIX_WIN_DEFAULT */
Added: external/tix-8.4.2.x/win/tixWinDraw.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWinDraw.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,413 @@
+/*
+ * tixWinDraw.c --
+ *
+ * Implement the Windows specific function calls for drawing.
+ *
+ * Copyright (c) 1993-1999 Ioi Kim Lam.
+ * Copyright (c) 2000 Tix Project Group.
+ *
+ * See the file "license.terms" for information on usage and redistribution
+ * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ *
+ * $Id: tixWinDraw.c,v 1.5 2004/03/28 02:44:57 hobbs Exp $
+ */
+
+#include <tkWinInt.h>
+#include <tixInt.h>
+#include <tixPort.h>
+
+
+/*----------------------------------------------------------------------
+ *
+ * TixpDrawTmpLine --
+ *
+ * Draws a "temporarily" line on the desktop window with XOR
+ * drawing mode. This function is used by the PanedWindow and
+ * ResizeHandler to draw the rubberband lines. Calling the
+ * function again with the same parameters cancels the temporary
+ * lines without affecting what was originally on the screen.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpDrawTmpLine(x1, y1, x2, y2, tkwin)
+ int x1;
+ int y1;
+ int x2;
+ int y2;
+ Tk_Window tkwin;
+{
+ HWND desktop;
+ HDC hdc;
+ HPEN hpen;
+ HGDIOBJ old;
+
+ desktop = GetDesktopWindow();
+ hdc = GetWindowDC(desktop);
+ hpen = CreatePen(PS_SOLID, 0, RGB(255,255,255));
+
+ old = SelectObject(hdc, hpen);
+ SetROP2(hdc, R2_XORPEN);
+
+ MoveToEx(hdc, x1, y1, NULL);
+ LineTo(hdc, x2, y2);
+
+ SelectObject(hdc, old);
+ DeleteObject(hpen);
+ ReleaseDC(desktop, hdc);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpDrawAnchorLines --
+ *
+ * See comments near Tix_DrawAnchorLines in tixUtils.c.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpDrawAnchorLines(display, drawable, gc, x, y, w, h)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ int x;
+ int y;
+ int w;
+ int h;
+{
+ HDC hdc;
+ TkWinDCState state;
+ RECT rect;
+
+ if (w < 2 || h < 2) {
+ /*
+ * Area too small to show effect. Don't bother
+ */
+ return;
+ }
+
+ hdc = TkWinGetDrawableDC(display, drawable, &state);
+ rect.left = x;
+ rect.top = y;
+ rect.right = x+w;
+ rect.bottom = y+h;
+ DrawFocusRect(hdc, &rect);
+ TkWinReleaseDrawableDC(drawable, hdc, &state);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpStartSubRegionDraw --
+ *
+ * This function is used by the Tix DItem code to implement
+ * clipped rendering -- if a DItem is larger than the region
+ * where the DItem is displayed (with the Tix_DItemDisplay
+ * function), we clip the DItem so that all the rendering
+ * happens inside the region.
+ *
+ * This Win32 implementation is tricky (which explains why the
+ * TixpSubRegDrawXXX API looks so arcane.) Tk does not support
+ * a portable API for setting the clip region of a GC. We could
+ * hack into Tk's Win32 implementation of GC to get the clipping
+ * to work, but that may run into future incompatibilities.
+ *
+ * For a clean and (almost) portable, albeit a bit slow,
+ * implemetation of clipping, we allocate a pixmap when clipping
+ * is required. All subsequent drawing goes into this
+ * pixmap. When TixpEndSubRegionDraw is called we then copy from
+ * the pixmap back to the destination drawable.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * A Tk pixmap may be created and saved into subRegPtr->pixmap in
+ * for the clipped drawing operations.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpStartSubRegionDraw(display, drawable, gc, subRegPtr, origX, origY,
+ x, y, width, height, needWidth, needHeight)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ TixpSubRegion * subRegPtr;
+ int origX;
+ int origY;
+ int x;
+ int y;
+ int width;
+ int height;
+ int needWidth;
+ int needHeight;
+{
+ TkWinDrawable * wdrPtr;
+ int depth;
+
+ if ((width < needWidth) || (height < needHeight)) {
+ subRegPtr->origX = origX;
+ subRegPtr->origY = origY;
+ subRegPtr->x = x;
+ subRegPtr->y = y;
+ subRegPtr->width = width;
+ subRegPtr->height = height;
+
+ /*
+ * Find out the depth of the drawable and create a pixmap of
+ * the same depth.
+ */
+
+ wdrPtr = (TkWinDrawable *)drawable;
+ if (wdrPtr->type == TWD_BITMAP) {
+ depth = wdrPtr->bitmap.depth;
+ } else {
+ depth = wdrPtr->window.winPtr->depth;
+ }
+
+ subRegPtr->pixmap = Tk_GetPixmap(display, drawable, width, height,
+ depth);
+
+ if (subRegPtr->pixmap != None) {
+ /*
+ * It could be None if we have somehow exhausted the Windows
+ * GDI resources.
+ */
+ XCopyArea(display, drawable, subRegPtr->pixmap, gc, x, y,
+ (unsigned) width, (unsigned) height, 0, 0);
+ }
+ } else {
+ subRegPtr->pixmap = None;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpEndSubRegionDraw --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpEndSubRegionDraw(display, drawable, gc, subRegPtr)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ TixpSubRegion * subRegPtr;
+{
+ if (subRegPtr->pixmap != None) {
+ XCopyArea(display, subRegPtr->pixmap, drawable, gc, 0, 0,
+ (unsigned) subRegPtr->width, (unsigned) subRegPtr->height,
+ subRegPtr->x, subRegPtr->y);
+ Tk_FreePixmap(display, subRegPtr->pixmap);
+ subRegPtr->pixmap = None;
+ }
+}
+
+void
+TixpSubRegSetClip(display, subRegPtr, gc)
+ Display *display;
+ TixpSubRegion * subRegPtr;
+ GC gc;
+{
+ /* Do nothing */
+}
+
+void
+TixpSubRegUnsetClip(display, subRegPtr, gc)
+ Display *display;
+ TixpSubRegion * subRegPtr;
+ GC gc;
+{
+ /* Do nothing */
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpSubRegDisplayText --
+ *
+ * Display a text string on one or more lines in a sub region.
+ *
+ * Results:
+ * See TkDisplayText
+ *
+ * Side effects:
+ * See TkDisplayText
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpSubRegDisplayText(display, drawable, gc, subRegPtr, font, string,
+ numChars, x, y, length, justify, underline)
+ Display *display; /* X display to use for drawing text. */
+ Drawable drawable; /* Window or pixmap in which to draw the
+ * text. */
+ GC gc; /* Graphics context to use for drawing text. */
+ TixpSubRegion * subRegPtr; /* Information about the subregion */
+ TixFont font; /* Font that determines geometry of text
+ * (should be same as font in gc). */
+ CONST84 char *string; /* String to display; may contain embedded
+ * newlines. */
+ int numChars; /* Number of characters to use from string. */
+ int x, y; /* Pixel coordinates within drawable of
+ * upper left corner of display area. */
+ int length; /* Line length in pixels; used to compute
+ * word wrap points and also for
+ * justification. Must be > 0. */
+ Tk_Justify justify; /* How to justify lines. */
+ int underline; /* Index of character to underline, or < 0
+ * for no underlining. */
+{
+ if (subRegPtr->pixmap != None) {
+ TixDisplayText(display, subRegPtr->pixmap, font, string,
+ numChars, x - subRegPtr->x, y - subRegPtr->y,
+ length, justify, underline, gc);
+ } else {
+ TixDisplayText(display, drawable, font, string,
+ numChars, x, y, length, justify, underline, gc);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpSubRegFillRectangle --
+ *
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpSubRegFillRectangle(display, drawable, gc, subRegPtr, x, y, width, height)
+ Display *display; /* X display to use for drawing rectangle. */
+ Drawable drawable; /* Window or pixmap in which to draw the
+ * rectangle. */
+ GC gc; /* Graphics context to use for drawing. */
+ TixpSubRegion * subRegPtr; /* Information about the subregion */
+ int x, y; /* Pixel coordinates within drawable of
+ * upper left corner of display area. */
+ int width, height; /* Size of the rectangle. */
+{
+ if (subRegPtr->pixmap != None) {
+ XFillRectangle(display, subRegPtr->pixmap, gc,
+ x - subRegPtr->x, y - subRegPtr->y, width, height);
+ } else {
+ XFillRectangle(display, drawable, gc, x, y, width, height);
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpSubRegDrawImage --
+ *
+ * Draws a Tk image in a subregion.
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpSubRegDrawImage(subRegPtr, image, imageX, imageY, width, height,
+ drawable, drawableX, drawableY)
+ TixpSubRegion * subRegPtr;
+ Tk_Image image;
+ int imageX;
+ int imageY;
+ int width;
+ int height;
+ Drawable drawable;
+ int drawableX;
+ int drawableY;
+{
+ Drawable dest;
+
+ if (subRegPtr->pixmap != None) {
+ dest = subRegPtr->pixmap;
+ drawableX -= subRegPtr->x;
+ drawableY -= subRegPtr->y;
+ } else {
+ dest = drawable;
+ }
+
+ Tk_RedrawImage(image, imageX, imageY, width, height, dest,
+ drawableX, drawableY);
+}
+
+void
+TixpSubRegDrawBitmap(display, drawable, gc, subRegPtr, bitmap, src_x, src_y,
+ width, height, dest_x, dest_y, plane)
+ Display *display;
+ Drawable drawable;
+ GC gc;
+ TixpSubRegion * subRegPtr;
+ Pixmap bitmap;
+ int src_x, src_y;
+ int width, height;
+ int dest_x, dest_y;
+ unsigned long plane;
+{
+ XSetClipOrigin(display, gc, dest_x, dest_y);
+ if (subRegPtr->pixmap != None) {
+ XCopyPlane(display, bitmap, subRegPtr->pixmap, gc, src_x, src_y,
+ width, height, dest_x - subRegPtr->x, dest_y - subRegPtr->y,
+ plane);
+ } else {
+ XCopyPlane(display, bitmap, drawable, gc, src_x, src_y, width, height,
+ dest_x, dest_y, plane);
+ }
+ XSetClipOrigin(display, gc, 0, 0);
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * TixpSubRegDrawAnchorLines --
+ *
+ * Draw anchor lines inside the given sub region.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpSubRegDrawAnchorLines(display, drawable, gc, subRegPtr, x, y, w, h)
+ Display *display; /* Display to draw on. */
+ Drawable drawable; /* Drawable to draw on. */
+ GC gc; /* Use the foreground color of this GC. */
+ TixpSubRegion * subRegPtr; /* Describes the subregion. */
+ int x; /* x pos of top-left corner of anchor rect */
+ int y; /* y pos of top-left corner of anchor rect */
+ int w; /* width of anchor rect */
+ int h; /* height of anchor rect */
+{
+ Drawable dest;
+
+ if (subRegPtr->pixmap != None) {
+ dest = subRegPtr->pixmap;
+ x -= subRegPtr->x;
+ y -= subRegPtr->y;
+ } else {
+ dest = drawable;
+ }
+
+ TixpDrawAnchorLines(display, dest, gc, x, y, w, h);
+}
Added: external/tix-8.4.2.x/win/tixWinInt.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWinInt.h Tue Mar 18 19:38:59 2008
@@ -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_ */
Added: external/tix-8.4.2.x/win/tixWinPort.h
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWinPort.h Tue Mar 18 19:38:59 2008
@@ -0,0 +1,46 @@
+
+/* $Id: tixWinPort.h,v 1.3 2004/03/28 02:44:57 hobbs 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 <malloc.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
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+struct _TixpSubRegion {
+ Pixmap pixmap;
+ int origX, origY;
+ int x, y;
+ int width, height;
+};
+
+typedef unsigned char UNSIGNED_CHAR;
+
+#endif /* _TIX_WINPORT_H_ */
Added: external/tix-8.4.2.x/win/tixWinWm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWinWm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,27 @@
+
+/* $Id: tixWinWm.c,v 1.1.1.1 2000/05/17 11:08:55 idiscovery Exp $ */
+
+/*
+ * tixWinWm.c --
+ *
+ * Functions related to window management that are specific to
+ * 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.
+ *
+ */
+
+#include "tixWinInt.h"
+
+int
+TixpSetWindowParent(interp, tkwin, newParent, parentId)
+ Tcl_Interp * interp;
+ Tk_Window tkwin;
+ Tk_Window newParent;
+ int parentId;
+{
+ return TCL_OK;
+}
Added: external/tix-8.4.2.x/win/tixWinXpm.c
==============================================================================
--- (empty file)
+++ external/tix-8.4.2.x/win/tixWinXpm.c Tue Mar 18 19:38:59 2008
@@ -0,0 +1,311 @@
+
+/* $Id: tixWinXpm.c,v 1.2 2004/03/28 02:44:57 hobbs Exp $ */
+
+/*
+ * tixWinImgXpm.c --
+ *
+ * Implement the Windows specific function calls for the pixmap
+ * image type.
+ *
+ * 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.
+ *
+ */
+
+#include <tkWinInt.h>
+#include <tix.h>
+#include <tixImgXpm.h>
+
+typedef struct PixmapData {
+ HDC bitmapDC; /* Bitmap used on Windows platforms */
+ HDC maskDC; /* Mask used on Windows platforms */
+ HBITMAP bitmap, bitmapOld;
+ HBITMAP maskBm, maskBmOld;
+} PixmapData;
+
+static void CopyTransparent _ANSI_ARGS_((Display* display,
+ HDC srcDC, Drawable dest,
+ int src_x, int src_y, int width,
+ int height, int dest_x, int dest_y,
+ HDC maskDC));
+
+
+/*----------------------------------------------------------------------
+ * TixpInitPixmapInstance --
+ *
+ * Initializes the platform-specific data of a pixmap instance
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TixpInitPixmapInstance(masterPtr, instancePtr)
+ PixmapMaster *masterPtr; /* Pointer to master for image. */
+ PixmapInstance *instancePtr;/* The pixmap instance. */
+{
+ PixmapData * dataPtr;
+
+ dataPtr = (PixmapData *)ckalloc(sizeof(PixmapData));
+ dataPtr->maskDC = NULL;
+ dataPtr->bitmapDC = NULL;
+
+ instancePtr->clientData = (ClientData)dataPtr;
+}
+
+
+/*----------------------------------------------------------------------
+ * TixpXpmAllocTmpBuffer --
+ *
+ * Allocate a temporary space to draw the image.
+ *
+ *----------------------------------------------------------------------
+ */
+void
+TixpXpmAllocTmpBuffer(masterPtr, instancePtr, imagePtr, maskPtr)
+ PixmapMaster * masterPtr;
+ PixmapInstance * instancePtr;
+ XImage ** imagePtr;
+ XImage ** maskPtr;
+{
+ XImage * image = NULL; /* Unused. Always return NULL. */
+ XImage * mask;
+ Display *display = Tk_Display(instancePtr->tkwin);
+ int depth;
+ int maskSize;
+ int i;
+ int wordBits = sizeof(WORD)*8; /* # of bits in WORD */
+ int wordBytes = sizeof(WORD)/sizeof(char); /* # of bytes in WORD */
+ int words_per_line;
+
+ depth = Tk_Depth(instancePtr->tkwin);
+
+ instancePtr->pixmap = Tk_GetPixmap(display,
+ Tk_WindowId(instancePtr->tkwin),
+ masterPtr->size[0], masterPtr->size[1], depth);
+
+ mask = (XImage*)ckalloc(sizeof(XImage));
+
+ mask->width = masterPtr->size[0];
+ mask->height = masterPtr->size[1];
+
+ /*
+ * In Windows, each scan line in the the mask data must be aligned
+ * to words. The padding bits must be zero'ed.
+ */
+ words_per_line = (mask->width + (wordBits-1))/wordBits;
+ mask->bytes_per_line = words_per_line * wordBytes;
+
+ maskSize = mask->bytes_per_line * mask->height;
+ mask->data = (char *)ckalloc(maskSize);
+ for (i=0; i<maskSize; i++) {
+ mask->data[i] = 0;
+ }
+
+ *imagePtr = image;
+ *maskPtr = mask;
+}
+
+
+void
+TixpXpmFreeTmpBuffer(masterPtr, instancePtr, image, mask)
+ PixmapMaster * masterPtr;
+ PixmapInstance * instancePtr;
+ XImage * image;
+ XImage * mask;
+{
+ if (image) {
+ ckfree((char*)image->data);
+ image->data = NULL;
+ XDestroyImage(image);
+ }
+ if (mask) {
+ ckfree((char*)mask->data);
+ mask->data = NULL;
+ ckfree((char*)mask);
+ }
+}
+
+
+/*----------------------------------------------------------------------
+ * TixpXpmSetPixel --
+ *
+ * Sets the pixel at the given (x,y) coordinate to be the given
+ * color.
+ *----------------------------------------------------------------------
+ */
+void
+TixpXpmSetPixel(instancePtr, image, mask, x, y, colorPtr, isTranspPtr)
+ PixmapInstance * instancePtr;
+ XImage * image;
+ XImage * mask;
+ int x;
+ int y;
+ XColor * colorPtr;
+ int * isTranspPtr;
+{
+ char * p;
+ int n;
+ GC gc;
+ XGCValues gcValues;
+ Display *display = Tk_Display(instancePtr->tkwin);
+
+ if (colorPtr != NULL) {
+ gcValues.foreground = colorPtr->pixel;
+ gc = Tk_GetGC(instancePtr->tkwin, GCForeground, &gcValues);
+ XDrawRectangle(display, instancePtr->pixmap, gc, x, y, 1, 1);
+ Tk_FreeGC(display, gc);
+ }
+
+ p = mask->data;
+ p+= y*(mask->bytes_per_line);
+ p+= x/8;
+ n = x%8;
+
+ if (colorPtr != NULL) {
+ *p |= (1 << (7-n));
+ } else {
+ *p &= ~(1 << (7-n));
+ *isTranspPtr = 1;
+ }
+}
+
+/*----------------------------------------------------------------------
+ * TixpXpmRealizePixmap --
+ *
+ * On Unix: Create the pixmap from the buffer.
+ * On Windows: Free the mask if there are no transparent pixels.
+ *----------------------------------------------------------------------
+ */
+void
+TixpXpmRealizePixmap(masterPtr, instancePtr, image, mask, isTransp)
+ PixmapMaster * masterPtr;
+ PixmapInstance * instancePtr;
+ XImage * image;
+ XImage * mask;
+{
+ Display *display = Tk_Display(instancePtr->tkwin);
+ PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
+ HDC dc, bitmapDC;
+ TkWinDCState dcState;
+ HBITMAP bitmap, bitmapOld;
+ int w, h;
+
+ w = masterPtr->size[0];
+ h = masterPtr->size[1];
+
+ dc = TkWinGetDrawableDC(display, instancePtr->pixmap, &dcState);
+ bitmapDC = CreateCompatibleDC(dc);
+
+ bitmap = CreateCompatibleBitmap(dc, w, h);
+ bitmapOld = SelectObject(bitmapDC, bitmap);
+
+ BitBlt(bitmapDC, 0, 0, w, h, dc, 0, 0, SRCCOPY);
+
+ if (isTransp) {
+ HDC maskDC;
+ HBITMAP maskBm, maskBmOld;
+
+ /*
+ * There are transparent pixels. We need a mask.
+ */
+ maskDC = CreateCompatibleDC(dc);
+ maskBm = CreateBitmap(w, h, 1, 1, (CONST VOID*)mask->data);
+ maskBmOld = SelectObject(maskDC, maskBm);
+
+ BitBlt(bitmapDC, 0, 0, w, h, maskDC, 0, 0, SRCAND);
+ BitBlt(maskDC, 0, 0, w, h, maskDC, 0, 0, NOTSRCCOPY);
+
+ dataPtr->maskDC = maskDC;
+ dataPtr->maskBm = maskBm;
+ dataPtr->maskBmOld = maskBmOld;
+ } else {
+ dataPtr->maskDC = NULL;
+ }
+ dataPtr->bitmapDC = bitmapDC;
+ dataPtr->bitmap = bitmap;
+ dataPtr->bitmapOld = bitmapOld;
+ TkWinReleaseDrawableDC(instancePtr->pixmap, dc, &dcState);
+}
+
+void
+TixpXpmFreeInstanceData(instancePtr, delete, display)
+ PixmapInstance *instancePtr; /* Pixmap instance. */
+ int delete; /* Should the instance data structure
+ * be deleted as well? */
+ Display * display; /* Unused on Windows. */
+{
+ PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
+
+ if (dataPtr->maskDC != NULL) {
+ DeleteObject(SelectObject(dataPtr->maskDC,
+ dataPtr->maskBmOld));
+ DeleteDC(dataPtr->maskDC);
+ dataPtr->maskDC = NULL;
+ }
+ if (dataPtr->bitmapDC != NULL) {
+ DeleteObject(SelectObject(dataPtr->bitmapDC,
+ dataPtr->bitmapOld));
+ DeleteDC(dataPtr->bitmapDC);
+ dataPtr->bitmapDC = NULL;
+ }
+ if (delete) {
+ ckfree((char*)dataPtr);
+ instancePtr->clientData = NULL;
+ }
+}
+
+void
+TixpXpmDisplay(clientData, display, drawable, imageX, imageY, width,
+ height, drawableX, drawableY)
+ ClientData clientData; /* Pointer to PixmapInstance structure for
+ * for instance to be displayed. */
+ Display *display; /* Display on which to draw image. */
+ Drawable drawable; /* Pixmap or window in which to draw image. */
+ int imageX, imageY; /* Upper-left corner of region within image
+ * to draw. */
+ int width, height; /* Dimensions of region within image to draw.*/
+ int drawableX, drawableY; /* Coordinates within drawable that
+ * correspond to imageX and imageY. */
+{
+ PixmapInstance *instancePtr = (PixmapInstance *) clientData;
+ PixmapData *dataPtr = (PixmapData*)instancePtr->clientData;
+
+ CopyTransparent(display, dataPtr->bitmapDC, drawable,
+ imageX, imageY, width, height,
+ drawableX, drawableY, dataPtr->maskDC);
+}
+
+static void
+CopyTransparent(display, srcDC, dest, src_x, src_y, width, height, dest_x,
+ dest_y, maskDC)
+ Display* display;
+ HDC srcDC;
+ Drawable dest;
+ int src_x;
+ int src_y;
+ int width;
+ int height;
+ int dest_x;
+ int dest_y;
+ HDC maskDC;
+{
+ HDC destDC;
+ TkWinDCState destState;
+
+ destDC = TkWinGetDrawableDC(display, dest, &destState);
+
+ if (maskDC) {
+ BitBlt(destDC, dest_x, dest_y, width, height, maskDC, src_x, src_y,
+ SRCAND);
+ BitBlt(destDC, dest_x, dest_y, width, height, srcDC, src_x, src_y,
+ SRCPAINT);
+ } else {
+ BitBlt(destDC, dest_x, dest_y, width, height, srcDC, src_x, src_y,
+ SRCCOPY);
+ }
+
+ TkWinReleaseDrawableDC(dest, destDC, &destState);
+}
+
More information about the Python-checkins
mailing list