1tgif(n)                                                                tgif(n)
2
3
4

NAME

6       tgif - Xlib based interactive 2-D drawing facility under X11.  Supports
7       hierarchical construction of drawings and easy navigation between  sets
8       of drawings.  It's also a hyper-graphics (or hyper-structured-graphics)
9       browser on the World-Wide-Web.
10

SYNOPSIS

12       tgif [-display displayname] [-fg <color>] [-bg <color>]  [-bd  <color>]
13       [-rv]  [-nv]  [-bw] [-reqcolor] [-cwo[+sbwarp]] [-hyper] [-exec <file>]
14       [-dbim {xcin|chinput|xim|kinput2|tgtwb5[,font]}] [-sbim xim] [-usexlib]
15       [-a4]  [-listdontreencode]  [-version]  [-pdfspd | -pdfspd=true | -pdf‐
16       spd=false  ]  [-pssetup  "<string>"  ]  [-nomode]  [-geometry   <geom>]
17       [=<geom>] [{file[.obj]|-merge file1[.obj] file2[.obj] ...}]
18
19       or
20
21       tgif  -print  [-eps] [-p] [-ps] [-f] [-text] [-epsi] [-tiffepsi] [-gif]
22       [-png] [-jpeg] [-ppm] [-pbm] [-xpm] [-xbm]  [-html]  [-pdf]  [-netlist]
23       [-display  displayname]  [-stdout] [-raw[+h[eaderonly]]] [-dosepsfilter
24       [-previewonly]]  [-status]  [-gray]  [-color  |  -reqcolor]  [-adobe  |
25       -adobe=<number>/<number>  |  -adobe=false  ]  [-dontreencode=<string> |
26       -listdontreencode]  [-version  |  -justversion]  [-producedby=<string>]
27       [-page <number>] [-print_cmd "<command>"] [-one_file_per_page] [-pepsc]
28       [-pdfspd |  -pdfspd=true  |  -pdfspd=false  ]  [-pssetup  "<string>"  ]
29       [-j2p6_cmd  "<command>"  ] [-dontcondense | -condensed] [-a4] [-noshow‐
30       pageineps]  [-quiet]  [-bop_hook  "<string>"]  [-eop_hook   "<string>"]
31       [-tmp_file_mode "<octal number>"] [-o<dir>] [-exec <file>] [file1[.obj]
32       file2[.obj] ...]
33

DESCRIPTION

35       Tgif is an interactive drawing tool that allows the user  to  draw  and
36       manipulate  objects in the X Window System.  Tgif runs interactively in
37       the first form.  In the second form shown in the SYNOPSIS section, tgif
38       just  prints file1.obj, file2.obj, etc.  (generated by tgif) into Post‐
39       Script(TM) page description files (without opening  windows  or  fonts)
40       and  pipes  them  to  lpr(1) if none of the -eps, -p, -epsi, -tiffepsi,
41       -gif, -png, -jpeg, -ppm, -pbm, -xpm, -xbm, -html, -pdf, -ps, -f, -text,
42       or -netlist options are specified.  This form of printing is tgif's way
43       of exporting a tgif file to another format.  In this  case,  any  other
44       unrecognized  command  line  options are sent to lpr(1).  In this mode,
45       tgif is compatible with the  obsoleted  prtgif.   A  symbol  file  (see
46       descriptions  below)  can also be printed by specifying the .sym exten‐
47       sion explicitly.
48
49       The command line argument file specifies a file or an Uniform  Resource
50       Locator  (URL) of objects to be initially edited by tgif.  Only HTTP or
51       FTP URL's are supported.  (For a more detailed description of  URL  and
52       the World-Wide-Web, the reader is referred to [1].)
53
54       Tgif  is  purely  based  on  Xlib.   It  is  tested under X11R6, and it
55       requires a 3 button mouse.
56

OPTIONS

58       In the first form shown in the SYNOPSIS section, the command line argu‐
59       ments can be:
60
61       -fg    Foreground color specified in <color>.
62
63       -bg    Background color specified in <color>.
64
65       -bd    Border color specified in <color>.
66
67       -rv    Start tgif in reversed-video mode.
68
69       -nv    Start tgif in normal-video mode.
70
71       -bw    Start tgif in black and white mode.
72
73       -reqcolor
74              Same  effect  as  setting  the  Tgif.PrintUsingRequestedColor  X
75              default to true (see the X DEFAULTS section below).
76
77       -cwo   Canvas Window Only.  Only the canvas window (see TGIF SUBWINDOWS
78              section  below)  will be displayed.  This has the same effect as
79              setting the Tgif.CanvasWindowOnly X default to true.
80
81       -cwo+sbwarp
82              If -cwo+sbwarp is used, single-button-warp  (clicking  the  left
83              mouse button to warp) is used to activate teleporting (see TELE‐
84              PORT/HYPERJUMP section below).
85
86       -hyper Start tgif  in  the  hyperspace  mode  (see  HYPERSPACE  section
87              below).
88
89       -exec <file>
90              After  tgif  starts, execute the internal command in <file> (see
91              INTERNAL COMMANDS section below).  If <file> is the string  "-",
92              tgif executes internal commands from the standard input.
93
94       -dbim method
95              Use method as the input method for double-byte fonts (see SQUARE
96              DOUBLE BYTE FONTS section below).  This cannot be used  in  con‐
97              junction with -sbim.
98
99       -sbim method
100              Use  method  as the input method for single-byte fonts.  This is
101              useful if the X Keyboard Extension is used in inputing  interna‐
102              tional characters (with dead keys).  This cannot be used in con‐
103              junction with -dbim.
104
105       -usexlib
106              If tgif is compiled with -DUSE_XT_INITIALIZE, X Toolkit initial‐
107              ization routines will be used to setup tgif.  Using this command
108              line option will force tgif to  ignore  the  -DUSE_XT_INITIALIZE
109              compiler option and use Xlib only.  This is useful when the sys‐
110              tem resource file for tgif is not installed properly  or  messed
111              up and needs to be bypassed.
112
113       -a4    Using   this   option   has  the  same  effect  as  setting  the
114              Tgif.PSA4PaperSize X default to true.
115
116       -noshowpageineps
117              Using this option has the same effect as setting the  Tgif.Show‐
118              PageInEPS X default to false.
119
120       -quiet If this option is used, tgif will surpress standard messages.
121
122       -listdontreencode=<string>
123              If  this  option  is used, tgif will print out the list of Post‐
124              Script font names specified  in  the  -D_DONT_REENCODE  compiler
125              option used in compiling tgif.
126
127       In  the  second  form  shown  in the SYNOPSIS section, the command line
128       arguments can be:
129
130       -version
131              If this option is used, tgif will print out its  version  number
132              and copyright on the command line.
133
134       -justversion
135              If  this  option is used, tgif will print out its version number
136              and copyright on the command line and exits immediately.
137
138       -nomode
139              Using this option has the same effect as setting the Tgif.NoMod‐
140              eWindow X default to true.
141
142       -eps (or -p)
143              Generates  an Encapsulated PostScript(TM) file in file.eps; this
144              file can be included in a LaTeX file through the \psfig,  \epsf,
145              or  \psfile  construct  (see  the  LATEX  FIGURE FORMATS section
146              below).
147
148       -ps (or -f)
149              Generates a PostScript file in file.ps; this file can be printed
150              to a PostScript printer with lpr(1).
151
152       -text  Generates  a  text  file in file.txt; the text file contains all
153              visible text and can be fed to a spell checker.
154
155       -epsi  Generates an Encapsulated PostScript (EPS) file with  a  preview
156              bitmap  in  file.eps.   Tgif  aborts  if  a valid display is not
157              accessible.
158
159       -tiffepsi
160              Generates an EPS file with a DOS EPS Binary File  Header  and  a
161              trailing  TIFF  image in file.eps.  See the GENERATING MICROSOFT
162              WINDOWS EPSI FILES section for more details.  Tgif aborts  if  a
163              valid display is not accessible.
164
165       -gif   Generates  a  GIF  file  in  file.gif.  Please see the notes for
166              Tgif.GifToXpm in the X DEFAULTS section below.  Tgif aborts if a
167              valid display is not accessible.
168
169       -png   Generates  a  PNG file in file.png.  Tgif aborts if a valid dis‐
170              play is not accessible.
171
172       -jpeg  Generates a JPEG file in file.jpg.  Tgif aborts if a valid  dis‐
173              play is not accessible.
174
175       -ppm   Generates  a  PPM file in file.ppm.  Tgif aborts if a valid dis‐
176              play is not accessible.
177
178       -pbm   Generates a PBM file in file.pbm.  Tgif aborts if a  valid  dis‐
179              play is not accessible.
180
181       -xpm   Generates  an X11 pixmap (XPM) file in file.xpm.  Tgif aborts if
182              a valid display is not accessible.
183
184       -xbm   Generates an X11 bitmap (XBM) file in file.xbm.  Tgif aborts  if
185              a valid display is not accessible.
186
187       -html  Generates  a GIF file in file.gif and an HTML file in file.html.
188              Tgif aborts if a valid display is not accessible.
189
190       -pdf   Generates a GIF file in file.gif and an PDF  file  in  file.pdf.
191              Please  see the notes for Tgif.PsToPdf in the X DEFAULTS section
192              below.
193
194       -netlist
195              Generates a text file in file.net and a text file  in  file.cmp.
196              file.net  contains  netlist  information stored in a table.  The
197              first line in it contains column names and each line in it is  a
198              port name (surrounded by double-quotes), followed by a comma and
199              a <TAB> character, followed by a signal name (also surrounded by
200              double-quotes).   file.cmp contains information about components
201              in the file.  Each component begins with its  name  followed  by
202              its  type.  The attributes of a component are printed afterwards
203              (indented by <TAB> characters).
204
205       -stdout
206              Sends the output to the standard output  instead  of  generating
207              the output in a file.
208
209       -raw   Causes the content of the files to be dumped to stdout.
210
211       -raw+h If  -raw+h  is  used  and  if  the file is an HTTP URL, the HTTP
212              header is also dumped to stdout.
213
214       -raw+headeronly
215              If -raw+headeronly is used and if the file is an HTTP  URL,  the
216              HTTP header is dumped to stdout.
217
218       -dosepsfilter
219              Makes tgif act as a filter for getting rid of the DOS EPS Binary
220              File Header and the trailing TIFF image  in  a  DOS/Windows  EPS
221              file.
222
223       -previewonly
224              If  -dosepsfilter is specified, -previewonly makes tgif act as a
225              filter for extracting the preview bitmap from the trailing  TIFF
226              image in a DOS/Windows EPS file.
227
228       -status
229              If  this option is used in conjunction with either -raw, -raw+h,
230              or -raw+headeronly causes a  status  line  to  be  displayed  in
231              stderr.
232
233       -gray  Using  this option has the same effect as setting the Tgif.UseG‐
234              rayScale X default to true (see the X DEFAULTS section below).
235
236       -color (or -reqcolor)
237              To print in color, one can use either the -color  or  the  -req‐
238              color option.  The only difference between the two is that using
239              -reqcolor has the same effect as setting the  Tgif.PrintUsingRe‐
240              questedColor  X  default  to  true  (see  the X DEFAULTS section
241              below).
242
243       -adobe (or -adobe=<number>/<number> -adobe=false)
244              Using  this  option  has  the  same  effect  as  specifying  the
245              Tgif.UsePsAdobeString X default.
246
247       -dontreencode=<string>
248              Using  this  option  has  the  same  effect  as  specifying  the
249              Tgif.DontReencode X default.
250
251       -producedby=<string>
252              Using  this  option  has  the  same  effect  as  specifying  the
253              Tgif.ProducedBy X default.
254
255       -page  Causes a specified page (specified by <page>) to be printed.
256
257       -print_cmd
258              Using  this  option  has  the  same  effect  as  specifying  the
259              Tgif.PrintCommand X default.
260
261       -one_file_per_page
262              Causes each page to be printed into a separate file.
263
264       -pepsc Preserve EPS Comment.  This command  line  option  is  obsoleted
265              since   EPS   comments   are   always  preserved  starting  from
266              tgif-4.0.11.
267
268       -nolandpdfspd
269              This commandline option became obsolete in tgif-4.1.42.   It  is
270              interpreted as -nopdfspd.
271
272       -pdfspd (or -pdfspd=true -pdfspd=false)
273              If -pdfspd or -pdfspd=true is specified, "setpagedevice" is gen‐
274              erated in the interim PostScript file when exporting  PDF  files
275              or  in  the  final  PostScript file when exporting PS files.  If
276              -pdfspd=false is specified, no "setpagedevice" will be generated
277              in  the  interim  PostScript file when exporting PDF files or in
278              the final PostScript file when exporting PS files.  This  option
279              overrides the Tgif.PdfSetPageDevice X default.
280
281       -pssetup
282              Using  these  options  have  the  same  effect as specifying the
283              Tgif.AdditionalPSSetup X default.
284
285       -j2p6_cmd
286              Using  this  option  has  the  same  effect  as  specifying  the
287              Tgif.JpegToPpm6 X default.
288
289       -dontcondense
290              Using  this option has the same effect as setting the Tgif.Dont‐
291              CondensePSFile X default to true.
292
293       -condensed
294              Using this option has the same effect as setting the  Tgif.Dont‐
295              CondensePSFile X default to false.
296
297       -bop_hook and -eop_hook
298              Using  these  options  have  the  same  effect as specifying the
299              Tgif.PSBopHook and Tgif.PSEpsHook X defaults.
300
301       -tmp_file_mode
302              Using this  option  have  the  same  effect  as  specifying  the
303              Tgif.TmpFileMode X defaults.
304
305       -o     If this option is not specified, the output file (eps, ps, etc.)
306              goes into the same directory as the input  file.   If  -odir  is
307              specified,  the output file goes into the directory specified by
308              <dir>.
309
310       -merge file1 file2 ...
311              Using this option merges file1.obj, file2.obj, etc.  into a mul‐
312              tipage file.
313

BASIC FUNCTIONALITIES

315       Primitive objects supported by tgif are rectangles, ovals, rounded-cor‐
316       ner  rectangles,  arcs,  polylines,  polygons,  open-splines,   closed-
317       splines,  text,  X11  bitmaps,  some specific forms of X11 pixmaps, and
318       Encapsulated PostScript.  (Please note that the splines tgif  draw  are
319       not  Bezier curves.)  Objects can be grouped together to form a grouped
320       object.  A primitive or a grouped object  can  be  made  into  an  icon
321       object or a symbol object through user commands.
322
323       Tgif  objects  are  stored  in  two types of files.  A file with a .obj
324       extension (referred to as an object file) is a file of objects,  and  a
325       file  with  a .sym extension (referred to as a symbol file) specifies a
326       ``building-block'' object.  A teleport mechanism is provided to  travel
327       (or  hyperjump) among the .obj files.  A building-block object consists
328       of the representation part and the definition part (which can be empty)
329       of the object.  Tgif supports the ``bottom-up'' construction of hierar‐
330       chical drawings by providing the capability to ``instantiate'' a build‐
331       ing-block  object  in  a  drawing.  Tgif also supports the ``top-down''
332       specification of drawings by allowing the user to  make  any  object  a
333       representation  of  an un-specified subsystem.  Both types of files are
334       stored in the form of Prolog facts.  Prolog  code  can  be  written  to
335       interpret  the  drawings!  (It is left to the user to produce the code.
336       See the PROLOG/C TESTDRIVE section for more details.)   Prolog  engines
337       are  referred to as drivers in the sections to follow.  (Other types of
338       drivers are also allowed, e.g., written in C.)
339
340       Text  based  attributes  can  be  attached  to  any  non-text   object.
341       Attributes  specified  in  the  representation part of a building-block
342       object are non-detachable when such an object is instantiated.  See the
343       ATTRIBUTES section for details.
344
345       Tgif  can  generate output in a few different formats.  By default, the
346       output is in the PostScript format (color PostScript is supported), and
347       it  is  generated  into  a file named /tmp/Tgifa* (produced by mktemp()
348       calls) where * is a number; this file is piped to lpr(1).   This  takes
349       place  when  the  laser-printer  icon is displayed in the Choice Window
350       (see the TGIF SUBWINDOWS section for the naming of tgif windows).  This
351       output  can  be  redirected to a file with a .ps extension.  This takes
352       place when the PS icon is displayed in the Choice Window.  When the PDF
353       icon  is displayed in the Choice Window, the output is generated into a
354       file with a .pdf extension.  By default, tgif calls ps2pdf(1) from  the
355       ghostscript(1)  package  to  convert a PS file to a PDF file.  When the
356       LaTeX (or EPSI) icon is displayed in the Choice Window, the  output  is
357       generated  into  a  file  with  a  .eps extension.  This file is in the
358       Encapsulated PostScript (or Encapsulated PostScript  Interchange)  for‐
359       mat;  it  can  be  included  in a LaTeX document with the \psfig or the
360       \epsf construct; this will be discussed  later.   The  only  difference
361       between  the  EPS and EPSI formats is that an EPSI file contains a pre‐
362       view bitmap.  However, it takes time to generate  the  preview  bitmap.
363       If the EPS/EPSI file is to be incorporated into some tool that does not
364       know how to use the preview bitmap, time can be saved by not using  the
365       EPSI  format.   When  the T icon is displayed in the Choice Window, the
366       output generated into a file with a .txt extension.   This  is  a  text
367       file  containing  all  visible  text; it can be fed to a spell checker.
368       When the x11bm (X11 bitmap) icon is displayed in the Choice Window  and
369       color  output  is not selected, tgif generates the output with the .xbm
370       extension; the output is in the X11 bitmap  format.   However,  if  the
371       x11bm  icon  is  displayed  in  the  Choice  Window and color output is
372       selected (through the ^#k keyboard command -- ^ denotes  the  <Control>
373       and  # denotes the <Meta> or <Alt> key), then tgif generates the output
374       with the .xpm extension, and the output is in  the  X11  pixmap  format
375       (the  version  of  this  XPM  format  depends  on  the  settings of the
376       Tgif.XPmOutputVersion X default).  When the GIF icon  is  displayed  in
377       the  Choice  Window,  the  output  is generated into a file with a .gif
378       extension.  By default, tgif  calls  xpmtoppm  and  ppmtogif  from  the
379       netpbm(1) package to convert an XPM file to a GIF file.
380
381       X11  bitmap  files,  certain forms of X11 pixmap files (such as the one
382       generated by tgif; see the section on  X11  PIXMAP  for  details),  GIF
383       files,  and  Encapsulated  PostScript  (EPS) files can be imported into
384       tgif and be represented as tgif  primitive  objects.   Files  in  other
385       raster  formats  (e.g, JPEG, TIFF, etc.) can also be imported into tgif
386       if external tools can be used to convert them into  X11  pixmap  files.
387       Please see the IMPORT RASTER GRAPHICS section for details.
388
389       Tgif drawings are supposed to be printed on letter size paper (8.5in by
390       11in).  Both landscape and portrait page styles are supported by  tgif.
391       Reduction  (or magnification) can be controlled by the #% keyboard com‐
392       mand  to  set  the  reduction/magnification.   If  the  compiler   flag
393       -DA4PAPER  is defined (in Imakefile or Makefile.noimake), then the out‐
394       put is supposed to be printed  on  A4  papers  (which  has  approximate
395       dimensions of 8.25in by 11.7in).
396

GRAPHICAL OBJECTS

398       An object in an object (.obj) file can be a primitive object, a grouped
399       object, or an icon object.  A symbol (.sym) file can have any number of
400       objects  allowed  in  an  object  file  and  exactly one symbol object.
401       (Recall that a symbol file specifies  a  building-block  object.)   The
402       symbol object in a symbol file is the representation part of the build‐
403       ing-block object, and the rest of the symbol  file  is  the  definition
404       part  of  the  building-block object.  The symbol object is highlighted
405       with a dashed outline to distinguish it from the rest of  the  objects.
406       When  a  building-block  object is instantiated, the symbol part of the
407       file is copied into the graphics editor, and it becomes  the  icon  for
408       the building-block object.
409
410       All  objects  in  tgif  can  be  moved,  duplicated,  deleted, rotated,
411       flipped, rotated, and sheared.  However, in  the  non-stretchable  text
412       mode, text objects can not be stretched.  For an text object, if it has
413       not been stretched, rotated, or sheared, flipping it horizontally  will
414       cause  the  text justification to change and flipping it vertically has
415       no effect.
416
417       Tgif supports 32 fill patterns, 32 pen patterns, 7 default line widths,
418       4  line styles (plain, head arrow, tail arrow, double arrows) for poly‐
419       lines and open-splines, 9 dash patterns, 3  types  of  text  justifica‐
420       tions,  4  text  styles  (roman, italic, bold, bold-italic), 11 default
421       text sizes (8, 10, 12, 14, 18, and 24 for the 75dpi fonts and  11,  14,
422       17,  20,  25,  and  34  for  the 100dpi fonts), 5 default fonts (Times,
423       Courier, Helvetica, New-Century-Schoolbook,  Symbol),  and  11  default
424       colors  (magenta,  red,  green,  blue,  yellow, pink, cyan, cadet-blue,
425       white, black, dark-slate-gray).  Additional line widths  can  be  added
426       through     the    use    of    Tgif.MaxLineWidths,    Tgif.LineWidth#,
427       Tgif.ArrowWidth#, and Tgif.ArrowHeight# X  defaults.   Additional  text
428       sizes  can be added through the use of Tgif.FontSizes X default.  Addi‐
429       tional fonts can be added through the  use  of  Tgif.AdditionalFonts  X
430       default.   If  the  defaults fonts are not available, their replacement
431       fonts can be specified by Tgif.HasAlternateDefaultFonts and  related  X
432       defaults.   Additional colors can be added through the use of Tgif.Max‐
433       Colors, and Tgif.Color# X defaults.  One  can  also  select  AddColor()
434       from the Edit Menu to add a color.
435
436       Most  commands  in  tgif  can either be activated by a popup menu or by
437       typing an appropriate non-alphanumeric key.  All operations that change
438       any  object  can  be  undone  and  then redone.  Commands such as zoom,
439       scroll, change fonts while no text objects are selected, etc.  are  not
440       undoable.   The  undo/redo  history  buffer  size  can be set using the
441       Tgif.HistoryDepth X default.
442

TGIF SUBWINDOWS

444       The tgif windows are described in this section.
445
446       Top Window
447              Displays the current domain and the name of  the  file  tgif  is
448              looking at.  Mouse clicks and key presses have no effect.
449
450       Menubar Window
451              This  window is right under the Top Window.  Pull-down menus can
452              be activated from it with any mouse buttons.  Key  presses  have
453              no  effect.   If HideMenubar() is selected from the Layout Menu,
454              this window becomes invisible.   If  ShowMenubar()  is  selected
455              from  the  Layout  Menu  (which can be activated from the Canvas
456              Window below), this window becomes visible.
457
458              The View, Text, and Graphics pull-down menus are cascading menus
459              and  can not be pinned (see the Popup Menus subsection below for
460              a description).
461
462       Message Window
463              This is right under the Menubar Window and to the left.  It dis‐
464              plays  tgif  messages.   Clicking  the left mouse button in this
465              window scrolls the messages towards  the  bottom,  clicking  the
466              right  mouse  button  scrolls  towards  the top, and clicking or
467              dragging the middle mouse button scrolls to the location in  the
468              message history depending on where the mouse is clicked.  If the
469              <Shift> (or <Control>)  key  is  held  down  when  clicking  the
470              left/right mouse button, it scrolls right/left.
471
472       Panel (Choice) Window
473              This  is  the  window to the right of the Message Window, and it
474              contains a collection of icons (not to be confused with the tgif
475              icon objects) reflecting the current state of tgif.  In top/bot‐
476              tom, left/right order, it displays the current drawing mode, the
477              page   style   (portrait   or   landscape),  edit  (see  below),
478              print/export mode, zoom factor,  move  and  stretch  mode  (con‐
479              strained  or  unconstrained),  radius for rounded-corner rectan‐
480              gles, text rotation, page number or row/column, page layout mode
481              (stacked  or  tiled), horizontal alignment (L C R S -), vertical
482              alignment (T M B S -), font, text size, vertical spacing between
483              lines  of  text within the same text object, text justification,
484              shape (see below), stretchable  or  non-stretchable  text  mode,
485              dash  pattern,  line  style,  polyline,  spline, or interpolated
486              spline, line width, fill pattern, pen pattern, color,  and  spe‐
487              cial (see below).  Key presses have no effect in this window.
488
489              In  addition  to displaying the current state of tgif, the icons
490              in the Choice Window can also be  used  to  change  the  current
491              state.  Each icon is associated with a particular state variable
492              of tgif.  Clicking the left mouse  button  on  top  of  an  icon
493              cycles  the  state  variable  associated  with the icon forward;
494              clicking the right mouse button cycles the state variable  back‐
495              wards.   Dragging the middle mouse button on top of an icon usu‐
496              ally generates a popup menu which corresponds to an entry in the
497              Main   Menu   for  the  Canvas  Window  below.   (The  ``edit'',
498              ``shape'',  and ``special''  icons  mentioned  above  are  dummy
499              icons  that allow the ``edit'', ``shape'', and ``special'' menus
500              to be accessed in the Choice Window.  They  do  not  respond  to
501              left  and  right mouse clicks.)  The response to the dragging of
502              the middle mouse button is different for the zoom,  radius,  and
503              vertical spacing icons.  Dragging the mouse left or up increases
504              the zoom or decreases the radius or vertical  spacing;  dragging
505              the mouse right or down has the opposite effect.
506
507              If  there  are  objects  selected in the canvas window, then the
508              action of the mouse will cause the selected objects to change to
509              the  newly  selected  mode;  note that in this case, the current
510              choice won't change if the middle mouse button is  used  (unless
511              the Tgif.StickyMenuSelection X default is set to true).
512
513              The settings of the horizontal and vertical alignments determine
514              how objects (or vertices) align with each other when the ^l key‐
515              board  command is issued, how each individual object (or vertex)
516              aligns with the grids when the ^t keyboard  command  is  issued,
517              how  objects  or  vertices  distribute spatially with respect to
518              each other when the #l keyboard command is issued, and how  each
519              icon  replaces  the  old  icon  when the ^#u keyboard command is
520              issued.  The horizontal alignments are  left  (L),  center  (C),
521              right  (R),  space (S), and ignore (-).  The vertical alignments
522              are top (T), middle (M), bottom (B), space (S), and ignore  (-).
523              In  aligning  operations,  the space (S) and the ignore (-) set‐
524              tings have the same effect.  The space settings are used to dis‐
525              tribute  objects  such that the gaps between any two neighboring
526              objects are equal.  In vertex mode, any non-ignore setting  will
527              cause  the  selected vertices to be spaced out evenly.  The best
528              way to understand them is to try them out.
529
530              The text vertical spacing determines the  vertical  distance  to
531              advance  when  a carriage return is pressed during text editing.
532              If the user tries to set the value too negative, such  that  the
533              next  line  is exactly at the same position as the current line,
534              such a setting will not be allowed (this distance depends on the
535              current font and font size).
536
537       Canvas Window
538              This  is  the  drawing  area.  The effects of the actions of the
539              mouse are  determined  by  the  current  drawing  mode.   Before
540              tgif-4.x, dragging the right mouse button will generate the Mode
541              Menu.  This is disabled by default in tgif-4.x, but you can turn
542              it on using the Tgif.Btn3PopupModeMenu X default.
543
544              The  drawing  modes  are  (in  order, as they appear in the Mode
545              Menu) select, text, rectangle, corner oval,  center  oval,  edge
546              circle,  polyline  (open-spline),  polygon  (closed-spline), arc
547              (center first), arc (endpoints first), rounded-corner rectangle,
548              freehand    polyline   (open-spline),   select   vertices,   and
549              rotate/shear.  When drawing a rectangle, an oval, or a  rounded-
550              corner  rectangle,  if the <Shift> key is held down, a square, a
551              circle, or a rounded-corner square is drawn.  Dragging the  mid‐
552              dle mouse button will generate the Main Menu.
553
554              In the select mode, left mouse button selects, moves, stretches,
555              and  reshapes  objects  (double-click  will  ``de-select''   all
556              selected  objects  in vertex mode).  When an object is selected,
557              it is highlighted by little squares (referred as  handles  here)
558              at  the  corners/vertices  (using the Tgif.HandleSize X default,
559              the sizes of the handles can be customized).   Dragging  one  of
560              the  handles  stretches/reshapes  the  selected  object.  If one
561              wants to move a selected object, one should not  drag  the  han‐
562              dles.   Instead, one should drag other parts of the object.  For
563              example, if the object is a hollow rectangle (the fill  is  NONE
564              and  the pen is not NONE), in order to select the rectangle, one
565              should to click on the outline of the rectangle  with  the  left
566              mouse  button.   If  one  would  like to move the rectangle, one
567              should drag the outline of the rectangle  with  the  left  mouse
568              button.  If the object is a filled rectangle (fill is not NONE),
569              one can click inside the rectangle to select it  and  drag  any‐
570              where inside the rectangle to move it.
571
572              Holding  down  the <Shift> key and clicking the left mouse on an
573              object which is not currently selected will add  the  object  to
574              the  list  of already selected objects.  The same action applied
575              to an object which is already selected will cause it to  be  de-
576              selected.   When  stretching  objects  (not  reshaping poly-type
577              objects), holding down the <Shift> key after stretching is  ini‐
578              tiated  activates  proportional  stretching  (basically, a scale
579              operation is being performed).  In  non-stretchable  text  mode,
580              text objects can not be stretched or scaled.
581
582              Double-clicking  or  clicking  the middle mouse button while the
583              <Shift> key is held down will activate the teleport (or travel),
584              the  launch, or the execute internal command mechanism.  See the
585              sections on TELEPORT/HYPERJUMP, LAUNCH APPLICATIONS, and  INTER‐
586              NAL  COMMANDS  for  details.   Teleporting  has  precedence over
587              launching, which has precedence over executing an internal  com‐
588              mand.   In the text drawing mode, dragging the middle mouse but‐
589              ton while the <Cntrl> key is held down inside the edit text area
590              will move the edit text area.
591
592              The  arrow keys can also be used to move selected objects.  How‐
593              ever, if no objects are selected,  using  the  arrow  keys  will
594              scroll  the  drawing area by a small amount, and using the arrow
595              keys when <Control> key is held down will scroll a screen full.
596
597              In the select vertices mode, left mouse button selects and moves
598              vertices.   Only  the  top-level  polyline/open-spline and poly‐
599              gon/closed-spline objects which are  selected  when  the  vertex
600              mode  is  activated are eligible for vertex operations.  In this
601              mode, all eligible objects have their vertices highlighted  with
602              squares.   When a vertex is selected (using similar mechanism as
603              selecting objects described above),  it  is  doubly  highlighted
604              with  a  '+'  sign.   Operations available to these doubly high‐
605              lighted vertices are move, delete, align (with each other), dis‐
606              tribute (space them equally), and align to grid.  The arrow keys
607              can also be used to move selected vertices.
608
609              Objects can be locked (through the #< keyboard command).  Locked
610              object  are  shown with gray handles, and they can not be moved,
611              stretched, flipped,  rotated,  or  sheared.   When  objects  are
612              grouped, the resulting grouped object will also be locked if any
613              one of it's constituents is locked.   Locked  objects  can  have
614              their  properties, such as color, font, pen, etc., changed; fur‐
615              thermore, they can be deleted.
616
617              If the current move/stretch mode  is  of  the  constrained  type
618              (activated  and  deactivated  by  the #@ keyboard command), top-
619              level polylines will have the following  behavior.   In  a  move
620              operation,  if  both  endpoints  of  a  polyline  lie inside the
621              objects being moved, then the whole polyline  is  moved;  other‐
622              wise, if only one endpoint falls inside the objects being moved,
623              then that endpoint is moved.  The vertex that is the neighbor of
624              the moved endpoint may also be moved either horizontally or ver‐
625              tically.  If the last line segment is  horizontal  or  vertical,
626              then  the  neighbor vertex may be moved so that the direction of
627              the last line segment is maintained.  In a stretch (not reshape)
628              operation,  if an endpoint of a polyline lies inside the objects
629              being moved, that endpoint will be moved.  The  vertex  that  is
630              the  neighbor  of  the  moved endpoint will also be moved in the
631              same manner as described above.
632
633              When the drawing mode is set to text (a vertical-bar  cursor  is
634              shown),  clicking  the left mouse button causes selected text to
635              go into edit mode.  Dragging the left mouse button  or  clicking
636              the  left  mouse button while the <Shift> key is held down high‐
637              lights substrings of the text.  Double-clicking causes a word to
638              be  selected.   In  edit  mode,  key presses are treated as text
639              strings being inputed, and arrow keys are used to move the  cur‐
640              rent  input  position.   If  a key press is preceded by an <ESC>
641              key, then the character's bit 7 is turned on.  This allows  non-
642              ASCII  (international)  characters  to  be entered.  One can use
643              xfd(1) to see what the corresponding international character  is
644              for  an  ASCII  character.  For the Symbol font, symbols such as
645              the integral, partial derivative, and copyright symbols can  all
646              be found in this range.  There are some characters that are sup‐
647              ported by X11 but not by PostScript; these  characters  are  not
648              accepted by tgif.  If the text being edited is an attribute of a
649              object, <Meta><Tab> will move the cursor  to  the  next  visible
650              attribute  and <Shift><Tab> will move the cursor to the previous
651              visible attribute.
652
653              If the drawing mode is set to draw polygons (not closed-splines)
654              and  if  the <Shift> key is held down, the rubber-banded polygon
655              will be self-closing.
656
657              The freehand drawing mode can be used to draw polylines and open
658              splines.   All  intermediate  points are specified by moving the
659              mouse (as opposed to clicking the mouse buttons as in the  poly‐
660              line  mode).   The second endpoint is specified by releasing the
661              mouse button.
662
663              In all drawing modes (other than the text  mode),  pressing  the
664              <ESC> key cancels the drawing (creation) of the current object.
665
666              Middle  mouse  button always generates the main tgif popup menu.
667              Holding down the <Shift> key and clicking the right mouse button
668              will  change  the  drawing mode to select.  Key presses with the
669              <Control> or <Meta> key held down (referred to  as  non-alphanu‐
670              meric  key  presses since they can also generate control charac‐
671              ters) are treated as commands, and their bindings are summarized
672              in  the next section.  Users can also define single key commands
673              to emulate the functions of the non-alphanumeric  key  commands.
674              The SHORTCUTS section will describe the details.
675
676       Scrollbars
677              Clicking  the  left  mouse  button  in  the  vertical/horizontal
678              scrollbar causes the canvas window to  scroll  down/right  by  a
679              small  distance; clicking the right mouse button has the reverse
680              effect.  (The scrollbars in the popup windows for selecting file
681              names  and  domain  names  behave similarly.)  Clicking with the
682              <Shift> key held down will scroll a window  full.   Clicking  or
683              dragging  the middle button will cause the page to scroll to the
684              location which corresponds to the gray area in  the  scrollbars.
685              (Tgif  insists  that the left-top corner of the Canvas Window is
686              at a distance that is a nonnegative multiple  of  some  internal
687              units from the left-top corner of the actual page.)
688
689       Rulers
690              They  track  the  mouse  location.  Mouse clicks and key presses
691              have no effect.  When the page reduction/magnification is set at
692              100%,  the markings in the rulers correspond to centimeters when
693              the metric grid system is used, and they  correspond  to  inches
694              when  the  English  grid  system  is used.  When the page reduc‐
695              tion/magnification is not set at 100%, the markings do not  cor‐
696              respond  to  the above mentioned units any more (this is consid‐
697              ered as a known bug).
698
699       Interrupt/Hyperspace Window
700              This window is right below the Message Window and to the left of
701              the horizontal ruler.  When the Tgif.IntrCheckInterval X default
702              has a positive value, an interrupt icon is visible when the Can‐
703              vas  Window is being redrawn.  If the user clicks on this window
704              when the interrupt icon is visible, tgif aborts  the  repainting
705              of  the  objects.   If  this is done when a file is being opened
706              (either through Open() or Push()), the  drawing  of  objects  is
707              stopped,  but  the reading of the file continues (reading of the
708              file is not aborted).
709
710              If tgif is currently in the  hyperspace  mode  (please  see  the
711              HYPERSPACE  section  below  for more details), a space ship icon
712              will be displayed when the interrupt  icon  is  not  being  dis‐
713              played.   Clicking any button in this window will switch tgif in
714              and out of the hyperspace mode.
715
716       Page Control Window
717              The Page Control Window is to the left of the horizontal scroll‐
718              bar.   This  window  is empty if the current page mode is set to
719              the tijled page mode.  If the current page mode is  set  to  the
720              stacked page mode, each page has a tab in tabs subwindow of this
721              window.  Clicking the left mouse button on a  tab  goes  to  the
722              corresponding  page.  Clicking the middle mouse button brings up
723              the Page Menu.  When there are too many pages in  a  drawing  so
724              that one can not see the tabs for all the pages, one can use the
725              icons to the left side of the Page Control Window to scroll  the
726              tabs  subwindow.   Clicking  on  the first icon scrolls the tabs
727              subwindow such that the first tab is visible.  Clicking  on  the
728              4th  icon  scrolls  the tabs subwindow such that the last tab is
729              visible.  Clicking on the 2nd icon scrolls  the  tabs  subwindow
730              towards  the  first  tab by one tab and clicking on the 3rd icon
731              scrolls the tabs subwindow towards the last tab by one tab.
732
733       Status Window
734              This window is below the horizontal scrollbar.   It  shows  what
735              action  will  be  taken  if a mouse button is depressed.  When a
736              menu is pulled down or popped up, this window shows what  action
737              will be taken if a menu item is selected.  It also displays mis‐
738              cellaneous status information.  Mouse  clicks  and  key  presses
739              have  no  effect.   If  HideStatus() is selected from the Layout
740              Menu,  this  window  becomes  invisible.   If  ShowStatus()   is
741              selected from the Layout Menu, this window becomes visible.
742
743              By  default, when this window is displaying mouse button status,
744              right-handed mouse is assumed.  Setting the  Tgif.ReverseMouseS‐
745              tatusButtons  X default to true will reverse the status (as if a
746              left-handed mouse is used).
747
748       Popup Menus
749              When a menu is popped up by a mouse drag, the menu can be pinned
750              if it is dragged far enough horizontally (the distance is deter‐
751              mined by the setting of the Tgif.MainMenuPinDistance X default).
752              Clicking  the  right mouse button in a pinned menu will cause it
753              to disappear.  Dragging the left mouse button in a  pinned  menu
754              will  reposition the menu (except when the Tgif.TitledPinnedMenu
755              X default is set to true in which case  the  left  mouse  button
756              performs  the same function as the middle mouse button).  Click‐
757              ing the middle mouse button in it will activate the  item  right
758              below the mouse.
759

NON-ALPHANUMERIC KEY BINDINGS

761       Most  operations that can be performed in tgif can be activated through
762       non-alphanumeric keys (some operations can only  be  activated  through
763       popup  menus or shortcut keys).  This section summarizes the operations
764       that can be activated by a key stroke with  the  <Control>  and/or  the
765       <Meta>  key  held  down.   ``^''  denotes  the  <Control> key and ``#''
766       denotes the <Meta> key in the following description.  (The ``keys.obj''
767       file,  distributed with tgif, also summarizes the same information, but
768       it is organized differently.  This file can be viewed with tgif, and if
769       installed properly, it can be found in the same directory as the ``tgi‐
770       ficon.obj'' file, mentioned in the FILES section of this document.)
771
772         ^a select all
773         ^b send selected objects to the back
774         ^c copy selected objects into the cut buffer
775         ^d duplicate selected objects
776         ^e save/restore drawing mode
777         ^f send selected objects to the front
778         ^g group selected objects (the grouped object will be brought to  the
779       front)
780         ^i instantiate a building-block object
781         ^k pop  back  to  (or  return to) a higher level and close the symbol
782       file (reverse of ^v)
783         ^l align selected objects according to the current alignment settings
784         ^n open a new un-named object file
785         ^o open an object file to edit
786         ^p print the current page (or export in XBM,  XPM,  GIF,  HTML,  PDF,
787       EPS, or PS formats)
788         ^q quit tgif
789         ^r redraw the page
790         ^s save the current object/symbol file
791         ^t align selected objects to the grid according to the current align‐
792       ment
793         ^u ungroup selected objects
794         ^v paste from the cut buffer
795         ^w change the drawing mode to text
796         ^x delete all selected objects
797         ^y change domain
798         ^z escape to driver
799         ^, scroll left
800         ^. scroll right
801         ^- print the current page with a specified command
802
803         #a attach selected text objects to  a  selected  non-text  object  as
804       attributes
805         #b escape to driver
806         #c rotate selected objects counter-clockwise
807         #d decrement the grid size
808         #e send a token on a selected polyline
809         #f flash a selected polyline
810         #g show/un-show grid points
811         #h flip the selected objects horizontally
812         #i increment the grid size
813         #j hide the attribute names of the selected objects
814         #k change the drawing mode to select
815         #l distribute selected objects according to the current alignment
816         #m move/justify an attribute of a selected object
817         #n show all the attribute names of the selected objects
818         #o zoom out
819         #p import a .obj or a .sym file into the current file
820         #q change the drawing mode to polyline/open-spline
821         #r change the drawing mode to rectangle
822         #s escape to driver
823         #t detach all the attributes of the selected objects
824         #u undo
825         #v flip the selected objects vertically
826         #w rotate the selected objects clockwise
827         #x escape to driver
828         #y escape to driver
829         #z zoom in
830         #9 create a user-specified arc (12 o'clock position is 0 degree)
831         #0 update the selected objects according to current settings
832         #, scroll up
833         #. scroll down
834         #- show all the attributes of the selected objects
835         #[ align the left sides of objects
836         #= align the horizontal centers of objects
837         #] align the right sides of objects
838         #{ align the top sides of objects
839         #+ align the vertical centers of objects
840         #} align the bottom sides of objects
841         #" make the selected polygon regular (fit the original bounding box)
842         #% set the percent print reduction (if < 100%) or magnification (if >
843       100%)
844         #: go to default zoom
845         #` zoom out all the way so that the whole page is visible
846         #~ saved selected objects in a new file
847         #; cut and/or magnify a selected bitmap/pixmap object
848         #_ abut selected objects horizontally
849         #| abut selected objects vertically
850         ## break up text objects into single character text objects
851         #^ scroll to the origin set by SaveOrigin()
852         #@ toggle between constrained and unconstrained move (stretch) modes
853         #$ change the drawing mode to select vertices
854         #& align selected objects to  the  paper  according  to  the  current
855       alignment
856         #* redo
857         #( import an Encapsulated PostScript file
858         #) scale selected objects by specifying X and Y scaling factors
859         #< lock  the selected objects (can't be moved, stretched, flipped, or
860       rotated)
861         #> unlock the selected objects
862
863        ^#a add points to the selected poly or spline
864        ^#b change the text style to bold
865        ^#c change to center justified text
866        ^#d delete points from the selected poly or spline
867        ^#e change the drawing mode to rounded-corner rectangles
868        ^#f reverse-video the selected bitmap objects
869        ^#g toggle snapping to the grid points
870        ^#h hide all attributes of the selected objects
871        ^#i make the selected object iconic
872        ^#j make the selected icon object a grouped object
873        ^#k select color or black-and-white output
874        ^#l change to left justified text
875        ^#m make the selected object symbolic
876        ^#n make the selected symbol object a grouped object
877        ^#o change the text style to roman
878        ^#p change the text style to bold-italic
879        ^#q change the drawing mode to polygon/closed-spline
880        ^#r change to right justified text
881        ^#s save the file under a new name
882        ^#t change the text style to italic
883        ^#u update iconic representations of selected objects
884        ^#v change the drawing mode to oval
885        ^#w toggle between poly and spline
886        ^#x cycle among the various output file formats
887        ^#y push into (or edit) the definition part of a building-block (icon)
888       object
889        ^#z change the drawing mode to arcs
890        ^#. import an X11 bitmap file
891        ^#, import an X11 pixmap file
892        ^#- toggle between English and Metric grid systems
893        ^#= repeat the last Find command
894

