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|-letter}]  [-listdontreencode] [-version] [-pdfspd | -pdfspd=true
16       | -pdfspd=false ] [-pssetup "<string>" ] [-tgwb2 [-rmcastlibdir <direc‐
17       tory>  | -rmcastlibpath <path>]] [-nomode] [-geometry <geom>] [=<geom>]
18       [{file[.obj]|-merge file1[.obj] file2[.obj] ...}]
19
20       or
21
22       tgif -print [-eps] [-p] [-ps] [-f] [-text] [-epsi]  [-tiffepsi]  [-gif]
23       [-png]  [-jpeg]  [-ppm]  [-pbm] [-xpm] [-xbm] [-html] [-pdf] [-netlist]
24       [-svg] [-display displayname] [-stdout] [-raw[+h[eaderonly]]] [-doseps‐
25       filter [-previewonly]] [-status] [-gray] [-color | -reqcolor] [-adobe |
26       -adobe=<number>/<number> |  -adobe=false  ]  [-dontreencode=<string>  |
27       -listdontreencode]  [-version  |  -justversion]  [-producedby=<string>]
28       [-page <number>] [-print_cmd "<command>"] [-one_file_per_page] [-pepsc]
29       [-pdfspd  |  -pdfspd=true  |  -pdfspd=false  ]  [-pssetup  "<string>" ]
30       [-j2p6_cmd "<command>" ] [-dontcondense |  -condensed]  [{-a4|-letter}]
31       [-noshowpageineps]    [-quiet]    [-bop_hook   "<string>"]   [-eop_hook
32       "<string>"] [-tmp_file_mode "<octal number>"] [-patterndir "<xbm direc‐
33       tory>"] [-o<dir>] [-exec <file>] [file1[.obj] file2[.obj] ...]
34

DESCRIPTION

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

OPTIONS

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

BASIC FUNCTIONALITIES

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

GRAPHICAL OBJECTS

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

TGIF SUBWINDOWS

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

NON-ALPHANUMERIC KEY BINDINGS

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

SHORTCUTS

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

COLORS AND COLORMAPS

996       In most X environments, only 256 colors can be displayed at  once.   In
997       these  environment,  if  an  application  needs  128 colors and another
998       application needs a totally different 129 colors, both applications can
999       not  be  displayed at once with all the colors they want.  X solves the
1000       problem by allowing applications to use their own colormaps  (known  as
1001       private colormaps).  Each private colormap can have at most 256 colors.
1002       There is also a shared colormap available for applications that do  not
1003       wish  to  use  private  colormaps.  The main problem with using private
1004       colormaps is that a user will see the the well-known colormap  flashing
1005       phenomenon  when  he/she  switches  in and out of applications that use
1006       private colormaps.
1007
1008       Tgif uses the shared colormap initially.  When it needs more color than
1009       what  is  available  in the shared colormap, it will use a private col‐
1010       ormap automatically.  When tgif no longer needs the  extra  colors,  it
1011       does  not  automatically revert to using the shared colormap because it
1012       needs to be able to undo operations that use the extra colors.  If  one
1013       does  no  longer  needs  the objects in the undo buffer, one can select
1014       FlushUndoBuffer() from the Edit Menu to flush the undo buffer.  At this
1015       point,  tgif  will attempt to use the shared colormap to avoid the col‐
1016       ormap flashing problem.  If one often uses XPM and GIF objects, one can
1017       bind the <Shift>f key to the FlushUndoBuffer() operation by setting the
1018       following X default and uses the <Shift>f key to regain entries in  the
1019       colormap when an XPM/GIF object is deleted:
1020
1021              Tgif.ShortCuts: !<Key>F:FlushUndoBuffer()
1022
1023       Even  when  a  private colormap is used, only 256 colors can be used at
1024       once.  Therefore, it is not possible to import two 256-colors GIF files
1025       into  the  same drawing unless the colors are somehow reduced to fit in
1026       the 256-colors colormap.  This can be done through dithering  which  is
1027       described in the IMPORT RASTER GRAPHICS section below.
1028

IMPORT RASTER GRAPHICS

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

OBJECT NAMES

1100       If an object contains an attribute (please see the ATTRIBUTES  sections
1101       below  for  details)  whose name is the string "name" (case-sensitive),
1102       the value part of the attribute is the name of the  object.   Subobject
1103       of   a   composite   object   can   be   named   using  a  path,  e.g.,
1104       <t>!<s1>!<s2>!..., where <t> is the name of a  top-level  object  which
1105       directly contains <s1> which directly contains <s2>, etc.  !* refers to
1106       the currently selected object (if more than one object is selected, the
1107       top-most  object in the stacking order is used).  !*<s1>!<s2> names the
1108       <s2> subobject of the <s1> subobject of the currently selected object.
1109
1110       The following is not fully supported, yet (only  the  #<page>  form  is
1111       supported  at  this time).  Every object in a tgif file can be uniquely
1112       named using the notation #<page>!<path>, where <page> can be  a  string
1113       that  specifies  the name of a page or #<number> which specifies a page
1114       number.  The <path> is described in  the  previous  paragraph.   If  an
1115       object  o1  is referenced by another object o2 within the same file (no
1116       file name or URL is specified before #) and <page> is omitted, then  o1
1117       must  be  on  the  same page as o2.  If a file name or URL is specified
1118       before # and <page> is omitted, then o1 must be on the first page.
1119

ATTRIBUTES

1121       Attributes are text strings of the form name=value or value  which  are
1122       attached  to  either  the  current drawing or any non-text objects.  An
1123       attribute attached to the current drawing is called a  file  attribute;
1124       otherwise,  it  is a regular attribute.  Attributes can be attached and
1125       detached from these objects except in the following case:
1126
1127              Attributes appearing in the symbol object  in  a  building-block
1128              object  file  can not be detached when the building-block object
1129              is instantiated.  These attributes  are  considered  to  be  the
1130              ``inherited''  attributes  of the icon object.  (If it is really
1131              necessary to detach inherited attributes of an icon object,  the
1132              icon  object  can be ``de-iconified'' by using UnMakeIconic() in
1133              the  Special  Menu  to  make  it  a  grouped  object;  then  the
1134              attributes can be detached.)
1135
1136       A  file  attribute  is  always invisible.  For a regular attribute, the
1137       user has control over which part of the  attribute  is  displayed.   An
1138       entire  attribute  can  be made invisible, or only its name can be made
1139       invisible (accomplished through the commands under  the  special  menu,
1140       such as #m, #n, #j, #-, and ^#h).
1141

TELEPORT/HYPERJUMP

1143       Tgif  provides the mechanism to travel between .obj and .sym files.  If
1144       the middle mouse button is clicked on an object with  the  <Shift>  key
1145       held  down  (or  double-clicking  such  an  object),  tgif looks for an
1146       attribute named warp_to (by default) or href of that object.  The  only
1147       difference  between  warp_to  and  href is that ".obj" is automatically
1148       appended to the value of a warp_to attribute while the value of a  href
1149       attribute  is  taken as is.  (Please note that warp_to is obsolete now.
1150       It is still supported for the  sake  of  compatibility.)   If  such  an
1151       attribute  is  found, the value part of the attribute is interpreted as
1152       the name of a .obj file to travel to.  (If tgif is  in  the  hyperspace
1153       mode,  then  clicking  the  left mouse button has the same effect.)  If
1154       there are multiple href attributes on the object, but are in  different
1155       colors,  tgif  will  use the one that has the same color as the current
1156       color appearing in the Choice Window.  If the current file is modified,
1157       the  user  is  prompted  to  save the file before traveling to the next
1158       file.  If the value part of the href  attribute  starts  with  the  '/'
1159       character, the value is treated as an absolute file name; otherwise, it
1160       is treated as a relative file name.
1161

HYPERSPACE

1163       Tgif provides a hyperspace mode to facilitate  traveling  between  .obj
1164       files.   The hyperspace mode is entered when GoHyperSpace() is selected
1165       from the Navigate Menu.  In hyperspace mode, the  little  window  below
1166       the  Message Window will show a little space ship.  The hyperspace mode
1167       is also automatically entered when a remote URL is opened  (unless  the
1168       Tgif.AutoHyperSpaceOnRemote X default is set to false).
1169
1170       In the hyperspace mode, certain objects are considered hot-links.  When
1171       the cursor is placed on top of these object,  it  will  change  from  a
1172       pointer  to  a  hand to indicate that clicking on the left mouse button
1173       will invoke some actions.  An object is a hot-link if  it  contains  an
1174       attribute  described  in either the TELEPORT/HYPERJUMP, LAUNCH APPLICA‐
1175       TIONS, or INTERNAL COMMANDS section.
1176
1177       The hyperspace mode is exited when the drawing mode is changed  or  the
1178       LeaveHyperSpace() is selected from the Navigate Menu.
1179

LAUNCH APPLICATIONS

1181       Tgif  provides  the  mechanism  to  launch applications.  If the middle
1182       mouse button is clicked on an object with the <Shift> key held down (or
1183       double-clicking  such  an  object),  tgif  looks for an attribute named
1184       launch (by default) of that object.  If such an attribute is found, the
1185       value  part  of the attribute is interpreted as a sh(1) command to exe‐
1186       cute.  Same color rule applies as described in  the  TELEPORT/HYPERJUMP
1187       section  above.  If the command ends with the '&' character, tgif forks
1188       itself  (what  actual   happens   depends   on   whether   the   _BACK‐
1189       GROUND_DONT_FORK  compiler  flag is defined or not at compile time) and
1190       the command is executed by the child  process;  otherwise,  popen()  is
1191       used  to execute the command (in this case, if the command hangs, there
1192       is no way provided to terminate the command, and tgif will not be  able
1193       to recover from it).  Within the command, values of other attributes of
1194       the same object can be used.  The syntax is:  $(attr),  where  attr  is
1195       the name of another attribute.
1196
1197       For  example, if one wants to perform a man(1) function, one can draw a
1198       box; enter a line of text "title=tgif";  enter  another  line  of  text
1199       "launch=xterm  -rw  -e man $(title)"; select all three objects using ^a
1200       keyboard command; attach the text strings to the box using #a  keyboard
1201       command;  and  launch  the  man(1) command by clicking the middle mouse
1202       button on the box (or the text strings) with the <Shift> key held down.
1203       If one wants to be more fancy, the box can be replaced by an X11 pixmap
1204       object; the 'launch' attribute can be made invisible; and  the  'title'
1205       attribute can be center justified and with its name hidden using the #m
1206       keyboard command.
1207
1208       By default, launching of an application is disabled in  the  hyperspace
1209       mode  for  security  considerations  (this  can  be  overridden  by the
1210       Tgif.AllowLaunchInHyperSpace X default setting).  If a lunch command is
1211       encountered  in  the  hyperspace mode, the command is displayed and the
1212       user is prompted to see if he/she wants to execute the command.
1213

INTERNAL COMMANDS

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

ARITHMETIC EXPRESSIONS

2258       Certain internal commands allow arithmetic  expressions  as  arguments.
2259       Infix  notation  is  used.  Supported operators (and their precedences)
2260       are listed below.
2261
2262        ?   1    if-then-else, e.g. <rel> ? <iftrue> : <else>
2263        :   2    if-then-else, e.g. <rel> ? <iftrue> : <else>
2264        ||  3    logical OR
2265        &&  4    logical AND
2266        |   5    bit-wise OR
2267        ^   5    bit-wise XOR
2268        &   5    bit-wise AND
2269        ==  6    equal
2270        !=  6    not-equal
2271        >   7    greater than
2272        <   7    less than
2273        >=  7    greater than or equal to
2274        <=  7    less than or equal to
2275        <<  8    shift left
2276        >>  8    shift right
2277        +   9    add
2278        -   9    subtract
2279        *  10    multiple
2280        /  10    divide
2281        // 10    integer divide
2282        %  10    mod
2283        !  11    logical NOT
2284        ~  11    bit-wise invert/NOT
2285        )  12    closed parenthesis
2286        (  13    open parenthesis
2287

GENERATING IMAGEMAP FILES

2289       This section describes how to generate NCSA imagemap and CERN clickable
2290       image  files.  The Tgif.ImageMapFileFormat X default decides whether to
2291       generate a NCSA imagemap or a CERN clickable image file.  Since the two
2292       formats  are  very  similar,  we will only discuss how to generate NCSA
2293       imagemap files.  For more information about NCSA imagemap,  please  see
2294       [3].  For more information about CERN clickable image, please see [4].
2295
2296       The Tgif.GenerateImageMap X default should be set to ``true'' to enable
2297       the imagemap generation.  When printing in  the  GIF  format  (see  the
2298       BASIC  FUNCTIONALITIES section about printing), an XPM file (which will
2299       be removed at the end of this process) is generated first.  (The  value
2300       specified  by  the  Tgif.InitExportPixelTrim  X default is used to trim
2301       extra pixels.  Using these values forms an escape mechanism to  fix  an
2302       idiosyncrasy  that  tgif  can  not figure out exactly how big the whole
2303       image is.)
2304
2305       The XPM version is specified by  the  Tgif.XPmOutputVersion  X  default
2306       unless the Tgif.UseXPmVersion1ForImageMap X default is set to ``true'',
2307       which forces the XPM1  format.   Then  the  command  specified  by  the
2308       Tgif.XpmToGif  X default is executed to convert the XPM file into a GIF
2309       (Generic Interchange Format) file which can be used by software such as
2310       NCSA's  Mosaic(1).  The file extension for the GIF file is specified by
2311       the Tgif.GifFileExtension X default.  Together with the  GIF  file,  an
2312       imagemap file with file extension specified by the Tgif.ImageMapFileEx‐
2313       tension X default is generated.  The content of the imagemap is  gener‐
2314       ated as follows.
2315
2316       Tgif  first  looks  for a file attribute with attribute name href.  The
2317       value of the attribute is written as the default URL.  If such  a  file
2318       attribute  can  not be found, imagemap generation is aborted.  If it is
2319       found, then all objects in the file are scanned.  For an object  having
2320       an  attribute  named href, the value of the attribute is written as the
2321       URL for a method line in the imagemap.  If the object is neither a cir‐
2322       cle nor a poly/polygon, the rectangle method is used.
2323
2324       Similar mechanism is used when printing in the HTML format, except that
2325       a generic HTML file is generated with an  imagemap  in  the  Spy  Glass
2326       Client-side  Imagemap  format.   You can generate a custom HTML file if
2327       you specify an HTML export template using SetHTMLExportTemplate()  from
2328       the File Menu.  Details about the template file is described below.
2329

HTML EXPORT TEMPLATE

2331       If an HTML export template file is specified with the SetHTMLExportTem‐
2332       plate() from the File Menu, custom HTML files  can  be  generated  when
2333       printing in the HTML format.  The customization is done through the use
2334       of variables embedded in the HTML export template  file.   These  vari‐
2335       ables  have  the  syntax  of an HTML character entity.  They all starts
2336       with "&tgv" and ends with ";".  They are:
2337
2338       &tgvfilename;
2339              This variable will be replaced by the name of the file  (without
2340              file extension).
2341
2342       &tgvcurnum;
2343              This variable will be replaced by current page number.
2344
2345       &tgvfirstnum;
2346              This variable will be replaced by the first page number (usually
2347              1).
2348
2349       &tgvlastnum;
2350              This variable will be replaced by last page number.
2351
2352       &tgvprevnum;
2353              This variable will be replaced by the previous page number (with
2354              wrap around).
2355
2356       &tgvprevnumnowrap;
2357              This variable will be replaced by the previous page number (with
2358              no wrap around).
2359
2360       &tgvnextnum;
2361              This variable will be replaced by the  next  page  number  (with
2362              wrap around).
2363
2364       &tgvnextnumnowrap;
2365              This  variable will be replaced by the next page number (with no
2366              wrap around).
2367
2368       &tgvtitle;
2369              This variable will be replaced by the title the page or  of  the
2370              file.
2371
2372       &tgvmapobjs;
2373              This  variable  will  be  replaced  by the objects (specified as
2374              <AREA> tabs) in a client-side image map.
2375
2376       For example, if a template specifies:
2377
2378              <IMG SRC="&tgvfilename;-&tgvcurnum;.gif"
2379                     USEMAP="#p0">
2380              <MAP NAME="p0">
2381              &tgvmapobjs;
2382              <AREA SHAPE="RECT"
2383                     COORDS="0,0,&tgvmapwidth;,&tgvmapheight;"
2384                     HREF="&tgvfilename;-&tgvnextnum;.html">
2385              </MAP>
2386
2387       Exporting using PrintOneFilePerPage() with this template may  get  (for
2388       page 2 of a file name "foo.obj" with 5 pages):
2389
2390              <IMG SRC="foo-2.gif"
2391                     USEMAP="#p0">
2392              <MAP NAME="p0">
2393              <AREA SHAPE="RECT" ...>
2394               ...
2395              <AREA SHAPE="RECT" ...>
2396              <AREA SHAPE="RECT"
2397                     COORDS="0,0,145,97"
2398                     HREF="foo-3.html">
2399              </MAP>
2400

GENERATING MICROSOFT WINDOWS EPSI FILES

2402       Some  Microsoft  Windows  (TM)  applications do not understand standard
2403       PostScript %%BeginPreview, %%EndImage, and %%EndPreview comments.  This
2404       section  describes  how to generate an EPSI file which is understood by
2405       them.  This feature  is  invoked  when  the  current  print  format  is
2406       TiffEPSI.   In this case, the generated EPSI file will contain 30 bytes
2407       of binary information in the beginning of the file  and  a  TIFF  image
2408       (also  binary) at the end of the file.  This file also will not contain
2409       the %%BeginPreview, %%EndImage, and %%EndPreview comments.  A  file  in
2410       this  format  is normally not considered to be a PostScript file except
2411       under Windows.
2412
2413       When this feature is enabled, tgif generates a normal EPSI file  first,
2414       then dump the current content of the file into an X11 bitmap file.  The
2415       command specified in Tgif.XbmToTiff is  executed  to  generate  a  TIFF
2416       image which is then append at the end of the EPSI file.
2417

LOCKING OBJECTS

2419       Objects  can  be locked and unlocked using #< and #> keyboard commands.
2420       When a selected object is locked, it is shown  with  gray  handles.   A
2421       locked object cannot be moved, stretched, flipped, or rotated; however,
2422       its properties, such as fill pattern,  width,  etc.,  can  be  changed.
2423       Locked  objects  can  also be deleted.  When a locked object is grouped
2424       with other objects, the resulting grouped object  is  also  locked.   A
2425       locked object can be used as an anchor to align other objects; however,
2426       DistributeObjs() command will fail if any objects are  locked.   Locked
2427       objects do not participate in any operations in the select vertex mode.
2428

UNDO/REDO

2430       Most  operations  can  be  undone  and redone.  The Tgif.HistoryDepth X
2431       default controls the size of the undo buffer.  If it is set to -1, then
2432       the  undo  buffer's  size is infinite.  The undo buffer is flushed when
2433       the New() or Open() commands are executed (from the  File  Menu),  when
2434       the  FlushUndoBuffer()  command is executed from the Edit Menu, or when
2435       Pop() is executed from a .sym file.  If  a  private  colormap  is  used
2436       (automatically  done  when  new  colors  can  not be allocated from the
2437       default colormap), executing FlushUndoBuffer() will  attempt  to  reset
2438       the colormap (if the -DDONT_FREE_COLORMAP compile option is not used).
2439

DOMAINS

2441       A  domain  is  a  collection of library symbols suitable for instantia‐
2442       tions.  A library is implemented as a  directory  of  .sym  files,  and
2443       therefore, a domain is implemented as a search path.  If there are sym‐
2444       bols with the same file name  which  reside  in  different  directories
2445       specified  in  the search path, then the one closer to the front of the
2446       search path will be made available for the user to instantiate.
2447
2448       The number of domains is specified by the MaxDomains X default, and the
2449       names  of  the domains are specified by the DomainPath# X default.  The
2450       library search paths are specified by csh environment  variables.   See
2451       the section on X DEFAULTS for more details.
2452
2453       Domain  information can also be loaded into the ~/.Tgif/domain.ini file
2454       by setting Tgif.DomainInIni to true and selecting  Reload  Domain  Info
2455       From X from the Domain submenu of the File Menu.
2456

SELECTING A NAME FROM A POPUP WINDOW

2458       When  selecting a file name, a symbol name, or a domain name, tgif pops
2459       up a window with appropriate names for the user to  choose  from.   The
2460       user  can use mouse clicks to select an entry.  Key strokes can also be
2461       used to specify the desired name; however, tgif attempts to  match  the
2462       key strokes with names in the selection on the fly.  If a match can not
2463       be found, the key strokes are ignored.  ^n, ^j, or  the  DownArrow  key
2464       advances  the  selection  down  by  1 entry; ^p, ^k, or the UpArrow key
2465       advances the selection up by 1 entry.  ^f, ^d,  or  the  DownArrow  key
2466       with <Control> key held down advances the selection down by 10 entries;
2467       ^b, ^u, or the UpArrow key with <Control> key held  down  advances  the
2468       selection  up by 10 entries.  '$' will select the last entry, while '^'
2469       will select the first entry.  ^w or ^y un-select  the  selected  entry.
2470       If  the  selected entry is a directory, hitting <CR> will change direc‐
2471       tory; if not, hitting <CR>  finishes  the  selection  process  and  the
2472       selected entry is returned.
2473
2474       In selecting file names to open or import, typing '/' is interpreted as
2475       going to the root directory or specifying an URL.  At this  point,  the
2476       automatic  matching of key strokes is temporarily disabled until either
2477       a <TAB> or a <CR> is pressed.  Also, clicking the middle  mouse  button
2478       in the file name area pastes from the clipboard.
2479
2480       The  automatic  appending  of  index.obj or .obj (introduced in version
2481       2.16) became obsolete and an URL is never modified.
2482
2483       The current selection is displayed near the top of  the  popup  window.
2484       Back-space should be used with caution because it might change the cur‐
2485       rent directory to the parent directory.
2486

IMPORTING EPS FILES

2488       Encapsulated PostScript (EPS) files can be imported using the  #(  key‐
2489       board  command.  If the EPS file has a preview bitmap (can be generated
2490       using the pstoepsi tool), tgif will display it  (HideBit/Pixmap()  from
2491       the  Layout  Menu  can  be  used  to  disable  the  displaying  of bit‐
2492       map/pixmaps).  When the EPS object is saved in a  .obj  or  .sym  file,
2493       neither  the preview bitmap, nor the PostScript content of the EPS file
2494       is saved.  Therefore, when printing such a file (either  from  tgif  or
2495       using  prtgif),  the  EPS  file  must be present at the same place from
2496       which it was originally imported.
2497

ADDITIONAL FONTS

2499       In addition to the Times, Courier, Helvetica,  NewCentury,  and  Symbol
2500       fonts, additional fonts can be specified using the Tgif.AdditionalFonts
2501       X default.  (The default screen fonts can also be replaced, please  see
2502       Tgif.HasAlternateDefaultFonts  in  the  X  DEFAULTS  section  for  more
2503       details.)  Each additional font requires 4 parts,  one  for  each  font
2504       style (in the order of Roman, Bold, Italic, and BoldItalic).  Each part
2505       contains 3 strings.  The first string  specifies  the  family,  weight,
2506       slant,  and width of the font (please see the man pages for xfontsel(1)
2507       for more details; also there  is  a  second  form  which  is  described
2508       below).   The  second string specifies the registry and encoding of the
2509       font (see xfontsel(1) again).  (One can use  xlsfonts(1)  to  see  what
2510       fonts  are  available  and pick out the just mentioned two strings from
2511       the output.)  The third string specifies the PostScript font name.
2512
2513       For example, if one wants to use the X Lucida  font  to  represent  the
2514       PostScript ZapfChancery-MediumItalic font, one can set Tgif.Additional‐
2515       Fonts as follows:
2516
2517       Tgif.AdditionalFonts: \n\
2518               lucida-medium-r-normal \n\
2519               iso8859-1 \n\
2520               ZapfChancery-MediumItalic \n\
2521               \n\
2522               lucida-demibold-r-normal \n\
2523               iso8859-1 \n\
2524               ZapfChancery-MediumItalic \n\
2525               \n\
2526               lucida-medium-i-normal \n\
2527               iso8859-1 \n\
2528               ZapfChancery-MediumItalic \n\
2529               \n\
2530               lucida-demibold-i-normal \n\
2531               iso8859-1 \n\
2532               ZapfChancery-MediumItalic
2533
2534       The above maps  all  four  font  styles  of  the  Lucida  font  to  the
2535       ZapfChancery-MediumItalic font (similar to how Symbol font is handled).
2536
2537       The  first string can also be specified in a second form which is iden‐
2538       tified by having "%d" as part of the string.  For example, one can  use
2539       "lucidasans-%d"  as  the first string.  In this case, the actual X font
2540       used will be the specified string with "%d" replaced by the font  size.
2541       The  encoding  string (second string) is ignored (but must be present).
2542       The font name prefix (please see Tgif.FontNamePrefix  entry  in  the  X
2543       DEFAULTS section) is also ignored.
2544

POSTSCRIPT CHARACTER ENCODING FOR INTERNATINOAL CHARACTERS

2546       Sometimes,  different  encodings  of the same PostScript font is needed
2547       for characters with character codes between 161  and  255  (inclusive).
2548       This can be accomplished in two ways.  One way is to use Tgif.Addition‐
2549       alDontReencode  (and  Tgif.DontReencode).   Another  way  is   to   use
2550       Tgif.PSFontNeedCharSubs.   The difference is that with Tgif.Additional‐
2551       DontReencode,  a  PostScript  font's   encoding   is   skipped.    With
2552       Tgif.PSFontNeedCharSubs,  characters  in a PostScript font can be given
2553       specific encoding.
2554
2555       In both cases, there is a need to  introduce  fake  font  names  (place
2556       holders).  For example,
2557
2558              Tgif.AdditionalFonts: \n\
2559                      utopia-medium-r-normal \n\
2560                      adobe-fontspecific \n\
2561                      UtopiaTmp-Regular \n\
2562                      \n\
2563                      utopia-bold-r-normal \n\
2564                      adobe-fontspecific \n\
2565                      UtopiaTmp-Bold \n\
2566                      \n\
2567                      utopia-medium-i-normal \n\
2568                      adobe-fontspecific \n\
2569                      UtopiaTmp-Italic \n\
2570                      \n\
2571                      utopia-bold-i-normal \n\
2572                      adobe-fontspecific \n\
2573                      UtopiaTmp-BoldItalic
2574              Tgif.PSFontAliases: \n\
2575                      UtopiaTmp-Regular=Utopia-Regular \n\
2576                      UtopiaTmp-Bold=Utopia-Bold \n\
2577                      UtopiaTmp-Italic=Utopia-Italic \n\
2578                      UtopiaTmp-BoldItalic=Utopia-BoldItalic
2579
2580       In  the  above  example,  4 fake PostScript font names are created (all
2581       have a common "UtopiaTmp" prefix).  The encoding  for  these  fonts  is
2582       adobe-fontspecific, according the X11 fonts being used.  Tgif.PSFontAl‐
2583       iases maps the fake PostScript font names  to  the  corresponding  real
2584       PostScript font names.  (If Tgif.PSFontAliases is missing, non-existent
2585       PostScript font names such as UtopiaTmp-Regular will appear in a  Post‐
2586       Script file.)
2587
2588       To  skip a PostScript font's encoding, one can use the Tgif.Additional‐
2589       DontReencode X default.  For example, if one specifies:
2590
2591              Tgif.AdditionalDontReencode: UtopiaTmp
2592
2593       characters with character codes between 161 and  255  (inclusive)  will
2594       not be encoded with ISO-Latin-1 character names.  For a list of charac‐
2595       ters names that are ISO-Latin-1 encoded, please see
2596       <URL:http://bourbon.usc.edu/tgif/faq/charencode.html#iso8859-1>.
2597
2598       To substitute characters in a PostScript font with  specific  encoding,
2599       one   can  use  the  Tgif.PSFontNeedCharSubs  and  Tgif.PSCharSubs_*  X
2600       defaults.  (You still need Tgif.AdditionalFonts and  Tgif.PSFontAliases
2601       setup as above.)  Here is an example:
2602
2603              Tgif.PSFontNeedCharSubs: \n\
2604                      Utopia-Regular=Foo \n\
2605                      Utopia-Bold=Foo \n\
2606                      Utopia-Italic=Foo \n\
2607                      Utopia-BoldItalic=Foo
2608              Tgif.PSCharSubs_Foo: \n\
2609                      exclamdown/Aogonek \n\
2610                      AE/Cacute \n\
2611                      ecircumflex/eogonek
2612
2613       In  the above example, Tgif.PSFontNeedCharSubs specified a list of fake
2614       PostScript font names that requires character substitutions  and  their
2615       corresponding  TOKEN  names.  For a fake PostScript font name that maps
2616       to TOKEN, the list of characters to be substituted is specified in  the
2617       Tgif.PSCharSubs_TOKEN  X default.  The format for Tgif.PSCharSubs_TOKEN
2618       is a list of OLDCHARCODE/NEWCHARNAME strings  where  OLDCHARCODE  is  a
2619       character  code  in decimal or octal format and NEWCHARNAME must be the
2620       name of a PostScript character.  In the above example, Foo was used  as
2621       the  TOKEN  name.   In  real  use, something like iso8895-2 may be more
2622       appropriate for a  TOKEN  name.   Since  decimal  or  octal  codes  are
2623       allowed, the following is equivalent to the above:
2624
2625              Tgif.PSFontNeedCharSubs: \n\
2626                      Utopia-Regular=iso8859-2 \n\
2627                      Utopia-Bold=iso8859-2 \n\
2628                      Utopia-Italic=iso8859-2 \n\
2629                      Utopia-BoldItalic=iso8859-2
2630              Tgif.PSCharSubs_iso8859-2: \n\
2631                      161/Aogonek \n\
2632                      8#306/Cacute \n\
2633                      8#312/eogonek
2634
2635       Please note that substitution only occurs for characters with character
2636       codes between 161 and 255 (inclusive).
2637
2638       For more information, please see
2639       <URL:http://bourbon.usc.edu/tgif/faq/charencode.html#charsubs>.
2640

SQUARE DOUBLE BYTE FONTS

2642       Starting with version 4.0 of tgif,  double-byte  fonts  are  supported.
2643       But  only  double-fonts  where  every  character has the same width and
2644       height  are  supported.   Double-byte  fonts  is  specified  using  the
2645       Tgif.SquareDoubleByteFonts  X default.  The format of this X default is
2646       similar to that of the Tgif.AdditionalFonts X default described in  the
2647       ADDITIONAL  FONTS  section above with differences described here.  Each
2648       double-byte font requires 4 parts, one for  each  font  style  (in  the
2649       order  of  Roman,  Bold, Italic, and BoldItalic).  Each part contains 3
2650       strings.  The first string specifies the name of  the  font.   It  must
2651       contain  a  "%d" as part of the string.  The actual X font used will be
2652       the specified string with "%d" replaced by the font size.   The  second
2653       string can be either "*", "H", or "V".  When it is the "V" string, each
2654       character is rotated  90  degrees  counter-clockwise.   Otherwise,  the
2655       characters  are not rotated.  The third string specifies the PostScript
2656       font name.
2657
2658       Using input methods  (specified  by  the  Tgif.DoubleByteInputMethod  X
2659       default)  one can mix english (single-byte) substrings within a double-
2660       byte string.  The font to use for the english substring is specified by
2661       the Tgif.DefaultSingleByteFont X default.
2662
2663       For  example, if one wants to use the X Song Ti font to represent Post‐
2664       Script GB-Song-Regular font, one can set Tgif.SquareDoubleByteFonts  as
2665       follows:
2666
2667       Tgif.DefaultSingleByteFont: Helvetica
2668       Tgif.GBShowFontChar:  271372  Tgif.GBConvFromUTF8:  iconv  -f  utf8  -t
2669       gb2312 Tgif.GBUConvToUTF8: iconv -f gb2312 -t utf8
2670       Tgif.SquareDoubleByteFonts: \n\
2671              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2672                      * \n\
2673                      GB-Song-Regular \n\
2674              \n\
2675              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2676                      * \n\
2677                      GB-Song-Regular \n\
2678              \n\
2679              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2680                      * \n\
2681                      GB-Song-Regular \n\
2682              \n\
2683              -isas-song ti-*-*-*--%d-*-*-*-*-*-gb2312.1980-0 \n\
2684                      * \n\
2685                      GB-Song-Regular
2686
2687       In the above example, the Song Ti font  doesn't  have  styles  such  as
2688       italic  and  bold,  so  all four parts are identical.  The Tgif.GBShow‐
2689       FontChar X default specifies a double-byte octal character to  be  used
2690       to represent this font in the Choice Window when this font is selected.
2691       The Tgif.GBUConvFromUTF8 X default specifies a command to run  when  an
2692       UTF8-encoded  string is to be pasted into a text object in the GB font.
2693       The Tgif.GBUConvToUTF8 X default specifies a command to run in  a  copy
2694       operation  to convert a selected string (in GB font) to the UTF8 format
2695       then copied to the clipboard.
2696
2697       Below is another example of using the X JIS fonts  to  represent  Post‐
2698       Script Ryumin-Light-EUC-H and Ryumin-Light-EUC-V fonts as follows:
2699
2700       Tgif.RyuminShowFontChar: 244242
2701       Tgif.SquareDoubleByteFonts: \n\
2702              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2703                      H \n\
2704                      Ryumin-Light-EUC-H \n\
2705              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2706                      H \n\
2707                      Ryumin-Light-EUC-H \n\
2708              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2709                      H \n\
2710                      Ryumin-Light-EUC-H \n\
2711              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2712                      H \n\
2713                      Ryumin-Light-EUC-H \n\
2714              \n\
2715              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2716                      V \n\
2717                      Ryumin-Light-EUC-V \n\
2718              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2719                      V \n\
2720                      Ryumin-Light-EUC-V \n\
2721              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2722                      V \n\
2723                      Ryumin-Light-EUC-V \n\
2724              -jis-fixed-*-*-*--%d-*-*-*-*-*-jisx0208.1983-* \n\
2725                      V \n\
2726                      Ryumin-Light-EUC-V
2727

MULTIPAGE DRAWING

2729       An  object  file can contain multiple pages.  Two layout modes, stacked
2730       and tiled, for a multipage drawing are supported.   In  stacked  layout
2731       mode,  pages  are  considered  to  be stacked on top of each other, and
2732       therefore, an object can only appear on  one  page.   In  tiled  layout
2733       mode,  pages  are  tiled to form a large logical page; in this case, an
2734       object can exist on several physical  pages  simultaneously.   Swiching
2735       between the two modes are considered rare events and can not be undone.
2736       Tgif does not allow switching from the tiled layout mode to the stacked
2737       mode  when  there  exists an object that spans physical page boundaries
2738       because it can not decide which physical page the object belongs.
2739
2740       Page numbers are supported through the use of page  numbering  objects.
2741       A  page  number objecting is an object that contains an attribute whose
2742       name is !PAGE_NUM (the name is case-sensitive) and  the  name  part  of
2743       that  attribute  is not shown (hiding an attribute name can be achieved
2744       by using the Move/JustifyAttr() command under the Attribute submenu  of
2745       the  Special Menu).  The value of the attribute determines how the page
2746       number  is  printed.   If  the  value  of  the  attribute  contains   a
2747       !(STACKED_PAGE_NUM)  substring,  that  part  of  the  substring will be
2748       replaced by the page number if the page layout mode is stacked.  If the
2749       page  layout  mode  is tiled, the string will be printed out as is.  If
2750       the value of the attribute contains a  !(STACKED_NUM_PAGES)  substring,
2751       that  part  of the substring will be replaced by the number of pages if
2752       the page layout mode is stacked.  If the value of  the  attribute  con‐
2753       tains  a !(TILED_PAGE_ROW) or !(TILED_PAGE_COL) substring, that part of
2754       the substring will be replaced by the row number or the  column  number
2755       of the physical page if the page layout mode is tiled.
2756

SPECIAL ATTRIBUTES

2758       There  are  a  few  special attributes that tgif recognized.  There are
2759       described in this section.  They are all case-sensitive.
2760
2761       !PAGE_NUM=<page_number>
2762              This specifies the page numbers in a multipage drawing.   Please
2763              see the MULTIPAGE DRAWING section for details.
2764
2765       auto_center_attr
2766              If  an  attribute's  name  is  empty  and the value is auto_cen‐
2767              ter_attr, then all the visible attributes of  the  owner  object
2768              will  automatically  be centered relative to the bounding box of
2769              the owner object.  It doesn't really make sense to have multiple
2770              visible attributes because they will overlap.  This attribute is
2771              useful for making simple flowchart elements.
2772
2773       unmakeiconic_on_instantiate
2774              If a symbol object's attribute has an empty attribute  name  and
2775              the  value  is unmakeiconic_on_instantiate, then when the symbol
2776              is instantiated, the following commands  are  performed  on  the
2777              just-instantiated  icon  object:  1) UnMakeIconic() command from
2778              the Special Menu, 2) UnGroup() command from  the  Arrange  Menu,
2779              and 3) the "unmakeiconic_on_instantiate" text object is removed.
2780              This attribute is useful for making simple flowchart segments.
2781
2782       unmakeiconic_on_instantiate_delete_attrs
2783              If a symbol object's attribute has an empty attribute  name  and
2784              the value is unmakeiconic_on_instantiate_delete_attrs, then when
2785              the symbol is instantiated, the following commands are performed
2786              on  the just-instantiated icon object: 1) UnMakeIconic() command
2787              from the Special  Menu,  2)  delete  all  attributes  from  this
2788              object,  and  3)  UnGroup() command from the Arrange Menu.  This
2789              attribute is useful for putting a group of "useful" objects into
2790              a symbol object.
2791
2792       retracted_arrows
2793              If   an   attribute's   name   is   empty   and   the  value  is
2794              retracted_arrows for a polyline or open-spline object with  more
2795              than  2  vertices,  then  the  arrows  of  the  spline object is
2796              retracted by one vertex.
2797
2798       auto_retracted_arrows
2799              This is very similar to the retracted_arrows above  except  that
2800              the  object  must  be  an interpolated open-spline with only one
2801              arrow head.  The spline object is forced to have 3 vertices  and
2802              the middle vertex of the spline object is automatically adjusted
2803              when an endpoint is moved.
2804
2805       auto_exec=<internal_command>
2806              If such a file attribute exists, the value is executed when  the
2807              file is opened (unless the file is opened as a result of execut‐
2808              ing the hyperjump_then_exec() internal command).
2809
2810       edit_attrs_in_context_menu=...
2811              If an object has an attribute named  edit_attrs_in_context_menu,
2812              the  values  (starting  from the 2nd line and separated by line‐
2813              breaks) of this attribute are treated as attribute  names.   The
2814              named attributes will be visible in the Edit Attribute In Editor
2815              submenu of the Context Menu.  For example, if an object has  the
2816              following attributes:
2817
2818                     edit_attrs_in_context_menu=
2819                            x
2820                            y
2821                            z
2822                     w=greetings
2823                     x=hello
2824                     y=world
2825                     z=how are you
2826                     good-bye
2827
2828              the  Edit  Attribute  In Editor submenu of the Context Menu will
2829              only show "x=hello", "y=world", and "z=how are you".
2830

