preview(1)

PROGRAM
preview - view and edit a UIS file.

SYNTAX

preview

[-i]
    input UIS file

[-fn]
    Specifies the font for preview (use % xlsfonts for available fonts)

[-jr file.jp]
    Creates a journal recording for preview

[-jp file.jp]
    Executes a journal playback for preview

[-V]
    Gives the version for preview

[-U]
    Gives the usage for preview

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called preview.ans or file1

[-a [file1]]
    Uses preview.ans or file1 as the answer file

DESCRIPTION
This program is intended for use by someone who is familiar with the editing and building of graphical user interfaces (GUI's) using the Khoros user interface specification (UIS). Preview is intended to aid the user in prototyping a graphical user interface. It simply reads a UIS file and displays it. If you are unfamiliar with the UIS file, you should read Chapter 2 of the Khoros Programmer's Manual for more information.

There are three basic actions that can be taken when running preview. They are SHOW, EDIT and input a new file. An input file can be specified at start up, as shown in the example below, or can be read in after preview is running using the "live" file input widget. Once a file has been selected, and its pane or form has been placed on the screen, editing can begin.

The file name that has been specified is "watched" to see if any changes are made. If a change is determined to have occurred, preview automatically shows or redisplays the graphical user interface. With this in mind, a quick summary of the possible usage scenerios are presented.

1)  First, an input file is selected and displayed. Then the EDIT action button is clicked on; this causes a window to pop up, automatically starting a session with the editor on the selected UIS file. (NOTE: preview checks your environment variables for the string EDITOR to be set. If it is, then your editor is used; if not, then vi is used.)

    While you are editing the file, the displayed GUI will automatically be revisited whenever you write (:w) the file. This provides a great deal of flexibility, as other files can be read into your edit session and temporary files by another name can be saved at any time.

2)  In this scenerio, the EDIT command with preview is not used. Instead, you run a session with the editor separately. If you are using preview to display the same file that is being edited, anytime you write the file, the modification will automatically trigger the SHOW mechanism.

The SHOW action button can be used at any time to force the GUI currently specified to be redisplayed. This is often used when the QUIT button on the displayed form is clicked on (not the QUIT button on preview).

REQUIRED ARGUMENTS
none

OPTIONAL ARGUMENTS

-i  type: infile
    desc: input UIS file

EXAMPLES

To view and edit the pane for the vadd routine:
% cd some_work_directory
% cp $KHOROS_HOME/repos/cantata/subforms/arith_binary/vadd.pane temp.pane
% preview -i temp.pane

Or you can simply run:
% preview

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lpreview(3)

RESTRICTIONS
None currently known. It can get confusing to the user if more than one edit session is run concurrently.

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.