SHORTCUTS

896       The user can define single character shortcut keys to emulate the func‐
897       tion of the non-alphanumeric key presses to activate commands.  This is
898       done  through  the  use  of the Tgif.ShortCuts X default.  (Please note
899       that these shortcut keys are only active when the drawing mode  is  not
900       set to the text mode.)  The Tgif.ShortCuts consists of a list of items,
901       each of which specifies the bindings between a key (may be case  sensi‐
902       tive)  and a command.  The items are separated by blanks, and each item
903       is interpreted as follows.  It consists of two parts, KEY and  COMMAND,
904       which  are  concatenated  together with a ':' character.  The format of
905       the KEY part is one of :<Key>x, !<Key>x, or <Key>x (here the  character
906       'x'  is  used  as  an example; furthermore, the substring <Key> must be
907       spelled exactly the way it appears here).   The  first  2  formats  are
908       equivalent,  they  specify  the  lower case x; the 3rd format specifies
909       both the characters 'x' and 'X'.  The COMMAND part  is  a  string  that
910       matches  strings  in  tgif's  popup menus with space characters removed
911       (exceptions are noted below).  This is  illustrated  by  the  following
912       example.  In the Edit menu, two of the entries are,
913
914          "Delete     ^x"
915          "SelectAll  ^a"
916
917       which  means  that <Control>x activates and Delete() command, and <Con‐
918       trol>a activates the SelectAll() command.  Therefore, both Delete() and
919       SelectAll() are valid names for the COMMAND part of a shortcut specifi‐
920       cation.  To complete the example, the following line  can  be  used  to
921       bind the lower case 'x' to Delete() and 'a' or 'A' to SelectAll():
922
923          Tgif.ShortCuts:  !<Key>x:Delete() \n\
924                      <Key>a:SelectAll()
925
926       For  more  examples,  please  see the sample X defaults file, tgif.Xde‐
927       faults, included in the tgif distribution.
928
929       Here is a list of exceptions where the COMMAND does not match a command
930       name in a menu entry.  The left entry is a proper COMMAND name, and the
931       right is a list of strings that's shown in popup menus which  the  COM‐
932       MAND would correspond to.
933
934          CyclePrintFormat()    Printer,    LaTeXFig,    RawPSFile,   XBitmap,
935       TextFile, EPSI, GIF/ISMAP, TiffEPSI, NetList
936          ToggleBW/ColorPS()    BlkWhtPS, ColorPS
937          ToggleGridSystem()    EnglishGrid, MetricGrid
938          ToggleMapShown() ShowBit/Pixmap, HideBit/Pixmap
939          ToggleUseGrayScale()  UseGrayScale, NoGrayScale
940          ToggleMoveMode() ConstMove, UnConstMove
941          ToggleShowMeasurement()    ShowMeasurement, HideMeasurement
942
943          ToggleLineType() (advances between different curved shapes)
944          ScrollPageUp()   (scroll up a window full)
945          ScrollPageDown() (scroll down a window full)
946          ScrollPageLeft() (scroll left a window full)
947          ScrollPageRight()     (scroll right a window full)
948          FreeHandMode()   (change the drawing  mode  to  freehand  poly/open-
949       spline)
950          CenterAnEndPoint()    (move  an endpoint of a polyline object to the
951       center of another object)
952          ToggleNamedAttrShown(<x>=) (toggle name shown for the attribute <x>)
953          ToggleSmoothHinge()   (convert smooth to hinge and hinge  to  smooth
954       points)
955          ToggleShowMenubar()   ShowMenubar, HideMenubar
956          ToggleShowStatus()    ShowStatus, HideStatus
957          ToggleShowMode() ShowMode, HideMode
958          ToggleOneMotionSelMove()   OneMotionSelMove, ClickSelClickMove
959          ToggleHyperSpace()    GoHyperSpace, LeaveHyperSpace
960          ImportOtherFileType(<x>)   (import using a filter named <x>)
961          BrowseOtherType(<x>)  (browse using a filter named <x>)
962          PrintSelectedObjs()   (print selected objects)
963
964       In  addition  to  the  above list, the following are also valid COMMAND
965       names  (having  the  obvious  meaning):  ScrollLeft(),   ScrollRight(),
966       ScrollUp(),  ScrollDown(),  SelectMode(),  DrawText(),  DrawBox(), Dra‐
967       wOval(),  DrawPoly(),  DrawPolygon(),   DrawRCBox(),   DrawArc(),   and
968       SelectVertexMode().
969

COLORS AND COLORMAPS

971       In  most  X environments, only 256 colors can be displayed at once.  In
972       these environment, if an  application  needs  128  colors  and  another
973       application needs a totally different 129 colors, both applications can
974       not be displayed at once with all the colors they want.  X  solves  the
975       problem  by  allowing applications to use their own colormaps (known as
976       private colormaps).  Each private colormap can have at most 256 colors.
977       There  is also a shared colormap available for applications that do not
978       wish to use private colormaps.  The main  problem  with  using  private
979       colormaps  is that a user will see the the well-known colormap flashing
980       phenomenon when he/she switches in and out  of  applications  that  use
981       private colormaps.
982
983       Tgif uses the shared colormap initially.  When it needs more color than
984       what is available in the shared colormap, it will use  a  private  col‐
985       ormap  automatically.   When  tgif no longer needs the extra colors, it
986       does not automatically revert to using the shared colormap  because  it
987       needs  to be able to undo operations that use the extra colors.  If one
988       does no longer needs the objects in the undo  buffer,  one  can  select
989       FlushUndoBuffer() from the Edit Menu to flush the undo buffer.  At this
990       point, tgif will attempt to use the shared colormap to avoid  the  col‐
991       ormap flashing problem.  If one often uses XPM and GIF objects, one can
992       bind the <Shift>f key to the FlushUndoBuffer() operation by setting the
993       following  X default and uses the <Shift>f key to regain entries in the
994       colormap when an XPM/GIF object is deleted:
995
996              Tgif.ShortCuts: !<Key>F:FlushUndoBuffer()
997
998       Even when a private colormap is used, only 256 colors can  be  used  at
999       once.  Therefore, it is not possible to import two 256-colors GIF files
1000       into the same drawing unless the colors are somehow reduced to  fit  in
1001       the  256-colors  colormap.  This can be done through dithering which is
1002       described in the IMPORT RASTER GRAPHICS section below.
1003

IMPORT RASTER GRAPHICS

1005       The native raster graphics formats that tgif supports are the  XBM  and
1006       XPM  formats.  In order to import color raster graphics file of another
1007       format, tgif can work with external tools that can convert non-XPM for‐
1008       mat  files to an XPM files.  A popular raster format conversion toolkit
1009       is the pbmplus(1) (also known as the netpbm(1)) toolkit.  It  can  con‐
1010       vert a GIF file (e.g., "foo.gif") to an XPM file (e.g., "foo.xpm") with
1011       the following command (giftopnm is in netpbm; an earlier version of  it
1012       called giftoppm exists in pbmplus):
1013
1014              giftopnm foo.gif | ppmtoxpm > foo.xpm
1015
1016       When  working  with  tgif, a GIF file name will be supplied by tgif and
1017       the output of ppmtoxpm will be directly read by tgif  through  a  pipe;
1018       therefore, the previous sequence is replaced by an X default containing
1019       the following form (which happens to be the  default  setting  for  the
1020       Tgif.GifToXpm X default):
1021
1022              giftopnm %s | ppmtoxpm
1023
1024       The  "%s"  is to be replaced by a GIF file name.  The above is referred
1025       to as a filter.
1026
1027       To be able to import other types of raster graphics files, one can  use
1028       Tgif.MaxImportFilters  and  Tgif.ImportFilter#  X  defaults  to specify
1029       additional filters.  The following example adds a JPEG filter:
1030
1031              Tgif.MaxImportFilters: 1
1032              Tgif.ImportFilter0: \n\
1033                      JPEG-222 jpg;jpeg \n\
1034                      djpeg -gif -colors 222 %s | \n\
1035                      giftopnm | ppmtoxpm
1036
1037       The "JPEG-222" above is the name given to the filter (must not  contain
1038       any space character).  The "jpg;jpeg" are possible file extensions sep‐
1039       arated by semicolons.  The  rest  is  the  filter  specification.   The
1040       djpeg(1) program is part of the libjpeg distribution.  It can convert a
1041       JPEG file to a GIF file.  The above filter also restrict the output  to
1042       have  a  maximum  of 222 colors.  (The 222 is chosen arbitrarily.  Many
1043       XPM files use some ``standard'' 32 colors, so one  may  want  to  leave
1044       room form them.)
1045
1046       To  invoke  a filter, one can select ImportOtherFile() or BrowseOther()
1047       commands from the File Menu.  This will bring up  a  dialogbox  listing
1048       the available filters by their names (e.g., "JPEG-222").  After select‐
1049       ing a filter, tgif continues in  a  similar  manner  as  with  invoking
1050       ImportXPixmap() or BrowseXPixmap() commands from the File Menu.
1051
1052       The above example is not suitable for the BrowseOther() command because
1053       only 256 colors can be used in a drawing (as explained  in  the  COLORS
1054       AND COLORMAPS section above).  In order for BrowseOther() to work well,
1055       one can use dithering to represent an image with a dithered image  that
1056       only  uses  a set of standard colors.  The example below uses ppmdither
1057       from the pbmplus/netpbm toolkit:
1058
1059              Tgif.MaxImportFilters: 2
1060              Tgif.ImportFilter0: \n\
1061                      JPEG-222 jpg;jpeg \n\
1062                      djpeg -gif -colors 222 %s | \n\
1063                      giftopnm | ppmtoxpm
1064              Tgif.ImportFilter1: \n\
1065                      JPEG-dithered jpg;jpeg \n\
1066                      djpeg -gif %s | \n\
1067                      giftopnm | ppmdither | ppmtoxpm
1068
1069       If one is working with one JPEG image, one can select ImportOtherFile()
1070       then  select "JPEG-222" to get as many as 222 colors.  If one is brows‐
1071       ing for JPEG images, one can select BrowseOther()  then  select  "JPEG-
1072       dithered".
1073

OBJECT NAMES

