This is version 2.0 of the BLT library. BLT is an extension to the Tk toolkit, adding new widgets, geometry managers, and miscellaneous commands. It does not require any patching of the Tcl or Tk source files. This release works with both Tk versions 3.6 and 4.0. It may work with the current 4.1 release, but I haven't it tried it yet. There are many changes in this release. Not least of which is that each command no longer has a "blt_" prefix. This wart has been removed since [Incr Tcl] 2.0 now includes namespaces. There's no good reason to "uglify" code when the right solution is now available. BLT will automatically use namespaces if you compile with the itcl-2.x versions of Tcl and Tk headers and libraries. BLT will reside in its own namespace called "blt". There are far too many bug fixes and changes to list here (I'm putting together a separate list), so check the manual pages. Thanks to everyone who has contributed their suggestions, ideas, or bug reports. While there are too many to thank individually, a few deserve special mention: Farrell McKay is responsible for many of the saner changes to the graph and barchart. I'm still (yet) working on some of his ideas. Not only does he have great ideas, but he backs them up with sample outputs and patch files. Lou Salkind has been a constant source of great suggestions and ideas. Lou's been the inspiration for many of the features in the graph (alternate axes, splines, non-uniform ticks, etc). Many thanks to Michael McLennan for his enthusiasm and insights. And most importantly, thanks goes to Michael for *not* listening to me when I pontificate how namespaces should work. Thanks to Jeffrey Hobbs for acting as caretaker to BLT. Jeffrey has done a terrific job keeping BLT up-to-date with the many Tk releases. --------- The BLT library adds the following commands to Tk: table A table-based geometry manager for Tk. You specify the widget layout as row and column positions in the table. Has many options for constraining window resizing. graph A X-Y graph widget. Plots two-variable data. Supports two sets of X and Y axes, inverted axes, custom axis layout. barchart A barchart widget. Plots two-variable data using bars. Supports two sets of X and Y axes, inverted axes, custom axis layout. vector Creates a vector of floating point values. The vector's components can be manipulated in three ways: through a Tcl array variable, a Tcl command, or the C API. spline Computes a spline fitting a set of data points (x and y vectors) and produces a vector of the interpolated images (y-coordinates) at a given set of x-coordinates. busy For handling user-interaction when the application is "busy". Manages an invisible "busy" window which prevents further user device (keyboard, mouse, button, etc.) interactions. Also provides a different cursor which supersedes application cursors. bgexec Like Tcl's "exec ... &", but collects the output, error, and status of the detached UNIX subprocesses. Sets a Tcl variable upon completion. Can be used with "tkwait variable" to handle expose events, etc. while waiting for subprocesses to finish. drag&drop Command which adds drag-n-drop capabilities to Tk. It provides "send"-style communication between drag-drop sources and targets. The result is a much more powerful drag-and-drop mechanism than is available with OpenLook or Motif. htext A simple hypertext widget. Allows text and Tk widgets to be combined in a scroll-able text window. Any Tk widget can be embedded and used to form hyper-links. Other options allow for selections and text searches. bitmap Command for creating and manipulating bitmaps from Tcl. Lets you read and write bitmaps from Tcl. Can also define X bitmaps and create bitmaps from text strings. Other options let you rotate and scale bitmaps. winop Low-level Xlib calls let you raise, lower, map, or, unmap any window. watch Lets you specify Tcl procedures to be run before and/or after every Tcl command. May be used for logging, tracing, profiling, or debugging or Tcl code. bltdebug Prints out each Tcl command before it's executed. --------- How to get and test BLT: The following describes how to get and install the BLT library. 0. FTP the distribution from ftp.aud.alcatel.com The URL is ftp://ftp.aud.alcatel.com/tcl/extensions/BLT2.0.tar.gz ftp ftp.aud.alcatel.com cd pub/tcl/extensions binary get BLT2.0.tar.gz quit 1. Uncompress and untar the distribution file. zcat BLT2.0.tar.gz | tar -xvf - This will create a directory "blt2.0" with the following subdirectories: blt2.0 ______________|_____________ | | | | demos library man src | shared 2. Run ./configure Go into the "blt2.0" directory cd blt2.0 and run the auto-configuration script "./configure" ./configure * If you want to use gcc, it's "./configure -with-cc=gcc" ./configure -with-cc=gcc * By default, the demo program, libBLT.a, the library files, and manual pages will be installed in "/usr/local/blt". You can change this by giving the -prefix option to ./configure. ./configure -prefix=/depot/stuff/blt The "configure" script will report out where it finds the X, Tcl, and Tk header files and libraries. If it displays "__Edit_config.BLT__" as a path, you need to edit the generated file "config.BLT". Simply edit config.BLT with the correct paths and re-run "configure". The configure script creates an include file "src/bltConfig.h". It will also generate new Makefiles from their respective templates (Makefile.in). Makefile.in ==> Makefile src/Makefile.in ==> src/Makefile src/shared/Makefile.in ==> src/shared/Makefile man/Makefile.in ==> man/Makefile library/Makefile.in ==> library/Makefile If "configure" can't find something (e.g. it can't find the X libraries), edit the file "config.BLT" and re-run "configure". Otherwise, you'll have to edit the Makefiles by hand. 3. Compile the demonstration program "bltwish". make 4. Test by running the demos. Go into the demos directory cd demos and run the test scripts. ./graph If your system doesn't support "#!" in shell scripts, then it's ../bltwish ./graph 5. Installing BLT The following directories will be created when BLT is installed. By default, the top directory is /usr/local/blt. _____________|_______________ | | | | | bin include lib blt2.0 man You can change the top directory by supplying the -prefix option to ./configure. * If you don't install BLT, you will need to set the BLT_LIBRARY environment variable or the Tcl variable "blt_library" in your scripts. Otherwise, you may not be able generate PostScript output for graphs and barcharts, or use the drag&drop facility properly. 6. Adding BLT to your program. Add the following lines to your program's Tcl_AppInit routine in tkAppInit.c if (Blt_Init(interp) != TCL_OK) { return TCL_ERROR; } then link with libBLT.a And that's all there's to it. 7. Send bugs reports, suggestions, etc. to gah@mhcnet.att.com or ghowlett@fast.net Make sure you include BLT and the version number in the subject line.