EXPORT TO TABLE

2832       When the ExportToTable() command is selected from the Table submenu  of
2833       the  Special  Menu,  certain attributes of selected objects are written
2834       into a user-specified output file in  a  format  which  can  be  easily
2835       imported by a spreadsheet program or to be used by the MergeWithTable()
2836       command described in the next section.  An output file contains columns
2837       of  strings.   Two  columns  are separated by a single <TAB> character.
2838       The first row of a output file contains the column names and all  other
2839       rows contain values.
2840
2841       The  names  of  the  attributes to be written are specified by the file
2842       attribute named TABLE_ATTRS (which is denoted by  !.TABLE_ATTRS  here).
2843       The  value  of  the TABLE_ATTRS file attribute is a list of comma-sepa‐
2844       rated attribute names.  When ExportToTable() command is  executed,  the
2845       attribute  names  specified  by !.TABLE_ATTRS are written to the output
2846       file first.  Then, for each selected object, every one of its attribute
2847       which appears in the list specified by !.TABLE_ATTRS are written to the
2848       output file in one line.  If an object has no attributes that match the
2849       specification, no corresponding line is generated.
2850

MERGE WITH TABLE

2852       When the MergeWithTable() command is selected from the Table submenu of
2853       the Special Menu, a selected object is  merged  (also  known  as  mail-
2854       merged on PCs) with a table (data) file (in the same format as the out‐
2855       put file described in the previous section) to generate a new multipage
2856       drawing having the stacked page layout mode.
2857
2858       The selected object contains formating information, and it is also used
2859       as a template to be replicated for each data row in the table file.  If
2860       an  attribute  of the replica matches the column name of the table, the
2861       attribute value is set to the value in the table  file.   The  replicas
2862       are tiled horizontally first.
2863
2864       Eight  attributes  must  be specified in the template object.  They are
2865       all case-sensitive.  The ones that measure distances can  be  specified
2866       in inches ("in"), centi-meters ("cm"), or pixels (if no units are spec‐
2867       ified).
2868
2869              PAPER_WIDTH
2870                     This specifies the width of the paper.
2871
2872              PAPER_HEIGHT
2873                     This specifies the height of the paper.
2874
2875              LEFT_MARGIN
2876                     This specifies the distance  to  the  left  edge  of  the
2877                     paper.
2878
2879              TOP_MARGIN
2880                     This specifies the distance to the top edge of the paper.
2881
2882              H_PITCH
2883                     This specifies the distance between the left edges of the
2884                     replicas.
2885
2886              V_PITCH
2887                     This specifies the distance between the top edges of  the
2888                     replicas.
2889
2890              NUM_COLS
2891                     This  specifies  the  number of replicas to tile horizon‐
2892                     tally before moving down to the next row.
2893
2894              NUM_ROWS
2895                     This specifies the number of replicas to tile  vertically
2896                     before moving to the next page.
2897
2898       After  each  replica  is generated, filled with the data from the table
2899       file, and placed, its attribute  named  exec  is  executed  (unless  an
2900       attribute  named  EXEC_AFTER_MERGE  is  specified,  in  which case, the
2901       attribute named by the EXEC_AFTER_MERGE attribute is executed instead).
2902       If there is no attribute named by the EXEC_AFTER_MERGE attribute, noth‐
2903       ing is executed.  (Please see the INTERNAL COMMANDS section for details
2904       on command execution.)  One can use the exec command to construct other
2905       attributes from the attributes associated with the data table.
2906
2907       If an attribute whose name is empty  and  whose  value  is  the  string
2908       USER_PLACEMENT,  the  user  will  be asked to place the replica (object
2909       name will be displayed in the Status Window when the  object  is  being
2910       placed).  In this case, the 8 placement related attributes are ignored.
2911
2912       If  an  attribute  whose  name  is  empty and whose value is the string
2913       STRIP_DOUBLE_QUOTES,  data  fields  surrounded  by  double-quotes   are
2914       stripped.
2915