1075       If  an object contains an attribute (please see the ATTRIBUTES sections
1076       below for details) whose name is the  string  "name"  (case-sensitive),
1077       the  value  part of the attribute is the name of the object.  Subobject
1078       of  a  composite  object   can   be   named   using   a   path,   e.g.,
1079       <t>!<s1>!<s2>!...,  where  <t>  is the name of a top-level object which
1080       directly contains <s1> which directly contains <s2>, etc.  !* refers to
1081       the currently selected object (if more than one object is selected, the
1082       top-most object in the stacking order is used).  !*<s1>!<s2> names  the
1083       <s2> subject of the <s1> subject of the currently selected object.
1084
1085       The  following  is  not  fully supported, yet (only the #<page> form is
1086       supported at this time).  Every object in a tgif file can  be  uniquely
1087       named  using  the notation #<page>!<path>, where <page> can be a string
1088       that specifies the name of a page or #<number> which specifies  a  page
1089       number.   The  <path>  is  described  in the previous paragraph.  If an
1090       object o1 is referenced by another object o2 within the same  file  (no
1091       file  name or URL is specified before #) and <page> is omitted, then o1
1092       must be on the same page as o2.  If a file name  or  URL  is  specified
1093       before # and <page> is omitted, then o1 must be on the first page.
1094

ATTRIBUTES

1096       Attributes  are  text strings of the form name=value or value which are
1097       attached to either the current drawing or  any  non-text  objects.   An
1098       attribute  attached  to the current drawing is called a file attribute;
1099       otherwise, it is a regular attribute.  Attributes can be  attached  and
1100       detached from these objects except in the following case:
1101
1102              Attributes  appearing  in  the symbol object in a building-block
1103              object file can not be detached when the  building-block  object
1104              is  instantiated.   These  attributes  are  considered to be the
1105              ``inherited'' attributes of the icon object.  (If it  is  really
1106              necessary  to detach inherited attributes of an icon object, the
1107              icon object can be ``de-iconified'' by using  UnMakeIconic()  in
1108              the  Special  Menu  to  make  it  a  grouped  object;  then  the
1109              attributes can be detached.)
1110
1111       A file attribute is always invisible.  For  a  regular  attribute,  the
1112       user  has  control  over  which part of the attribute is displayed.  An
1113       entire attribute can be made invisible, or only its name  can  be  made
1114       invisible  (accomplished  through  the commands under the special menu,
1115       such as #m, #n, #j, #-, and ^#h).
1116

TELEPORT/HYPERJUMP

1118       Tgif provides the mechanism to travel between .obj and .sym files.   If
1119       the  middle  mouse  button is clicked on an object with the <Shift> key
1120       held down (or double-clicking  such  an  object),  tgif  looks  for  an
1121       attribute  named warp_to (by default) or href of that object.  The only
1122       difference between warp_to and href is  that  ".obj"  is  automatically
1123       appended  to the value of a warp_to attribute while the value of a href
1124       attribute is taken as is.  (Please note that warp_to is  obsolete  now.
1125       It  is  still  supported  for  the  sake of compatibility.)  If such an
1126       attribute is found, the value part of the attribute is  interpreted  as
1127       the  name  of  a .obj file to travel to.  (If tgif is in the hyperspace
1128       mode, then clicking the left mouse button has  the  same  effect.)   If
1129       there  are multiple href attributes on the object, but are in different
1130       colors, tgif will use the one that has the same color  as  the  current
1131       color appearing in the Choice Window.  If the current file is modified,
1132       the user is prompted to save the file  before  traveling  to  the  next
1133       file.   If  the  value  part  of the href attribute starts with the '/'
1134       character, the value is treated as an absolute file name; otherwise, it
1135       is treated as a relative file name.
1136

HYPERSPACE

1138       Tgif  provides  a  hyperspace mode to facilitate traveling between .obj
1139       files.  The hyperspace mode is entered when GoHyperSpace() is  selected
1140       from  the  Navigate  Menu.  In hyperspace mode, the little window below
1141       the Message Window will show a little space ship.  The hyperspace  mode
1142       is  also  automatically entered when a remote URL is opened (unless the
1143       Tgif.AutoHyperSpaceOnRemote X default is set to false).
1144
1145       In the hyperspace mode, certain objects are considered hot-links.  When
1146       the  cursor  is  placed  on  top of these object, it will change from a
1147       pointer to a hand to indicate that clicking on the  left  mouse  button
1148       will  invoke  some  actions.  An object is a hot-link if it contains an
1149       attribute described in either the TELEPORT/HYPERJUMP,  LAUNCH  APPLICA‐
1150       TIONS, or INTERNAL COMMANDS section.
1151
1152       The  hyperspace  mode is exited when the drawing mode is changed or the
1153       LeaveHyperSpace() is selected from the Navigate Menu.
1154

LAUNCH APPLICATIONS

1156       Tgif provides the mechanism to  launch  applications.   If  the  middle
1157       mouse button is clicked on an object with the <Shift> key held down (or
1158       double-clicking such an object), tgif  looks  for  an  attribute  named
1159       launch (by default) of that object.  If such an attribute is found, the
1160       value part of the attribute is interpreted as a sh(1) command  to  exe‐
1161       cute.   Same  color rule applies as described in the TELEPORT/HYPERJUMP
1162       section above.  If the command ends with the '&' character, tgif  forks
1163       itself   (what   actual   happens   depends   on   whether  the  _BACK‐
1164       GROUND_DONT_FORK compiler flag is defined or not at compile  time)  and
1165       the  command  is  executed  by the child process; otherwise, popen() is
1166       used to execute the command (in this case, if the command hangs,  there
1167       is  no way provided to terminate the command, and tgif will not be able
1168       to recover from it).  Within the command, values of other attributes of
1169       the  same  object  can be used.  The syntax is:  $(attr), where attr is
1170       the name of another attribute.
1171
1172       For example, if one wants to perform a man(1) function, one can draw  a
1173       box;  enter  a  line  of  text "title=tgif"; enter another line of text
1174       "launch=xterm -rw -e man $(title)"; select all three objects  using  ^a
1175       keyboard  command; attach the text strings to the box using #a keyboard
1176       command; and launch the man(1) command by  clicking  the  middle  mouse
1177       button  on  the  box  (or  the text strings) withe the <Shift> key held
1178       down.  If one wants to be more fancy, the box can be replaced by an X11
1179       pixmap  object;  the  'launch' attribute can be made invisible; and the
1180       'title' attribute can be center justified  and  with  its  name  hidden
1181       using the #m keyboard command.
1182
1183       By  default,  launching of an application is by default disabled in the
1184       hyperspace mode for security considerations (this can be overridden  by
1185       the  Tgif.AllowLaunchInHyperSpace  X default setting).  If a lunch com‐
1186       mand is encountered in the hyperspace mode, the  command  is  displayed
1187       and the user is prompted to see if he/she wants to execute the command.
1188

INTERNAL COMMANDS

1190       Tgif  provides the mechanism to execute internal commands.  If the mid‐
1191       dle mouse button is clicked on an object with the <Shift> key held down
1192       (or  double-clicking such an object), tgif looks for an attribute named
1193       exec (by default) of that object.  If such an attribute is  found,  the
1194       value  part  of the attribute is interpreted as a list of internal com‐
1195       mands (separated by semicolor) to execute.  Same color rule applies  as
1196       described  in  the TELEPORT/HYPERJUMP section above.  A command usually
1197       takes the form:
1198
1199              <cmd_name> ( <arg1>, <arg2>, ..., <argN> )
1200
1201       An argument of a command can be a string argument or  a  numeric  argu‐
1202       ment.   A string argument must be enclosed in double-quotes.  A numeric
1203       argument can be a numerical value or a string of the form "$(x)", where
1204       x  is  the name of another attribute (this form is referred as the sub‐
1205       stitution form).  A string argument can also contain substitution form.
1206       Please note that only one-level substitution are performed (the collec‐
1207       tion of internal commands should be viewed as a simple  scripting  lan‐
1208       guage and not a declaration language).
1209
1210       When  an  attribute is referenced in an internal command, the attribute
1211       name can be in the form, <obj_name>.<string>, where <obj_name> must  be
1212       in  the  form  specified in the OBJECT NAMES section above and <string>
1213       contains only alphanumeric characters and the underscore ('_')  charac‐
1214       ter.   If the first 2 characters of an attribute name is "!.", the rest
1215       of the attribute name names a file attribute.  If the first  2  charac‐
1216       ters of an attribute name is "!*", the rest of the attribute name names
1217       an attribute of the currently selected object (if more than one  object
1218       is selected, the top-most object in the stacking order is used).
1219
1220       Please note that lines that begin with "//" are treated as comments.
1221
1222       The following internal commands are supported:
1223
1224       launch(<attr_name>)
1225              The  value  of  the attribute specified by <attr_name> is inter‐
1226              preted as a sh(1) command to execute.   Please  see  the  LAUNCH
1227              APPLICATIONS section above for more details.
1228
1229       exec(<attr_name>)
1230              The  value  of  the attribute specified by <attr_name> is inter‐
1231              preted as an internal command to execute.  This is similar to  a
1232              subroutine  call.  Please note that the internal command is exe‐
1233              cuted  in  the  context  of  the  top-level  which  contain  the
1234              attribute.
1235
1236       mktemp(<str>,<attr_name>)
1237              This  command makes a unique file name.  The <str> argument is a
1238              template string, e.g., "/tmp/TgifXXXXXX",  and  it  requires  at
1239              least  two  "/"  in it.  The result of mktemp() is stored as the
1240              value of the attribute specified by <attr_name>.  Please see the
1241              man  pages  of  the  C  library  function on mktemp(3C) for more
1242              details.  (If tgif is compiled with the -D_USE_TMPFILE  compiler
1243              option, then tempnam(3S) is used instead.)
1244
1245       create_file_using_simple_template(<template>,<out‐
1246       put>,<str>,<attr_name>)
1247              The file specified by <template> is  scanned  for  a  line  that
1248              matches <str>.  When such a line is found, that line is replaced
1249              by the value of the attribute  specified  by  <attr_name>.   The
1250              result is put into the file specified as <output>.
1251
1252       update_eps_child(<eps_file_name>)
1253              This  only  works  if  the  object being executed is a composite
1254              object.  If the object has a component which is an imported  EPS
1255              (Encapsulated PostScript) object, it is replaced by the EPS file
1256              specified by <eps_file_name>.  If the object does not contain an
1257              EPS subobject, an EPS subobject is created.
1258
1259       update_xbm_child(<xbm_file_name>)
1260              This  only  works  if  the  object being executed is a composite
1261              object.  If the object has a component which is an imported  XBM
1262              (X11 bitmap) object, it is replaced by the XBM file specified by
1263              <xbm_file_name>.  If the object does not contain an  XBM  subob‐
1264              ject, an XBM subobject is created.
1265
1266       update_xpm_child(<xpm_file_name>)
1267              This  only  works  if  the  object being executed is a composite
1268              object.  If the object has a component which is an imported  XPM
1269              (X11 pixmap) object, it is replaced by the XPM file specified by
1270              <xpm_file_name>.  If the object does not contain an  XPM  subob‐
1271              ject, an XPM subobject is created.
1272
1273       delete_eps_child(<obj_name>)
1274              This  only  works  if the object named <obj_name> is a composite
1275              object.  If the object has a component which is an EPS (Encapsu‐
1276              lated PostScript) object, it is deleted.  If the object does not
1277              contain an EPS subobject, no operation is performed.
1278
1279       delete_xbm_child(<obj_name>)
1280              This only works if the object named <obj_name>  is  a  composite
1281              object.   If  the  object  has  a component which is an XPM (X11
1282              pixmap) object, it is deleted.  If the object does  not  contain
1283              an XPM subobject, no operation is performed.
1284
1285       delete_xpm_child(<obj_name>)
1286              This  only  works  if the object named <obj_name> is a composite
1287              object.  If the object has a component which is an XBM (X11 bit‐
1288              map)  object,  it is deleted.  If the object does not contain an
1289              XBM subobject, no operation is performed.
1290
1291       flip_deck(<times>,<frames_per_second>,<style>)
1292              This only works if the object  being  executed  is  a  composite
1293              object and all subobjects of the composite object are X11 bitmap
1294              or X11 pixmap objects and have identical  positions  and  sizes.
1295              The  <times>  argument specifies the number of times the deck is
1296              flipped.  It can be a number  or  the  string  "infinite".   The
1297              <frames_per_second>  argument must be a number between 1 and 60.
1298              The <style> argument can  be  either  "linear"  or  "ping_pong".
1299              When  this  command is being executed, any mouse button click or
1300              key click aborts command execution.
1301
1302       read_file_into_attr(<file_name>,<attr_name>)
1303              This command reads a file into an  attribute.   The  <file_name>
1304              argument  names  a  file,  e.g., "/tmp/foo".  The content of the
1305              file is  read  as  the  value  of  the  attribute  specified  by
1306              <attr_name>.   If  the  file  can  not  be  opened for read, the
1307              attribute's value is set to an empty string.
1308
1309       write_attr_into_file(<attr_name>,<file_name>)
1310              This command writes the value of an attribute into a file.   The
1311              <file_name>  argument names a file, e.g., "/tmp/foo".  The value
1312              of the  attribute  specified  by  <attr_name>  is  written  into
1313              <file_name>.
1314
1315       append_attr_into_file(<attr_name>,<file_name>)
1316              This command appends the value of an attribute into a file.  The
1317              <file_name> argument names a file, e.g., "/tmp/foo".  The  value
1318              of  the  attribute  specified  by  <attr_name>  is appended into
1319              <file_name>.
1320
1321       select_obj_by_name(<obj_name>)
1322              This command  silently  (no  highlighting  handles)  selects  an
1323              object  named  <obj_name>.   Please see the OBJECT NAMES section
1324              above for the specification of object names.
1325
1326       select_top_obj()
1327              This command silently (no highlighting handles) selects the  top
1328              object.  This command fails if there is no object in the current
1329              page.
1330
1331       delete_selected_obj()
1332              This command deletes all selected objects.  This  command  fails
1333              if no object is selected.
1334
1335       unselect_all_obj()
1336              This   command   de-selects   all   selected  objects.   If  the
1337              select_obj_by_name() command is used, this command must be  used
1338              eventually.
1339
1340       move_selected_obj_relative(<dx>,<dy>)
1341              This command moves the selected object by <dx> absolute units in
1342              the x direction and <dy> absolute units in the y direction.
1343
1344       repeat(<cmd_attr_name>,<times>)
1345              This   command   executes   the   internal   command   in    the
1346              <cmd_attr_name> attribute <times> times.
1347
1348       hyperjump(<attr_name>)
1349              This command teleports to the file name or URL name found in the
1350              <attr_name> attribute.
1351
1352       make_cgi_query(<dest_attr_name>,<url_name>,<list_attr_name>)
1353              This command constructs an URL in the Common  Gateway  Interface
1354              (CGI)  format  in  the  <dest_attr_name>  attribute.  <url_name>
1355              names the  CGI  server  script  and  <list_attr_name>  names  an
1356              attribute  whose value are comma-separated attribute names.  For
1357              example, if an object has the following attributes:
1358
1359                     attr_list=last_name,first_name
1360                     last_name=Cheng
1361                     first_name=Bill
1362                     final_url=
1363                     exec=make_cgi_query(final_url,
1364                         http://bourbon.usc.edu:8001/cgi-bin/test-cgi,
1365                         attr_list)
1366
1367              Executing this object will construct  the  following  string  in
1368              final_url:
1369
1370                     http://bourbon.usc.edu:8001/cgi-bin/test-
1371                     cgi?last_name=Cheng&first_name=Bill
1372
1373              An subsequent hyperjump(final_url) command  can  be  invoked  to
1374              execute  the corresponding "test-cgi" CGI server script with the
1375              last_name and first_name arguments.
1376
1377              For a  detailed  description  of  CGI  scripts,  the  reader  is
1378              referred to [2].
1379
1380       wait_click(<cursor_name>,<grab>,<attr_name>)
1381              This command displays the <cursor_name> cursor and waits for the
1382              user to click a mouse button.  If <cursor_name>  is  the  string
1383              NULL (case-sensitive), the cursor will not change.  If <Btn1> is
1384              clicked, the command terminates and 1 is placed in  <attr_name>.
1385              If  <Btn2>  is  clicked,  2  is  placed in <attr_name>, etc.  If
1386              <grab> set to TRUE (case-sensitive), then the mouse  is  grabbed
1387              by tgif.  Valid <cursor_name> can be found in <X11/cursorfont.h>
1388              (without the XC_ prefix).
1389
1390       sleep(<cursor_name>,<ms_interval>)
1391              This command displays the <cursor_name>  cursor  and  waits  for
1392              <ms_interval>  milliseconds  to elapse.  If <cursor_name> is the
1393              string NULL (case-sensitive), the cursor will not change.   This
1394              command  can be interrupted (and aborted) by any mouse clicks or
1395              key strokes.  Valid <cursor_name> can be found  in  <X11/cursor‐
1396              font.h> (without the XC_ prefix).
1397
1398       begin_animate()
1399              This  command is used to start an animation sequence (using dou‐
1400              ble-buffering).  Please note that, by default, tgif prepares for
1401              undo/redo.  For a long animation sequence, the undo/redo records
1402              may take up a lot  of  memory.   In  this  case,  disable_undo()
1403              (described below) should be used before this command.
1404
1405       end_animate()
1406              This command is used to terminate an animation sequence.
1407
1408       set_redraw(<true_or_false>)
1409              This   command   is   used  to  temporarily  disable  redraw  if
1410              <true_or_false> is FALSE (case-sensitive) when tgif  is  in  the
1411              animation  mode  (turned  on  by  begin_animate()).   If a shuf‐
1412              fle_obj_to_top() or a shuffle_obj_to_bottom()  command  is  used
1413              before  a  move  command, set_redraw(FALSE) and set_redraw(TRUE)
1414              should be used immediately before and immediately after, respec‐
1415              tively, the shuffle_obj_to_top() or shuffle_obj_to_bottom() com‐
1416              mand.
1417
1418       set_selected_obj_color(<color_str>)
1419              This command  changes  the  color  of  the  selected  object  to
1420              <color_str>.   If  no object is selected, the current color will
1421              be changed to <color_str>.
1422
1423       set_selected_obj_fill(<fill_index>)
1424              This command changes the fill pattern of the selected object  to
1425              <fill_index>,  which must be between 0 (for no fill) and 31.  If
1426              no object is selected, the current fill pattern will be  changed
1427              to <fill_index>.
1428
1429       set_selected_obj_pen(<pen_index>)
1430              This   command  changes  the  pen  of  the  selected  object  to
1431              <pen_index>, which must be between 0 (for no pen) and 31.  If no
1432              object   is  selected,  the  current  pen  will  be  changed  to
1433              <pen_index>.
1434
1435       set_selected_obj_line_width(<width>,<arrow_w>,<arrow_h>)
1436              This command changes the line  width,  arrow  width,  and  arrow
1437              height  of  the  selected  object  to  <width>,  <arrow_w>,  and
1438              <arrow_h>, respectively.  If <arrow_w> or <arrow_h> is  -1,  the
1439              arrow  width  or arrow height, respectively, is not changed.  If
1440              no object is selected, the current line width will be changed to
1441              the  one  that  matches  <width>,  <arrow_w>, and <arrow_h> most
1442              closely.  (Closeness is measured such  that  the  difference  is
1443              width  is  counted  10  times the diffference in arrow width and
1444              arrow height.)
1445
1446       set_selected_obj_spline(<spline_type>)
1447              This command changes the spline type of the selected  object  to
1448              <spline_type>,  which  can be straight, spline, or interpolated.
1449              If no object is  selected,  the  current  spline  type  will  be
1450              changed to <spline_type>.
1451
1452       set_selected_obj_arrow(<arrow_type>)
1453              This  command  changes  the arrow type of the selected object to
1454              <arrow_type>, which can be none, right, left, or double.  If  no
1455              object  is  selected,  the current arrow type will be changed to
1456              <arrow_type>.
1457
1458       set_selected_obj_dash(<dash_index>)
1459              This command changes the dash type of  the  selected  object  to
1460              <dash_index>,  which  must  be  between  0 (solid) and 8.  If no
1461              object is selected, the current dash type  will  be  changed  to
1462              <dash_index>.
1463
1464       set_selected_obj_trans_pat(<trans_pat>)
1465              This  command  changes selected object to have opaque pattern if
1466              <trans_pat> is 0; it changes selected object to have transparent
1467              pattern if <trans_pat> is any other numeric value.  If no object
1468              is selected, the current fill and pen pattern will be opaque  if
1469              <trans_pat>  is  0 and will be transparent if <trans_pat> is any
1470              other numeric value.
1471
1472       set_selected_obj_rcb_radius(<rcb_radius>)
1473              This command changes the rcbox radius of the selected object  to
1474              <rcb_radius>, which must be greater or equal to 4.  If no object
1475              is selected,  the  current  rcbox  radius  will  be  changed  to
1476              <rcb_radius>.
1477
1478       set_selected_text_vspace(<vspace>)
1479              This  command  changes the text vspace of the selected object to
1480              <vspace>.  If no object is selected,  the  current  text  vspace
1481              will be changed to <vspace>.
1482
1483       set_selected_text_just(<justification>)
1484              This  command  changes  the  text  justification of the selected
1485              object to <justification>, which can be left, center, or  right.
1486              If no object is selected, the current text justification will be
1487              changed to <justification>.
1488
1489       set_selected_text_font(<ps_font_name>)
1490              This command changes the font and text  style  of  the  selected
1491              object    to    match   <ps_font_name>.    Examples   of   valid
1492              <ps_font_name> can be found when  one  selects  CopyProperties()
1493              from  the Properties Menu.  The item listed under text font is a
1494              valid <ps_font_name>.  If no object  is  selected,  the  current
1495              font  and  text  style  will be changed to match <ps_font_name>.
1496              This command fails if no match can be found,
1497
1498       set_selected_text_style(<textstyle>)
1499              This command changes the text style of the  selected  object  to
1500              <textstyle>,  which  can  be r (for roman), b (for bold), i (for
1501              italic), or bi (for bold-italic).  If no object is selected, the
1502              current text style will be changed to <textstyle>.
1503
1504       set_selected_text_size(<size>)
1505              This  command  changes  the  text size of the selected object to
1506              <size>.  If <size> ends with the substring "pt", then point size
1507              is  used  instead of text size.  If such as size cannot be found
1508              in the Size Menu, the closest size in  the  Size  Menu  will  be
1509              used.   If  no object is selected, the current text size will be
1510              changed to <size> or the closest size.
1511
1512       set_selected_text_underline(<underline>)
1513              This command removes text underline from the selected object  if
1514              <underline>  is  0; it underlines text in the selected object if
1515              <underline> is  any  other  numeric  value.   If  no  object  is
1516              selected,  the  current  text  underline will be changed accord‐
1517              ingly.
1518
1519       inc(<attr_name>,<expr>)
1520              This command increment <attr_name>  by  the  expression  <expr>.
1521              Both  the  value  of  <attr_name>  and  <expr> must be integers.
1522              Please see the ARITHMETIC EXPRESSIONS section below for  details
1523              about expressions.
1524
1525       dec(<attr_name>,<expr>)
1526              This command decrement <attr_name> by <expr>.  Both the value of
1527              <attr_name> and <expr> must be integers.
1528
1529       shuffle_obj_to_top(<obj_name>)
1530              This command move <obj_name> to the top.   If  <obj_name>  is  a
1531              subobject,  it  is  raised to the top, relative to its siblings.
1532              This command is useful in animation where a selected frame (sub‐
1533              object) can be raised to the top.
1534
1535       shuffle_obj_to_bottom(<obj_name>)
1536              This  command move <obj_name> to the bottom.  If <obj_name> is a
1537              subobject, it is raised to the bottom, relative to its siblings.
1538              This command is useful in animation where a selected frame (sub‐
1539              object) can be raised to the bottom.
1540
1541       disable_undo()
1542              This command cleans up the undo/redo records  and  disable  undo
1543              (and  stop  recording undo/redo information).  The original his‐
1544              tory depth is saved away.  This command should be used before  a
1545              long animation sequence.
1546
1547       enable_undo()
1548              This  command  restores the history depth saved away by the dis‐
1549              able_undo() command and enables undo/redo.  This command  should
1550              be eventually used after disable_undo() is called.
1551
1552       get_drawing_area(<ltx_attr>,<lty_attr>,<rbx_attr>,<rby_attr>)
1553              This command stores the absolute coordinate of the current draw‐
1554              ing area in the specified  attributes.   <ltx_attr>  stores  the
1555              left-top  X coordinate, <lty_attr> stores the left-top Y coordi‐
1556              nate, <rbx_attr>  stores  the  right-bottom  X  coordinate,  and
1557              <rby_attr> stores the right-bottom Y coordinate.
1558
1559       get_selected_obj_bbox(<ltx_attr>,<lty_attr>,<rbx_attr>,<rby_attr>)
1560              This  command stores the absolute coordinate of the bounding box
1561              of the selected object in the specified attributes.   <ltx_attr>
1562              stores the left-top X coordinate, <lty_attr> stores the left-top
1563              Y coordinate, <rbx_attr> stores the right-bottom  X  coordinate,
1564              and <rby_attr> stores the right-bottom Y coordinate.  The bound‐
1565              ing box is computed assuming that all lines are of width 0.
1566
1567       get_named_obj_bbox(<obj_name>,<ltx_attr>,<lty_attr>,<rbx_attr>,<rby_attr>)
1568              This  command stores the absolute coordinate of the bounding box
1569              of the object named  <obj_name>  in  the  specified  attributes.
1570              <ltx_attr>  stores  the left-top X coordinate, <lty_attr> stores
1571              the left-top Y coordinate, <rbx_attr> stores the right-bottom  X
1572              coordinate, and <rby_attr> stores the right-bottom Y coordinate.
1573              The bounding box is computed assuming  that  all  lines  are  of
1574              width 0.
1575
1576       move_selected_obj_absolute(<ltx>,<lty>)
1577              This  command  moves  left-top  corner of the selected object to
1578              (<ltx>,<lty>).
1579
1580       assign(<attr_name>,<expr>)
1581              This command  assigns  <expr>  to  the  attribute  specified  by
1582              <attr_name>.  <expr> must be evaluated to a numeric value.
1583
1584       strcpy(<attr_name>,<string>)
1585              This  command  copies  <string>  into the attribute specified by
1586              <attr_name>.
1587
1588       copy_string_to_cut_buffer(<string>)
1589              This command copies <string> into the cut buffer.
1590
1591       strcat(<attr_name>,<string>)
1592              This command appends <string>  to  the  attribute  specified  by
1593              <attr_name>.
1594
1595       while(<expr>,<cmd_attr_name>)
1596              This   command   keeps   executing   the   internal  command  in
1597              <cmd_attr_name> until <expr> evaluates to 0.
1598
1599       if(<expr>,<then_cmd_attr_name>,<else_cmd_attr_name>)
1600              If  <expr>   evaluates   to   0,   the   internal   command   in
1601              <else_cmd_attr_name>  is  executed; otherwise, the internal com‐
1602              mand in <then_cmd_attr_name> is executed.   <then_cmd_attr_name>
1603              or <else_cmd_attr_name> can be the string NULL (case-sensitive);
1604              in this case, no corresponding action is taken.
1605
1606       get_current_file(<attr_name>)
1607              This command stores the full path name of the  current  file  in
1608              <attr_name>.
1609
1610       get_current_export_file(<attr_name>)
1611              This   command   stores   the  full  path  name  of  the  output
1612              (print/export) file in <attr_name>.
1613
1614       get_current_dir(<attr_name>)
1615              This command stores the current directory in <attr_name>.
1616
1617       getenv(<attr_name>,<env_var_name>)
1618              This   command   stores   the   environment    variable    named
1619              <env_var_name> in <attr_name>.
1620
1621       strlen(<attr_name>,<string>)
1622              This  command  assigns  the  number of characters in <string> to
1623              <attr_name>.
1624
1625       substr(<attr_name>,<string>,<start_index>,<length>)
1626              This command copies <length> characters, starting from the char‐
1627              acter  index  <start_index>,  of <string> into <attr_name>.  The
1628              <start_index> is zero-based.
1629
1630       strstr(<attr_name>,<string>,<sub_string>)
1631              This command finds  the  first  occurrence  of  <sub_string>  in
1632              <string> and copies <sub_string> and the rest of the string into
1633              <attr_name>.
1634
1635       strrstr(<attr_name>,<string>,<sub_string>)
1636              This command  finds  the  last  occurrence  of  <sub_string>  in
1637              <string> and copies <sub_string> and the rest of the string into
1638              <attr_name>.
1639
1640       unmake_selected_obj_iconic()
1641              This command has the same  effect  as  selecting  UnMakeIconic()
1642              from  the  Special  Menu except that at least one object must be
1643              selected already.
1644
1645       hyperjump_then_exec(<attr_name>,<attr_name_to_exec>)
1646              This command teleports to the file name or URL name found in the
1647              <attr_name>  attribute then executes the internal command speci‐
1648              fied by the <attr_name_to_exec> attribute in the new file.
1649
1650       show_attr(<attr_name>)
1651              This command makes the <attr_name> attribute visible.
1652
1653       hide_attr(<attr_name>)
1654              This command makes the <attr_name> attribute invisible.
1655
1656       show_attr_name(<attr_name>)
1657              This command makes the name part of  the  <attr_name>  attribute
1658              visible.
1659
1660       hide_attr_name(<attr_name>)
1661              This  command  makes  the name part of the <attr_name> attribute
1662              invisible.
1663
1664       show_value(<attr_value>)
1665              This command makes the attribute whose name is empty  and  whose
1666              value is <attr_value> visible.
1667
1668       hide_value(<attr_value>)
1669              This  command  makes the attribute whose name is empty and whose
1670              value is <attr_value> invisible.
1671
1672       get_attr_bbox(<ltx_attr>,<lty_attr>,<rbx_attr>,<rby_attr>,<attr_name>)
1673              This command stores the absolute coordinate of the bounding  box
1674              of  the  <attr_name>  attribute  in  the  specified  attributes.
1675              <ltx_attr> stores the left-top X coordinate,  <lty_attr>  stores
1676              the  left-top Y coordinate, <rbx_attr> stores the right-bottom X
1677              coordinate, and <rby_attr> stores the right-bottom Y coordinate.
1678              The  bounding  box  is  computed  assuming that all lines are of
1679              width 0.
1680
1681       size_selected_obj_absolute(<abs_w>,<abs_h>)
1682              This command stretches the right-bottom corner of  the  selected
1683              object  so  that  its  width  becomes <abs_w> and height becomes
1684              <abs_h>.
1685
1686       size_named_obj_absolute(<obj_name>,<abs_w>,<abs_h>)
1687              This command stretches the right-bottom  corner  of  the  object
1688              named  <obj_name>  so  that its width becomes <abs_w> and height
1689              becomes <abs_h>.
1690
1691       message_box(<attr_name>,<msg>,<title>,<style>)
1692              This command displays a messagebox with <title> as the title and
1693              <msg>  as the message.  <style> can be the string "info", "ync",
1694              "yn", or "stop".  The messagebox display an OK  button  for  the
1695              "info"  or  "stop"  styles,  YES/NO/CANCEL buttons for the "ync"
1696              style, YES/NO buttons for the "yn" style.  When the user click a
1697              button  in the messagebox, the name of the button will be placed
1698              in <attr_name>.  If the user cancels the  messagebox  by  typing
1699              the  <ESC>  key, <attr_name> will be set to the string "CANCEL".
1700              If <attr_name> is the string NULL (case-sensitive), the informa‐
1701              tion  about which button is clicked is not written anywhere.  If
1702              <title> is the string NULL, Tgif will be the title for the  mes‐
1703              sagebox.
1704
1705       get_user_input(<attr_name>,<msg1>,<msg2>)
1706              This  command displays a dialogbox with <msg1> in the first line
1707              and <msg2>  in  the  second  line.   If  <msg2>  is  the  string
1708              "USE_CURRENT_DIR",  the  second line displays the current direc‐
1709              tory.  The user can type in a line in the  dialogbox  which  get
1710              placed in <attr_name>.  If the user cancels the dialog by typing
1711              the <ESC> key, <attr_name> will be set to the empty string.
1712
1713       add_attr_to_selected_obj(<attr_name>,<attr_value>,<abs_x>,<abs_y>)
1714              This command adds <attr_name>=<attr_value> to a selected  object
1715              and place the attribute at (<abs_x>,<abs_y>).  If <attr_name> is
1716              the string NULL (case-sensitive), the attribute's name  will  be
1717              the  empty  string.  If <abs_x> and <abs_y> are both NULL (case-
1718              sensitive), the attribute will be placed below  the  lower  left
1719              corner  or  the object.  If <attr_name> starts with "!.", a file
1720              attribute will be added.
1721
1722       delete_attr_from_selected_obj(<attr_name>)
1723              This command deletes  an  attribute  named  <attr_name>  from  a
1724              selected  object.   If  <attr_name>  starts  with  "!.",  a file
1725              attribute will be deleted.
1726
1727       user_end_an_edge(<attr_name>,<abs_x>,<abs_y>)
1728              This command starts a polyline/open-spline at (<abs_x>,<abs_y>),
1729              switches  the drawing mode to the draw polyline/open-spline, and
1730              lets the user finishes the polyline/open-spline.   If  the  end‐
1731              point  falls  in  an  object having an attribute type=port, that
1732              object's name will be placed in <attr_name>, if  <attr_name>  is
1733              not the string NULL (case-sensitive).
1734
1735       user_draw_an_edge(<start_attr_name>,<end_attr_name>)
1736              This  command  switches  the  drawing  mode  to  the  draw poly‐
1737              line/open-spline and lets the user draw a  polyline/open-spline.
1738              If  the  first  endpoint  falls in an object having an attribute
1739              type=port,   that   object's   name   will    be    placed    in
1740              <start_attr_name>,  if <attr_name> is not the string NULL (case-
1741              sensitive).  If the last endpoint falls in an object  having  an
1742              attribute  type=port,  that  object's  name  will  be  placed in
1743              <end_attr_name>, if <attr_name> is not the  string  NULL  (case-
1744              sensitive).
1745
1746       get_a_poly_vertex_abso‐
1747       lute(<x_attr_name>,<y_attr_name>,<obj_name>,<index>)
1748              This command stores the absolute  coordinate  of  the  <index>th
1749              vertex  of  <obj_name>  in attributes specified by <x_attr_name>
1750              and <y_attr_name>.  The object specified by <obj_name>  must  be
1751              either a poly/open-spline or a polygon/closed-spline object.
1752
1753       move_a_poly_vertex_absolute(<obj_name>,<index>,<abs_x>,<abs_y>)
1754              This  command  moves  the  <index>th vertex of <obj_name> to the
1755              absolute coordinate (<abs_x>,<abs_y>).  The object specified  by
1756              <obj_name>   must  be  either  a  poly/open-spline  or  a  poly‐
1757              gon/closed-spline object.
1758
1759       post_attr_and_get_cgi_result(<url_attr>,<query_attr>,<result_attr>)
1760              This command makes  an  HTTP  request  using  the  POST  method.
1761              <url_attr> names the attribute that contains the URL (which usu‐
1762              ally  names  a  CGI  server  script).   <query_attr>  names  the
1763              attribute  whose  value is the data to be posted.  <result_attr>
1764              names the attribute for receiving the results.  For example,  if
1765              an object has the following attributes:
1766
1767                     url=http://bourbon.usc.edu:8001/cgi-bin/echo-post
1768                     query=Hello World!
1769                     result=
1770                     exec=post_attr_and_get_cgi_result(url,query,result)
1771
1772              Executing  this object will post "Hello World!" to the specified
1773              CGI script.  In this case, the result of  executing  the  script
1774              just echoes "Hello World!" back (along with some other bookkeep‐
1775              ing information).
1776
1777       navigate_back()
1778              This command performs the same operation  as  if  the  Navigate‐
1779              Back() is selected from the Navigate Menu.
1780
1781       stop() This command stops the execution of all internal commands.
1782
1783       sqrt(<attr_name>,<expr>)
1784              This  command  assigns the square-root of <expr> to <attr_name>.
1785              <expr> must be evaluated to a non-negative numeric value.
1786
1787       random(<attr_name>)
1788              This command assigns a random integer to <attr_name> using the C
1789              library  function  rand().   0  is used as a seed for the random
1790              number generator.
1791
1792       srand48(<use_cur_time_as_seed>)
1793              This command seeds the random generator used by  the  C  library
1794              function  drand48().   If <use_cur_time_as_seed> is 0, 0 will be
1795              used as a seed.  Otherwise, the current time will be used  as  a
1796              seed.
1797
1798       drand48(<attr_name>)
1799              This  command  assigns a floating pointer number between 0.0 and
1800              1.0 to <attr_name> using the C library function drand48().
1801
1802       round(<attr_name>,<expr>)
1803              This command assigns the round of <expr> to <attr_name>.
1804
1805       redraw_obj(<obj_name>)
1806              This command redraws the area occupied by <obj_name>.
1807
1808       redraw_drawing_area()
1809              This command redraws the whole drawing area (visible through the
1810              Canvas Window).
1811
1812       itox(<attr_name>,<digits>,<expr>)
1813              This  command assigns <attr_name> to be the hex value of <expr>.
1814              <digits> (which must be between 1 and 8, inclusive) is the final
1815              width of the hex value (zeroes are added on the left).
1816
1817       for_i(<attr_name>,<min_val>,<max_val>,<increment>,<cmd_attr_name>)
1818              This command is the same as the following sequence of commands:
1819
1820                     assign(<attr_name>,<min_val>);
1821                     while($(<attr_name>) <= <max_val>,loop)
1822
1823              where loop has the following value:
1824
1825              exec(<cmd_attr_name>);
1826              inc(<attr_name>,<increment>)
1827
1828       Please  note that <min_val>, <max_val>, and <increment> are only evalu‐
1829       ated once prior the execution of this command.
1830
1831       set_file_not_modified()
1832              This command sets the file modified flag to false.
1833
1834       new_id(<attr_name>)
1835              This command generates an object ID, which  is  (unique  in  the
1836              current drawing, and stores it in <attr_name>.
1837
1838       rotate_selected_obj(<angle>)
1839              This  command  rotates  the  selected object by <angle> degrees.
1840              Positive angle is clockwise.
1841
1842       call_simple_shortcut(<shortcut_name>)
1843              This command calls a shortcut named <shortcut_name> which  takes
1844              no  arguments.   Please see the SHORTCUTS section for a descrip‐
1845              tion of shortcuts.
1846
1847       call_one_arg_shortcut(<shortcut_name>,<arg>)
1848              This command calls a shortcut named <shortcut_name>  that  takes
1849              one  argument  and  pass  <arg> to it.  Please see the SHORTCUTS
1850              section for a description of shortcuts.
1851
1852       substitute_attr(<attr_name>,<src_attr_name>,<replace_attr_name>,<pat‐
1853       tern_str>)
1854              This  command replaces occurrences of <pattern_str> in the value
1855              part of the attribute specified by <src_attr_name> by the  value
1856              of  the attribute specified by <replace_attr_name> and write the
1857              result into the attribute specified by <attr_name>.
1858
1859       get_file_size(<attr_name>,<file_name>)
1860              This command puts the size of file specified by  <file_name>  in
1861              the attribute specified by <attr_name>.
1862
1863       is_file(<attr_name>,<file_name>)
1864              This   command   puts  a  "1"  in  the  attribute  specified  by
1865              <attr_name> if the file specified  by  <file_name>  exists.   It
1866              puts a "0" otherwise.
1867
1868       index(<attr_name>,<string>,<sub_string>)
1869              This  command  finds  the  first  occurrence  of <sub_string> in
1870              <string> and copies the zero-based index into <attr_name>.
1871
1872       rindex(<attr_name>,<string>,<sub_string>)
1873              This command  finds  the  last  occurrence  of  <sub_string>  in
1874              <string> and copies the zero-based index into <attr_name>.
1875
1876       get_number_of_lines_in_attr(<result_attr>,<attr_name>)
1877              This  command counts the number of lines in the attribute speci‐
1878              fied by <attr_name> and writes the count into <result_attr>.
1879
1880       get_line_in_attr(<result_attr>,<attr_name>,<line_number>)
1881              This command copies the nth line of the attribute  specified  by
1882              <attr_name>  into  <result_attr>,  where n is a zero-based index
1883              specified by <line_number>.
1884
1885       trim(<attr_name>)
1886              This command removes leading and trailing blank characters  from
1887              the attribute specified by <attr_name>.
1888
1889       is_attr(<result_attr>,<attr_name>)
1890              This  command  writes  a "1" into <result_attr> if the attribute
1891              specified  by  <attr_name>  exists.   It  writes  a   "0"   into
1892              <result_attr> otherwise.
1893
1894       find_obj_names(<result_attr>,<obj_name>,<attr_name_value>)
1895              This  command  finds  all objects that are direct sub-objects of
1896              the object specified by <obj_name> and writes their  names  into
1897              <result_attr>.   If <obj_name> is an empty string, all top-level
1898              objects are scanned.
1899
1900              <attr_name_value>  specifies  a  filter  for  the  objects.   If
1901              <attr_name_value>  is  the  empty string, all qualifying objects
1902              are selected.  If <attr_name_value> is of the form "<string>=*",
1903              an object is selected if it has an attribute named <string>.  If
1904              <attr_name_value> is of the form "<string>=<value>",  an  object
1905              is selected if it has an attribute named <string> and its corre‐
1906              sponding value is <value>.  If <attr_name_value> does  not  con‐
1907              tain  the  '='  character,  an  object  is selected if it has an
1908              attribute whose name is empty and  the  corresponding  value  is
1909              identical to <attr_name_value>.
1910
1911              If   n   objects   are   matched,  the  attribute  specified  by
1912              <result_attr> is updated with  n+1  lines.   The  value  of  the
1913              zeroth  line  becomes  n  and  the  object names becomes lines 1
1914              through n of  <result_attr>.   The  get_line_in_attr()  internal
1915              command can be used to retrieve the object names.
1916
1917       tokenize(<result_attr>,<string>,<separator>)
1918              This  command breaks <string> into tokens which are separated by
1919              the <separator> character and writes the  tokens  (in  the  same
1920              fashion   as   in   the   find_obj_names   command  above)  into
1921              <result_attr>.  <separator> must be a string of length of 1  and
1922              it  must not be the space character, the single-quote character,
1923              or the double-quote character.  If a token contains the  separa‐
1924              tor  character, the token can be surrounded by a pair of single-
1925              quotes or double-quotes which  are  automatically  removed  when
1926              this command is executed.
1927
1928              If  n tokens are found, the attribute specified by <result_attr>
1929              is updated with n+1 lines.  The value of the zeroth line becomes
1930              n  and  the  tokens  becomes lines 1 through n of <result_attr>.
1931              The get_line_in_attr() internal command can be used to  retrieve
1932              the tokens.
1933
1934       move_attr_relative(<attr_name>,<dx>,<dy>)
1935              This  command  moves  the attribute whose name is <attr_name> by
1936              <dx> absolute units in the x direction and <dy>  absolute  units
1937              in the y direction.
1938
1939       get_number_of_vertices(<result_attr>,<obj_name>)
1940              This  command copies the number of vertices of the object speci‐
1941              fied by <obj_name> into  <result_attr>.   The  specified  object
1942              must be a polyline (open-spline) or a polygon (closed-spline).
1943
1944       is_obj_transformed(<result_attr>,<obj_name>)
1945              This command writes a "1" into <result_attr> if the object spec‐
1946              ified by <obj_name> is transformed  (rotated  or  sheared).   It
1947              writes a "0" into <result_attr> otherwise.
1948
1949       make_selected_obj_iconic(<sym_path>)
1950              This  command  works like the MakeIconic() command from the Spe‐
1951              cial Menu, except that the user is not prompted for the name  of
1952              the  icon.  Instead, <sym_path> is used to specify the full path
1953              name of the icon.
1954
1955       get_tgif_version(<major_attr,minor_attr,patchlevel_attr,build_attr>)
1956              This command writes tgif's major version number,  minor  version
1957              number,  patchlevel,  and  build  information into <major_attr>,
1958              <minor_attr>, <patchlevel_attr> and <build_attr>,  respectively.
1959              If  an argument is the string NULL (case-sensitive), that infor‐
1960              mation is skipped.
1961
1962       get_tgif_dir(<result_attr>)
1963              This command writes "$HOME/.Tgif" into <result_attr> where $HOME
1964              is the home directory of the user.
1965
1966       get_profile_string(<result_attr>,<sec‐
1967       tion>,<key>,<def_value>,<ini_path>)
1968              This command gets the value associated with the key specified by
1969              <key> from the section specified by <section> in the file speci‐
1970              fied by  the  full  path  <ini_path>  and  stores  it  into  the
1971              attribute  specified  by  <result_attr>.   If there is not value
1972              associated with the specified key, <def_value>  is  stored  into
1973              <result_attr>.   If  <key> is an empty string, all the key names
1974              in <section> of <ini_path> will be written (in the same  fashion
1975              as  in the find_obj_names command above) into <result_attr>.  If
1976              <section>  is  an  empty  string,  all  the  section  names   in
1977              <ini_path>  will  be  written  (in  the  same  fashion as in the
1978              find_obj_names command above) into <result_attr>.
1979
1980       write_profile_string(<section>,<key>,<value>,<ini_path>)
1981              This command sets the value associated with the key specified by
1982              <key>  of  the section specified by <section> in the file speci‐
1983              fied by the full path <ini_path> to be <value>.  If <key> is  an
1984              empty  string,  all  key/value  pairs in <section> of <ini_path>
1985              will be cleared.  <section> should not be an empty string.
1986
1987       select_additional_obj(<obj_name>)
1988              This command silently (no highlighting handles) selects an addi‐
1989              tional  object  named  <obj_name>.   Please see the OBJECT NAMES
1990              section above for the specification of object names.
1991
1992       open_file(<file_number>,<file_name>,<file_mode>)
1993              This command opens the file specified by <file_name> in the mode
1994              specified by <file_mode> and assigns the opened file a file ref‐
1995              erence number of <file_number>.   <file_number>  must  be  0  or
1996              between  3  and  15.  Opening file 0 rewinds the standard input.
1997              Examples of modes are "r" for reading, "w" for writing, and  "a"
1998              for  appending.   A  file  is always opened in text (non-binary)
1999              mode.
2000
2001       close_file(<file_number>)
2002              This command closes the file associated with file reference num‐
2003              ber <file_number>.  <file_number> must be 0 or between 3 and 15.
2004
2005       read_file(<file_number>,<result_attr>)
2006              This  command  reads  a  line from the file associated with file
2007              reference number <file_number> and put the line in the attribute
2008              specified  by  <result_attr>.   <file_number>  must be between 0
2009              (for standard input) or between 3 and 15.
2010
2011       write_file(<file_number>,<string>)
2012              This command writes <string> to the file  associated  with  file
2013              reference number <file_number>.  <file_number> must be between 1
2014              and 15.  Numbers 1 and 2 are for standard  output  and  standard
2015              error files.
2016
2017       flush_file(<file_number>)
2018              This  command  flushes  the  file associated with file reference
2019              number <file_number>.  <file_number> must be between 1  and  15.
2020              Numbers  1  and  2  are  for  standard output and standard error
2021              files.
2022
2023       append_file(<dest_file_name>,<src_file_name>)
2024              This command appends the file specified  by  <src_file_name>  to
2025              the file specified by <dest_file_name>.
2026
2027       set_output_format(<format>,<color_output>)
2028              This command sets the output format to <format>.  If <color_out‐
2029              put> is 0, black and white output (printing) mode will be  used;
2030              otherwise,  color  output  (printing) mode will be used.  Please
2031              see the Tgif.WhereToPrint X default for a list of possible  for‐
2032              mats.
2033
2034       set_export_clip_rect(<ltx>,<lty>,<rbx>,<rby>)
2035              This  command sets the export clipping rectangle to be a rectan‐
2036              gular region with left-top corner at  (<ltx>,<lty>)  and  right-
2037              bottom  corner  at  (<rbx>,<rby>).   <ltx> must be strictly less
2038              than <rbx> and <lty> must be strictly less than <rby>.
2039
2040       import_file(<file_name>,<format>,<ltx>,<lty>)
2041              This command imports the file specified by <file_name> and place
2042              it  at  (<ltx>,<lty>).  The file is expected to be in the format
2043              specified by <format>, which can be "XBM", "XPM", "GIF",  "PNG",
2044              "JPEG",  "PBM",  "PBM", "PGM", "PPM", and names specified by the
2045              Tgif.ImportFilter# X defaults.  If <format> is "TGIF", the  file
2046              should either be a tgif file.
2047
2048       set_xpm_output_version(<version_number>)
2049              This  command sets the XPM version number when outputting in the
2050              X11 pixmap format to be <version_number>.  <version_number>  can
2051              take on values 1 or 3.
2052
2053       edit_ini_section(<attr_name>,<title>,<section>,<ini_path>)
2054              This command brings up a dialogbox to edit the section specified
2055              by <section> in the file specified by the full path  <ini_path>.
2056              If the user press the OK button in the dialogbox, the section is
2057              cleared and the content of the dialogbox is  written  back  into
2058              the  file,  and  "OK"  is  placed  in the attribute specified by
2059              <attr_name>.  If the user press the CANCEL button in the dialog‐
2060              box,  the  file  is  unmodified,  and  "CANCEL" is placed in the
2061              attribute specified by <attr_name>.
2062
2063       select_from_ini_section(<attr_name>,<title>,<section>,<ini_path>)
2064              This command brings up a list to select an entry from  the  sec‐
2065              tion  specified  by  <section> in the file specified by the full
2066              path <ini_path>.  If nothing is selected, the  attribute  speci‐
2067              fied  by  <attr_name>  will be cleared.  Otherwise, the selected
2068              entry  will  be  written  into  the   attribute   specified   by
2069              <attr_name>.
2070
2071       append_line_into_attr(<attr_name>,<string>)
2072              This  command  appends  the  line  specified  by <string> to the
2073              attribute specified by <attr_name>.
2074
2075       insert_line_into_attr(<attr_name>,<string>,<line_number>)
2076              This command inserts the line specified by <string> as  the  nth
2077              line  of  the  attribute  specified by <attr_name>, where n is a
2078              zero-based index specified by <line_number>.  n must be at least
2079              1.   If  n is larger the number of lines in the attribute, blank
2080              lines are automatically inserted.
2081
2082       clear_attr(<attr_name>)
2083              This command clears the attribute value of the attribute  speci‐
2084              fied by <attr_name> and deletes all other lines of the attribute
2085              if the attribute contains multiple lines.
2086
2087       create_text_obj(<abs_x>,<abs_baseline_y>,<string>)
2088              This  command  creates   a   text   object   at   the   location
2089              (<abs_x>,<abs_baseline_y>) with the text specified by <string>.
2090
2091       create_box_obj(<abs_ltx>,<abs_lty>,<abs_rbx>,<abs_rby>)
2092              This     command     creates     a    rectangle    defined    by
2093              (<abs_ltx>,<abs_lty>) and (<abs_rbx>,<abs_rby>).
2094
2095       create_corner_oval_obj(<abs_ltx>,<abs_lty>,<abs_rbx>,<abs_rby>)
2096              This   command   creates    a    corner    oval    defined    by
2097              (<abs_ltx>,<abs_lty>) and (<abs_rbx>,<abs_rby>).
2098
2099       create_center_oval_obj(<abs_x>,<abs_y>,<radius>)
2100              This command creates a center oval centered at (<abs_x>,<abs_y>)
2101              with radius specified by <radius>.
2102
2103       create_edge_oval_obj(<abs_ltx>,<abs_lty>,<abs_rbx>,<abs_rby>)
2104              This   command   creates   an    edge    circle    defined    by
2105              (<abs_ltx>,<abs_lty>) and (<abs_rbx>,<abs_rby>).
2106
2107       create_rcbox_obj(<abs_ltx>,<abs_lty>,<abs_rbx>,<abs_rby>)
2108              This  command  creates  a  rounded-corner  rectangle  defined by
2109              (<abs_ltx>,<abs_lty>) and (<abs_rbx>,<abs_rby>).
2110
2111       create_arc_obj(<abs_x>,<abs_y>,<radius>,<dir>,<angle1>,<angle2>)
2112              This command creates an arc centered at  (<abs_x>,<abs_y>)  with
2113              radius,  direction,  start  angle,  and  end  angle specified by
2114              <radius>, <dir>,  <angle1>,  and  <angle2>,  respectively.   The
2115              <radius>,  <dir>,  <angle1>,  and  <angle2> are specified in the
2116              same way as they are specified  in  the  SpecifyAnArc()  command
2117              under  the  CreateObject submenu of the Edit Menu.  <dir> can be
2118              "+" or "-" where "+" is clockwise.  <angle1> and <angle2> are in
2119              degrees with 0 degree at the 12 o'clock position.
2120
2121       create_first_vertex(<abs_x>,<abs_y>)
2122              This  command  is  used in conjunction with the create_next_ver‐
2123              tex() and create_poly_obj() commands to create a  polyline/open-
2124              spline object.  It can also be used in conjunction with the cre‐
2125              ate_next_vertex() and create_polygon_obj() commands to create  a
2126              polygon/closed-spline  object.   This  command sets the starting
2127              point of the polyline/open-spline object or the  polygon/closed-
2128              spline object to be at (<abs_x>,<abs_y>).
2129
2130       create_next_vertex(<abs_x>,<abs_y>)
2131              This  command  is used in conjunction with the create_first_ver‐
2132              tex() and create_poly_obj() commands to create a  polyline/open-
2133              spline object.  It can also be used in conjunction with the cre‐
2134              ate_first_vertex() and create_polygon_obj() commands to create a
2135              polygon/closed-spline object.  This command sets the next vertex
2136              of the polyline/open-spline object or the  polygon/closed-spline
2137              object to be at (<abs_x>,<abs_y>).
2138
2139       create_poly_obj()
2140              This  command  is used in conjunction with the create_first_ver‐
2141              tex()  and  create_next_vertex()  commands  to  create  a  poly‐
2142              line/open-spline object.
2143
2144       create_polygon_obj()
2145              This  command  is used in conjunction with the create_first_ver‐
2146              tex()  and  create_next_vertex()  commands  to  create  a  poly‐
2147              gon/closed-spline object.
2148
2149       start_create_group_obj()
2150              This  command is used in conjunction with the create_group_obj()
2151              command to create a grouped  object.   This  command  marks  the
2152              beginning of the group.
2153
2154       create_group_obj()
2155              This   command  is  used  in  conjunction  with  the  start_cre‐
2156              ate_group_obj() command to create a grouped object.   This  com‐
2157              mand  groups  all  objects  created  since  the  last start_cre‐
2158              ate_group_obj() call into a grouped object.
2159
2160       set_allow_interrupt(<true_or_false>)
2161              If <true_or_false> is FALSE (case-sensitive),  this  command  is
2162              used  to temporarily disable an user interrupt when tgif is exe‐
2163              cuting internal commands.  If a user interrupt is received  when
2164              interrupt  is disabled, it will be queued and will interrupt the
2165              execution of internal  commands  when  set_allow_interrupt()  is
2166              called again with <true_or_false> being TRUE (case-sensitive).
2167
2168       select_each_obj_and_exec(<attr_name_to_exec>)
2169              This  command  first  unselects any object that is selected.  It
2170              then selects each object in the current drawing in turn and exe‐
2171              cutes  the internal command specified by the <attr_name_to_exec>
2172              attribute.  If this command is executed as a result of  a  mouse
2173              click  over  an object, only objects in the current page will be
2174              scanned for execution.  If  this  command  is  executed  from  a
2175              script  file,  objects  in every page will be scanned for execu‐
2176              tion.
2177
2178       edit_attr_in_text_mode(<attr_name>)
2179              When this command is executed, tgif enters the text drawing mode
2180              and edits the attribute specified by <attr_name>.
2181
2182       set_file_unsavable()
2183              This command is used to make the current file unsavable.
2184
2185       pstoepsi(<target_eps_path>,<src_ps_path>,<scale>)
2186              This  command generates a preview bitmap for the PostScript file
2187              in <src_ps_path> and prepends it to <src_ps_path> and  save  the
2188              output  in <target_eps_path> (<src_ps_path> is unmodified).  The
2189              only accepted values of <scale> is 1 or 2.  If  the  Tgif.Exter‐
2190              nalPsToEpsi  X  default is set to true, this command will simply
2191              invoke "pstoepsi <src_ps_path> <target_eps_path>" externally  if
2192              <scale>  is  1 and will invoke "pstoepsi -2x <src_ps_path> <tar‐
2193              get_eps_path>" if <scale> is 2.  This command only works if tgif
2194              is running in the interactive (non-batch) mode.
2195
2196       objs_bbox_intersect(<obj1_name>,<obj2_name>,<result_attr>)
2197              This  command  sets  the  value  of  the  attribute specified by
2198              <result_attr> to "1"  if  the  boundingboxes  of  objects  named
2199              <obj1_name> and <obj2_name> intersect.  It sets the value of the
2200              attribute specified by <result_attr> to "0" otherwise.
2201
2202       delete_all_attr_from_selected_objs()
2203              This command  deletes  all  attributes  from  selected  objects.
2204              Please  only  use  this  command when commands are taken from an
2205              external file!
2206

ARITHMETIC EXPRESSIONS

2208       Certain internal commands allow arithmetic  expressions  as  arguments.
2209       Infix  notation  is  used.  Supported operators (and their precedences)
2210       are listed below.
2211
2212        ?   1    if-then-else, e.g. <rel> ? <iftrue> : <else>
2213        :   2    if-then-else, e.g. <rel> ? <iftrue> : <else>
2214        ||  3    logical OR
2215        &&  4    logical AND
2216        |   5    bit-wise OR
2217        ^   5    bit-wise XOR
2218        &   5    bit-wise AND
2219        ==  6    equal
2220        !=  6    not-equal
2221        >   7    greater than
2222        <   7    less than
2223        >=  7    greater than or equal to
2224        <=  7    less than or equal to
2225        <<  8    shift left
2226        >>  8    shift right
2227        +   9    add
2228        -   9    subtract
2229        *  10    multiple
2230        /  10    divide
2231        // 10    integer divide
2232        %  10    mod
2233        !  11    logical NOT
2234        ~  11    bit-wise invert/NOT
2235        )  12    closed parenthesis
2236        (  13    open parenthesis
2237

GENERATING IMAGEMAP FILES

2239       This section describes how to generate NCSA imagemap and CERN clickable
2240       image  files.  The Tgif.ImageMapFileFormat X default decides whether to
2241       generate a NCSA imagemap or a CERN clickable image file.  Since the two
2242       formats  are  very  similar,  we will only discuss how to generate NCSA
2243       imagemap files.  For more information about NCSA imagemap,  please  see
2244       [3].  For more information about CERN clickable image, please see [4].
2245
2246       The Tgif.GenerateImageMap X default should be set to ``true'' to enable
2247       the imagemap generation.  When printing in  the  GIF  format  (see  the
2248       BASIC  FUNCTIONALITIES section about printing), an XPM file (which will
2249       be removed at the end of this process) is generated first.  (The  value
2250       specified  by  the  Tgif.InitExportPixelTrim  X default is used to trim
2251       extra pixels.  Using these values forms an escape mechanism to  fix  an
2252       idiosyncrasy  that  tgif  can  not figure out exactly how big the whole
2253       image is.)
2254
2255       The XPM version is specified by  the  Tgif.XPmOutputVersion  X  default
2256       unless the Tgif.UseXPmVersion1ForImageMap X default is set to ``true'',
2257       which forces the XPM1  format.   Then  the  command  specified  by  the
2258       Tgif.XpmToGif  X default is executed to convert the XPM file into a GIF
2259       (Generic Interchange Format) file which can be used by software such as
2260       NCSA's  Mosaic(1).  The file extension for the GIF file is specified by
2261       the Tgif.GifFileExtension X default.  Together with the  GIF  file,  an
2262       imagemap file with file extension specified by the Tgif.ImageMapFileEx‐
2263       tension X default is generated.  The content of the imagemap is  gener‐
2264       ated as follows.
2265
2266       Tgif  first  looks  for a file attribute with attribute name href.  The
2267       value of the attribute is written as the default URL.  If such  a  file
2268       attribute  can  not be found, imagemap generation is aborted.  If it is
2269       found, then all objects in the file are scanned.  For an object  having
2270       an  attribute  named href, the value of the attribute is written as the
2271       URL for a method line in the imagemap.  If the object is neither a cir‐
2272       cle nor a poly/polygon, the rectangle method is used.
2273
2274       Similar mechanism is used when printing in the HTML format, except that
2275       a generic HTML file is generated with an  imagemap  in  the  Spy  Glass
2276       Client-side  Imagemap  format.   You can generate a custom HTML file if
2277       you specify an HTML export template using SetHTMLExportTemplate()  from
2278       the File Menu.  Details about the template file is described below.
2279

HTML EXPORT TEMPLATE

2281       If an HTML export template file is specified with the SetHTMLExportTem‐
2282       plate() from the File Menu, custom HTML files  can  be  generated  when
2283       printing in the HTML format.  The customization is done through the use
2284       of variables embedded in the HTML export template  file.   These  vari‐
2285       ables  have  the  syntax  of an HTML character entity.  They all starts
2286       with "&tgv" and ends with ";".  They are:
2287
2288       &tgvfilename;
2289              This variable will be replaced by the name of the file  (without
2290              file extension).
2291
2292       &tgvcurnum;
2293              This variable will be replaced by current page number.
2294
2295       &tgvfirstnum;
2296              This variable will be replaced by the first page number (usually
2297              1).
2298
2299       &tgvlastnum;
2300              This variable will be replaced by last page number.
2301
2302       &tgvprevnum;
2303              This variable will be replaced by the previous page number (with
2304              wrap around).
2305
2306       &tgvprevnumnowrap;
2307              This variable will be replaced by the previous page number (with
2308              no wrap around).
2309
2310       &tgvnextnum;
2311              This variable will be replaced by the  next  page  number  (with
2312              wrap around).
2313
2314       &tgvnextnumnowrap;
2315              This  variable will be replaced by the next page number (with no
2316              wrap around).
2317
2318       &tgvtitle;
2319              This variable will be replaced by the title the page or  of  the
2320              file.
2321
2322       &tgvmapobjs;
2323              This  variable  will  be  replaced  by the objects (specified as
2324              <AREA> tabs) in a client-side image map.
2325
2326       For example, if a template specifies:
2327
2328              <IMG SRC="&tgvfilename;-&tgvcurnum;.gif"
2329                     USEMAP="#p0">
2330              <MAP NAME="p0">
2331              &tgvmapobjs;
2332              <AREA SHAPE="RECT"
2333                     COORDS="0,0,&tgvmapwidth;,&tgvmapheight;"
2334                     HREF="&tgvfilename;-&tgvnextnum;.html">
2335              </MAP>
2336
2337       Exporting using PrintOneFilePerPage() with this template may  get  (for
2338       page 2 of a file name "foo.obj" with 5 pages):
2339
2340              <IMG SRC="foo-2.gif"
2341                     USEMAP="#p0">
2342              <MAP NAME="p0">
2343              <AREA SHAPE="RECT" ...>
2344               ...
2345              <AREA SHAPE="RECT" ...>
2346              <AREA SHAPE="RECT"
2347                     COORDS="0,0,145,97"
2348                     HREF="foo-3.html">
2349              </MAP>
2350

GENERATING MICROSOFT WINDOWS EPSI FILES

2352       Some  Microsoft  Windows  (TM)  applications do not understand standard
2353       PostScript %%BeginPreview, %%EndImage, and %%EndPreview comments.  This
2354       section  describes  how to generate an EPSI file which is understood by
2355       them.  This feature  is  invoked  when  the  current  print  format  is
2356       TiffEPSI.   In this case, the generated EPSI file will contain 30 bytes
2357       of binary information in the beginning of the file  and  a  TIFF  image
2358       (also  binary) at the end of the file.  This file also will not contain
2359       the %%BeginPreview, %%EndImage, and %%EndPreview comments.  A  file  in
2360       this  format  is normally not considered to be a PostScript file except
2361       under Windows.
2362
2363       When this feature is enabled, tgif generates a normal EPSI file  first,
2364       then dump the current content of the file into an X11 bitmap file.  The
2365       command specified in Tgif.XbmToTiff is  executed  to  generate  a  TIFF
2366       image which is then append at the end of the EPSI file.
2367

LOCKING OBJECTS

2369       Objects  can  be locked and unlocked using #< and #> keyboard commands.
2370       When a selected object is locked, it is shown  with  gray  handles.   A
2371       locked  object  can  be moved, stretched, flipped, or rotated; however,
2372       its properties, such as fill pattern,  width,  etc.,  can  be  changed.
2373       Locked  objects  can  also be deleted.  When a locked object is grouped
2374       with other objects, the resulting grouped object  is  also  locked.   A
2375       locked object can be used as an anchor to align other objects; however,
2376       DistributeObjs() command will fail if any objects are  locked.   Locked
2377       objects do not participate in any operations in the select vertex mode.
2378

UNDO/REDO

2380       Most  operations  can  be  undone  and redone.  The Tgif.HistoryDepth X
2381       default controls the size of the undo buffer.  If it is set to -1, then
2382       the  undo  buffer's  size is infinite.  The undo buffer is flushed when
2383       the New() or Open() commands are executed (from the  File  Menu),  when
2384       the  FlushUndoBuffer()  command is executed from the Edit Menu, or when
2385       Pop() is executed from a .sym file.  If  a  private  colormap  is  used
2386       (automatically  done  when  new  colors  can  not be allocated from the
2387       default colormap), executing FlushUndoBuffer() will  attempt  to  reset
2388       the colormap (if the -DDONT_FREE_COLORMAP compile option is not used).
2389

DOMAINS

2391       A  domain  is  a  collection of library symbols suitable for instantia‐
2392       tions.  A library is implemented as a  directory  of  .sym  files,  and
2393       therefore, a domain is implemented as a search path.  If there are sym‐
2394       bols with the same file name  which  reside  in  different  directories
2395       specified  in  the search path, then the one closer to the front of the
2396       search path will be made available for the user to instantiate.
2397
2398       The number of domains is specified by the MaxDomains X default, and the
2399       names  of  the domains are specified by the DomainPath# X default.  The
2400       library search paths are specified by csh environment  variables.   See
2401       the section on X DEFAULTS for more details.
2402
2403       Domain  information can also be loaded into the ~/.Tgif/domain.ini file
2404       by setting Tgif.DomainInIni to true and selecting  Reload  Domain  Info
2405       From X from the Domain submenu of the File Menu.
2406

SELECTING A NAME FROM A POPUP WINDOW

2408       When  selecting a file name, a symbol name, or a domain name, tgif pops
2409       up a window with appropriate names for the user to  choose  from.   The
2410       user  can use mouse clicks to select an entry.  Key strokes can also be
2411       used to specify the desired name; however, tgif attempts to  match  the
2412       key strokes with names in the selection on the fly.  If a match can not
2413       be found, the key strokes are ignored.  ^n, ^j, or  the  DownArrow  key
2414       advances  the  selection  down  by  1 entry; ^p, ^k, or the UpArrow key
2415       advances the selection up by 1 entry.  ^f, ^d,  or  the  DownArrow  key
2416       with <Control> key held down advances the selection down by 10 entries;
2417       ^b, ^u, or the UpArrow key with <Control> key held  down  advances  the
2418       selection  up by 10 entries.  '$' will select the last entry, while '^'
2419       will select the first entry.  ^w or ^y un-select  the  selected  entry.
2420       If  the  selected entry is a directory, hitting <CR> will change direc‐
2421       tory; if not, hitting <CR>  finishes  the  selection  process  and  the
2422       selected entry is returned.
2423
2424       In selecting file names to open or import, typing '/' is interpreted as
2425       going to the root directory or specifying an URL.  At this  point,  the
2426       automatic  matching of key strokes is temporarily disabled until either
2427       a <TAB> or a <CR> is pressed.  Also, clicking the middle  mouse  button
2428       in the file name area pastes from the clipboard.
2429
2430       The  automatic  appending  of  index.obj or .obj (introduced in version
2431       2.16) is obsoleted and an URL is never modified.
2432
2433       The current selection is displayed near the top of  the  popup  window.
2434       Back-space should be used with caution because it might change the cur‐
2435       rent directory to the parent directory.
2436

IMPORTING EPS FILES

2438       Encapsulated PostScript (EPS) files can be imported using the  #(  key‐
2439       board  command.  If the EPS file has a preview bitmap (can be generated
2440       using the pstoepsi tool), tgif will display it  (HideBit/Pixmap()  from
2441       the  Layout  Menu  can  be  used  to  disable  the  displaying  of bit‐
2442       map/pixmaps).  When the EPS object is saved in a  .obj  or  .sym  file,
2443       neither  the preview bitmap, nor the PostScript content of the EPS file
2444       is saved.  Therefore, when printing such a file (either  from  tgif  or
2445       using  prtgif),  the  EPS  file  must be present at the same place from
2446       which it was originally imported.
2447

ADDITIONAL FONTS

2449       In addition to the Times, Courier, Helvetica,  NewCentury,  and  Symbol
2450       fonts, additional fonts can be specified using the Tgif.AdditionalFonts
2451       X default.  (The default screen fonts can also be replaced, please  see
2452       Tgif.HasAlternateDefaultFonts  in  the  X  DEFAULTS  section  for  more
2453       details.)  Each additional font requires 4 parts,  one  for  each  font
2454       style (in the order of Roman, Bold, Italic, and BoldItalic).  Each part
2455       contains 3 strings.  The first string  specifies  the  family,  weight,
2456       slant,  and width of the font (please see the man pages for xfontsel(1)
2457       for more details; also there  is  a  second  form  which  is  described
2458       below).   The  second string specifies the registry and encoding of the
2459       font (see xfontsel(1) again).  (One can use  xlsfonts(1)  to  see  what
2460       fonts  are  available  and pick out the just mentioned two strings from
2461       the output.)  The third string specifies the PostScript font name.
2462
2463       For example, if one wants to use the X Lucida  font  to  represent  the
2464       PostScript ZapfChancery-MediumItalic font, one can set Tgif.Additional‐
2465       Fonts as follows:
2466
2467       Tgif.AdditionalFonts: \n\
2468               lucida-medium-r-normal \n\
2469               iso8859-1 \n\
2470               ZapfChancery-MediumItalic \n\
2471               \n\
2472               lucida-demibold-r-normal \n\
2473               iso8859-1 \n\
2474               ZapfChancery-MediumItalic \n\
2475               \n\
2476               lucida-medium-i-normal \n\
2477               iso8859-1 \n\
2478               ZapfChancery-MediumItalic \n\
2479               \n\
2480               lucida-demibold-i-normal \n\
2481               iso8859-1 \n\
2482               ZapfChancery-MediumItalic
2483
2484       The above maps  all  four  font  styles  of  the  Lucida  font  to  the
2485       ZapfChancery-MediumItalic font (similar to how Symbol font is handled).
2486
2487       The  first string can also be specified in a second form which is iden‐
2488       tified by having "%d" as part of the string.  For example, one can  use
2489       "lucidasans-%d"  as  the first string.  In this case, the actual X font
2490       used will be the specified string with "%d" replaced by the font  size.
2491       The  encoding  string (second string) is ignored (but must be present).
2492       The font name prefix (please see Tgif.FontNamePrefix  entry  in  the  X
2493       DEFAULTS section) is also ignored.
2494

POSTSCRIPT CHARACTER ENCODING FOR INTERNATINOAL CHARACTERS

2496       Sometimes,  different  encodings  of the same PostScript font is needed
2497       for characters with character codes between 161  and  255  (inclusive).
2498       This can be accomplished in two ways.  One way is to use Tgif.Addition‐
2499       alDontReencode  (and  Tgif.DontReencode).   Another  way  is   to   use
2500       Tgif.PSFontNeedCharSubs.   The difference is that with Tgif.Additional‐
2501       DontReencode,  a  PostScript  font's   encoding   is   skipped.    With
2502       Tgif.PSFontNeedCharSubs,  characters  in a PostScript font can be given
2503       specific encoding.
2504
2505       In both cases, there is a need to  introduce  fake  font  names  (place
2506       holders).  For example,
2507
2508              Tgif.AdditionalFonts: \n\
2509                      utopia-medium-r-normal \n\
2510                      adobe-fontspecific \n\
2511                      UtopiaTmp-Regular \n\
2512                      \n\
2513                      utopia-bold-r-normal \n\
2514                      adobe-fontspecific \n\
2515                      UtopiaTmp-Bold \n\
2516                      \n\
2517                      utopia-medium-i-normal \n\
2518                      adobe-fontspecific \n\
2519                      UtopiaTmp-Italic \n\
2520                      \n\
2521                      utopia-bold-i-normal \n\
2522                      adobe-fontspecific \n\
2523                      UtopiaTmp-BoldItalic
2524              Tgif.PSFontAliases: \n\
2525                      UtopiaTmp-Regular=Utopia-Regular \n\
2526                      UtopiaTmp-Bold=Utopia-Bold \n\
2527                      UtopiaTmp-Italic=Utopia-Italic \n\
2528                      UtopiaTmp-BoldItalic=Utopia-BoldItalic
2529
2530       In  the  above  example,  4 fake PostScript font names are created (all
2531       have a common "UtopiaTmp" prefix).  The encoding  for  these  fonts  is
2532       adobe-fontspecific, according the X11 fonts being used.  Tgif.PSFontAl‐
2533       iases maps the fake PostScript font names  to  the  corresponding  real
2534       PostScript font names.  (If Tgif.PSFontAliases is missing, non-existent
2535       PostScript font names such as UtopiaTmp-Regular will appear in a  Post‐
2536       Script file.)
2537
2538       To  skip a PostScript font's encoding, one can use the Tgif.Additional‐
2539       DontReencode X default.  For example, if one specifies:
2540
2541              Tgif.AdditionalDontReencode: UtopiaTmp
2542
2543       characters with character codes between 161 and  255  (inclusive)  will
2544       not be encoded with ISO-Latin-1 character names.  For a list of charac‐
2545       ters names that are ISO-Latin-1 encoded, please see
2546       <URL:http://bourbon.usc.edu/tgif/faq/charencode.html#iso8859-1>.
2547
2548       To substitute characters in a PostScript font with  specific  encoding,
2549       one   can  use  the  Tgif.PSFontNeedCharSubs  and  Tgif.PSCharSubs_*  X
2550       defaults.  (You still need Tgif.AdditionalFonts and  Tgif.PSFontAliases
2551       setup as above.)  Here is an example:
2552
2553              Tgif.PSFontNeedCharSubs: \n\
2554                      Utopia-Regular=Foo \n\
2555                      Utopia-Bold=Foo \n\
2556                      Utopia-Italic=Foo \n\
2557                      Utopia-BoldItalic=Foo
2558              Tgif.PSCharSubs_Foo: \n\
2559                      exclamdown/Aogonek \n\
2560                      AE/Cacute \n\
2561                      ecircumflex/eogonek
2562
2563       In  the above example, Tgif.PSFontNeedCharSubs specified a list of fake
2564       PostScript font names that requires character substitutions  and  their
2565       corresponding  TOKEN  names.  For a fake PostScript font name that maps
2566       to TOKEN, the list of characters to be substituted is specified in  the
2567       Tgif.PSCharSubs_TOKEN  X default.  The format for Tgif.PSCharSubs_TOKEN
2568       is a list of OLDCHARCODE/NEWCHARNAME strings  where  OLDCHARCODE  is  a
2569       character  code  in decimal or octal format and NEWCHARNAME must be the
2570       name of a PostScript character.  In the above example, Foo was used  as
2571       the  TOKEN  name.   In  real  use, something like iso8895-2 may be more
2572       appropriate for a  TOKEN  name.   Since  decimal  or  octal  codes  are
2573       allowed, the following is equivalent to the above:
2574
2575              Tgif.PSFontNeedCharSubs: \n\
2576                      Utopia-Regular=iso8859-2 \n\
2577                      Utopia-Bold=iso8859-2 \n\
2578                      Utopia-Italic=iso8859-2 \n\
2579                      Utopia-BoldItalic=iso8859-2
2580              Tgif.PSCharSubs_iso8859-2: \n\
2581                      161/Aogonek \n\
2582                      8#306/Cacute \n\
2583                      8#312/eogonek
2584
2585       Please note that substitution only occurs for characters with character
2586       codes between 161 and 255 (inclusive).
2587
2588       For more information, please see
2589       <URL:http://bourbon.usc.edu/tgif/faq/charencode.html#charsubs>.
2590

SQUARE DOUBLE BYTE FONTS

2592       Starting with version 4.0 of tgif,  double-byte  fonts  are  supported.
2593       But  only  double-fonts  where  every  character has the same width and
2594       height  are  supported.   Double-byte  fonts  is  specified  using  the
2595       Tgif.SquareDoubleByteFonts  X default.  The format of this X default is
2596       similar to that of the Tgif.AdditionalFonts X default described in  the
2597       ADDITIONAL  FONTS  section above with differences described here.  Each
2598       double-byte font requires 4 parts, one for  each  font  style  (in  the
2599       order  of  Roman,  Bold, Italic, and BoldItalic).  Each part contains 3
2600       strings.  The first string specifies the name of  the  font.   It  must
2601       contain  a  "%d" as part of the string.  The actual X font used will be
2602       the specified string with "%d" replaced by the font size.   The  second
2603       string can be either "*", "H", or "V".  When it is the "V" string, each
2604       character is rotated  90  degrees  counter-clockwise.   Otherwise,  the
2605       characters  are not rotated.  The third string specifies the PostScript
2606       font name.
2607
2608       Using input methods  (specified  by  the  Tgif.DoubleByteInputMethod  X
2609       default)  one can mix english (single-byte) substrings within a double-
2610       byte string.  The font to use for the english substring is specified by
2611       the Tgif.DefaultSingleByteFont X default.
2612
2613       For  example, if one wants to use the X Song Ti font to represent Post‐
2614       Script GB-Song-Regular font, one can set Tgif.SquareDoubleByteFonts  as
2615       follows:
2616
2617       Tgif.DefaultSingleByteFont: Helvetica
2618       Tgif.GBShowFontChar: 271372
2619       Tgif.SquareDoubleByteFonts: \n\
2620              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2621                      * \n\
2622                      GB-Song-Regular \n\
2623              \n\
2624              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2625                      * \n\
2626                      GB-Song-Regular \n\
2627              \n\
2628              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2629                      * \n\
2630                      GB-Song-Regular \n\
2631              \n\
2632              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2633                      * \n\
2634                      GB-Song-Regular
2635
2636       In  the  above  example,  the  Song Ti font doesn't have styles such as
2637       italic and bold, so all four parts  are  identical.   The  Tgif.GBShow‐
2638       FontChar  X  default specifies a double-byte octal character to be used
2639       to represent this font in the Choice Window when this font is selected.
2640
2641       Below is another example of using the X JIS fonts  to  represent  Post‐
2642       Script Ryumin-Light-EUC-H and Ryumin-Light-EUC-V fonts: as follows:
2643
2644       Tgif.RyuminShowFontChar: 244242
2645       Tgif.SquareDoubleByteFonts: \n\
2646              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2647                      H \n\
2648                      Ryumin-Light-EUC-H \n\
2649              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2650                      H \n\
2651                      Ryumin-Light-EUC-H \n\
2652              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2653                      H \n\
2654                      Ryumin-Light-EUC-H \n\
2655              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2656                      H \n\
2657                      Ryumin-Light-EUC-H \n\
2658              \n\
2659              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2660                      V \n\
2661                      Ryumin-Light-EUC-V \n\
2662              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2663                      V \n\
2664                      Ryumin-Light-EUC-V \n\
2665              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2666                      V \n\
2667                      Ryumin-Light-EUC-V \n\
2668              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2669                      V \n\
2670                      Ryumin-Light-EUC-V
2671

MULTIPAGE DRAWING

2673       An  object  file can contain multiple pages.  Two layout modes, stacked
2674       and tiled, for a multipage drawing are supported.   In  stacked  layout
2675       mode,  pages  are  considered  to  be stacked on top of each other, and
2676       therefore, an object can only appear on  one  page.   In  tiled  layout
2677       mode,  pages  are  tiled to form a large logical page; in this case, an
2678       object can exist on several physical  pages  simultaneously.   Swiching
2679       between the two modes are considered rare events and can not be undone.
2680       Tgif does not allow switching from the tiled layout mode to the stacked
2681       mode  when  there  exists an object that spans physical page boundaries
2682       because it can not decide which physical page the object belongs.
2683
2684       Page numbers are supported through the use of page  numbering  objects.
2685       A  page  number objecting is an object that contains an attribute whose
2686       name is !PAGE_NUM (the name is case-sensitive) and  the  name  part  of
2687       that  attribute  is not shown (hiding an attribute name can be achieved
2688       by using the Move/JustifyAttr() command under the Attribute submenu  of
2689       the  Special Menu).  The value of the attribute determines how the page
2690       number  is  printed.   If  the  value  of  the  attribute  contains   a
2691       !(STACKED_PAGE_NUM)  substring,  that  part  of  the  substring will be
2692       replaced by the page number if the page layout mode is stacked.  If the
2693       page  layout  mode  is tiled, the string will be printed out as is.  If
2694       the value of the attribute contains a  !(STACKED_NUM_PAGES)  substring,
2695       that  part  of the substring will be replaced by the number of pages if
2696       the page layout mode is stacked.  If the value of  the  attribute  con‐
2697       tains  a !(TILED_PAGE_ROW) or !(TILED_PAGE_COL) substring, that part of
2698       the substring will be replaced by the row number or the  column  number
2699       of the physical page if the page layout mode is tiled.
2700

SPECIAL ATTRIBUTES

2702       There  are  a  few  special attributes that tgif recognized.  There are
2703       described in this section.  They are all case-sensitive.
2704
2705       !PAGE_NUM=<page_number>
2706              This specifies the page numbers in a multipage drawing.   Please
2707              see the MULTIPAGE DRAWING section for details.
2708
2709       auto_center_attr
2710              If  an  attribute's  name  is  empty  and the value is auto_cen‐
2711              ter_attr, then all the visible attributes of  the  owner  object
2712              will  automatically  be centered relative to the bounding box of
2713              the owner object.  It doesn't really make sense to have multiple
2714              visible attributes because they will overlap.  This attribute is
2715              useful for making simple flowchart elements.
2716
2717       unmakeiconic_on_instantiate
2718              If a symbol object's attribute has an empty attribute  name  and
2719              the  value  is unmakeiconic_on_instantiate, then when the symbol
2720              is instantiated, the following commands  are  performed  on  the
2721              just-instantiated  icon  object:  1) UnMakeIconic() command from
2722              the Special Menu, 2) UnGroup() command from  the  Arrange  Menu,
2723              and 3) the "unmakeiconic_on_instantiate" text object is removed.
2724              This attribute is useful for making simple flowchart segments.
2725
2726       unmakeiconic_on_instantiate_delete_attrs
2727              If a symbol object's attribute has an empty attribute  name  and
2728              the value is unmakeiconic_on_instantiate_delete_attrs, then when
2729              the symbol is instantiated, the following commands are performed
2730              on  the just-instantiated icon object: 1) UnMakeIconic() command
2731              from the Special  Menu,  2)  delete  all  attributes  from  this
2732              object,  and  3)  UnGroup() command from the Arrange Menu.  This
2733              attribute is useful for putting a group of "useful" objects into
2734              a symbol object.
2735
2736       retracted_arrows
2737              If   an   attribute's   name   is   empty   and   the  value  is
2738              retracted_arrows for a polyline or open-spline object with  more
2739              than  2  vertices,  then  the  arrows  of  the  spline object is
2740              retracted by one vertex.
2741
2742       auto_retracted_arrows
2743              This is very similar to the retracted_arrows above  except  that
2744              the  object  must  be  an interpolated open-spline with only one
2745              arrow head.  The spline object is forced to have 3 vertices  and
2746              the middle vertex of the spline object is automatically adjusted
2747              when an endpoint is moved.
2748
2749       auto_exec=<internal_command>
2750              If such a file attribute exists, the value is executed when  the
2751              file is opened (unless the file is opened as a result of execut‐
2752              ing the hyperjump_then_exec() internal command).
2753
2754       edit_attrs_in_context_menu=...
2755              If an object has an attribute named  edit_attrs_in_context_menu,
2756              the  values  (starting  from the 2nd line and separated by line‐
2757              breaks) of this attribute are treated as attribute  names.   The
2758              named attributes will be visible in the Edit Attribute In Editor
2759              submenu of the Context Menu.  For example, if an object has  the
2760              following attributes:
2761
2762                     edit_attrs_in_context_menu=
2763                            x
2764                            y
2765                            z
2766                     w=greetings
2767                     x=hello
2768                     y=world
2769                     z=how are you
2770                     good-bye
2771
2772              the  Edit  Attribute  In Editor submenu of the Context Menu will
2773              only show "x=hello", "y=world", and "z=how are you".
2774

