The TkIcon extension Copyright (c) 1993 by Sven Delmas All rights reserved. See the file COPYRIGHT for the copyright notes. This small extension to Tk allows the creation of icon and edge items in a canvas widget. These items provide a lot of additional functionality (take a look at the manual pages canvas.n and tkiconpane.n). The tkiconpane widget is a complete implementation of a desktop displayer as well as a graph widget (including a layouting mechanism). The advantage of TkIcon is that a big part of the work is done in C, which makes the implementation much faster. Graph layouting: ---------------- The graph layouting is done with a simple tree layouter (named tree), and an ISI layouter. The tree layouter was originally based upon a Tcl algorithm published by Juergen Wagner (J_Wagner@iao.fhg.de or gandalf@csli.stanford.edu) in his "theObjects" package. The ISI layouter was implemented following an explanation published by Anette Kjaer. If someone has interesting other layouting algorithms, please let me know. It should not be a big problem to add additional algorithms... Building a patched wish: ------------------------ - Unpack the Tk distribution and change to the Tk directory. - Unpack the TkIcon distribution in the Tk distribution directory. - Unpack the TkPixmap distribution in the Tk directory. This is necessary, because the Makefile loads the Xpm3 library from the local xpm directory by default. If you have a publically installed Xpm 3.2g library, you can use this library by removing the string "-L./xpm" from the PIXMAP_LIBS variable and the string "-I./xpm" from the PIXMAP_CFLAGS variable in the Makefile. - Build the Xpm3 library in the ./xpm subdirectory. This is only necessary if you do not use a public Xpm 3.2g library. It is important to configure the Imakefile. Some systems need -DNEED_STRCASECMP (like mine :-). By default, a not shareable version is built. Look at the comment in the Imakefile to decide whether you want to make it shareable (which means you have to install it globally) or not. To build the Xpm3 library, type in the xpm directory: xmkmf; make - Patch tkCanvBmap.c, tkCanvas.c tkMenubutton.c, tkMenu.c, tkButton.c, tkConfig.c, tk.h and the doc files with the file tkPixmap3.6.pat. On a 14 character limited filesystem, this may cause problems, as tkMenubutton.c is too long. In this case, rename the file to a shorter name and replace this name in the patch file. Don't forget to rename the file to tkMenubutton.c after applying the patch. - On my system, the call of the patch program looks like this: patch -l -p1 < tkPixmap3.6.pat - Patch tkCanvas.c and the doc files with the file tkIcon3.6.pat. This adds the TkIcon support to the canvas widget. - On my system, the call of the patch program looks like this: patch -l -p1 < tkIcon3.6.pat - Configure the Tk distribution by running configure. And do all the things you usually do to get a working Tk. You can modify the Makefile. Here, you can select which picture formats you want to support, etc.. It is also possible to select additional packages to be included into the wish. You have to uncomment the TKICON variables to add the TkIcon package. - Build Tk (wish) by typing: make - You can now install everything by typing this in the Tk build directory: make install This will install the new wish and all the library files and header files. If you just want to install the new wish, you can copy the executable to a new location. By default, the library files are placed in the TK_LIBRARY directory. The original Tk tclIndex has to be changed. It must contain the new command "tkiconpane". Please take care to keep the tclIndex file up to date when you install other packages. The tclIndex file must contain the following line: set auto_index(tkiconpane) "source [set dir]/tkIconPane.tcl" You can add these lines by hand (as described above), or you can use auto_mkindex. Availability: ------------- The TkIcon distribution file is named TkIcon3.6.tar.gz or TkIcon3.6.tar.Z TkIcon is available via anonymous ftp at: harbor.ecn.purdue.edu: pub/tcl/extensions/ ftp.ibp.fr: pub/tcl/contrib/extensions/ nic.funet.fi: pub/languages/tcl/extensions/ syd.dit.csiro.au: pub/tk/contrib/extensions/ ftp.cs.tu-berlin.de: pub/tcl/contrib/extensions/ To get a copy of it, just type the following: ftp ftp.cs.tu-berlin.de bin cd pub/tcl/extensions get TkIcon3.6.tar.gz, or (that depends on the site) get TkIcon3.6.tar.Z To get a copy via ftpmail, just send the following mail to: mail-server@cs.tu-berlin.de To get a help message, send the following body: send HELP end To retrieve TkIcon, send the following body: send pub/tcl/contrib/extensions/TkIcon3.6.tar.gz end Feedback (Author): ----------------- Sven Delmas TU Berlin, Germany garfield@cs.tu-berlin.de