SimpleViewerDoc.tioga
Jules Bloomenthal, October 8, 1990 12:05 pm PDT
PCEDAR 2.0 — FOR INTERNAL XEROX USE ONLY
SimpleViewer
a program to demonstrate viewer software
Jules Bloomenthal
© Copyright 1986, 1990 Xerox Corporation. All rights reserved.
Abstract: This software provides no interface but serves as a sample for viewer programming.
Created and Maintained by: Bloomenthal.pa
Keywords: Imager, mouse, TIP, Viewers.
DF File: PCedar/Top/SimpleViewer-Suite.df
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
Introduction
The source file SimpleViewerImpl.mesa demonstrates a simple but expandable use of the viewers software. Of note are calls on ViewerOps.RegisterViewerClass to create a new class of viewer, ViewerClasses.NotifyProc to handle mouse input, and ViewerClasses.PaintProc to repaint the viewer.
The Program "SimpleViewer"
SimpleViewer provides interactive movement of a rectangle in a viewer in response to a mouse action within the viewer. The rectangle moves only if the left mouse is down; the rectangle will jump to the current mouse position if Control-J is typed. The current time will be printed in the message window if Control-T is typed.
The Program "SimpleTipTest"
This program requires the name of a tip table as sole argument. It creates a viewer within which mouse actions are reported by printing at the current mouse location the list of atoms produced by the TIP mechanism for the given .tip file.