EXPORT TO TABLE

2776       When the ExportToTable() command is selected from the Table submenu  of
2777       the  Special  Menu,  certain attributes of selected objects are written
2778       into a user-specified output file in  a  format  which  can  be  easily
2779       imported by a spreadsheet program or to be used by the MergeWithTable()
2780       command described in the next section.  An output file contains columns
2781       of  strings.   Two  columns  are separated by a single <TAB> character.
2782       The first row of a output file contains the column names and all  other
2783       rows contain values.
2784
2785       The  names  of  the  attributes to be written are specified by the file
2786       attribute named TABLE_ATTRS (which is denoted by  !.TABLE_ATTRS  here).
2787       The  value  of  the TABLE_ATTRS file attribute is a list of comma-sepa‐
2788       rated attribute names.  When ExportToTable() command is  executed,  the
2789       attribute  names  specified  by !.TABLE_ATTRS are written to the output
2790       file first.  Then, for each selected object, every one of its attribute
2791       which appears in the list specified by !.TABLE_ATTRS are written to the
2792       output file in one line.  If an object has no attributes that match the
2793       specification, no corresponding line is generated.
2794

MERGE WITH TABLE

2796       When the MergeWithTable() command is selected from the Table submenu of
2797       the Special Menu, a selected object is  merged  (also  known  as  mail-
2798       merged on PCs) with a table (data) file (in the same format as the out‐
2799       put file described in the previous section) to generate a new multipage
2800       drawing having the stacked page layout mode.
2801
2802       The selected object contains formating information, and it is also used
2803       as a template to be replicated for each data row in the table file.  If
2804       an  attribute  of the replica matches the column name of the table, the
2805       attribute value is set to the value in the table  file.   The  replicas
2806       are tiled horizontally first.
2807
2808       Eight  attributes  must  be specified in the template object.  They are
2809       all case-sensitive.  The ones that measure distances can  be  specified
2810       in inches ("in"), centi-meters ("cm"), or pixels (if no units are spec‐
2811       ified).
2812
2813              PAPER_WIDTH
2814                     This specifies the width of the paper.
2815
2816              PAPER_HEIGHT
2817                     This specifies the height of the paper.
2818
2819              LEFT_MARGIN
2820                     This specifies the distance  to  the  left  edge  of  the
2821                     paper.
2822
2823              TOP_MARGIN
2824                     This specifies the distance to the top edge of the paper.
2825
2826              H_PITCH
2827                     This specifies the distance between the left edges of the
2828                     replicas.
2829
2830              V_PITCH
2831                     This specifies the distance between the top edges of  the
2832                     replicas.
2833
2834              NUM_COLS
2835                     This  specifies  the  number of replicas to tile horizon‐
2836                     tally before moving down to the next row.
2837
2838              NUM_ROWS
2839                     This specifies the number of replicas to tile  vertically
2840                     before moving to the next page.
2841
2842       After  each  replica  is generated, filled with the data from the table
2843       file, and placed, its attribute  named  exec  is  executed  (unless  an
2844       attribute  named  EXEC_AFTER_MERGE  is  specified,  in  which case, the
2845       attribute named by the EXEC_AFTER_MERGE attribute is executed instead).
2846       If there is no attribute named by the EXEC_AFTER_MERGE attribute, noth‐
2847       ing is executed.  (Please see the INTERNAL COMMANDS section for details
2848       on command execution.)  One can use the exec command to construct other
2849       attributes from the attributes associated with the data table.
2850
2851       If an attribute whose name is empty  and  whose  value  is  the  string
2852       USER_PLACEMENT,  the  user  will  be asked to place the replica (object
2853       name will be displayed in the Status Window when the  object  is  being
2854       placed).  In this case, the 8 placement related attributes are ignored.
2855
2856       If  an  attribute  whose  name  is  empty and whose value is the string
2857       STRIP_DOUBLE_QUOTES,  data  fields  surrounded  by  double-quotes   are
2858       stripped.
2859

