A Quick Introduction to TGIF

Dr. Brian Fristensky
Department of Plant Science
University of Manitoba
Winnipeg, Manitoba, CANADA

Official TGIF Web site: http://bourbon.usc.edu:8001/tgif/
TGIF Manual Pages in HTML

TGIF is a versatile but simple drawing program. As compared to Adobe Photoshop or PowerPoint, TGIF focuses on letting you do simple things quickly and easily, rather than making everything a sophisticated and complex process. After using TGIF routinely for many years, I have found that probably 95% of the time, the more elaborate programs were really overkill for the job I wanted to do.

This guide is meant as a quick entry to using TGIF, not as an exhaustive user manual.
As I will illustrate below, one of the strengths of the program is that it provides several displays that tell you what you can do at each point. This guide assumes you've used other drawing programs previously.

Starting TGIF

Menu (varies from system to system). Usually TGIF would be found under the headings 'Graphics' of 'Drawing'.

Command line.  'tgif' with no arguments starts tgif with an empty file. 'tgif filename' opens the specified file in tgif. TGIF files are automatically given the '.obj' extension.

The TGIF window

Main Menu - pull down menus that can be opened using right or left mouse buttons.

Settings - Buttons tell the current settings that will be used for an object being drawn. Settings include things like the font, pitch size  or text style, color, arrow style ets. Each button is also a menu. To get the menu, hold down the middle mouse button. You can also rotate throught the choices of any button by successively clicking on the button.

Message Window - Gives messages during processes such as saving or exporting a file.

Tool Bar - Click on any button in the tool bar to  choose the drawing mode. Arrow is the select mode; T is text entry mode, the box is the box-drawing mode etc..

Canvas - The drawing area.

Mouse button functions - There are 3 windows, one for each button on the mouse. As you move the mouse over a menu, button, or object, these windows will tell you what the mouse does in each case. Think of these as equivalent to the little yellow hints that pop up in many programs when you move the mouse over a part of a window.

The One Little Trick You Need to Know

In TGIF, you are always in one of several modes that you choose on the toolbar, shown at left. At the top is the Select mode, that lets you select object and do things to them. Next is the Text mode, that lets you add text, followed by the Draw Box mode etc. To avoid confusion, you need to know that most operations in TGIF consist of three  basic steps.

1. Make sure you are in the Select Mode by clicking on the arrow button.

2. Select an object or objects. This can be done in any of three ways:
  • Clicking on a single object
  • Select multiple objects by  holding down the left mouse button and drawing a box around the objects
  • Select multiple objects by holding down the SHIFT key and clicking on objects one at a time
3. Perform an operation on the selected objects. For example, you can change the attributes of all selected objects by changing any of the buttons on the Settings menu.

The biggest common problem when first using TGIF is remembering that you have to be in the Select mode to perform most operations other than drawing. For example,  if you're in the Draw polyspline (ie. draw line) mode and you try to select an object, you will begin to draw a line, rather than selecting an object.  (The Mouse window will tell you that you can cancel by clicking on the right or middle mouse buttons).

Once you know these tricks, TGIF is an easy program to use.


Exporting  graphics to a file
TGIF thinks of printing and exporting as essentially the same thing ie. you export by printing to a file.  First, choose the file format for printing. One way is by choosing 'File --> PrintExportFormat', or select the print format from the Print Format Menu. Next, choose 'File --> Print'. The progress of the export will be shown in the Message window. The name of the output file will consist of the base name of the current file (ie. minus the .obj extension) with an extension indicating the format. For example, if the TGIF file was named 'schema_template.obj', and you export as a GIF image, the ouput filename would be 'schema_template.gif'.  You can export to EPS (.eps), PostScript (.ps), X-bitmap (.xbm), EPSI (.epsi), GIF (.gif), and HTML fomats. Some installations of TGIF also allow PNG (.png) and JPEG formats (.jpg).

Printing to a printer

Okay, this one is more complicated than it needs to be. In Unix, you can set a default printer destination by adding a line to your $HOME/.login file such as

setenv PRINTER bldgagric.plant_hp3si

To print to your default printer, set the Print Format Menu to show the printer icon Next, choose 'File -->Print' and the file will be printed.

Alternatively, you can select the printer to print to using  'File --> PrintWithCmd'. A dialog menu will pop up

You type the Unix print command to print to the printer of your choice. 'lpr' would simply print to your default printer.  'lpr -Pbldgagric.plant_hp3si' uses the -P option of the lpr command to send output to the printer named 'bldgagric.plant_hp3si'.

For more details on the Unix lpr command, type 'man lpr' at the Unix command prompt.