MIME TYPES AND MAILCAPS

2917       When  an  URL  names an HTTP server, the HTTP server sends the Content-
2918       type of the URL along with the remote file referenced  by  the  URL  to
2919       tgif.   The  Content-type contains information such as the type/subtype
2920       of the file plus some optional fields.  If the file is not a tgif file,
2921       the following mechanism is used to view the file.
2922
2923       First,  the  X  defaults  are  looked up to see if there is an external
2924       viewer specified for the file.  Please  see  Tgif.@@@Viewer  in  the  X
2925       DEFAULTS section below for details.  If there's no match, the type/sub‐
2926       type is matched against entries in the MIME-types  file.   The  default
2927       MIME-types  file  is  .mime.types in user's home directory.  Please see
2928       Tgif.MimeTypesFile in the X DEFAULTS section on  how  to  override  the
2929       default  MIME-types  file.   The  first field in each line of the MIME-
2930       types file specifies type/subtype information.  If there is a type/sub‐
2931       type  match in the MIME-types files, the MailCap files are consulted as
2932       follows.
2933
2934       A line in a MailCap file consists of fields separated  by  semi-colons.
2935       The  first field specifies the type/subtype and the second field speci‐
2936       fies a view command for viewing a file that matches  the  type/subtype.
2937       For  tgif,  the  view command must contains a single %s substring to be
2938       replaced by local copy of the URL.  Only the %t and  the  %{}  optional
2939       fields  are  supported  by  tgif.   The multipart MIME-type is not sup‐
2940       ported.  The type/subtype information of the  remote  file  is  matches
2941       against the MailCap files.  If a match is found, the corresponding view
2942       command is executed.  If no match is found, but the type of the  remote
2943       file  is  either application, audio, image, or video, the file is saved
2944       and no external viewer is launched.   Otherwise,  the  remote  file  is
2945       assumed  to be pure text and tgif will create a text object to view the
2946       text.
2947
2948       The MailCap files are the  (colon-separated)  files  specified  by  the
2949       MAILCAP  environment variable (if defined).  If MAILCAP is not defined,
2950       the .mailcap file in the user's home directory is used.
2951
2952       MIME is the Multipurpose Internet Mail Extensions specified in RFC1521,
2953       and MAILCAP is specified in RFC1524.
2954

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