MIME TYPES AND MAILCAPS

2861       When  an  URL  names an HTTP server, the HTTP server sends the Content-
2862       type of the URL along with the remote file referenced  by  the  URL  to
2863       tgif.   The  Content-type contains information such as the type/subtype
2864       of the file plus some optional fields.  If the file is not a tgif file,
2865       the following mechanism is used to view the file.
2866
2867       First,  the  X  defaults  are  looked up to see if there is an external
2868       viewer specified for the file.  Please  see  Tgif.@@@Viewer  in  the  X
2869       DEFAULTS section below for details.  If there's no match, the type/sub‐
2870       type is matched against entries in the MIME-types  file.   The  default
2871       MIME-types  file  is  .mime.types in user's home directory.  Please see
2872       Tgif.MimeTypesFile in the X DEFAULTS section on  how  to  override  the
2873       default  MIME-types  file.   The  first field in each line of the MIME-
2874       types file specifies type/subtype information.  If there is a type/sub‐
2875       type  match in the MIME-types files, the MailCap files are consulted as
2876       follows.
2877
2878       A line in a MailCap file consists of fields separated  by  semi-colons.
2879       The  first field specifies the type/subtype and the second field speci‐
2880       fies a view command for viewing a file that matches  the  type/subtype.
2881       For  tgif,  the  view command must contains a single %s substring to be
2882       replaced by local copy of the URL.  Only the %t and  the  %{}  optional
2883       fields  are  supported  by  tgif.   The multipart MIME-type is not sup‐
2884       ported.  The type/subtype information of the  remote  file  is  matches
2885       against the MailCap files.  If a match is found, the corresponding view
2886       command is executed.  If no match is found, but the type of the  remote
2887       file  is  either application, audio, image, or video, the file is saved
2888       and no external viewer is launched.   Otherwise,  the  remote  file  is
2889       assumed  to be pure text and tgif will create a text object to view the
2890       text.
2891
2892       The MailCap files are the  (colon-separated)  files  specified  by  the
2893       MAILCAP  environment variable (if defined).  If MAILCAP is not defined,
2894       the .mailcap file in the user's home directory is used.
2895
2896       MIME is the Multipurpose Internet Mail Extensions specified in RFC1521,
2897       and MAILCAP is specified in RFC1524.
2898

HOW TO MAKE A BUILDING-BLOCK OBJECT (SYMBOL FILE)

2900       Here  are the steps for defining a building-block object, to be used in
2901       a hierarchical design.
2902
2903       1)     Draw the  representation  part  of  the  building-block  object.
2904              Group everything together.  Select this grouped object.
2905
2906       2)     Popup  the main menu with the middle mouse button; select ``Spe‐
2907              cial''.  Select ``MakeSymbolic'' from the next popup menu.   The
2908              selected object becomes a symbol and gets a dashed boundary.
2909
2910       3)     Type  in attributes as individual text strings.  Select the sym‐
2911              bol object and all the text strings to be attached to  the  sym‐
2912              bol.  Type #a (for Attach) to attach attributes to the symbol.
2913
2914       4)     (This  step  is  optional.)   Build  the  definition part of the
2915              building-block object.  Look at the ``flip-flop.sym''  file  for
2916              an  example.  To look at that file, first, instantiate a ``flip-
2917              flop'' by typing ^i (for  Instantiate).   Select  the  flip-flop
2918              from the popup window; place the flip-flop; select the flip-flop
2919              and type ^v (for Push) to see the symbol file.
2920
2921       5)     Save and name the file.  If the current  library  path  contains
2922              the  current directory (or '.'), the symbol just built should be
2923              instantiatable by typing ^i.
2924

X11 PIXMAP (XPM) FORMATS

2926       Tgif can only import X11 pixmaps that satisfy the constraints described
2927       here.   The  format  of  the  X11  pixmap  must be either 1 (XPM1) or 3
2928       (XPM3).  Only a subset of the XPM3 format is supported, namely, the key
2929       field  for  the  color  specification  must be 'c' (for color visuals).
2930       Tools that generate  XPM1  format  files  are  (they  might  have  been
2931       upgraded  to support XPM3), pbmplus (or netpbm), which is a set of bit‐
2932       map and pixmap conversion freeware (together with xv,  the  colors  for
2933       pixmap  objects  can  be  manipulated),  and xgrabsc, another freeware;
2934       also, xloadimage can display XPM1 files.  Tools that can generate  XPM3
2935       format  files  are,  for example, xsnap(1) and sxpm(1).  For each color
2936       specified in the color string, a color cell is allocated.  If the allo‐
2937       cation fails, the current color will be used for that color string.  If
2938       the first color character is a back-quote (`) or a space, then the cor‐
2939       responding  color  is substituted with the background color of the tgif
2940       window if the Tgif.GuessXPmBgColor X default is set to ``true''.  (This
2941       design  choice  is  made because the pixmap will then look ``right'' on
2942       both regular and reverse video.)  The following is an example of a very
2943       small pixmap file (in XPM1 format).
2944
2945              #define arrow_format 1
2946              #define arrow_width 5
2947              #define arrow_height 3
2948              #define arrow_ncolors 3
2949              #define arrow_chars_per_pixel 1
2950              static char *arrow_colors[] = {
2951                 "`", "Black",
2952                 "a", "red",
2953                 "b", "yellow"
2954              };
2955              static char *arrow_pixels[] = {
2956              "`a```",
2957              "aabbb",
2958              "`a```"
2959              };
2960

LATEX FIGURE FORMATS

2962       Here  we  show  how  to  make a figure for a LaTeX file, first with the
2963       \psfig (or \epsf) special construct, then with the psfile special  con‐
2964       struct.   (The  author  does  not  recommend the psfile construct.)  An
2965       example of both can be found in ``example.tex'' which is included  with
2966       the tgif distribution.
2967
2968       To print a tgif file to be included in a LaTeX document with the \psfig
2969       or \epsf special construct (files generated will be in the Encapsulated
2970       PostScript  format),  first  select  LaTeX  format  in the panel window
2971       (click the left mouse button on the laser printer icon), then  type  ^p
2972       to  generate  the  Encapsulated  PostScript  file.  If the file name is
2973       ``an-sr-flip-flop.obj'', then the LaTeX figure file generated  will  be
2974       named  ``an-sr-flip-flop.eps''.   This  file can be included in a LaTeX
2975       document as follows,
2976
2977              \input{psfig}
2978              \begin{figure*}[htb]
2979              \centerline{\psfig{figure=an-sr-flip-flop.eps}}
2980              \caption{An SR flip-flop.  \label{fig:an-sr-flip-flop}}
2981              \end{figure*}
2982
2983       An alternative way is to use the \epsf construct as follows,
2984
2985              \input{epsf}
2986              \begin{figure*}[htb]
2987              \centerline{\epsffile{an-sr-flip-flop.eps}}
2988              \caption{An SR flip-flop.  \label{fig:an-sr-flip-flop}}
2989              \end{figure*}
2990
2991       The \centerline command above centers the picture.  If one has multiple
2992       tgif  figures  in  one's  LaTeX  document, one only have to include the
2993       psfig macro (\input{psfig}  or  \input{epsf})  once,  right  after  the
2994       \begin{document} statement.
2995
2996       If  Encapsulated  PostScript  is not available, the psfile special con‐
2997       struct can be used as  described  here.   In  this  case,  since  LaTeX
2998       doesn't  not  know  where  the bounding box of the drawing is, it takes
2999       some practice to get this just right.  Here is something that seems  to
3000       work.  First, center the picture on the page (e.g., the width of a por‐
3001       trait style page is 8.5 inch, so the center of the page is at the  4.25
3002       inch  mark), and make the top object in the picture about 1/4 inch away
3003       from the top of the page.  Select the LaTeX format in the panel window,
3004       then  print  in  the LaTeX format.  As with the psfig construct, a file
3005       with the .eps extension will be generated.  This file can  be  included
3006       in a LaTeX document as follows,
3007
3008              \begin{figure*}[htb]
3009              \special{psfile="an-sr-flip-flop.eps" hoffset=-40}
3010              \rule{0in}{1.1in}
3011              \caption{An SR flip-flop.  \label{fig:an-sr-flip-flop}}
3012              \end{figure*}
3013
3014       The  \rule{0in}{1.1in}  above  specifies an invisible box of 1.1 inches
3015       high, which is the total height of the picture in an-sr-flip-flop.
3016

CONNECTING OBJECTS

3018       In the world of E-CAD, an icon object can represent an electronic  com‐
3019       ponent  and  a line object can represent a connection between a pair of
3020       pins of two electronic components.  When a component  moves,  the  end‐
3021       point  of  a  wire  connecting to the component will also move with the
3022       component.  Tgif simulates these functionalities in a limited fashion.
3023
3024       In tgif, a connection is represented by matching signal names.  A  wire
3025       is  defined  as a polyline object having a type=tgWire attribute and an
3026       attribute named signal_name.  The definition of a pin is  more  compli‐
3027       cated.   It is described in the next paragraph.  If two pins have iden‐
3028       tical values for the signal_name attribute, they are considered  to  be
3029       connected (they do not have to be visually connected by a wire).
3030
3031       A  pin object must have a type=port attribute and attributes named sig‐
3032       nal_name and name.  But not all  objects  having  such  attributes  are
3033       pins.  In addition, a pin object must be either:
3034
3035       1)     a top-level symbol or an icon object
3036
3037       or:
3038
3039       2)     an immediate subobject of a owner symbol or icon object.  or:
3040
3041       3)     an  immediate  subobject  of  a owner grouped object which has a
3042              type=tgBroadcastWire attribute.
3043
3044       In (2) above, the owner object must also have an attribute  named  name
3045       and  must  not be a subobject of another symbol or icon object.  If the
3046       owner object is a subobject of a grouped object, the name attributes of
3047       the grouped object will be ignored.
3048
3049       In (3) above, that grouped object can be created using the ConnectPort‐
3050       sToBroadcastWire() command in the PortsAndSignals submenu of  the  Spe‐
3051       cial  Menu  when  a  polyline object and some floating port objects are
3052       selected.
3053
3054       A pin object can have a connected view and a disconnected view.  A con‐
3055       nected  view  is  a subobject with a view=conn,FILL,PEN attribute and a
3056       disconnected  view  is  a  subobject   with   a   view=disconn,FILL,PEN
3057       attribute;  FILL  and  PEN  are numeric values between 0 and 31 (inclu‐
3058       sive).  The value corresponds to patterns in the Fill Menu and the  Pen
3059       Menu.   Normally,  only  0  or  1 should be used.  When the signal_name
3060       attribute of a pin object is changed from an empty  string  to  a  non-
3061       empty string, the pen and fill of the subobject that corresponds to the
3062       disconnected view will be set to 0 (meaning NONE) and the pen and  fill
3063       of  the subobject that corresponds to the connected view will be set to
3064       the values specified in the view attribute of the connected view.  When
3065       the  signal_name  attribute of a pin object is changed from a non-empty
3066       string to an empty string, the pen and fill of the subobject that  cor‐
3067       responds to the connected view will be set to 0 and the pen and fill of
3068       the subobject that corresponds to the disconnected view will be set  to
3069       the values specified in the view attribute of the disconnected view.
3070
3071       A  connection can be created using the ConnectTwoPortsByAWire() command
3072       from the PortsAndSignals submenu of the Special Menu.  Please note that
3073       if  a  pin is part of another object, that object must also have a name
3074       attribute with a non-empty value.  When two pins  are  connected  using
3075       this  command, the signal_name attributes of the pins and the wire will
3076       be set to have the same value.
3077
3078       The moving of endpoints when a component moves is implemented  in  tgif
3079       using  the  constrained  move  mode  from the MoveMode Menu (please see
3080       Tgif.ConstrainedMove in the X DEFAULTS section for additional  informa‐
3081       tion).   Please  note  that  a connected wire that is not visually con‐
3082       nected will not automatically extends itself to follow a connected com‐
3083       ponent  even in the constrained move mode.  Also, when a wire object is
3084       deleted, the signal_name attributes of connected  pins  do  not  change
3085       (since they are not really "connected").
3086

X DEFAULTS

