File: WhiteboardViewers.mesa
Copyright (C) 1984 by Xerox Corporation. All rights reserved.
Created by: Donahue, January 4, 1985 1:33:07 pm PST
The interface to the Viewer manipulations of whiteboards.
Last Edited by: Winkler, December 18, 1984 11:00:08 am PST
DIRECTORY
Icons USING [IconFlavor],
Rope USING [ROPE],
ViewerClasses USING [Viewer, ViewerFlavor],
ViewerTools USING [TiogaContents];
WhiteboardViewers: CEDAR DEFINITIONS =
BEGIN OPEN Rope;
Viewer: TYPE = ViewerClasses.Viewer;
wb: READONLY ViewerClasses.ViewerFlavor;
the ViewerFlavor of whiteboards
icon: READONLY ViewerClasses.ViewerFlavor;
the ViewerFlavor of icons appearing on whiteboards
text: READONLY ViewerClasses.ViewerFlavor;
the ViewerFlavor of text boxes appearing on whiteboards
SetMenu: PROC[v: Viewer];
Set the menu of the viewer to be the standard whiteboard menu
AddTextBox: PROCEDURE[wb: Viewer, x, y, w, h: INTEGER, contents: ViewerTools.TiogaContents] RETURNS[child: Viewer];
Create a new whiteboard text box with the specified contents, but don't paint it.
AddIcon: PROCEDURE[wb: Viewer, name: ROPE, icon: Icons.IconFlavor, x, y: INTEGER] RETURNS[child: Viewer];
Create a new icon, but don't paint it.
InvertIcon: PROC[icon: Viewer, paint: BOOLTRUE];
Invert the mode used to paint the icon (this can be used when opening an icon to suggest that it may take some time)
GetGrid: PROC[v: Viewer] RETURNS[grid: INT];
Return the current grid setting for a whiteboard.
SetGrid: PROC[v: Viewer, grid: INT];
Change the current grid setting.
ResetGrid: PROC[v: Viewer, grid: INT];
Start with a fresh grid setting.
MoveChild: PROCEDURE[child: Viewer];
Move an object around on the whiteboard.
GrowBox: PROCEDURE[wb, box: Viewer, x, y: INTEGER];
Grow or shrink a whiteboard text box.
NearestChild: PROCEDURE[wb: Viewer, x, y: INTEGER, type: ViewerClasses.ViewerFlavor ← NIL] RETURNS[nearest: Viewer];
Produces the whiteboard viewer closest to the x, y position of the whiteboard wb.
Expand: PROC[parent, wb: Viewer, wbList: LIST OF ROPE];
Displays the listed whiteboards in the parent viewer, with lines drawn from the viewer for wb. No logging is done for the viewers added.
DontLog: PROC[icon: Viewer] RETURNS [BOOLEAN];
If this icon was added to the whiteboard as the result of an Expand operation, then DontLog will return TRUE -- the idea is that such expansions are not to be logged as permanent changes to the containing whiteboard (they reflect only the current state of affairs)
SetWBName: PROC[wb: Viewer, name: ROPE, paint: BOOLEANTRUE];
Set the name of a whiteboard viewer to be "Whiteboard: <name>".
END...