2956       Here  are the steps for defining a building-block object, to be used in
2957       a hierarchical design.
2958
2959       1)     Draw the  representation  part  of  the  building-block  object.
2960              Group everything together.  Select this grouped object.
2961
2962       2)     Popup  the main menu with the middle mouse button; select ``Spe‐
2963              cial''.  Select ``MakeSymbolic'' from the next popup menu.   The
2964              selected object becomes a symbol and gets a dashed boundary.
2965
2966       3)     Type  in attributes as individual text strings.  Select the sym‐
2967              bol object and all the text strings to be attached to  the  sym‐
2968              bol.  Type #a (for Attach) to attach attributes to the symbol.
2969
2970       4)     (This  step  is  optional.)   Build  the  definition part of the
2971              building-block object.  Look at the ``flip-flop.sym''  file  for
2972              an  example.  To look at that file, first, instantiate a ``flip-
2973              flop'' by typing ^i (for  Instantiate).   Select  the  flip-flop
2974              from the popup window; place the flip-flop; select the flip-flop
2975              and type #v (for Push) to see the symbol file.
2976
2977       5)     Save and name the file.  If the current  library  path  contains
2978              the  current directory (or '.'), the symbol just built should be
2979              instantiatable by typing ^i.
2980

X11 PIXMAP (XPM) FORMATS