3088       Tgif.Geometry: WIDTHxHEIGHT+X+Y
3089
3090       Tgif.IconGeometry: +X+Y
3091
3092       Tgif.Foreground: COLORSTRING
3093              The default foreground color is Black.
3094
3095       Tgif.Background: COLORSTRING
3096              The default background color is White.
3097
3098       Tgif.BorderColor: COLORSTRING
3099              If not specified, the foreground color will be used.
3100
3101       Tgif.ReverseVideo: [on,off]
3102              For  black  and  white  terminal, reverse video ``on'' means the
3103              background is black.  For color terminal, reverse  video  ``on''
3104              means  the background is specified by the Tgif.Foreground color.
3105              The default is off.
3106
3107       Tgif.InitialFont: [Times,Courier,Helvetica,NewCentury,Symbol]
3108              This specifies the initial font.  The default is Courier.
3109
3110       Tgif.InitialFontStyle: [Roman,Bold,Italic,BoldItalic]
3111              This specifies the initial font style.  The default is Roman.
3112
3113       Tgif.InitialFontJust: [Left,Center,Right]
3114              This specifies the initial font justification.  The  default  is
3115              Left.
3116
3117       Tgif.InitialFontDPI: [75,100]
3118              Obsoleted.
3119
3120       Tgif.InitialFontSizeIndex: [0,1,2,3,4,5]
3121              Obsoleted.
3122
3123       Tgif.InitialFontSize: NUMBER
3124              This  specifies  the  size of the start-up font.  The default is
3125              14.  An alternative form allows "pt" to be specified immediately
3126              after NUMBER (with no space between "pt" the the NUMBER).
3127
3128       Tgif.MsgFontSizeIndex: [0,1,2,3,4,5]
3129              Obsoleted.
3130
3131       Tgif.MsgFontSize: NUMBER
3132              This  specifies  the size of the font used for messages, menues,
3133              and popup windows.  The default is 14.
3134
3135       Tgif.RulerFontSize: NUMBER
3136              This specifies the size of the font used for ruler windows.  The
3137              default is 10.
3138
3139       Tgif.DefaultFontSize: NUMBER
3140              This  specifies the size of the font to be used when a requested
3141              for a font size can not satisfied.  This size must exist for all
3142              fonts used in tgif.  The default is 14.
3143
3144       Tgif.FontSizes: NUMBER1 NUMBER2, ...
3145              This  specified the font sizes.  The default is 8 10 11 12 14 17
3146              18 20 24 25 34.  An alternative form allows "pt" to be specified
3147              immediately  after  a NUMBER (with no space between "pt" the the
3148              NUMBER).  Please also use Tgif.InitialFontSize  to  specify  the
3149              initial  font  size  to  use  if 14 is not in the specified font
3150              sizes.
3151
3152       Tgif.AdditionalFonts: FONT_SPEC1 FONT_SPEC2 ...
3153              In addition to the Times, Courier,  Helvetica,  NewCentury,  and
3154              Symbol  fonts,  additional  fonts can be specified here.  Please
3155              see the ADDITIONAL FONTS section for details.
3156
3157       Tgif.FontNamePrefix: [-*, *]
3158              This specified the prefix to be used when tgif makes  a  request
3159              to the X server.  The default is -*.  Certain fonts have obscure
3160              font names (e.g., does not start  with  the  -  character).   In
3161              order to use these fonts, this X default can be set to *.
3162
3163       Tgif.HasAlternateDefaultFonts: [true,false]
3164              The  default  value of this X default is false.  If it is set to
3165              ``false'', tgif uses the  iso8859  registry  with  ASN1  encoded
3166              screen  fonts, and it looks for "times", "courier", "helvetica",
3167              "new century schoolbook", and "symbol" as  part  of  the  screen
3168              font names.  Some X servers do not support these fonts.  In this
3169              case, this X default can be used to make tgif use user specified
3170              screen  and  PostScript  fonts.   If  this  X  default is set to
3171              ``true'', tgif will look for additional X defaults of  the  form
3172              Tgif.<ps_font_name>, where <ps_font_name> can be one of the fol‐
3173              lowing strings:
3174
3175                     Times-Roman
3176                     Times-Bold
3177                     Times-Italic
3178                     Times-BoldItalic
3179                     Courier-Roman
3180                     Courier-Bold
3181                     Courier-Oblique
3182                     Courier-BoldOblique
3183                     Helvetica-Roman
3184                     Helvetica-Bold
3185                     Helvetica-Oblique
3186                     Helvetica-BoldOblique
3187                     NewCenturySchlbk-Roman
3188                     NewCenturySchlbk-Bold
3189                     NewCenturySchlbk-Italic
3190                     NewCenturySchlbk-BoldItalic
3191                     Symbol
3192
3193              The corresponding value of the X default must  contain  "%d"  as
3194              part  of the string, and the "%d" string will be replaced by the
3195              font size when the font is requested.  For example, The  follow‐
3196              ing  lines  will  use the Times New Roman screen font instead of
3197              the Times screen  font  and  use  the  Bookman  PostScript  font
3198              instead  of  the  Times PostScript font, if Tgif.HasAlternateDe‐
3199              faultFonts is ``true'':
3200
3201              Tgif.Times-Roman:  *-times  new  roman-medium-r-*--%d-*,Bookman-
3202              Light
3203              Tgif.Times-Bold: *-times new roman-bold-r-*--%d-*,Bookman-Demi
3204              Tgif.Times-Italic:  *-times  new roman-medium-i-*--%d-*,Bookman-
3205              LightItalic
3206              Tgif.Times-BoldItalic: *-times new roman-bold-i-*--%d-*,Bookman-
3207              DemiItalic
3208
3209              Please  note  that certain X servers require the right-hand-side
3210              font specifications to have all the dashes in place.
3211
3212       Tgif.DefaultCursor: [x_cursor,arrow,...]
3213              This specifies the select cursor.  Entries in <X11/cursorfont.h>
3214              (without  the  XC_  prefix)  are valid names of the cursor.  The
3215              default is arrow.
3216
3217       Tgif.DrawCursor: [x_cursor,arrow,...]
3218              This specifies the cursor used when drawing objects.  Entries in
3219              <X11/cursorfont.h>  (without  the XC_ prefix) are valid names of
3220              the cursor.  The default is the same as Tgif.DefaultCursor.
3221
3222       Tgif.DragCursor: [x_cursor,arrow,...]
3223              This specifies  the  cursor  used  when  dragging.   Entries  in
3224              <X11/cursorfont.h>  (without  the XC_ prefix) are valid names of
3225              the cursor.  The default is hand2.
3226
3227       Tgif.VertexCursor: [x_cursor,arrow,...]
3228              This specifies the cursor used  in  the  select  vertices  mode.
3229              Entries in <X11/cursorfont.h> (without the XC_ prefix) are valid
3230              names of the cursor.  The default is plus.
3231
3232       Tgif.FreeHandCursor: [x_cursor,arrow,...]
3233              This  specifies  the  cursor  used  in  freehand  drawing  mode.
3234              Entries in <X11/cursorfont.h> (without the XC_ prefix) are valid
3235              names of the cursor.  The default is pencil.
3236
3237       Tgif.RubberBandColor: COLORSTRING
3238              This specifies color  used  for  rubber-banding  (XORing).   The
3239              default color is the same as the foreground color.
3240
3241       Tgif.MaxColors: NUMBER
3242              This  specifies  the  maximum  number of colors.  Color0 through
3243              ColorMax, where Max is NUMBER-1, in X defaults are queried.   If
3244              NUMBER is greater than the default of 11, Color11 through Color‐
3245              Max must all exist in X  defaults.   Please  see  the  GRAPHICAL
3246              OBJECTS section for a list of the default colors.
3247
3248       Tgif.Color#: COLORSTRING
3249              This  specifies  the correspondence between a color number and a
3250              color.
3251
3252       Tgif.DefaultColorIndex: NUMBER
3253              This specifies the default color index if a  certain  color  can
3254              not be found.  The default is 0.
3255
3256       Tgif.ShortCuts: ITEM1 ITEM2 ...
3257              The ITEM specifies the correspondence between a key (may be case
3258              sensitive) and a non-alphanumeric key command.  Please  see  the
3259              SHORTCUTS section for details.
3260
3261       Tgif.MaxLineWidths: NUMBER
3262              This  specifies  the  maximum number of line widths.  LineWidth0
3263              through LineWidthMax,  ArrowWidth0  through  ArrowWidthMax,  and
3264              ArrowHeight0 through ArrowHeightMax, where Max is NUMBER-1, in X
3265              defaults are queried.  If NUMBER is  greater  than  the  default
3266              value of 7, LineWidth7 through LineWidthMax, ArrowWidth7 through
3267              ArrowWidthMax, and ArrowHeight7 through ArrowHeightMax must  all
3268              exist in X defaults.  Some default values will be used for those
3269              that are not specified in the X defaults.
3270
3271       Tgif.DefaultLineWidth: NUMBER
3272              This specifies the initial line width index.  The default is 0.
3273
3274       Tgif.LineWidth#: NUMBER
3275              This specifies a line width.  The default line widths are 1,  2,
3276              3, 4, 5, 6, and 7.
3277
3278       Tgif.ArrowWidth#: NUMBER
3279              This  specifies  the  width (when the arrow is pointing horizon‐
3280              tally) of the arrow head for arc and open-spline  objects.   The
3281              default arrow widths are 8, 10, 12, 14, 18, 20, and 22.
3282
3283       Tgif.ArrowHeight#: NUMBER
3284              This  specifies half the height (when the arrow is also pointing
3285              horizontally) of the arrow head for arc and open-spline objects.
3286              The default arrow heights are 3, 4, 5, 6, 7, 8, and 9.
3287
3288       Tgif.MaxDomains: NUMBER
3289              This  specifies  that  NUMBER is the number of domains.  Domain‐
3290              Path0,DomainPath1,...,DomainPathM all must exist in X  defaults.
3291              Here M=NUMBER-1.
3292
3293       Tgif.DomainPath#: DOMAINSTRING
3294              This  specifies  the  correspondence  between a domain number, a
3295              domain name, and the path associated with a domain.   Hence  one
3296              DomainPath# X default is required for each domain defined.  Here
3297              the # should be replaced with a domain number.  The domain  num‐
3298              bers  should be 0,1,...,MAXDOMAINS-1, where MAXDOMAINS is set in
3299              the MaxDomain X default above.  The MaxDomain X default in  com‐
3300              bination  with  the  DomainPath#  X  default are required to use
3301              domains.
3302
3303              DOMAINSTRING contains strings which are  separated  by  the  ':'
3304              symbol.   The  first  string is the name of the domain.  Each of
3305              the rest of the strings specifies a directory where symbol files
3306              are  to  be  searched  when  the Instantiate command is executed
3307              (please see the HOW TO MAKE A BUILDING-BLOCK OBJECT section  for
3308              details).  Another way to look at the DOMAINSTRING specification
3309              is that removing the first string (which  specifies  the  domain
3310              name)  and  the first ':' symbol, a DOMAINSTRING has the form of
3311              the PATH csh(1) environment variable.  For example,  to  specify
3312              the  symbol  path  for  domain DEFAULT to look for symbol files,
3313              first in the library directory /tmp/tgif/symbols,  then  in  the
3314              current  directory,  DOMAINSTRING should be set to the following
3315              value:
3316
3317                     DEFAULT:/tmp/tgif/symbols:.
3318
3319       Tgif.DefaultDomain: NUMBER
3320              This specifies the default domain  when  tgif  starts  up.   The
3321              default is 0.
3322
3323       Tgif.PrintCommand: COMMAND
3324              This  specifies  the  print  command used for printing the Post‐
3325              Script file.  The default is lpr(1).  An example would be lpr -h
3326              -Pprintername.   If COMMAND contains a %s substring, the %s will
3327              be replaced by the full path name of the PostScript  file  which
3328              is normally send to the print command.  Therefore, COMMAND with‐
3329              out a %s substring behaves identically to  COMMAND  %s.   Please
3330              note  that  this only works when running tgif without the -print
3331              command line option.  This can be used to send a  font  file  to
3332              the  printer  before  the tgif PostScript file is sent as in the
3333              following example:
3334
3335                     cat /somewhere/sansfex.pfa %s | lpr -Pmyprinter
3336
3337       Tgif.WhereToPrint: STRING
3338              This  specifies  the  initial  print/export  destination/format.
3339              STRING  can  be Printer, EPS, PS, Bitmap, Text, EPSI, GIF, HTML,
3340              PDF, WinEPSI, PNG, JPEG, PPM, or NetList.  The default is EPS.
3341
3342       Tgif.PrintDirectory: PATH
3343              This specifies the print directory when the  output  destination
3344              is  not  the printer.  The default is a null string, which means
3345              that the output goes into the directory  in  which  the  current
3346              file resides.
3347
3348       Tgif.NoTgifIcon: [true,false]
3349              If  set  to ``true'', tgif will not use its own icon window.  In
3350              this case, one should also  set  Tgif.UseWMIconPixmap  described
3351              below to true.  The default is false.
3352
3353       Tgif.UseWMIconPixmap: [true,false]
3354              If  set  to  ``true'',  tgif  will use the standard icon pixmap.
3355              Also, Tgif.NoTgifIcon will be ignored.  The default is true.
3356
3357       Tgif.DontShowVersion: [true,false]
3358              If set to ``true'', the tgif version will not  be  displayed  on
3359              top of the tgif window.  The default is true.
3360
3361       Tgif.XBmReverseVideo: [true,false]
3362              If set to ``true'', an invert bitmap operation will be performed
3363              when importing an X11 bitmap file.  The default is false.
3364
3365       Tgif.AskForXBmSpec: [true,false]
3366              If set to ``true'', the user will be asked to specify magnifica‐
3367              tion and geometry for an X11 bitmap file being imported.  Format
3368              of the specification is MAG=WxH+X+Y, where MAG is the magnifica‐
3369              tion,  W  and H specifies the width and height, and the location
3370              specification can be +X+Y, +X-Y, -X+Y, and  -X-Y.   The  '='  is
3371              mandatory  if any of the geometry information is specified.  The
3372              default is false.
3373
3374       Tgif.AskForXPmSpec: [true,false]
3375              If set to ``true'', the user will be asked to specify magnifica‐
3376              tion  and  geometry  for an X11 pixmap file being imported.  The
3377              format of the specification is the same  as  for  AskForXBmSpec.
3378              The default is false.
3379
3380       Tgif.StripEPSComments: (obsolete)
3381              This  X  default is obsolete in tgif-4.0.11 because it turns out
3382              that it's not always okay to strip PS comments (it should always
3383              be set to false).
3384
3385       Tgif.GuessXPmBgColor: [true,false]
3386              If  set  to  ``true'', then when tgif imports an X11 pixmap file
3387              with the first color string being ' ' (the space  character)  or
3388              '`' (the back quote character), it will treat the first color as
3389              a background color.  This means that the specified color in  the
3390              X11 pixmap file will be changed to the current background color.
3391              The default is false.  (Please note that this default  was  true
3392              before patch 2 of tgif-2.7.  This X default is there for compat‐
3393              ibility reasons; it should be considered obsolete.)
3394
3395       Tgif.XPmOutputVersion: NUMBER
3396              This specifies the XPM version number when outputting in the X11
3397              pixmap  format.   NUMBER can take on values 1 or 3.  The default
3398              is 1.
3399
3400       Tgif.XPmInXGrabSCFormat: [true,false]
3401              If Tgif.XpmOutputVersion is set to 1, setting this  to  ``true''
3402              will force the X11 pixmap output to resemble what xgrabsc gener‐
3403              ates.  The default is false.
3404
3405       Tgif.UseGrayScale: [true,false]
3406              If set to ``true'', gray scales will be used for tiling patterns
3407              to speed up printing.  The default is false.
3408
3409       Tgif.AutoPanInEditText: [true,false]
3410              If set to ``true'', auto panning will be used such that the text
3411              cursor is always visible in text edit mode (except when the cur‐
3412              sor  is to the left or on top of the paper).  This should proba‐
3413              bly be turned off on slow servers.  The default is true.
3414
3415       Tgif.PercentPrintReduction: NUMBER
3416              The specifies the initial percent print reduction/magnification.
3417              The default is 100.
3418
3419       Tgif.ConstrainedMove: [true,false]
3420              This  specifies  the  initial  move mode.  When set to ``true'',
3421              moving or stretching an object will cause the endpoints  of  all
3422              polylines  or  open-splines,  whose  endpoints  fall  within the
3423              object, and may  be  the  neighboring  vertices,  to  be  moved.
3424              Please  see  the  IDIOSYNCRASIES  section for more details.  The
3425              default value is false.
3426
3427       Tgif.DoubleQuoteDoubleQuote: [true,false]
3428              When set to ``true'', output of the double-quote character  will
3429              be preceded by a double-quote character; when set to false, out‐
3430              put of the double-quote character will be preceded  by  a  back-
3431              slash character.  The default value is false.
3432
3433       Tgif.GridSystem: [English,Metric]
3434              This sets the initial grid system.  The default is English.
3435
3436       Tgif.InitialGrid: NUMBER
3437              This specifies the initial grid size.  For the English grid sys‐
3438              tem, NUMBER can be -2, -1, 0, +1, or +2 for grid sizes of  1/32,
3439              1/16,  1/8, 1/4, and 1/2 inch.  For the Metric grid system, NUM‐
3440              BER can be -1, 0, +1, or +2 for grid sizes of 1mm, 2mm, 5mm, and
3441              1cm.  The default value is 0.
3442
3443       Tgif.DropObsIconAttrWhenUpdate: [true,false]
3444              If  set  to  ``true'',  obsolete icon attributes will be dropped
3445              without confirmation when the UpdateSymbols command is executed.
3446              If  set  to  ``false'',  a  popup window will prompt the user to
3447              specify what to do with  the  obsoleted  icon  attributes.   The
3448              default is false.
3449
3450       Tgif.UseRecentDupDistance: [true,false]
3451              If  set to ``true'', the most recent change in position produced
3452              by a combination of a duplicate and a move command will be  used
3453              for the new duplicate command.  Otherwise, some default distance
3454              will be used to position the duplicate.  The default is true.
3455
3456       Tgif.SplineTolerance: NUMBER
3457              This specifies the tolerance of spline drawing.  The smaller the
3458              number, the smoother the spline.  The default is 9 (min is 3 and
3459              max is 13).
3460
3461       Tgif.SplineRubberband: [true,false]
3462              If set to ``true'', spline rubber-bands will be used in drawing,
3463              moving, and stretching open and closed splines.  (This might not
3464              be desirable if the spline contains  too  many  vertices.)   The
3465              default is true.
3466
3467       Tgif.Synchronize: [on,off]
3468              XSynchronize  is  called  if this default is set to ``on''.  The
3469              default is off.
3470
3471       Tgif.DoubleClickUnIconify: [true,false]
3472              If set to ``true'', double mouse clicks are used  to  de-iconify
3473              the  icon  window  (in this mode, the icon window ignores single
3474              mouse clicks and drags).  The default is false.
3475
3476       Tgif.MainMenuPinDistance: NUMBER
3477              This specifies the horizontal  distance  (in  pixels)  the  user
3478              needs to drag a popup menu before the popup menu is to be pinned
3479              down.  The default is  80.   (If  pinned  popup  menus  are  not
3480              desired,  then  this  should  be set to a value greater than the
3481              screen width.)  Dragging the left mouse button can  be  used  to
3482              move  the  pinned  popup  menu; clicking the right button in the
3483              popup menu will remove it.
3484
3485       Tgif.DoubleClickInterval: NUMBER
3486              This specifies the maximum interval  (in  milliseconds)  between
3487              two  mouse  clicked  to  be recognized as one double-click.  The
3488              default is 300.
3489
3490       Tgif.HandleSize: NUMBER
3491              This specifies (half) the size of the handle used  to  highlight
3492              objects.   Its  allowable value is between 2 and 6.  The default
3493              is 3.
3494
3495       Tgif.HistoryDepth: NUMBER
3496              This specifies the size of the undo/redo buffer; negative values
3497              mean that the buffer is unbounded.  The default is -1.
3498
3499       Tgif.SaveTmpOnReturn: [true,false]
3500              If  set to ``true'', a tmpmodel file will be saved automatically
3501              before returning to the driver.  Otherwise,  no  files  will  be
3502              saved automatically.  The default is true.
3503
3504       Tgif.ImportFromLibrary: [true,false]
3505              If  set  to  ``true'',  the library directories specified by the
3506              current domain are searched for .obj, .sym, xbitmap/xpixmap, and
3507              EPS  files  to import.  Otherwise, the current directory will be
3508              used as the starting point.  The default is false.
3509
3510       Tgif.WarpToWinCenter: [true,false]
3511              If set to ``true'', the mouse is warped to the center  of  popup
3512              windows.   Otherwise,  the  mouse is not warped.  The default is
3513              true.
3514
3515       Tgif.SaveCommentsInSaveNew: [true,false]
3516              If set to ``true'', "%%" type  comments  in  the  file  will  be
3517              stored in the newly created file.  The default is true.
3518
3519       Tgif.CanvasWindowOnly: [true,false]
3520              If  set  to  ``true'',  only the canvas window will be displayed
3521              (this is kind of the ``demo'' mode).  The default is false.
3522
3523       Tgif.UsePsAdobeString: [true,false,NUMBER_1/NUMBER_2]
3524              If set to ``true'', the first line in the PS or EPS file will be
3525              "%!PS-Adobe-2.0  EPSF-1.2".   If  set  to  ``false'', it is just
3526              "%!".  If the PS-Adobe  string  confuses  the  document  manager
3527              (such  as  Transcript)  on  your  site,  you  should  set  it to
3528              ``false''.  If the third form is used,, the first line  will  be
3529              "%!PS-Adobe-NUMBER_1 EPSF-NUMBER_2".  The default is false.
3530
3531       Tgif.HalfToneBitmap: [true,false]
3532              If set to ``true'', the Floyd-Steinberg half-tone method will be
3533              used when printing in the X11 bitmap  format.   This  is  useful
3534              when  the  drawing  contains X11 pixmap objects.  The default is
3535              false.
3536
3537       Tgif.ThresholdBitmap: [true,false]
3538              If set to ``true'', a simple thresholding method will be used to
3539              decide  whether  a  bit is turned on or off when printing in the
3540              X11 bitmap format.  If Tgif.HalfToneBitmap is set to true,  this
3541              X default is ignored.  The default is false.
3542
3543       Tgif.BitmapThreshold: NUMBER
3544              This  specifies  the  threshold  value used in either the Floyd-
3545              Steinberg half-tone algorithm or the simple  thresholding  algo‐
3546              rithm.   NUMBER must be between 0 and 1.  This X default is only
3547              active when either the Tgif.HalfToneBitmap or  the  Tgif.Thresh‐
3548              oldBitmap X default is set to true.  The default value is 0.5 if
3549              Tgif.HalfToneBitmap is true, and is 1.0 if  Tgif.ThresholdBitmap
3550              is true (basically, anything that is not white will be black).
3551
3552       Tgif.GroupedTextEditable: [true,false]
3553              If  set to ``false'', only top level text objects and attributes
3554              of top level objects can be edited when the drawing mode is  set
3555              to  the  text  mode.   If  set  to  ``true'',  text  objects and
3556              attributes everywhere can be edited.  The default is false.
3557
3558       Tgif.DefaultEPSScaling: NUMBER
3559              This specifies the scaling factor applied to an imported  PS  or
3560              EPS  image.   As  mentioned in the IDIOSYNCRASIES section below,
3561              tgif treats 128 pixels as  an  inch  and  PostScript  treats  72
3562              points  as  an  inch.   In  order  to  have real-size PostScript
3563              images, this  parameter  should  be  set  to  1.7778  (which  is
3564              128/72).  The default value is 1.
3565
3566       Tgif.IntrCheckInterval: NUMBER
3567              This  specifies  the  number of objects drawn before tgif checks
3568              for interrupts.  If this is set to be 0 or  less,  interrupt  is
3569              not allowed.  The default value is 10.
3570
3571       Tgif.TiledPageScaling: NUMBER
3572              This  specifies  the scaling value used when a multipage drawing
3573              in tiled page mode is printed.  Since most  PostScript  printers
3574              do  not use the full page as the drawing area, setting this num‐
3575              ber to 1 may get truncated output.  The default value is 0.9.
3576
3577       Tgif.TGIFPATH: STRING
3578              This specifies the directory where the files, mentioned  in  the
3579              FILES  section  below,  can  be found.  The TGIFPATH environment
3580              variable may override this option.  The default value is  speci‐
3581              fied by the compiler option TGIF_PATH.
3582
3583       Tgif.TGIFICON: STRING
3584              This  specifies the name of the object file to be displayed when
3585              tgif is iconified.  If it starts with a  /  character,  absolute
3586              path  is  used;  otherwise,  the actual path of the icon file is
3587              $TGIFPATH/STRING where TGIFPATH is either defined  using  the  X
3588              defaults  or  an  environment  variable.   The  default value is
3589              ``tgificon.obj''.
3590
3591       Tgif.StickyMenuSelection: [true,false]
3592              If set to ``true'', when  patterns/linewidths/linestyles/...  of
3593              objects  are changed using a menu action, the corresponding pat‐
3594              tern/linewidth/linestyle/... becomes the current selection.  The
3595              default is true.
3596
3597       Tgif.PSBopHook: STRING
3598              If  specified,  the  following  PostScript  line is added at the
3599              beginning of each page when printing to the printer or to  a  PS
3600              file,
3601
3602                     userdict /STRING known { STRING } if
3603
3604              This  option  should  only  be used if one is very familiar with
3605              PostScript.  (Setting STRING to "tgif-bop-hook"  is  recommended
3606              since  it would not have a name conflict with existing software,
3607              such as dvips(1).)
3608
3609       Tgif.PSEopHook: STRING
3610              If specified, the following PostScript line is added at the  end
3611              of each page when printing to the printer or to a PS file,
3612
3613                     userdict /STRING known { STRING } if
3614
3615              This  option  should  only  be used if one is very familiar with
3616              PostScript.  (Setting STRING to "tgif-eop-hook"  is  recommended
3617              since  it would not have a name conflict with existing software,
3618              such as dvips(1).)
3619
3620       Tgif.MinimalEPS: [true,false]
3621              If set to ``false'', comments such as %%Pages,  %%DocumentFonts,
3622              %%EndComments,  %%BeginProlog,  %%EndProlog,  %%Page, %%Trailer,
3623              and %%EOF will be generated in an EPS  output.   These  comments
3624              may  confuse  certain  ``document  managers''.   Therefore,  the
3625              default is true if Tgif.UsePsAdobeString is not  specified  (and
3626              the default is false if Tgif.UsePsAdobeString is specified).
3627
3628       Tgif.InitialPrintInColor: [true,false]
3629              If  set  to ``true'', color output (printing) mode is enabled on
3630              startup.  Please note that in black and white PS/EPS/EPSI print‐
3631              ing  mode,  the  white  color  will be be printed as black (only
3632              background will be printed  as  white).   The  default  is  true
3633              (except when the -print command line option is used).
3634
3635       Tgif.InitialShowGrid: [true,false]
3636              If  set  to ``false'', showing grid is disabled on startup.  The
3637              default is true.
3638
3639       Tgif.InitialSnapOn: [true,false]
3640              If set to ``false'', snapping to the grid points is disabled  on
3641              startup.  The default is true.
3642
3643       Tgif.NoMenubar: [true,false]
3644              If  set  to  ``true'',  no menubar will be shown initially.  The
3645              default is false.
3646
3647       Tgif.NoStatusWindow: [true,false]
3648              If set to ``true'', no Status Window will  be  shown  initially.
3649              The default is false.
3650
3651       Tgif.ReverseMouseStatusButtons: [true,false]
3652              If  set  to  ``true'', the left mouse status and the right mouse
3653              status are swapped.  This should be used  when  a  ``left-handed
3654              mouse'' is used.  The default is false.
3655
3656       Tgif.MinimalMenubar: [true,false]
3657              If  set  to ``false'', the menu items in the Menubar Window will
3658              be the same as the main popup menu.  This  would  take  up  much
3659              more  space.   If  set  to ``true'', the Page, PageLayout, Hori‐
3660              Align, VertAlign, and MoveMode menus are collapsed into the View
3661              cascading menu; the Font, TextStyle, and TextSize menus are col‐
3662              lapsed  into  the  Text  cascading  menu;  and   the   LineDash,
3663              LineStyle,  LineType,  LineWidth,  Fill,  and Pen menus are col‐
3664              lapsed into the Graphics cascading menu.  The default is true.
3665
3666       Tgif.ColorBgInPrintingColorPS: [true,false]
3667              If set to ``true'', the window background color is used  as  the
3668              background  color  when  generating color PostScript output.  If
3669              set to ``false'', no background color is used.  The  default  is
3670              false.
3671
3672       Tgif.ScrollBarWidth: NUMBER
3673              This  specifies  the  width  of  a  scroll  bar.  NUMBER must be
3674              between 2 and 16.  The default is 16.
3675
3676       Tgif.InitialPaperSize: STRING
3677              The STRING specifies the initial width and height of the  paper.
3678              STRING  is  in  the  "<width>  x  <height>"  form.   <width> and
3679              <height> is a numeric value immediately followed by either  "in"
3680              (inch)  or  "cm"  (centi-meter).   The  "  x " that separate the
3681              <width> and <height> is mandatory.  If A4PAPER is defined in the
3682              Makefile,  the  default value is "21cm x 29.7cm".  If A4PAPER is
3683              not defined in the Makefile,  the  default  value  is  "8.5in  x
3684              11in".
3685
3686       Tgif.UpdateChildUsingAlignment: [true,false,no_overlap]
3687              If  set  to  ``true''  or 'no_overlap', when update_eps_child(),
3688              update_xbm_child(), or update_xpm_child()  internal  command  is
3689              executed,  the  current  horizontal  and vertical alignments are
3690              used to place the  EPS/XBM/XPM  subobject.   If  the  horizontal
3691              alignment  is  L, C, R, S, or -, the subobject is aligned to the
3692              left, center, right, center, or left, respectively, to the  par‐
3693              ent  object.  If the vertical alignment is T, M, B, S, or -, the
3694              subobject is placed above, middle, below, middle, or  below  the
3695              parent object if this X default is set to 'no_overlap'; the sub‐
3696              object is aligned to the top, middle, bottom, middle,  or  below
3697              the parent object if this X default is set to ``true''.  If this
3698              X default is set to ``false'',  the  subobject  is  placed  left
3699              aligned and below the parent object.  The default is false.
3700
3701       Tgif.GenerateImageMap: [true,false]
3702              If  set to ``true'', NCSA imagemap or CERN Clickable Image files
3703              will be generated when print  in  GIF  format.   In  this  case,
3704              Tgif.XpmToGif,   Tgif.ImageMapFileExtension,  Tgif.GifFileExten‐
3705              sion,  Tgif.ImageMapFileFormat,  and   Tgif.UseXPmVersion1ForIm‐
3706              ageMap  X defaults, described below, will be interpreted; other‐
3707              wise, they are ignored.  Please see the  section  on  GENERATING
3708              IMAGEMAP FILES for details.  The default is false.
3709
3710       Tgif.XpmToGif: STRING
3711              The  STRING specifies a command used to convert an XPM file to a
3712              GIF file.  The STRING must contain a %s substring to be replaced
3713              by the full path name of the XPM file.  The default is "xpmtoppm
3714              %s | ppmtogif".
3715
3716       Tgif.ImageMapFileExtension: STRING
3717              The STRING specifies the file extension  for  a  imagemap  file.
3718              The default is "map".
3719
3720       Tgif.GifFileExtension: STRING
3721              The  STRING  specifies  the  file extension for a GIF file.  The
3722              default is "gif" (lower case).
3723
3724       Tgif.ImageMapFileFormat: [NCSA,CERN]
3725              The STRING specifies either the NCSA imagemap or the CERN click‐
3726              able  image  format.   The default is NCSA for the NCSA imagemap
3727              format.
3728
3729       Tgif.UseXPmVersion1ForImageMap: [true,false]
3730              The setting of this X default should depend on  the  setting  of
3731              the  Tgif.XpmToGif  X  default  above.  If set to ``true'', XPM1
3732              file is generated regardless of the setting of the  Tgif.XPmOut‐
3733              putVersion X default.  The default is true.
3734
3735       Tgif.UsePaperSizeStoredInFile: [true,false]
3736              If  set to ``true'', the paper size information stored in a just
3737              opened file is used.  The default is true.
3738
3739       Tgif.OneMotionSelMove: [true,false]
3740              If set to ``true'', one can select and move  an  object  in  one
3741              motion.  The default is false.
3742
3743       Tgif.TiffEPSI: (obsolete)
3744              This  X  default is obsolete because TiffEPSI became a supported
3745              export format since tgif-4.0.
3746
3747       Tgif.XbmToTiff: STRING
3748              The STRING specifies a command used to convert an XBM file to  a
3749              TIFF  file.   The  STRING must contain either one of two %s sub‐
3750              string.  The first %s substring is to be replaced  by  the  full
3751              path  name of the XBM file.  The optional second %s substring is
3752              to be replaced by the full  path  name  of  the  generated  TIFF
3753              image.  The default is "xbmtopbm %s | pnmtotiff -none > %s".
3754
3755       Tgif.EPSIExportExtension: STRING
3756              STRING  specifies  the  file  extension  used for exporting EPSI
3757              files.  The default is "eps".
3758
3759       Tgif.HotListFileName: STRING
3760              STRING specifies a full path name of a file used  to  store  the
3761              hot  file  list.   By default, this file is .Tgif_hotlist in the
3762              user's home directory.
3763
3764       Tgif.@@@Viewer: STRING
3765              STRING specifies an external viewer for an  remote  URL  with  a
3766              file extension of @@@.  STRING can be in 3 forms.  It can be the
3767              string "NONE" to indicate  that  when  such  a  remote  file  is
3768              encountered, tgif should retrieve the file into a user specified
3769              directory.  For example, if one wishes to  retrieve  .gz  files,
3770              one can use:
3771
3772                     Tgif.gzViewer: NONE
3773
3774              STRING  can  also contain the string %S (S is capitalized), this
3775              indicates that %S is to be replaced by the URL.  For example, if
3776              one wishes to view .html files using xmosaic, one can use:
3777
3778                     Tgif.htmlViewer: xmosaic %S
3779
3780              Another form of STRING contains the string %s (S is lower-case),
3781              this indicates that the remote file is to be  retrieved  into  a
3782              user  specified  directory  and view by a tool.  For example, if
3783              one wishes to view .gif files using xv, one can use:
3784
3785                     Tgif.gifViewer: xv %s
3786
3787              Please note that this mechanism has precedence over  the  mecha‐
3788              nism described in the MIME TYPES AND MAILCAPS section above.
3789
3790       Tgif.AutoHyperSpaceOnRemote: [true,false]
3791              If  set  to ``false'', tgif will not go into the hyperspace mode
3792              when a remote URL is visited.  The default is true.
3793
3794       Tgif.AllowLaunchInHyperSpace: [true,false]
3795              If set to ``true'', launching of applications is enabled in  the
3796              hyperspace  mode  when  a remote URL is visited.  This is poten‐
3797              tially very dangerous because the application may do catastroph‐
3798              ic  damages.   Therefore,  it is strongly recommended that it is
3799              set to false.  The default is false.
3800
3801       Tgif.CanChangeAttrColor: [true,false]
3802              If set to ``true'', color of an attribute can be changed when it
3803              is attached to an object.  The default is false.
3804
3805       Tgif.MimeTypesFile: STRING
3806              STRING  specifies a full path name of the MIME-types file.  Tgif
3807              only uses the type/subtype field  in  the  MIME-types  file  and
3808              ignores  all  other  fields.   The  default  MIME-types  file is
3809              .mime.types in user's home directory.
3810
3811       Tgif.LocalRGBTxt: STRING
3812              If one would like to override certain system colors, one can use
3813              STRING  to  specify  a  full path name of a file to be consulted
3814              first before looking up the color in the server.  The file  must
3815              be  in  the  same format as the rgb.txt file.  Namely, each line
3816              contains 4 fields, the first 3 fields  correspond  to  the  red,
3817              green,  and  blue  components of the color, and the 4th field is
3818              the name of the color.  A color  component  must  have  a  value
3819              between 0 and 255 (inclusive).
3820
3821       Tgif.PrintUsingRequestedColor: [true,false]
3822              If set to ``true'', the color PostScript file being printed will
3823              use the requested color instead of the color returned by  the  X
3824              server.  The default is false.
3825
3826       Tgif.ShowMeasurement: [true,false]
3827              If set to ``true'', the location of the cursor and the width and
3828              height of  the  object  begin  drawn/dragged/stretched  will  be
3829              shown.  The default is false.
3830
3831       Tgif.ShowMeasurementUnit: STRING
3832              The  STRING  specifies  the unit used to display the measurement
3833              cursor.  There are 2  basic  formats.   One  is  just  the  word
3834              "pixel",  "inch", or "cm".  There are also known as basic units.
3835              Another format  is  NUM  BASIC-UNIT/NEW-UNIT,  where  NUM  is  a
3836              numeric  value,  BASIC-UNIT  is one of the basic units, and NEW-
3837              UNIT is any string.  For example, "0.1 cm/mm" means that the new
3838              display  unit  is  "mm"  and 1 "mm" is 0.1 cm.  "50 pixel/cm" is
3839              identical to "1 cm/cm" and "128 pixel/inch" is identical  to  "1
3840              inch/inch".  The default is pixel.
3841
3842       Tgif.PageStyleLandscape: [true,false]
3843              If  set  to  ``true'',  tgif  comes  up  in landscape mode.  The
3844              default is false.
3845
3846       Tgif.QueryZoomInPoint:                 [true,false]                  or
3847       [always,no_select,no_query,never]
3848              If  set  to  ``true'' (or ``always''), the user will be asked to
3849              select a center point when zooming in.  If set to ``no_select'',
3850              the  user will be asked to select a center point when zooming in
3851              if no objects are selected.  If set to ``no_query'',  the  posi‐
3852              tion of the mouse is the zoom-in point.  In this case, it is not
3853              desirable to zooms in using a menu selection.   The  default  is
3854              false (or never).
3855
3856       Tgif.GZipCmd: STRING
3857              The  STRING  specifies  a command used to gzip a .obj file.  The
3858              command must produce output into its  stdout.   If  the  command
3859              contains a %s substring, the %s will be replace by the full path
3860              name of a temporary copy of the .obj file.  The default is "gzip
3861              -c".
3862
3863       Tgif.GUnZipCmd: STRING
3864              The  STRING specifies a command used to unzip a zipped tgif file
3865              (with extension .obj.gz or .sym.gz) into a tgif file.  The  com‐
3866              mand  must  produce output into its stdout.  If the command con‐
3867              tains a %s substring, the %s will be replace by  the  full  path
3868              name  of  a  temporary  copy of the zipped file.  The default is
3869              "gunzip -c".
3870
3871       Tgif.HttpProxy: STRING
3872              The STRING specifies a host name and a port number  of  an  HTTP
3873              proxy server.  Format of the specification is <host>:<port>.  If
3874              :<port> is omitted, 80 is used as the default port number.   The
3875              environment  variable  http_proxy  has  precedence  over  this X
3876              default.  The default is not to use an HTTP proxy server.
3877
3878       Tgif.FtpProxy: STRING
3879              The STRING specifies a host name and a port  number  of  an  FTP
3880              proxy server.  Format of the specification is <host>:<port>.  If
3881              :<port> is omitted, 21 is used as the default port number.   The
3882              environment  variable  ftp_proxy  has  precedence  over  this  X
3883              default.  The default is not to use an FTP proxy server.
3884
3885       Tgif.InitialArrowStyle: [NONE,RIGHT,LEFT,DOUBLE]
3886              This  specifies  the  initial  arrow  style  for  polyline/open-
3887              splines/arcs.  The default is RIGHT.
3888
3889       Tgif.ShowPageInEPS: [true,false]
3890              If set to ``true'', a showpage PostScript command will be gener‐
3891              ated for an EPS or EPSI file.  The default is true.
3892
3893       Tgif.MaxNavigateCacheBuffers: NUMBER
3894              This specifies the number of cache buffers  allocated  to  cache
3895              remote  files  (to minimize communication).  NUMBER must be non-
3896              negative.  The default is 40.
3897
3898       Tgif.NumberFileInPrintOnePage: [true,false]
3899              If set to ``true'', when PrintOnePage from  the  Print  Menu  is
3900              selected  for  a  stacked  multipage  drawing  (e.g., file.obj),
3901              file_N with the proper file extension will be generated, where N
3902              corresponds to the selected page number.  The default is false.
3903
3904       Tgif.OneMotionTimeout: NUMBER
3905              When  Tgif.OneMotionSelMove  is set to true, moving an object is
3906              considered to be making a selection if the elapse  time  between
3907              mouse-down and mouse-up is smaller than the timeout value speci‐
3908              fied by this X default (in milliseconds).  The default is 200.
3909
3910       Tgif.MinMoveInterval: NUMBER
3911              When Tgif.OneMotionSelMove is set to false, moving an object  is
3912              considered  to  be making a selection if the elapse time between
3913              mouse-down and mouse-up is smaller than the  interval  specified
3914              by this X default (in milliseconds).  The default is 0.
3915
3916       Tgif.GifToXpm: STRING
3917              The  STRING specifies a command used to convert a GIF file to an
3918              XPM file.  The STRING must contain a %s substring to be replaced
3919              by the full path name of the GIF file.  The default is "giftopnm
3920              %s | ppmtoxpm".
3921
3922       Tgif.InitExportPixelTrim:      LEFT_NUMBER,TOP_NUMBER,RIGHT_NUMBER,BOT‐
3923       TOM_NUMBER
3924              The  numbers  specify the number of pixels to trim when printing
3925              or exporting in the XBM, XPM, or GIF format.  The use  of  these
3926              values  forms  an  escape  mechanism to fix an idiosyncrasy that
3927              tgif can not figure out exactly how big the whole image is.  The
3928              default values are all 0's.
3929
3930       Tgif.QuantizingLevels: NUMBER
3931              Some  image functions such as Sharpen() uses convolution and may
3932              generate an image that uses more than 256 colors which tgif  can
3933              not  handle.  The NUMBER specifies the number of colors to quan‐
3934              tize down to when such a situation occurs.  The default is 222.
3935
3936       Tgif.RotateCursor: [x_cursor,arrow,...]
3937              This specifies the cursor used in the rotate mode.   Entries  in
3938              <X11/cursorfont.h>  (without  the XC_ prefix) are valid names of
3939              the cursor.  The default is crosshair.
3940
3941       Tgif.ColorLayers: [true,false]
3942              If set to ``true'', each color is considered to be  a  different
3943              layer  which  can be individually turned on and off.  If a color
3944              layer is turned off, primitive objects in that layer will not be
3945              visible.   A  grouped object only becomes invisible when all its
3946              constituent objects are invisible.  The default is false.
3947
3948       Tgif.TiffToXbmCmd: STRING
3949              The STRING specifies a command used to convert a TIFF file to an
3950              XBM file.  This command is used when importing an EPSI file gen‐
3951              erated by a Windows application.  The STRING must contain  a  %s
3952              substring to be replaced by the full path name of the TIFF file.
3953              The default is "tifftopnm %s | pgmtopbm | pbmtoxbm"
3954
3955       Tgif.DefFixedWidthFont: STRING
3956              The STRING specifies a font to be used as the default  font  for
3957              the  Status  Window,  menus,  dialogboxes,  etc.  The default is
3958              "-*-courier-medium-r-normal-*-14-*-*-*-*-*-iso8859-1".
3959
3960       Tgif.DefFixedWidthRulerFont: STRING
3961              The STRING specifies a font to be used  in  the  horizontal  and
3962              vertical  ruler  windows.   The default is "-*-courier-medium-r-
3963              normal-*-10-*-*-*-*-*-iso8859-1".
3964
3965       Tgif.MenuFont: STRING
3966              The STRING specifies a font to be used  in  menus.   If  this  X
3967              default is not specified, the default font is used in menus.
3968
3969       Tgif.BoldMsgFont: STRING
3970              The  STRING  specifies  a  bold  font  to be used in buttons and
3971              dialogboxes.  If this X default is not specified but  Tgif.Menu‐
3972              Font is specified, this will take on the value of Tgif.MenuFont.
3973              If this X default  and  Tgif.MenuFont  are  not  specified,  the
3974              default font is used in bold messages.
3975
3976       Tgif.MsgFont: STRING
3977              The STRING specifies a thin font to be used in the Status Window
3978              and dialogboxes.  If  this  X  default  is  not  specified,  the
3979              default font is used in messages.
3980
3981       Tgif.BggenToXpm: STRING
3982              The STRING specifies a command for generating an X11 pixmap file
3983              to be executed when RunBggen() is selected  from  the  ImageProc
3984              Menu.   The STRING must contain two %s substrings.  The first %s
3985              is to be replaced by a user specified string.  The second %s  is
3986              to  be  replaced  by  the geometry of the image.  The default is
3987              "bggen %s -g %s | ppmquant 64 | ppmtoxpm".
3988
3989       Tgif.DefaultErrorDiffuseLevels: R_NUMBER G_NUMBER B_NUMBER
3990              The NUMBERs specify the number of bits of red, green,  and  blue
3991              to be used when ReduceToDefaultColors() or DefaultErrorDiffuse()
3992              are selected from the ImageProc Menu.  These values determine  a
3993              set  of default colors to be used for color quantization for the
3994              ReduceToDefaultColors()   and   DefaultErrorDiffuse()   methods.
3995              R_NUMBER+G_NUMBER+B_NUMBER  must be less than or equal to 8, and
3996              each number must be greater than 0.  The default is 2 2 2.
3997
3998       Tgif.MaxImportFilters: NUMBER
3999              This specifies the maximum number of import filters.  ImportFil‐
4000              ter0  through  ImportFilterMax,  where  Max  is  NUMBER-1,  in X
4001              defaults are queried.  The default is 0.
4002
4003       Tgif.ImportFilter#: FILTERSTRING
4004              This specifies an import filter.  FILTERSTRING has 3 parts (sep‐
4005              arated  by space characters).  The first part is the name of the
4006              filter.  It must not contain a space character.  The second part
4007              contains semicolon-separated file extensions.  The third part is
4008              the actual filter command for converting the named external file
4009              type to an X11 pixmap file.  Please see the IMPORT RASTER GRAPH‐
4010              ICS section for details.
4011
4012       Tgif.ShowFileNameOnBrowse: [true,false]
4013              If set  to  ``true'',  file  names  will  be  shown  when  Brow‐
4014              seXBitmap(), BrowseXPixmap(), or BrowseOther() are selected from
4015              the File Menu.  The default is true.
4016
4017       Tgif.HtmlFileExtension: STRING
4018              The STRING specifies the file extension used  when  printing  in
4019              the HTML format.  The default is "html".
4020
4021       Tgif.GenerateHtmlHref: [true,false]
4022              If  set  to  ``true''  and when printing in the HTML format, the
4023              value of an href attribute is parsed.  If the value references a
4024              .obj file, it's changed to have a HTML file extension.  If it is
4025              set to ``false'', no conversion will be performed.  The  default
4026              is true.
4027
4028       Tgif.RotationIncrement: NUMBER
4029              This  specifies  the initial rotation increment in degrees.  The
4030              default is 45.
4031
4032       Tgif.PSA4PaperSize: [true,false]
4033              If set to ``true'' and A4 size paper is specified, the following
4034              line is added to a PS/EPS/EPSI file (before "%%EndComments"):
4035
4036                     %%DocumentPaperSizes: a4
4037
4038              The default is false.
4039
4040       Tgif.ShapeShadowSpec: STRING
4041              The STRING specifies the initial horizontal and vertical offsets
4042              of a shape shadow.  If both values are zeroes, a shape  is  cre‐
4043              ated  without  a  shadow.   When creating a shape with a shadow,
4044              background fill pattern (3rd pattern in the first column of  the
4045              Fill Menu) usually gives the best result.  The default is "0,0".
4046
4047       Tgif.StretchableText: [true,false]
4048              If  set  to ``true'', stretchable text mode is the initial mode.
4049              The default is true.
4050
4051       Tgif.EditTextSize: NUMBER
4052              This specifies the text size to be used in editing existing text
4053              objects.   NUMBER should either be 0 or a value between 4 and 34
4054              (inclusive).  If NUMBER is 0, the actual text size  is  used  in
4055              editing  existing text objects.  The value of the edit text size
4056              can later be changed by  selecting  SetEditTextSize()  from  the
4057              Properties Menu.  The default is 0.
4058
4059       Tgif.IconPixmap: STRING
4060              STRING  specifies  the  path of an XBM or XPM file to be used as
4061              tgif's desktop icon.  If STRING starts with a / character, abso‐
4062              lute  path  is used; otherwise, the actual path of the icon file
4063              is $TGIFPATH/STRING where TGIFPATH is either defined using the X
4064              defaults  or  an  environment  variable.  This X default is only
4065              enabled if Tgif.UseWMIcon is set to true.  The default value  is
4066              ``tgificon.xbm'' (which is compiled into tgif).
4067
4068       Tgif.TmpFileMode: NUMBER (OCTAL)
4069              This specifies file mode for temporary and exported files.  NUM‐
4070              BER must be an octal number.  If NUMBER is 0, no attempt is made
4071              to  change  the  file mode.  If this value is specified (even if
4072              it's 0), it overrides the PSFILE_MOD compile option.   There  is
4073              no default value.
4074
4075       Tgif.TitledPinnedMenu: [true,false]
4076              If  set  to ``true'', pinned menu will have a title bar and left
4077              button is used for selecting menu items in a pinned  menu.   The
4078              default is true.
4079
4080       Tgif.ColorFromXPixmap: STRING
4081              STRING  specifies the path of an XPM file to be used to load the
4082              initial colors.  If this X default is specified, the Tgif.Color#
4083              X defaults are ignored.
4084
4085       Tgif.VectorWarpSoftness: NUMBER
4086              This  specifies  the  softness  value  used when VectorWarp() is
4087              selected from the ImageProc Menu.  VectorWarp()  lets  the  user
4088              warp pixels in an X11 pixmap object by specifying a vector.  The
4089              size of the affected area is controlled  by  this  value,  which
4090              must  lie between 1.0 and 4.0.  The larger the value, the larger
4091              the affected area.  The default value is 2.0.
4092
4093       Tgif.ChangePropertiesOfAttrs: [true,false]
4094              If set to ``true'', changing a  property  (such  as  font,  font
4095              size, color, etc.)  of an object will change the property of the
4096              attributes attached to the object in the same way.  The  default
4097              is false.
4098
4099       Tgif.ShiftForDiagMouseMove: [true,false]
4100              If  set  to  ``true'', certain mouse movements are restricted to
4101              multiple of 45 degrees.  The default is true.
4102
4103       Tgif.UseRecentForDiagMouseMove: [true,false]
4104              If set to ``true'', the object that is used as anchor  for  mea‐
4105              suring  the  moving  distance is used as an anchor when objects.
4106              This only works if Tgif.UseRecentDupDistance and  Tgif.ShiftFor‐
4107              DiagMouseMove are both set to true, The default is false.
4108
4109       Tgif.FlushColormapOnOpen: [true,false]
4110              If  set to ``true'', colormap is flushed the initial tgif colors
4111              are reloaded when a new file is opened.  The default is false.
4112
4113       Tgif.TransparentPattern: [true,false]
4114              If set to ``true'', fill and pen patterns are  transparent  ini‐
4115              tially.  The default is false.
4116
4117       Tgif.DontReencode: STRING
4118              For  fonts  that are not iso8859-1 encoded, non-ASCII portion of
4119              the font (characters with bit 7 on) is by default  reencoded  as
4120              if  it  were  iso8859-1 encoded.  If this is not desirable for a
4121              font, reencoding can be bypassed by including the first part  of
4122              the  PostScript  font  name  of  the  font in STRING.  Fields in
4123              STRING  are  colon-separated.   For  example,   if   STRING   is
4124              "Times:Courier:Helvetica",  PostScript  fonts  that  begins with
4125              "Times",  "Courier",  or  "Helvetica"  will  not  be  reencoded.
4126              (Please  note  that this X default overwrite the fonts specified
4127              by -D_DONT_REENCODE at compile time.)  Please also see the POST‐
4128              SCRIPT  CHARACTER  ENCODING FOR INTERNATINOAL CHARACTERS section
4129              for an example.
4130
4131       Tgif.AdditionalDontReencode: STRING
4132              Use this X default to augment Tgif.DontReencode  (or  the  fonts
4133              specified  by -D_DONT_REENCODE at compile time).  STRING here is
4134              basically concatenated to the STRING specified by Tgif.DontReen‐
4135              code  (or  the  fonts  specified  by -D_DONT_REENCODE at compile
4136              time).
4137
4138       Tgif.UnsignedInXBmExport: [true,false]
4139              If set to ``true'', unsigned char will be used instead  of  char
4140              in exported XBM files.  The default is false.
4141
4142       Tgif.CommentInBitmapExport: [true,false]
4143              If set to ``true'', a blank RCS Header comment will be prepended
4144              to exported XBM and XPM files.  The default is false.
4145
4146       Tgif.ShowFontSizeInPoints: [true,false]
4147              If set to ``true'', font sizes are  displayed  in  the  unit  of
4148              point sizes.  The default is false.
4149
4150       Tgif.DontCondensePSFile: [true,false]
4151              By  default,  PS/EPS  files generated by tgif are condensed.  If
4152              this X default is set to ``true'', tgif will not  generate  con‐
4153              densed PS/EPS files.  The default is true.
4154
4155       Tgif.StripCondensedPSComments: (obsolete)
4156              This  X  default is obsolete in tgif-4.0.11 because it turns out
4157              that it's not always okay to strip PS comments (it should always
4158              be set to false).
4159
4160       Tgif.PdfFileExtension: STRING
4161              The  STRING  specifies  the file extension used when printing in
4162              the PDF format.  The default is "pdf".
4163
4164       Tgif.PsToPdf: STRING
4165              The STRING specifies a command used to convert a PS  file  to  a
4166              PDF  file.   The  STRING  must  contain  2  %s  substrings to be
4167              replaced by the full path name of the PS file and the full  path
4168              name  of  the PDF file.  The default is "ps2pdf %s %s".  (If you
4169              like to use "epstopdf", you can try setting this to "epstopdf %s
4170              --outfile=%s".)
4171
4172       Tgif.3DLook: [true,false]
4173              If  set  to  ``false'',  no 3D decoration of windows and buttons
4174              will be used.  The default is true.
4175
4176       Tgif.XpmDeckToGifAnim: STRING
4177              The STRING specifies a command used to convert  a  list  of  GIF
4178              file  to  a GIF animation file.  The STRING must not contain any
4179              %s substring.  The default is "gifsicle -lforever  --delay  10".
4180              Gifsicle's  home  page  is  <URL:http://www.lcdf.org/gifsicle/>.
4181              One can also set this X default to "whirlgif  -loop  -time  10".
4182              Whirlgif's  home  page is <URL:http://www.msg.net/utility/whirl
4183              gif/>.
4184
4185       Tgif.GifAnimExplode: STRING
4186              The STRING specifies a command used to explode an  animated  GIF
4187              file  into  its constituent GIF files.  The STRING must not con‐
4188              tain any %s substring.  The constituent GIF files must have  the
4189              following  file  names.   If  the  animated  GIF  file  is named
4190              "foo.gif", the constituent GIF files must be named  "foo.gif.0",
4191              "foo.gif.1",  etc.   The  default is "gifsicle -eU".  Gifsicle's
4192              home page is <URL:http://www.lcdf.org/gifsicle/>.
4193
4194       Tgif.Btn3PopupModeMenu: [true,false]
4195              If set to ``true'', pressing the right mouse button in the  can‐
4196              vas window will generate the Mode Menu.  The default is false.
4197
4198       Tgif.ScriptFraction: NUMBER
4199              This  specifies  the size of the super/subscript relative to the
4200              size of the normal text.  The value must be between 0.2 and 0.8.
4201              The default value is 0.6.
4202
4203       Tgif.DeleteNextCharWithDelKey: [true,false]
4204              If set to ``true'', pressing the Delete key on the keyboard will
4205              delete the character to the right of the cursor  in  text  mode.
4206              The default is true.
4207
4208       Tgif.SquareDoubleByteFonts: FONT_SPEC1 FONT_SPEC2 ...
4209              Starting  with  version  4.0 of tgif, double-byte fonts are sup‐
4210              ported.  But only double-fonts where  every  character  has  the
4211              same width and height are supported.  Please see the SQUARE DOU‐
4212              BLE FONTS section for details.
4213
4214       Tgif.DefaultSingleByteFont: STRING
4215              Using input methods (specified by the Tgif.DoubleByteInputMethod
4216              X  default  below), one can mix english (single-byte) substrings
4217              within a double-byte string.  The font to use  for  the  english
4218              substring is specified by this X default.  The default is Times.
4219
4220       Tgif.@@@ShowFontChar: OCTAL STRING
4221              OCTAL  STRING specifies a double-byte octal character to be used
4222              to represent a double-byte font in the Choice  Window  when  the
4223              font  is  selected.   @@@  should be replaced by the name of the
4224              double-byte font.  Please see the SQUARE  DOUBLE  FONTS  section
4225              for examples.
4226
4227       Tgif.DoubleByteInputMethod: STRING
4228              This  specifies  the  input  method for double-byte fonts.  Cur‐
4229              rently, the following values are supported:  "xcin",  "chinput",
4230              "kinput2",  "xim",  and  "tgtwb5".  If you are using xcin-2.5 or
4231              above, please use "xim" instead of "xcin".  The  "tgtwb5"  input
4232              method is built into tgif and can take an optional parameter (by
4233              appending ",FONTNAME" after "tgtwb5") specifying a Big5  X  font
4234              name  to  be  used in selecting a character.  If FONTNAME is not
4235              specified,                          "-taipei-fixed-medium-r-nor‐
4236              mal--16-150-75-75-c-160-big5-0"  will  be  used.  Please see the
4237              SQUARE DOUBLE BYTE FONTS section for details.
4238
4239       Tgif.UseNKF: [true,false]
4240              If set to ``true'', Network Kanji Filter  (NKF)  will  be  used.
4241              The default is false.
4242
4243       Tgif.CopyAndPasteJIS: [true,false]
4244              If  set  to  ``true'',  copying and pasting text strings will go
4245              through additional JIS to EUC conversion.  The default is false.
4246
4247       Tgif.PreeditType: [overthespot,root]
4248              If set to  ``overthespot'',  over-the-spot  preediting  will  be
4249              used.  The default is root.
4250
4251       Tgif.Lang: STRING
4252              This  specifies  the locale.  The environment variables LANG can
4253              override this setting.
4254
4255       Tgif.Modifiers: STRING
4256              This specifies the locale modifiers.  The environment  variables
4257              XMODIFIERS can override this setting.
4258
4259       Tgif.ConvSelection: STRING
4260              This specifies the name of the selection used in converting kin‐
4261              put2 strings.  The default value is _JAPANESE_CONVERSION.
4262
4263       Tgif.VisibleGridInSlideShow: STRING
4264              If set to ``true'', grids will be  visible  in  slideshow  mode.
4265              The default is false.
4266
4267       Tgif.SmoothScrollingCanvas: [off,jump,smooth]
4268              If  set  to ``smooth'', scrolling the main canvas window will be
4269              smooth.  However, there may be a delay when scrolling starts  to
4270              cache  the image.  If set to ``jump'', scrolling the main canvas
4271              window will be jumpy.  If set to  ``off'',  scrolling  the  main
4272              canvas  window will not change the canvas until the mouse button
4273              is released.  The default is jump.
4274
4275       Tgif.LightGrayColor: COLORSTRING
4276              This specifies the color to be used for the background  of  but‐
4277              tons, menus, etc.  The default is gray75.
4278
4279       Tgif.DarkGrayColor: COLORSTRING
4280              This  specifies  the color to be used for the shadow of buttons,
4281              menus, etc.  The default is gray50.
4282
4283       Tgif.DefaultObjectBackground: COLORSTRING
4284              This specifies the color  to  be  used  for  the  background  of
4285              objects.  By default, the default background color is used.
4286
4287       Tgif.UseImagePixelsForTrueColorExport: [true,false]
4288              If  set to ``true'', the color table of an exported XPM/GIF file
4289              will be obtained from the actual image pixels  for  a  TrueColor
4290              visual.  The default is false.
4291
4292       Tgif.DialogboxUse3DBorder: [true,false]
4293              If set to ``false'', dialogboxes will not have 3D borders.  This
4294              should be used with X servers such as  X-Win32  because  dialog‐
4295              boxes already have 3D borders.  The default is true.
4296
4297       Tgif.MenuFontSet: STRING
4298              This  X  default  is  only  used  if  tgif  is compiled with the
4299              ENABLE_NLS compiler option.  The  STRING  specifies  a  list  of
4300              fonts  to  be used in menus.  STRING can be ``none'' to indicate
4301              not to use menu font set.  The default is  "-*-helvetica-medium-
4302              r-normal--12-*-*-*-*-*-*-*,-*-*-medium-r-*--12-*-*-*-*-*-*-*".
4303
4304       Tgif.MsgFontSet: STRING
4305              This  X  default  is  only  used  if  tgif  is compiled with the
4306              ENABLE_NLS compiler option.  The  STRING  specifies  a  list  of
4307              fonts  to be used in status messages.  STRING can be ``none'' to
4308              indicate not to use message font set.  The default  is  "-*-hel‐
4309              vetica-medium-r-normal--12-*-*-*-*-*-*-*,-*-*-medium-
4310              r-*--12-*-*-*-*-*-*-*".
4311
4312       Tgif.BoldMsgFontSet: STRING
4313              This X default is  only  used  if  tgif  is  compiled  with  the
4314              ENABLE_NLS  compiler  option.   The  STRING  specifies a list of
4315              fonts to be used in messageboxes.  STRING  can  be  ``none''  to
4316              indicate  not  to  use  bold  message  font set.  The default is
4317              "-*-helvetica-bold-r-normal--12-*-*-*-*-*-*-*,-*-*-medium-
4318              r-*--12-*-*-*-*-*-*-*".
4319
4320       Tgif.BoldMsgFontDoubleByte: [true,false]
4321              This  X  default  is  only  used  if  tgif  is compiled with the
4322              ENABLE_NLS compiler option.  This X default  should  be  set  to
4323              ``true'' if the strings used in messageboxes may contain double-
4324              byte characters.  The default is false.
4325
4326       Tgif.LocaleDir: STRING
4327              This X default is  only  used  if  tgif  is  compiled  with  the
4328              ENABLE_NLS  compiler  option.   The STRING specifies a full path
4329              name of a locale directory.
4330
4331       Tgif.PsRegMarksInTiledPageMode: [true,false]
4332              If set to ``true'', small crosshairs will be drawn at  the  cor‐
4333              ners  defining  the  clipping  regions  when  printing/exporting
4334              PS/EPS files in the tiled page mode.  The greyness of the  cross
4335              hairs  will  be determined by the Tgif.PsRegMarksGray X default.
4336              The default is false.
4337
4338       Tgif.PsRegMarksGray: NUMBER
4339              This  specifies  the  greyness  of  the  crosshairs  used   when
4340              Tgif.PsRegMarksInTiledPageMode  is  set  to  true.   The default
4341              value is 0.95
4342
4343       Tgif.PSFontAliases: PSFONTALIAS_SPEC1 PSFONTALIAS_SPEC2 ...
4344              Font aliases can be used to represent different  encoding,  etc.
4345              Please  see  the POSTSCRIPT CHARACTER ENCODING FOR INTERNATINOAL
4346              CHARACTERS section for details.
4347
4348       Tgif.DomainInIni: [true,false]
4349              If set to ``true'', domain information will be loaded  from  the
4350              ~/.Tgif/domain.ini  file  and  all  the menu items in the Domain
4351              submenu of the File Menu will be enabled.  The default is false.
4352
4353       Tgif.UndoRedoRestoreDrawingMode: [true,false]
4354              If set to ``true'', the drawing mode just  before  an  undo/redo
4355              operation  will  be  restored  after  undo/redo.  The default is
4356              true.
4357
4358       Tgif.MenuRowsBeforeScroll: NUMBER
4359              This specifies the maximum number of rows in a  user-specifiable
4360              text menu (such as the Font Menu and the FontSize Menu) before a
4361              vertical scrollbar is automatically used.  The default value  is
4362              20.
4363
4364       Tgif.MenuColsBeforeScroll: NUMBER
4365              This  specifies the maximum number of rows in a user-specifiable
4366              bitmap menu (such as the Color Menu) before a horizontal scroll‐
4367              bar is automatically used.  The default value is 26.
4368
4369       Tgif.PngToXpm: STRING
4370              The  STRING specifies a command used to convert a PNG file to an
4371              XPM file.  The STRING must contain a %s substring to be replaced
4372              by the full path name of the PNG file.  The default is "pngtopnm
4373              %s | pnmdepth 255 | ppmquant 222 | ppmtoxpm".
4374
4375       Tgif.JpegToXpm: STRING
4376              The STRING specifies a command used to convert a JPEG file to an
4377              XPM file.  The STRING must contain a %s substring to be replaced
4378              by the full path name of the JPEG file.  The default  is  "djpeg
4379              -gif -color 222 %s | giftopnm | ppmtoxpm".
4380
4381       Tgif.PbmToXbm: STRING
4382              The  STRING specifies a command used to convert a PBM file to an
4383              XBM file.  The STRING must contain a %s substring to be replaced
4384              by the full path name of the PBM file.  The default is "pbmtoxbm
4385              %s".
4386
4387       Tgif.PgmToXpm: STRING
4388              The STRING specifies a command used to convert a PGM file to  an
4389              XPM file.  The STRING must contain a %s substring to be replaced
4390              by the full path name of the PGM file.  The default is "ppmtoxpm
4391              %s".
4392
4393       Tgif.PpmToXpm: STRING
4394              The  STRING specifies a command used to convert a PPM file to an
4395              XPM file.  The STRING must contain a %s substring to be replaced
4396              by the full path name of the PPM file.  The default is "ppmquant
4397              222 %s | ppmtoxpm".
4398
4399       Tgif.XpmToPng: STRING
4400              The STRING specifies a command used to convert an XPM file to  a
4401              PNG file.  The STRING must contain a %s substring to be replaced
4402              by the full path name of the XPM file.  The default is "xpmtoppm
4403              %s | ppmtopng".
4404
4405       Tgif.PngFileExtension: STRING
4406              The  STRING  specifies  the  file extension for a PNG file.  The
4407              default is "png" (lower case).
4408
4409       Tgif.XpmToJpeg: STRING
4410              The STRING specifies a command used to convert an XPM file to  a
4411              JPEG  file.   The  STRING  must  contain  a  %s  substring to be
4412              replaced by the full path name of the XPM file.  The default  is
4413              "xpmtoppm %s | cjpeg".
4414
4415       Tgif.JpegFileExtension: STRING
4416              The  STRING  specifies  the file extension for a JPEG file.  The
4417              default is "jpg" (lower case).
4418
4419       Tgif.ProducedBy: STRING
4420              When printing/exporting PS/EPS files, STRING will  appear  in  a
4421              %%ProducedBy  line  in  a  exported PS/EPS file.  Please include
4422              your  name  and  e-mail  address  in  STRING.   The  default  is
4423              "(unknown)".
4424
4425       Tgif.Editor: STRING
4426              STRING  specifies  a  text editor to use for editing attributes.
4427              The STRING must contain two %s substrings to be replaced by  the
4428              window title and the full path name of the text file.  For exam‐
4429              ple, you can use "xemacs -title  '%s'  '%s'".   The  default  is
4430              "xterm -title '%s' -e vi '%s'".
4431
4432       Tgif.GoHyperSpaceInSlideShow: [true,false]
4433              If  set  to  ``true'', hyperspace mode will be entered when tgif
4434              enters the slideshow mode.  The default is false.
4435
4436       Tgif.LineWidthIndexInSlideShow: NUMBER
4437              This specifies the line width index to use when tgif is  in  the
4438              slideshow mode.  The default value is 4.
4439
4440       Tgif.MaxRecentFiles: NUMBER
4441              This  specifies  the  maximum number of files to remember in the
4442              recently used file list.  The default value is 10.
4443
4444       Tgif.ResetOriginOnAdvancePage: [true,false]
4445              If set to ``true'', tgif will scroll to the left-top  corner  of
4446              the page when pages are advanced.  The default is false.
4447
4448       Tgif.UseMeasureTooltip: [true,false]
4449              If set to ``true'', the location of the cursor and the width and
4450              height of the object begin drawn/dragged/stretched will be shown
4451              in  a  tooltip  window.   This  X  default  only takes effect if
4452              Tgif.ShowMeasurement is true.  The default is false.
4453
4454       Tgif.MeasureTooltipXFollowMouse: [true,false]
4455              If set to ``true'', the X position of  the  measurement  tooptip
4456              will follow the mouse.  The default is false.
4457
4458       Tgif.MeasureTooltipYFollowMouse: [true,false]
4459              If  set  to  ``true'', the Y position of the measurement tooptip
4460              will follow the mouse.  The default is false.
4461
4462       Tgif.MeasureTooltipHorizontalPosition: [left,center,right]
4463              Fix the X position of the measurement tooltip to the left,  cen‐
4464              ter,  or  right.   This X default only takes effect if Tgif.Mea‐
4465              sureTooltipXFollowMouse is false.  The default is left.
4466
4467       Tgif.MeasureTooltipVerticalPosition: [top,middle,bottom]
4468              Fix the Y position of the measurement tooltip to the  top,  mid‐
4469              dle,  or  bottom.  This X default only takes effect if Tgif.Mea‐
4470              sureTooltipYFollowMouse is false.  The default is top.
4471
4472       Tgif.MeasureTooltipVerbose: [true,false]
4473              If set to ``true'', additional information about  the  positions
4474              and  sizes  of  objects will be displayed in the tooltip window.
4475              The default is false.
4476
4477       Tgif.NoMinWinSize: [true,false]
4478              If set to ``false'', tgif will have a  minimum  window  size  so
4479              that  the whole panel window is alway visible.  The problem with
4480              this setting is that some window manager  will  show  the  wrong
4481              window  size  when  you resize the window.  This setting is left
4482              for compatibility reasons.  If set to ``true'', a side effect is
4483              that  the menubar will no longer automatically wraps around when
4484              Tgif.MinimalMenubar is set to true.  The default is true.
4485
4486       Tgif.AutoWrapMenubar: [true,false]
4487              If set to ``true'', the menubar will automatically wrap  around.
4488              If Tgif.MinimalMenubar is set to false, menubar will always wrap
4489              around automatically.  The default is false.
4490
4491       Tgif.AutoEPSPreviewBitmap: [true,false]
4492              If set to ``true'', when importing  a  PS/EPS  file,  tgif  will
4493              automatically  generate  a  preview  bitmap if the file does not
4494              already contain one.  The default is false.
4495
4496       Tgif.PsToXbm: STRING
4497              STRING specifies a command used to convert a PS file  to  a  XBM
4498              file.   The  STRING  must  contain  a single %s substrings to be
4499              replaced by the full path name of the PS file.  Please note that
4500              the  above command usually generates a bitmap that's much larger
4501              than image in the file.  Tgif automatically trims out the  blank
4502              space similar to the way pbmtoepsi works.  The default is "gs -q
4503              -dNOPAUSE -sDEVICE=pbm -sOutputFile=- -- "%s" | pbmtoxbm".
4504
4505       Tgif.TmpDirInHomeDir: [true,false]
4506              If set to ``true'', tgif will use the $HOME/.Tgif  directory  as
4507              the  temporary directory (unless the Tgif.TmpDir X default below
4508              is used) and the compiler  option  -DTMP_DIR  is  ignored.   The
4509              default  is  false if the -D_TMP_DIR_IN_HOME_DIR compiler option
4510              is used.  The default is true if the -D_TMP_DIR_IN_HOME_DIR com‐
4511              piler option is not used.
4512
4513       Tgif.TmpDir: STRING
4514              STRING  specifies a directory to be used as the temporary direc‐
4515              tory.  The use of this X default is discouraged,  especially  if
4516              tgif  is compiled with -DUSE_XT_INITIALIZE and a X resource file
4517              found in the directory search path specified by the  environment
4518              variable  $XAPPLRESDIR  is  used.  By default, tgif uses /tmp as
4519              the temporary directory.
4520
4521       Tgif.ThumbnailGeometry: WIDTHxHEIGHT
4522              This X  default  specifies  the  geometry  of  thumbnails.   The
4523              default is 160x120.
4524
4525       Tgif.ThumbnailPadding: NUMBER
4526              This  specifies  the  padding  (in pixels) for thumbnail images.
4527              The default value is 8.
4528
4529       Tgif.ThumbnailXGap: NUMBER
4530              This specifies the horizontal  gap  (in  pixels)  for  thumbnail
4531              images.  The default value is 16.
4532
4533       Tgif.ThumbnailYGap: NUMBER
4534              This  specifies  the  vertical  gap  (in  pixels)  for thumbnail
4535              images.  The default value is 0.
4536
4537       Tgif.ThumbnailX: NUMBER
4538              This specifies the starting x location (in pixels) for thumbnail
4539              images.  The default value is 32.
4540
4541       Tgif.ThumbnailY: NUMBER
4542              This specifies the starting y location (in pixels) for thumbnail
4543              images.  The default value is 32.
4544
4545       Tgif.ShowWireSignalName: [true,false]
4546              If set to ``false'', when connecting ports, tgif will  automati‐
4547              cally  place  the  signal name and hide it.  Otherwise, the user
4548              will be prompted to place the signal name and it will  be  visi‐
4549              ble.  The default is true.
4550
4551       Tgif.LandscapePdfSetPageDevice: (obsolete)
4552              This  X  default  is obsolete in tgif-4.1.42 because the name is
4553              misleading.  Please see Tgif.PdfSetPageDevice below.
4554
4555       Tgif.PdfSetPageDevice: [true,false]
4556              If set to ``true'', when exporting PDF (or PS) files, tgif  will
4557              use PostScript "setpagedevice" command to specify the paper size
4558              in the generated PostScript file before  calling  ps2pdf(1)  (if
4559              exporting  in PDF format).  This should not be necessary (and is
4560              considered a bug in ps2pdf).  In the future, this X default  can
4561              be  used  to turn off the generation of the "setpagedevice" com‐
4562              mand when ps2pdf can  handle  landscape  PostScript  files  cor‐
4563              rectly.
4564
4565       Tgif.DeleteCmdAsCut: [true,false]
4566              If  set  to ``true'', when Delete is selected from the Edit Menu
4567              or if <Cntrl>x is pressed,  Cut  will  be  executed  instead  of
4568              Delete.   Pressing the <DEL> key on the keyboard will still per‐
4569              form a regular Delete.  The default is false.  Tgif.EnableMouse‐
4570              Wheel:  [true,false]  If  set  to ``false'', Button4 and Button5
4571              mouse wheel scrolling events will be ignored.   The  default  is
4572              true.  Tgif.Btn2PopupMainMenu: [true,false] If set to ``false'',
4573              Button2 events will not bring up the Main  Menu  in  the  canvas
4574              window.  The default is true.
4575
4576       Tgif.NoChoiceWindow: [true,false]
4577              If  set to ``true'', no Choice and Message Windows will be shown
4578              initially.  The default is false.
4579
4580       Tgif.UseXPmVersion1ForXPmDeck: [true,false]
4581              The setting of this X default should depend on  the  setting  of
4582              the  Tgif.XpmDeckToGifAnim X default above.  If set to ``true'',
4583              XPM1 file is generated when a deck  of  X11  pixmap  objects  is
4584              being  converted  to a GIF animation file regardless of the set‐
4585              ting of the Tgif.XPmOutputVersion X  default.   The  default  is
4586              true.
4587
4588       Tgif.SlideShowWindowOffsets: X_OFFSET,Y_OFFSET
4589              The  numbers  specify  the  number  of  pixels to adjust for the
4590              slideshow mode.  If only one value is given, both X and  Y  off‐
4591              sets are set to the same value.  The default values are all 0's.
4592
4593       Tgif.SlideShowBorderColor: COLORSTRING
4594              This  specifies the color to be used for the area outside of the
4595              paper boundary in slideshow mode.  By default, the color of  the
4596              border is the same as the background color.
4597
4598       Tgif.ConvertToBezierSegments: NUMBER
4599              This specifies the number of segments used in converting a poly‐
4600              line/spline object to a Bezier curve.  The default value is 50.
4601
4602       Tgif.TickMarkSize: NUMBER
4603              This specifies the size of a tick mark  to  be  used  when  tick
4604              marks  are  added at a vertex of a polyline/polygon/spline.  The
4605              default value is 8.
4606
4607       Tgif.NoModeWindow: [true,false]
4608              If set to ``true'', no Mode Window will be shown initially.  The
4609              default is false.
4610
4611       Tgif.MakeUnsavableInSlideShow: [true,false]
4612              If set to ``true'', the current file will be made unsavable when
4613              slideshow mode is entered.  (If the current file  contains  auto
4614              page  numbering objects, the file will be made unsavable regard‐
4615              less of the setting of this X default.)  The default is false.
4616
4617       Tgif.SingleByteInputMethod: STRING
4618              This specifies the input method  for  single-byte  fonts.   Cur‐
4619              rently, only "xim" is supported.
4620
4621       Tgif.IgnoreSlideShowOfffsetsInFile: [true,false]
4622              If set to ``false'', the slideshow offsets stored in a file will
4623              override the Tgif.SlideShowWindowOffsets setting.   The  default
4624              is true.
4625
4626       Tgif.ItalicMsgFont: STRING
4627              The  STRING  specifies a italic font to be used in some buttons.
4628              If this X default is not specified but Tgif.MenuFont  is  speci‐
4629              fied,  this  will take on the value of Tgif.MenuFont.  If this X
4630              default and Tgif.MenuFont are not specified, the default font is
4631              used in italic messages.
4632
4633       Tgif.ItalicMsgFontSet: STRING
4634              This  X  default  is  only  used  if  tgif  is compiled with the
4635              ENABLE_NLS compiler option.  The  STRING  specifies  a  list  of
4636              fonts  to  be  used  in messageboxes.  STRING can be ``none'' to
4637              indicate not to use italic message font  set.   The  default  is
4638              "-*-helvetica-medium-o-normal--12-*-*-*-*-*-*-*,-*-*-medium-
4639              r-*--12-*-*-*-*-*-*-*".
4640
4641       Tgif.BoldItalicMsgFont: STRING
4642              The STRING specifies a bold italic font to be used in some text.
4643              If  this  X default is not specified but Tgif.MenuFont is speci‐
4644              fied, this will take on the value of Tgif.MenuFont.  If  this  X
4645              default and Tgif.MenuFont are not specified, the default font is
4646              used in bold italic messages.
4647
4648       Tgif.BoldItalicMsgFontSet: STRING
4649              This X default is  only  used  if  tgif  is  compiled  with  the
4650              ENABLE_NLS  compiler  option.   The  STRING  specifies a list of
4651              fonts to be used in some text.  STRING can be ``none'' to  indi‐
4652              cate  not  to  use bold italic message font set.  The default is
4653              "-*-helvetica-bold-o-normal--12-*-*-*-*-*-*-*,-*-*-medium-
4654              r-*--12-*-*-*-*-*-*-*".
4655
4656       Tgif.ExternalPsToEpsi: [true,false]
4657              If  set  to  ``true'',  the execution of the pstoepsi() internal
4658              command will simply invoke pstoepsi externally.  The default  is
4659              false.
4660
4661       Tgif.GsPath: STRING
4662              The  STRING  specifies  a full path name of the gs (ghostscript)
4663              program.  The default is  "gs"  (which  implies  that  the  "gs"
4664              excutable is in your PATH).
4665
4666       Tgif.CompoundObjWithTextStretchableForPSE: [true,false]
4667              If set to ``false'', when executing the Precise Scale Everything
4668              command, a compound object will not be stretched if it  contains
4669              a  text subobject.  This X default only has effect if tgif is in
4670              the non-stretchable text mode.  (If tgif is in  the  stretchable
4671              text mode, this X default is ignored.)  The default is false.
4672
4673       Tgif.HideWindowsInSlideShow: [true,false]
4674              If  set  to  ``false'',  tgif  will  keep all windows visible in
4675              slideshow mode.  Otherwise, only the canvas window will be visi‐
4676              ble in slideshow mode.  The default is true.
4677
4678       Tgif.PSDistillerNoImageCompress: [true,false]
4679              If  set  to ``true'', tgif will generate PostScript code so that
4680              images in a generated PostScript file will not be compressed  by
4681              a distiller program such as ps2pdf.  The default is false.
4682
4683       Tgif.AdditionalPSSetup: STRING
4684              If  specified,  the  PostScript  line  specified  by  STRING  is
4685              inserted at the end  of  PostScript  file  setup  (right  before
4686              %%EndSetup).   This  option  should  only be used if one is very
4687              familiar with PostScript.  Here is an example to  ask  distiller
4688              programs not to compress bitmap images:
4689
4690                     Tgif.AdditionalPSSetup: \n\
4691                         systemdict /setdistillerparams known \n\
4692                         { << /AutoFilterGrayImages false \n\
4693                         /AutoFilterColorImages false \n\
4694                         /ColorImageFilter /FlateEncode \n\
4695                         /GrayImageFilter /FlateEncode \n\
4696                         >> setdistillerparams } if
4697
4698       Tgif.PSFontCharSubs: FONTSUB_SPEC1 FONTSUB_SPEC2 ...
4699              The  format of FONTSUB_SPEC is FONTNAME=TOKENNAME where FONTNAME
4700              is the name of a PostScript font and TOKENNAME is  the  name  of
4701              the  extension for the Tgif.PSCharSubs_TOKENNAME X default.  For
4702              PostScript font names that begins with a string that  matches  a
4703              FONTNAME part of a FONTSUB_SPEC, tgif will read the Tgif.PSChar‐
4704              Subs_TOKENNAME X default to determine which characters  will  be
4705              substituted.
4706
4707              For  fonts  that are not iso8859-1 encoded, non-ASCII portion of
4708              the font (characters with bit 7 on) is by default  reencoded  as
4709              if  it  were  iso8859-1 encoded when PS output is generated.  If
4710              this is not desired, different named PS characters can  be  sub‐
4711              stituted  for  characters  with  bit  7 on.  Please also see the
4712              POSTSCRIPT CHARACTER ENCODING FOR INTERNATINOAL CHARACTERS  sec‐
4713              tion for an example.
4714
4715       Tgif.PSCharSubs_TOKENNAME: PSCHARSUBS_SPEC1 PSCHARSUBS_SPEC2 ...
4716              TOKENNAME  must match a FONTSUB_SPEC in the Tgif.PSFontNeedChar‐
4717              Subs X default.  The  format  for  PSCHARSUBS_SPEC  is  OLDCHAR‐
4718              CODE/NEWCHARNAME  where OLDCHARCODE is a character code in octal
4719              format and NEWCHARNAME is a PostScript character  name  to  use.
4720              For more information, please see the POSTSCRIPT CHARACTER ENCOD‐
4721              ING FOR INTERNATINOAL CHARACTERS section.
4722
4723       Tgif.DrawTextFuncKey_F#: INTERNAL COMMAND LIST
4724              This specifies the correspondence between a function key  and  a
4725              list of internal commands.  When function key F# is pressed when
4726              tgif is in the text drawing  mode,  the  corresponding  list  of
4727              internal  commands  is  executed.  Tgif only recognizes function
4728              keys F1 through F12.
4729
4730       Tgif.PasteFromXSelectionOnly: [true,false]
4731              If set to ``false'', if tgif has failed to perform a  paste  via
4732              the  X Selections mechanism, it will attempt the old style paste
4733              (directly fetch bytes from the X server).  This is  mainly  used
4734              for with X servers.  The default is true.
4735
4736       Tgif.PasteFromSelectionTimeout: NUMBER
4737              This  specifies  the  number of seconds for a paste operation to
4738              timeout.  The default value is 10.
4739
4740       Tgif.LengthLimit256InInsertChar: [true,false]
4741              If set to ``true'', the maximum number of characters per line of
4742              text  is  set  at  256.  Additional characters are ignored.  The
4743              default is false.
4744
4745       Tgif.JpegToPpm6: STRING
4746              The STRING specifies a command used to convert a JPEG file to  a
4747              PPM  file  in  the P6 format.  The STRING must contain a %s sub‐
4748              string to be replaced by the full path name of  the  JPEG  file.
4749              The default is "djpeg -ppm %s".
4750
4751       Tgif.ObjectShadowOffsets: X_OFFSET,Y_OFFSET
4752              The  numbers  specify  the  number of pixels to be offseted when
4753              creating a generic object shadow.  If only one value  is  given,
4754              both  X  and  Y  offsets are set to the same value.  The default
4755              values are all 2's.
4756
4757       Tgif.ObjectShadowColor: COLORSTRING
4758              This specifies the color to be used for generic  object  shadow.
4759              The default value is "#c0c0c0".
4760
4761       Tgif.IgnoreObjectShadowInfoInFile: [true,false]
4762              If  set  to  ``false'',  the  generic  object shadow information
4763              stored in a file will override the Tgif.ObjectShadowOffsets  and
4764              Tgif.ObjectShadowColor settings.  The default is true.
4765

ENVIRONMENT VARIABLE

4767       TGIFPATH
4768              This  environment  variable  should  be set such that the files,
4769              mentioned in the FILES section below, can be found.
4770
4771       TGIFICON
4772              This environment variable should be  set  to  the  name  of  the
4773              object file to be displayed when tgif is iconified.  By default,
4774              it is set to ``tgificon''.  If it starts  with  a  /  character,
4775              absolute path is used; otherwise, the icon file is assumed to be
4776              $TGIFPATH/$TGIFICON.
4777
4778       TGIF_[Domain]
4779              Obsoleted.
4780

FILES

4782       $TGIFPATH/tgificon.obj contains the default tgif icon.
4783
4784       $TGIFPATH/keys.obj contains a summary of the non-alphanumeric key bind‐
4785       ings.
4786

PROLOG/C TESTDRIVE

4788       In the tgif distribution, there are three Prolog files which illustrate
4789       a simple Prolog driver.  tgif.pl contains predicates for  parsing  tgif
4790       files  (both .obj and .sym).  frontend.pl contains predicates for talk‐
4791       ing to Prolog engines, such as that of Quintus and SISCtus, through the
4792       foreign  function interface.  To use frontend.pl, frontend11.o needs to
4793       be built (which requires the frontend11.o entry to be uncommented  from
4794       the  makefiles).   Finally,  testdrive.pl contains a program which will
4795       print out the ID files of all objects in the current drawing,  if  tgif
4796       is  escaped  with the Solve() (or #s) command.  This is also a good way
4797       of finding out the structure of a tgif  file  (especially  because  the
4798       structure  is  not  documented due to the complexity introduced to keep
4799       tgif compatible with files created by older versions).
4800
4801       A very simple C driver, testdrive.c, is also  provided  with  the  tgif
4802       distribution which perform the same function as the Prolog driver.  The
4803       extra code present in this file (and not present in tgif.c) is used  to
4804       illustrate  how  the  in-memory objects and attributes can be traversed
4805       and how new objects can be created and manipulated.
4806

SEE ALSO

4808       latex(1L), lpr(1), ghostscript(1), env(1), X(1), dvips(1), csh(1), pbm‐
4809       plus(1),    netpbm(1),    djpeg(1),   bitmap(1),   XPM(1),   netpbm(1),
4810       xfontsel(1), xlsfonts(1), xgrabsc(1), xloadimage(1), xsnap(1), sxpm(1),
4811       xv(1), pstoepsi(1), Mosaic(1), bggen(1), rand(3C), ps2pdf(1)
4812

IDIOSYNCRASIES

4814       When  any  of the ``escape to driver'' commands are (accidentally) exe‐
4815       cuted, the  current  content  of  the  drawing  is  saved  into  ``tmp‐
4816       model.obj''  if the drawing indicates that it is a .obj file; then tgif
4817       escapes to the driver and returns right away.  If the drawing indicates
4818       that  it  is  a  .sym  file,  then  the  content  is  saved into ``tmp‐
4819       model.sym'', but tgif does not return to the driver.
4820
4821       The paste operation works on a cut buffer generated by tgif or by  non-
4822       tgif  tools  (such  as  xterm).   If the cut buffer is not generated by
4823       tgif, its content  is  treated  as  a  collection  of  ASCII  character
4824       strings,  which  is  inserted into the current drawing as a text object
4825       (current settings for text objects are used to create the text object).
4826       If  the  cut buffer is generated by tgif, then all the current settings
4827       are ignored.
4828
4829       The font sizes are the screen font sizes (which  correspond  to  the  X
4830       fonts  that  are  used  to  draw  the text on the screen).  They appear
4831       smaller on the printout.  When a 24 point text  is  printed,  it  would
4832       correspond to about a 13.5 point PostScript text.  This is because tgif
4833       treats 128 pixels as an inch, and PostScript treats  72  points  as  an
4834       inch.
4835
4836       Because  characters  supported by X11 and PostScript are different, not
4837       all the characters, especially in the range 128  to  255  (or  \200  to
4838       \377),  which are supported by X11, but are not accepted by tgif.  Fur‐
4839       thermore, in order to print the supported subset or  these  characters,
4840       character  codes  must  be re-encoded.  Therefore, if one would like to
4841       hack tgif to support other personalized fonts, one  should  be  careful
4842       about the re-encoding mechanism.
4843
4844       The  grids  are  not absolute; they are specified as screen pixels, and
4845       they scale with the current zoom.  For example, if the grid is  set  at
4846       16  pixels at maximum zoom, and if the user zooms out once, objects can
4847       be drawn, moved, or stretched at 16 screen pixel increments,  but  this
4848       corresponds to 32 pixels in the real coordinate system.
4849
4850       If  the  vertical  text  spacing is set to negative values, highlighted
4851       text will look a little strange due to XOR operations.  If the vertical
4852       text spacing is set to be greater than 100 or less than -100, the panel
4853       window will not be cleared properly; to clear  the  panel  window,  the
4854       user may have to close the tgif window and then open it again.
4855
4856       As  described in the TGIF SUBWINDOWS section, in constrained move mode,
4857       if both endpoints of a not-selected  polyline  lie  inside  the  object
4858       being  moved,  then the whole polyline is moved.  This may look strange
4859       sometimes because, for example, if  one  starts  with  a  line  segment
4860       pointing to an object, just moving the object will caused the line seg‐
4861       ment to be ``stretched''; however, if one eventually moves  the  object
4862       so  that the other endpoint is also inside the object, any future move‐
4863       ment of the object will cause the whole line segment to  move  (instead
4864       of  just moving the original endpoint).  The moving of the vertex which
4865       is the neighbor of a moved endpoint may also look strange at times.  At
4866       this point, one should switch to the unconstrained move mode.
4867
4868       Another idiosyncrasy with respect to the constrained move is that right
4869       after duplicating an object, the constrained move is disabled temporar‐
4870       ily  because  it  is  assumed that at this point the user would want to
4871       move the new object to a desirable position, and only  after  this  new
4872       object  is  ``settled  down'', the constrained move will be re-enabled.
4873       Settling down is signified by doing something other than moving the new
4874       object.
4875
4876       Locked objects can be deleted.
4877
4878       Under  the  Edit  Menu,  PasteFromFile() reads a file into the drawing.
4879       Pasting from a file is different  from  the  normal  pasting  operation
4880       where  copying  is  performed  in something like xterm because tabs are
4881       automatically converted to spaces.  Tabs are ignored when pasting  from
4882       a file.
4883
4884       When  printing  a multipage drawing, all pages (even the ones that con‐
4885       tains no objects) will be printed.  Using  the  PrintOnePage()  command
4886       under  the  Page  Menu one can print the selected page (in stacked page
4887       layout mode, this is the current page; in tiled page layout  mode,  the
4888       user is prompted to select a visible page).
4889
4890       Tgif  can  be setup to use its own icon window (the Tgif.NoTgifIcon and
4891       the Tgif.UseWMIconPixmap X defaults must both be set to  false).   How‐
4892       ever,  it  may  confuse  certain window managers.  So, if the effect is
4893       undesirable, one can set the Tgif.UseWMIconPixmap X defaults to true.
4894

BUGS

4896       There seems to be a problem with printing Courier  fonts  with  a  non-
4897       solid  pen  on  the Apple LaserWriter.  (Printing single character does
4898       seem to work fine.)  As pointed out by the PostScript reference manual,
4899       Courier  is a ``stroked font'', and it is usually ``difficult'' to con‐
4900       struct character paths for such types of fonts.  However, Courier fonts
4901       work  fine  with  ghostscript(1) and dxpsview.  It's not clear how this
4902       problem can be fixed.  The author  recommends  avoiding  Courier  fonts
4903       when printing in color if a non-solid pen is desired.
4904
4905       Arcs  with  arrow tips don't look very sharp (the tip is not pointed as
4906       in open-splines with arrow tips).
4907
4908       At high magnifications, stretching arcs may  cause  anomalous  behavior
4909       due to round off errors.
4910
4911       When  page  reduction/magnification is not set at 100%, the markings in
4912       the Ruler Windows do not correspond to real measurements.  behavior due
4913       to round off errors.
4914
4915       Copying/pasting  large objects might not work because tgif does not use
4916       the ``selection'' mechanism (yet).
4917
4918       If and when tgif crashes, it will try to save the  current  content  of
4919       the  drawing  in  a  file  called  ``EmergencySave.obj'' (or ``Emergen‐
4920       cySave.sym'' if the current drawing specifies a symbol object).  Often,
4921       the  drawing can be restored by loading the ``EmergencySave.obj'' file.
4922       Nevertheless, if the cause of the crash is that some objects  are  cor‐
4923       rupted  (due  to programming bugs), then the ``EmergencySave.obj'' file
4924       may also be corrupted.
4925
4926       When launching an application, if the command does not end with the '&'
4927       character and the command does not terminate, tgif also hangs.  In this
4928       case, kill(1) should be used to send HUP signal to the tgif process  if
4929       one wants to save the content of tgif in ``EmergencySave.obj''.
4930
4931       The  file  exec.c  may not compile properly on AIX machines.  One might
4932       have to add -D_BSD to the DEFINES in  either  the  Imakefile  or  Make‐
4933       file.noimake.
4934
4936       Please see the ``Copyright'' file for details on the copyrights.
4937
4938       PostScript is a trademark of Adobe Systems Incorporated.
4939

STATUS

4941       The  current  status of tgif can be obtained from tgif's World-Wide-Web
4942       home page at <URL:http://bourbon.usc.edu/tgif/>.
4943

AUTHOR

4945       William Chia-Wei Cheng (bill.cheng@acm.org)
4946       <URL:http://merlot.usc.edu/william/usc/>
4947

REFERENCES

4949       [1]    ``A         Beginner's         Guild         to          HTML'',
4950              <URL:http://www.ncsa.uiuc.edu/General/Internet/WWW/HTML
4951              Primer.html>.
4952
4953       [2]    ``CGI        -        Common        Gateway         Interface'',
4954              <URL:http://www.w3.org/CGI/overview.html>.
4955
4956       [3]    ``NCSA Imagemap'', <URL:http://hoohoo.ncsa.uiuc.edu/docs/tutori
4957              als/imagemapping.html>.
4958
4959       [4]    ``CERN    Clickable    Image'',    <URL:http://www.w3.org/hyper
4960              text/WWW/Daemon/User/CGI/HTImageDoc.html>.
4961
4962
4963
4964Tgif                  Version 4.1 Patchlevel 45 and Above              tgif(n)
Impressum