| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
<HTML> |
| 5 |
<HEAD> |
| 6 |
<TITLE>graph(n) manual page</TITLE> |
| 7 |
</HEAD> |
| 8 |
<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red"> |
| 9 |
<A HREF="#toc">Table of Contents</A><P> |
| 10 |
|
| 11 |
<H2><A NAME="sect0" HREF="#toc0">Name</A></H2> |
| 12 |
BLT - Introduction to the BLT library |
| 13 |
<H2><A NAME="sect1" HREF="#toc1">Description</A></H2> |
| 14 |
BLT |
| 15 |
is a library of extensions to the Tk library. It adds new commands and |
| 16 |
variables to the application's interpreter. <P> |
| 17 |
|
| 18 |
<H2><A NAME="sect2" HREF="#toc2">Commands</A></H2> |
| 19 |
The following commands |
| 20 |
are added to the interpreter from the BLT library: |
| 21 |
<DL> |
| 22 |
|
| 23 |
<DT><B>table</B> </DT> |
| 24 |
<DD>A table geometry |
| 25 |
manager for Tk. You specify window placements as table row,column positions |
| 26 |
and windows can also span multiple rows or columns. It also has many options |
| 27 |
for setting and/or bounding window sizes. </DD> |
| 28 |
|
| 29 |
<DT><B>graph</B> </DT> |
| 30 |
<DD>A 2D plotting widget. Plots |
| 31 |
two variable data in a window with an optional legend and annotations. |
| 32 |
It has of several components; coordinate axes, crosshairs, a legend, |
| 33 |
and a collection of elements and tags. </DD> |
| 34 |
|
| 35 |
<DT><B>barchart</B> </DT> |
| 36 |
<DD>A barchart widget. Plots |
| 37 |
two-variable data as rectangular bars in a window. The x-coordinate values |
| 38 |
designate the position of the bar along the x-axis, while the y-coordinate |
| 39 |
values designate the magnitude. The <B>barchart</B> widget has of several components; |
| 40 |
coordinate axes, crosshairs, a legend, and a collection of elements and |
| 41 |
tags. </DD> |
| 42 |
|
| 43 |
<DT><B>vector</B> </DT> |
| 44 |
<DD>Creates a vector of floating point values. The vector's components |
| 45 |
can be manipulated in three ways: through a Tcl array variable, a Tcl command, |
| 46 |
or the C API. </DD> |
| 47 |
|
| 48 |
<DT><B>spline</B> </DT> |
| 49 |
<DD>Computes a spline fitting a set of data points (x and |
| 50 |
y vectors) and produces a vector of the interpolated images (y-coordinates) |
| 51 |
at a given set of x-coordinates. </DD> |
| 52 |
|
| 53 |
<DT><B>bgexec</B> </DT> |
| 54 |
<DD>Like Tcl's <B>exec</B> command, <B>bgexec</B> runs |
| 55 |
a pipeline of Unix commands in the background. Unlike <B>exec</B>, the output |
| 56 |
of the last process is collected and a global Tcl variable is set upon |
| 57 |
its completion. <B>bgexec</B> can be used with <B>tkwait</B> to wait for Unix commands |
| 58 |
to finish while still handling expose events. Intermediate output is also |
| 59 |
available while the pipeline is active. </DD> |
| 60 |
|
| 61 |
<DT><B>busy</B> </DT> |
| 62 |
<DD>Creates a "busy window" which |
| 63 |
prevents user-interaction when an application is busy. The busy window also |
| 64 |
provides an easy way to have temporary busy cursors (such as a watch or |
| 65 |
hourglass). </DD> |
| 66 |
|
| 67 |
<DT><B>bitmap</B> </DT> |
| 68 |
<DD>Reads and writes bitmaps from Tcl. New X bitmaps can |
| 69 |
be defined on-the-fly from Tcl, obviating the need to copy around bitmap |
| 70 |
files. Other options query loaded X bitmap's dimensions and data. </DD> |
| 71 |
|
| 72 |
<DT><B>drag&drop</B> |
| 73 |
</DT> |
| 74 |
<DD>Provides a drag-and-drop facility for Tk. Information (represented by a |
| 75 |
token window) can be dragged to and from any Tk window, including those |
| 76 |
of another Tk application. <B>drag&drop</B> acts as a coordinator, directing Tk |
| 77 |
<B>send</B> commands between (or within) TCL/Tk applications. </DD> |
| 78 |
|
| 79 |
<DT><B>htext</B> </DT> |
| 80 |
<DD>A simple |
| 81 |
hypertext widget. Combines text and Tk widgets into a single scroll-able |
| 82 |
window. Tcl commands can be embedded into text, which are invoked as the |
| 83 |
text is parsed. In addition, Tk widgets can be appended to the window at |
| 84 |
the current point in the text. <B>Htext</B> can be also used to create scrolled |
| 85 |
windows of Tk widgets. </DD> |
| 86 |
|
| 87 |
<DT><B>winop</B> </DT> |
| 88 |
<DD>Raise, lower, map, or, unmap any window. The |
| 89 |
raise and lower functions are useful for stacking windows above or below |
| 90 |
"busy windows". </DD> |
| 91 |
|
| 92 |
<DT><B>watch</B> </DT> |
| 93 |
<DD>Arranges for Tcl procedures to be called before and/or |
| 94 |
after the execution of every Tcl command. This command may be used in the |
| 95 |
logging, profiling, or tracing of Tcl code. </DD> |
| 96 |
|
| 97 |
<DT><B>bltdebug</B> </DT> |
| 98 |
<DD>A simple Tcl command |
| 99 |
tracing facility useful for debugging Tcl code. Displays each Tcl command |
| 100 |
before and after substitution along its level in the interpreter on standard |
| 101 |
error. </DD> |
| 102 |
</DL> |
| 103 |
|
| 104 |
<H2><A NAME="sect3" HREF="#toc3">Variables</A></H2> |
| 105 |
<P> |
| 106 |
The following Tcl variables are either set or used by BLT |
| 107 |
at various times in its execution: |
| 108 |
<DL> |
| 109 |
|
| 110 |
<DT><B>blt_library</B> </DT> |
| 111 |
<DD>This variable contains the |
| 112 |
name of a directory containing a library of Tcl scripts and other files |
| 113 |
related to BLT. Currently, this directory contains the <B>drag&drop</B> protocol |
| 114 |
scripts and the PostScript prolog used by <B>graph</B> and <B>barchart</B>. The value |
| 115 |
of this variable is taken from the BLT_LIBRARY environment variable, if |
| 116 |
one exists, or else from a default value compiled into the <B>BLT</B> library. |
| 117 |
</DD> |
| 118 |
|
| 119 |
<DT><B>blt_versions</B> </DT> |
| 120 |
<DD>This variable is set in the interpreter for each application. |
| 121 |
It is an array of the current version numbers for each of the BLT commands |
| 122 |
in the form <I>major</I>.<I>minor</I>. <I>Major</I> and <I>minor</I> are integers. The major version |
| 123 |
number increases in any command that includes changes that are not backward |
| 124 |
compatible (i.e. whenever existing applications and scripts may have to change |
| 125 |
to work with the new release). The minor version number increases with |
| 126 |
each new release of a command, except that it resets to zero whenever the |
| 127 |
major version number changes. The array is indexed by the individual command |
| 128 |
name. </DD> |
| 129 |
</DL> |
| 130 |
|
| 131 |
<H2><A NAME="sect4" HREF="#toc4">Adding Blt to Your Applications</A></H2> |
| 132 |
It's easy to add BLT to an existing |
| 133 |
Tk application. BLT requires no patches or edits to the Tcl or Tk libraries. |
| 134 |
To add BLT, simply add the following code snippet to your application's |
| 135 |
tkAppInit.c file. <BR> |
| 136 |
<CODE>if (Blt_Init(interp) != TCL_OK) {<BR> |
| 137 |
return TCL_ERROR;<BR> |
| 138 |
}<BR> |
| 139 |
</CODE><P>Recompile and link with the BLT library (libBLT.a) and that's it. <P> |
| 140 |
Alternately, |
| 141 |
you can dynamically load BLT, simply by invoking the command <BR> |
| 142 |
<CODE>package require BLT<BR> |
| 143 |
</CODE><P>from your Tcl script. |
| 144 |
<H2><A NAME="sect5" HREF="#toc5">Bugs</A></H2> |
| 145 |
Send bug reports, requests, suggestions, etc. to |
| 146 |
[email protected] or [email protected] |
| 147 |
<H2><A NAME="sect6" HREF="#toc6">Keywords</A></H2> |
| 148 |
BLT <P> |
| 149 |
|
| 150 |
<HR><P> |
| 151 |
<A NAME="toc"><B>Table of Contents</B></A><P> |
| 152 |
<UL> |
| 153 |
<LI><A NAME="toc0" HREF="#sect0">Name</A></LI> |
| 154 |
<LI><A NAME="toc1" HREF="#sect1">Description</A></LI> |
| 155 |
<LI><A NAME="toc2" HREF="#sect2">Commands</A></LI> |
| 156 |
<LI><A NAME="toc3" HREF="#sect3">Variables</A></LI> |
| 157 |
<LI><A NAME="toc4" HREF="#sect4">Adding Blt to Your Applications</A></LI> |
| 158 |
<LI><A NAME="toc5" HREF="#sect5">Bugs</A></LI> |
| 159 |
<LI><A NAME="toc6" HREF="#sect6">Keywords</A></LI> |
| 160 |
</UL> |
| 161 |
</BODY></HTML> |