2982       Tgif can only import X11 pixmaps that satisfy the constraints described
2983       here.   The  format  of  the  X11  pixmap  must be either 1 (XPM1) or 3
2984       (XPM3).  Only a subset of the XPM3 format is supported, namely, the key
2985       field  for  the  color  specification  must be 'c' (for color visuals).
2986       Tools that generate  XPM1  format  files  are  (they  might  have  been
2987       upgraded  to support XPM3), pbmplus (or netpbm), which is a set of bit‐
2988       map and pixmap conversion freeware (together with xv,  the  colors  for
2989       pixmap  objects  can  be  manipulated),  and xgrabsc, another freeware;
2990       also, xloadimage can display XPM1 files.  Tools that can generate  XPM3
2991       format  files  are,  for example, xsnap(1) and sxpm(1).  For each color
2992       specified in the color string, a color cell is allocated.  If the allo‐
2993       cation fails, the current color will be used for that color string.  If
2994       the first color character is a back-quote (`) or a space, then the cor‐
2995       responding  color  is substituted with the background color of the tgif
2996       window if the Tgif.GuessXPmBgColor X default is set to ``true''.  (This
2997       design  choice  is  made because the pixmap will then look ``right'' on
2998       both regular and reverse video.)  The following is an example of a very
2999       small pixmap file (in XPM1 format).
3000
3001              #define arrow_format 1
3002              #define arrow_width 5
3003              #define arrow_height 3
3004              #define arrow_ncolors 3
3005              #define arrow_chars_per_pixel 1
3006              static char *arrow_colors[] = {
3007                 "`", "Black",
3008                 "a", "red",
3009                 "b", "yellow"
3010              };
3011              static char *arrow_pixels[] = {
3012              "`a```",
3013              "aabbb",
3014              "`a```"
3015              };
3016

