Index of /tcl/ftparchive/sorted/apps/purchase-1.6

      Name                   Last modified     Size  Description

[DIR] Parent Directory 26-Oct-99 08:56 - [   ] README 01-Mar-95 15:02 1k [CMP] purchase-1.6.tar.gz 06-Mar-95 14:21 56k

This is a program to prepare a fill-out form describing a purchase
order.  There are two things of interest in this program:

 - it uses variable trace callbacks to achieve a spreadsheet-like 
   recalculation functionality
 - it contains code to render the on-screen textual info in PostScript
   for a hardcopy of the form.

The program is provided in the file 'purchase', and it uses the
'fileselector.tcl' code from the GIPSI package written by Matthew Rice
<rice@waterloo.hp.com>.  The Tcl code is devoid of comments, because
they all reside in the Literate Programming source, purchase.w; to get
a printed copy of the commented/annotated source (16 pages), do 'make
printdoc'.

PostScript hardcopy
-------------------

The PostScript hardcopy code is relatively short and can be extracted
for use in other programs. It has the following advantages:

 - the code works for the intended purpose, i.e. it provides an 
   Encapsulated PS rendition of the textual information of a 
   hierarchy of windows
 - it is relatively simple and easy to customize

and deficiencies:

 - the approach is a hack
 - radio- and checkbuttons aren't handled (it shouldn't be difficult, though)
 - horizontal clipping of text is not handled
 - font changes in Text widget are ignored (one font per whole widget)

Usage
  set PSdump [widgets2ps .rootwidget]

to get the PS as a string, or

  widgets2ps .rootwidget filename

to store the PS code in a file.