| 1 |
'\" |
| 2 |
'\" Copyright 1991-1997 by Bell Labs Innovations for Lucent Technologies. |
| 3 |
'\" |
| 4 |
'\" Permission to use, copy, modify, and distribute this software and its |
| 5 |
'\" documentation for any purpose and without fee is hereby granted, provided |
| 6 |
'\" that the above copyright notice appear in all copies and that both that the |
| 7 |
'\" copyright notice and warranty disclaimer appear in supporting documentation, |
| 8 |
'\" and that the names of Lucent Technologies any of their entities not be used |
| 9 |
'\" in advertising or publicity pertaining to distribution of the software |
| 10 |
'\" without specific, written prior permission. |
| 11 |
'\" |
| 12 |
'\" Lucent Technologies disclaims all warranties with regard to this software, |
| 13 |
'\" including all implied warranties of merchantability and fitness. In no event |
| 14 |
'\" shall Lucent Technologies be liable for any special, indirect or |
| 15 |
'\" consequential damages or any damages whatsoever resulting from loss of use, |
| 16 |
'\" data or profits, whether in an action of contract, negligence or other |
| 17 |
'\" tortuous action, arising out of or in connection with the use or performance |
| 18 |
'\" of this software. |
| 19 |
'\" |
| 20 |
.so man.macros |
| 21 |
.TH intro n BLT_VERSION BLT "BLT Built-In Commands" |
| 22 |
.BS |
| 23 |
'\" Note: do not modify the .SH NAME line immediately below! |
| 24 |
.SH NAME |
| 25 |
BLT \- Introduction to the BLT library |
| 26 |
.BE |
| 27 |
.SH DESCRIPTION |
| 28 |
BLT is a library of extensions to the Tk library. It adds new |
| 29 |
commands and variables to the application's interpreter. |
| 30 |
.LP |
| 31 |
.SH COMMANDS |
| 32 |
The following commands are added to the interpreter from the BLT library: |
| 33 |
.TP 15 |
| 34 |
\fBtable\fR |
| 35 |
A table geometry manager for Tk. You specify window placements as table |
| 36 |
row,column positions and windows can also span multiple rows or columns. |
| 37 |
It also has many options for setting and/or bounding window sizes. |
| 38 |
.TP 15 |
| 39 |
\fBgraph\fR |
| 40 |
A 2D plotting widget. Plots two variable data in a window with an optional |
| 41 |
legend and annotations. It has of several components; coordinate axes, |
| 42 |
crosshairs, a legend, and a collection of elements and tags. |
| 43 |
.TP 15 |
| 44 |
\fBbarchart\fR |
| 45 |
A barchart widget. Plots two-variable data as rectangular bars in a |
| 46 |
window. The x-coordinate values designate the position of the bar along |
| 47 |
the x-axis, while the y-coordinate values designate the magnitude. |
| 48 |
The \fBbarchart\fR widget has of several components; coordinate axes, |
| 49 |
crosshairs, a legend, and a collection of elements and tags. |
| 50 |
.TP 15 |
| 51 |
\fBvector\fR |
| 52 |
Creates a vector of floating point values. The vector's components |
| 53 |
can be manipulated in three ways: through a Tcl array variable, a Tcl |
| 54 |
command, or the C API. |
| 55 |
.TP |
| 56 |
\fBspline\fR |
| 57 |
Computes a spline fitting a set of data points (x and y vectors) and |
| 58 |
produces a vector of the interpolated images (y-coordinates) at a |
| 59 |
given set of x-coordinates. |
| 60 |
.TP 15 |
| 61 |
\fBbgexec\fR |
| 62 |
Like Tcl's \fBexec\fR command, \fBbgexec\fR runs a pipeline of Unix |
| 63 |
commands in the background. Unlike \fBexec\fR, the output of the last |
| 64 |
process is collected and a global Tcl variable is set upon its completion. |
| 65 |
\fBbgexec\fR can be used with \fBtkwait\fR to wait for Unix commands |
| 66 |
to finish while still handling expose events. Intermediate output is |
| 67 |
also available while the pipeline is active. |
| 68 |
.TP 15 |
| 69 |
\fBbusy\fR |
| 70 |
Creates a "busy window" which prevents user-interaction when an |
| 71 |
application is busy. The busy window also provides an easy way |
| 72 |
to have temporary busy cursors (such as a watch or hourglass). |
| 73 |
.TP 15 |
| 74 |
\fBbitmap\fR |
| 75 |
Reads and writes bitmaps from Tcl. New X bitmaps can be defined |
| 76 |
on-the-fly from Tcl, obviating the need to copy around bitmap files. |
| 77 |
Other options query loaded X bitmap's dimensions and data. |
| 78 |
.TP 15 |
| 79 |
\fBdrag&drop\fR |
| 80 |
Provides a drag-and-drop facility for Tk. Information (represented |
| 81 |
by a token window) can be dragged to and from any Tk window, including |
| 82 |
those of another Tk application. \fBdrag&drop\fR acts as a |
| 83 |
coordinator, directing Tk \fBsend\fR commands between (or within) TCL/Tk |
| 84 |
applications. |
| 85 |
.TP 15 |
| 86 |
\fBhtext\fR |
| 87 |
A simple hypertext widget. Combines text and Tk widgets into a single |
| 88 |
scroll-able window. Tcl commands can be embedded into text, which are |
| 89 |
invoked as the text is parsed. In addition, Tk widgets can be |
| 90 |
appended to the window at the current point in the text. \fBHtext\fR |
| 91 |
can be also used to create scrolled windows of Tk widgets. |
| 92 |
.TP 15 |
| 93 |
\fBwinop\fR |
| 94 |
Raise, lower, map, or, unmap any window. The raise and lower functions |
| 95 |
are useful for stacking windows above or below "busy windows". |
| 96 |
.TP 15 |
| 97 |
\fBwatch\fR |
| 98 |
Arranges for Tcl procedures to be called before and/or after the execution |
| 99 |
of every Tcl command. This command |
| 100 |
may be used in the logging, profiling, or tracing of Tcl code. |
| 101 |
.TP 15 |
| 102 |
\fBbltdebug\fR |
| 103 |
A simple Tcl command tracing facility useful for debugging Tcl code. |
| 104 |
Displays each Tcl command before and after substitution along its level |
| 105 |
in the interpreter on standard error. |
| 106 |
.SH VARIABLES |
| 107 |
.PP |
| 108 |
The following Tcl variables are either set or used by BLT at various times |
| 109 |
in its execution: |
| 110 |
.TP 15 |
| 111 |
\fBblt_library\fR |
| 112 |
This variable contains the name of a directory containing a library |
| 113 |
of Tcl scripts and other files related to BLT. Currently, this |
| 114 |
directory contains the \fBdrag&drop\fR protocol scripts and the |
| 115 |
PostScript prolog |
| 116 |
used by \fBgraph\fR and \fBbarchart\fR. |
| 117 |
The value of this variable is taken from the BLT_LIBRARY environment |
| 118 |
variable, if one exists, or else from a default value compiled into |
| 119 |
the \fBBLT\fR library. |
| 120 |
.TP 15 |
| 121 |
\fBblt_versions\fR |
| 122 |
This variable is set in the interpreter for each application. It is an |
| 123 |
array of the current version numbers for each |
| 124 |
of the BLT commands in the form \fImajor\fR.\fIminor\fR. \fIMajor\fR and |
| 125 |
\fIminor\fR are integers. The major version number increases in |
| 126 |
any command that includes changes that are not backward compatible |
| 127 |
(i.e. whenever existing applications and scripts may have to change to |
| 128 |
work with the new release). The minor version number increases with |
| 129 |
each new release of a command, except that it resets to zero whenever the |
| 130 |
major version number changes. The array is indexed by the individual |
| 131 |
command name. |
| 132 |
.SH ADDING BLT TO YOUR APPLICATIONS |
| 133 |
It's easy to add BLT to an existing Tk application. BLT requires no |
| 134 |
patches or edits to the Tcl or Tk libraries. To add BLT, simply add the |
| 135 |
following code snippet to your application's tkAppInit.c file. |
| 136 |
.CS |
| 137 |
if (Blt_Init(interp) != TCL_OK) { |
| 138 |
return TCL_ERROR; |
| 139 |
} |
| 140 |
.CE |
| 141 |
Recompile and link with the BLT library (libBLT.a) and that's it. |
| 142 |
.PP |
| 143 |
Alternately, you can dynamically load BLT, simply by invoking the |
| 144 |
command |
| 145 |
.CS |
| 146 |
package require BLT |
| 147 |
.CE |
| 148 |
from your Tcl script. |
| 149 |
.SH BUGS |
| 150 |
Send bug reports, requests, suggestions, etc. to |
| 151 |
[email protected] or [email protected] |
| 152 |
.SH KEYWORDS |
| 153 |
BLT |