LATEX FIGURE FORMATS

3018       Here  we  show  how  to  make a figure for a LaTeX file, first with the
3019       \psfig (or \epsf) special construct, then with the psfile special  con‐
3020       struct.   (The  author  does  not  recommend the psfile construct.)  An
3021       example of both can be found in ``example.tex'' which is included  with
3022       the tgif distribution.
3023
3024       To print a tgif file to be included in a LaTeX document with the \psfig
3025       or \epsf special construct (files generated will be in the Encapsulated
3026       PostScript  format),  first  select  LaTeX  format  in the panel window
3027       (click the left mouse button on the laser printer icon), then  type  ^p
3028       to  generate  the  Encapsulated  PostScript  file.  If the file name is
3029       ``an-sr-flip-flop.obj'', then the LaTeX figure file generated  will  be
3030       named  ``an-sr-flip-flop.eps''.   This  file can be included in a LaTeX
3031       document as follows,
3032
3033              \input{psfig}
3034              \begin{figure*}[htb]
3035              \centerline{\psfig{figure=an-sr-flip-flop.eps}}
3036              \caption{An SR flip-flop.  \label{fig:an-sr-flip-flop}}
3037              \end{figure*}
3038
3039       An alternative way is to use the \epsf construct as follows,
3040
3041              \input{epsf}
3042              \begin{figure*}[htb]
3043              \centerline{\epsffile{an-sr-flip-flop.eps}}
3044              \caption{An SR flip-flop.  \label{fig:an-sr-flip-flop}}
3045              \end{figure*}
3046
3047       The \centerline command above centers the picture.  If one has multiple
3048       tgif  figures  in  one's  LaTeX  document, one only have to include the
3049       psfig macro (\input{psfig}  or  \input{epsf})  once,  right  after  the
3050       \begin{document} statement.
3051
3052       If  Encapsulated  PostScript  is not available, the psfile special con‐
3053       struct can be used as  described  here.   In  this  case,  since  LaTeX
3054       doesn't  not  know  where  the bounding box of the drawing is, it takes
3055       some practice to get this just right.  Here is something that seems  to
3056       work.  First, center the picture on the page (e.g., the width of a por‐
3057       trait style page is 8.5 inch, so the center of the page is at the  4.25
3058       inch  mark), and make the top object in the picture about 1/4 inch away
3059       from the top of the page.  Select the LaTeX format in the panel window,
3060       then  print  in  the LaTeX format.  As with the psfig construct, a file
3061       with the .eps extension will be generated.  This file can  be  included
3062       in a LaTeX document as follows,
3063
3064              \begin{figure*}[htb]
3065              \special{psfile="an-sr-flip-flop.eps" hoffset=-40}
3066              \rule{0in}{1.1in}
3067              \caption{An SR flip-flop.  \label{fig:an-sr-flip-flop}}
3068              \end{figure*}
3069
3070       The  \rule{0in}{1.1in}  above  specifies an invisible box of 1.1 inches
3071       high, which is the total height of the picture in an-sr-flip-flop.
3072

CONNECTING OBJECTS

3074       In the world of E-CAD, an icon object can represent an electronic  com‐
3075       ponent  and  a line object can represent a connection between a pair of
3076       pins of two electronic components.  When a component  moves,  the  end‐
3077       point  of  a  wire  connecting to the component will also move with the
3078       component.  Tgif simulates these functionalities in a limited fashion.
3079
3080       In tgif, a connection is represented by matching signal names.  A  wire
3081       is  defined  as a polyline object having a type=tgWire attribute and an
3082       attribute named signal_name.  The definition of a pin is  more  compli‐
3083       cated.   It is described in the next paragraph.  If two pins have iden‐
3084       tical values for the signal_name attribute, they are considered  to  be
3085       connected (they do not have to be visually connected by a wire).
3086
3087       A  pin object must have a type=port attribute and attributes named sig‐
3088       nal_name and name.  But not all  objects  having  such  attributes  are
3089       pins.  In addition, a pin object must be either:
3090
3091       (1)    a top-level symbol or an icon object
3092
3093       or:
3094
3095       (2)    an immediate subobject of a owner symbol or icon object.  or:
3096
3097       (3)    an  immediate  subobject  of  a owner grouped object which has a
3098              type=tgBroadcastWire attribute.
3099
3100       In (2) above, the owner object must also have an attribute  named  name
3101       and  must  not be a subobject of another symbol or icon object.  If the
3102       owner object is a subobject of a grouped object, the name attributes of
3103       the grouped object will be ignored.
3104
3105       In (3) above, that grouped object can be created using the ConnectPort‐
3106       sToBroadcastWire() command in the PortsAndSignals submenu of  the  Spe‐
3107       cial  Menu  when  a  polyline object and some floating port objects are
3108       selected.
3109
3110       A pin object can have a connected view and a disconnected view.  A con‐
3111       nected  view  is  a subobject with a view=conn,FILL,PEN attribute and a
3112       disconnected  view  is  a  subobject   with   a   view=disconn,FILL,PEN
3113       attribute;  FILL  and  PEN  are numeric values between 0 and 31 (inclu‐
3114       sive).  The value corresponds to patterns in the Fill Menu and the  Pen
3115       Menu.   Normally,  only  0  or  1 should be used.  When the signal_name
3116       attribute of a pin object is changed from an empty  string  to  a  non-
3117       empty string, the pen and fill of the subobject that corresponds to the
3118       disconnected view will be set to 0 (meaning NONE) and the pen and  fill
3119       of  the subobject that corresponds to the connected view will be set to
3120       the values specified in the view attribute of the connected view.  When
3121       the  signal_name  attribute of a pin object is changed from a non-empty
3122       string to an empty string, the pen and fill of the subobject that  cor‐
3123       responds to the connected view will be set to 0 and the pen and fill of
3124       the subobject that corresponds to the disconnected view will be set  to
3125       the values specified in the view attribute of the disconnected view.
3126
3127       A  connection can be created using the ConnectTwoPortsByAWire() command
3128       from the PortsAndSignals submenu of the Special Menu.  Please note that
3129       if  a  pin is part of another object, that object must also have a name
3130       attribute with a non-empty value.  When two pins  are  connected  using
3131       this  command, the signal_name attributes of the pins and the wire will
3132       be set to have the same value.
3133
3134       The moving of endpoints when a component moves is implemented  in  tgif
3135       using  the  constrained  move  mode  from the MoveMode Menu (please see
3136       Tgif.ConstrainedMove in the X DEFAULTS section for additional  informa‐
3137       tion).   Please  note  that  a connected wire that is not visually con‐
3138       nected will not automatically extends itself to follow a connected com‐
3139       ponent  even in the constrained move mode.  Also, when a wire object is
3140       deleted, the signal_name attributes of connected  pins  do  not  change
3141       (since they are not really "connected").
3142

X DEFAULTS

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

FILES

5120       $TGIFPATH/tgificon.obj contains the default tgif icon.
5121
5122       $TGIFPATH/keys.obj contains a summary of the non-alphanumeric key bind‐
5123       ings.
5124

PROLOG/C TESTDRIVE

5126       In the tgif distribution, there are three Prolog files which illustrate
5127       a  simple  Prolog driver.  tgif.pl contains predicates for parsing tgif
5128       files (both .obj and .sym).  frontend.pl contains predicates for  talk‐
5129       ing to Prolog engines, such as that of Quintus and SISCtus, through the
5130       foreign function interface.  To use frontend.pl, frontend11.o needs  to
5131       be  built (which requires the frontend11.o entry to be uncommented from
5132       the makefiles).  Finally, testdrive.pl contains a  program  which  will
5133       print  out  the ID files of all objects in the current drawing, if tgif
5134       is escaped with the Solve() (or #s) command.  This is also a  good  way
5135       of  finding  out  the  structure of a tgif file (especially because the
5136       structure is not documented due to the complexity  introduced  to  keep
5137       tgif compatible with files created by older versions).
5138
5139       A  very  simple  C  driver, testdrive.c, is also provided with the tgif
5140       distribution which perform the same function as the Prolog driver.  The
5141       extra  code present in this file (and not present in tgif.c) is used to
5142       illustrate how the in-memory objects and attributes  can  be  traversed
5143       and how new objects can be created and manipulated.
5144

SEE ALSO

5146       latex(1L), lpr(1), ghostscript(1), env(1), X(1), dvips(1), csh(1), pbm‐
5147       plus(1),   netpbm(1),   djpeg(1),   bitmap(1),    XPM(1),    netpbm(1),
5148       xfontsel(1), xlsfonts(1), xgrabsc(1), xloadimage(1), xsnap(1), sxpm(1),
5149       xv(1), pstoepsi(1), Mosaic(1), bggen(1), rand(3C), ps2pdf(1)
5150

IDIOSYNCRASIES

5152       When any of the ``escape to driver'' commands are  (accidentally)  exe‐
5153       cuted,  the  current  content  of  the  drawing  is  saved  into ``tmp‐
5154       model.obj'' if the drawing indicates that it is a .obj file; then  tgif
5155       escapes to the driver and returns right away.  If the drawing indicates
5156       that it is  a  .sym  file,  then  the  content  is  saved  into  ``tmp‐
5157       model.sym'', but tgif does not return to the driver.
5158
5159       The  paste operation works on a cut buffer generated by tgif or by non-
5160       tgif tools (such as xterm).  If the cut  buffer  is  not  generated  by
5161       tgif,  its  content  is  treated  as  a  collection  of ASCII character
5162       strings, which is inserted into the current drawing as  a  text  object
5163       (current settings for text objects are used to create the text object).
5164       If the cut buffer is generated by tgif, then all the  current  settings
5165       are ignored.
5166
5167       The  font  sizes  are  the screen font sizes (which correspond to the X
5168       fonts that are used to draw the  text  on  the  screen).   They  appear
5169       smaller  on  the  printout.   When a 24 point text is printed, it would
5170       correspond to about a 13.5 point PostScript text.  This is because tgif
5171       treats  128  pixels  as  an inch, and PostScript treats 72 points as an
5172       inch.
5173
5174       Because characters supported by X11 and PostScript are  different,  not
5175       all  the  characters,  especially  in  the range 128 to 255 (or \200 to
5176       \377), which are supported by X11, but are not accepted by tgif.   Fur‐
5177       thermore,  in  order to print the supported subset of these characters,
5178       character codes must be re-encoded.  Therefore, if one  would  like  to
5179       hack  tgif  to  support other personalized fonts, one should be careful
5180       about the re-encoding mechanism.
5181
5182       The grids are not absolute; they are specified as  screen  pixels,  and
5183       they  scale  with the current zoom.  For example, if the grid is set at
5184       16 pixels at maximum zoom, and if the user zooms out once, objects  can
5185       be  drawn,  moved, or stretched at 16 screen pixel increments, but this
5186       corresponds to 32 pixels in the real coordinate system.
5187
5188       If the vertical text spacing is set  to  negative  values,  highlighted
5189       text will look a little strange due to XOR operations.  If the vertical
5190       text spacing is set to be greater than 100 or less than -100, the panel
5191       window  will  not  be  cleared properly; to clear the panel window, the
5192       user may have to close the tgif window and then open it again.
5193
5194       As described in the TGIF SUBWINDOWS section, in constrained move  mode,
5195       if  both  endpoints  of  a  not-selected polyline lie inside the object
5196       being moved, then the whole polyline is moved.  This may  look  strange
5197       sometimes  because,  for  example,  if  one  starts with a line segment
5198       pointing to an object, just moving the object will cause the line  seg‐
5199       ment  to  be ``stretched''; however, if one eventually moves the object
5200       so that the other endpoint is also inside the object, any future  move‐
5201       ment  of  the object will cause the whole line segment to move (instead
5202       of just moving the original endpoint).  The moving of the vertex  which
5203       is the neighbor of a moved endpoint may also look strange at times.  At
5204       this point, one should switch to the unconstrained move mode.
5205
5206       Another idiosyncrasy with respect to the constrained move is that right
5207       after duplicating an object, the constrained move is disabled temporar‐
5208       ily because it is assumed that at this point the  user  would  want  to
5209       move  the  new  object to a desirable position, and only after this new
5210       object is ``settled down'', the constrained move  will  be  re-enabled.
5211       Settling down is signified by doing something other than moving the new
5212       object.
5213
5214       Locked objects can be deleted.
5215
5216       Under the Edit Menu, PasteFromFile() reads a  file  into  the  drawing.
5217       Pasting  from  a  file  is  different from the normal pasting operation
5218       where copying is performed in something like  xterm  because  tabs  are
5219       automatically  converted to spaces.  Tabs are ignored when pasting from
5220       a file.
5221
5222       When printing a multipage drawing, all pages (even the ones  that  con‐
5223       tains  no  objects)  will be printed.  Using the PrintOnePage() command
5224       under the Page Menu one can print the selected page  (in  stacked  page
5225       layout  mode,  this is the current page; in tiled page layout mode, the
5226       user is prompted to select a visible page).
5227
5228       Tgif can be setup to use its own icon window (the  Tgif.NoTgifIcon  and
5229       the  Tgif.UseWMIconPixmap  X defaults must both be set to false).  How‐
5230       ever, it may confuse certain window managers.  So,  if  the  effect  is
5231       undesirable, one can set the Tgif.UseWMIconPixmap X defaults to true.
5232

BUGS

5234       There  seems  to  be  a problem with printing Courier fonts with a non-
5235       solid pen on the Apple LaserWriter.  (Printing  single  character  does
5236       seem to work fine.)  As pointed out by the PostScript reference manual,
5237       Courier is a ``stroked font'', and it is usually ``difficult'' to  con‐
5238       struct character paths for such types of fonts.  However, Courier fonts
5239       work fine with ghostscript(1) and dxpsview.  It's not  clear  how  this
5240       problem  can  be  fixed.   The author recommends avoiding Courier fonts
5241       when printing in color if a non-solid pen is desired.
5242
5243       Arcs with arrow tips don't look very sharp (the tip is not  pointed  as
5244       in open-splines with arrow tips).
5245
5246       At  high  magnifications,  stretching arcs may cause anomalous behavior
5247       due to round off errors.
5248
5249       When page reduction/magnification is not set at 100%, the  markings  in
5250       the Ruler Windows do not correspond to real measurements.
5251
5252       Copying/pasting  large objects might not work because tgif does not use
5253       the ``selection'' mechanism (yet).
5254
5255       If and when tgif crashes, it will try to save the  current  content  of
5256       the  drawing  in  a  file  called  ``EmergencySave.obj'' (or ``Emergen‐
5257       cySave.sym'' if the current drawing specifies a symbol object).  Often,
5258       the  drawing can be restored by loading the ``EmergencySave.obj'' file.
5259       Nevertheless, if the cause of the crash is that some objects  are  cor‐
5260       rupted  (due  to programming bugs), then the ``EmergencySave.obj'' file
5261       may also be corrupted.
5262
5263       When launching an application, if the command does not end with the '&'
5264       character and the command does not terminate, tgif also hangs.  In this
5265       case, kill(1) should be used to send HUP signal to the tgif process  if
5266       one wants to save the content of tgif in ``EmergencySave.obj''.
5267
5268       The  file  exec.c  may not compile properly on AIX machines.  One might
5269       have to add -D_BSD to the DEFINES in  either  the  Imakefile  or  Make‐
5270       file.noimake.
5271
5273       Please see the ``Copyright'' file for details on the copyrights.
5274
5275       PostScript is a trademark of Adobe Systems Incorporated.
5276

STATUS

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

AUTHOR

5282       William Chia-Wei Cheng (bill.cheng@acm.org)
5283       <URL:http://merlot.usc.edu/william/usc/>
5284

REFERENCES

5286       [1]    ``A         Beginner's         Guild         to          HTML'',
5287              <URL:http://www.ncsa.uiuc.edu/General/Internet/WWW/HTML
5288              Primer.html>.
5289
5290       [2]    ``CGI        -        Common        Gateway         Interface'',
5291              <URL:http://www.w3.org/CGI/overview.html>.
5292
5293       [3]    ``NCSA Imagemap'', <URL:http://hoohoo.ncsa.uiuc.edu/docs/tutori
5294              als/imagemapping.html>.
5295
5296       [4]    ``CERN    Clickable    Image'',    <URL:http://www.w3.org/hyper
5297              text/WWW/Daemon/User/CGI/HTImageDoc.html>.
5298
5299
5300
5301Tgif                  Version 4.2 Patchlevel 3 and Above               tgif(n)
Impressum