DIRECTORY BasicTime, Rope USING [ROPE], ViewerClasses USING [Viewer], ViewerTools USING [TiogaContents], WhiteboardDBPrivate; WhiteboardDB: CEDAR DEFINITIONS = BEGIN Viewer: TYPE = ViewerClasses.Viewer; ROPE: TYPE = Rope.ROPE; whiteboard: ATOM; stopped: BOOL; WBError: ERROR[reason: ATOM]; Display: PROC[eName: ROPE, v: Viewer _ NIL] RETURNS[Viewer]; GetWBName: PROC[wb: Viewer] RETURNS [name: ROPE]; Destroy: PROC[eName: ROPE]; New: PROC[eName: ROPE] RETURNS[success: BOOL]; Save: PROC[wb: Viewer]; WBExists: PROC[eName: ROPE] RETURNS[alreadyExists: BOOL]; GetCreateDate: PROC[eName: ROPE] RETURNS[date: BasicTime.GMT]; CopyWB: PROC[from, to: ROPE]; Enumerate: PROC[pattern: ROPE _ NIL] RETURNS[wbList: LIST OF ROPE]; GetChildren: PROC[eName: ROPE] RETURNS [wbList: LIST OF ROPE]; GetIconProps: PROC[wbIcon: Viewer] RETURNS[name: ROPE, type: ATOM]; GetToolArgument: PROC[wbIcon: Viewer] RETURNS[argument: ROPE]; Dump: PROC[to: ROPE]; Load: PROC[from: ROPE]; NewIcon: PROC[wb: Viewer, x, y: INT, name: ROPE, type: ATOM, icon: ROPE, label: ROPE _ NIL, argument: ROPE _ NIL] RETURNS [new: Viewer]; NewBox: PROC[wb: Viewer, x, y, w, h: INT, contents: ViewerTools.TiogaContents _ NIL] RETURNS [new: Viewer]; Delete: PROC[child: Viewer]; EditText: PROC[box: Viewer]; Grow: PROC[box: Viewer]; Move: PROC[child: Viewer]; Erase: PROC[wb: Viewer]; Reset: PROC[wb: Viewer]; EstablishWhiteboardDB: PROC[DBFile: ROPE _ NIL]; Close: PROC[]; END... üFile: WhiteboardDB.mesa Copyright (C) 1984 by Xerox Corporation. All rights reserved. Last edited by: Donahue, June 20, 1985 2:30:28 pm PDT Last Edited by: Jennifer Widom, August 24, 1984 8:29:30 pm PDT Last Edited by: Winkler, December 18, 1984 10:50:20 am PST stopped becomes true when the database has been shut down by executing a Checkpoint proc (since the transaction must be closed at this point). Operations executed after stopped becomes true will be ignored. When operations in this interface fail, they raise this error. The current list of ATOMs that may be returned include $WrongVersion (the version stamp of the whiteboard disagrees with the one in the database), $ReadOnly (the whiteboard database is readonly), $ServerDown (can't establish a connection to the server to do the store), $InternalError (either a Cypress or a Whiteboards problem -- contact implementor), $TransactionAbort (retrying the operation will probably be sufficient). Procedures for updating and querying a Whiteboard database Display the named whiteboard in the given viewer. When this is called, the named whiteboard is known to exist. Return the name of the whiteboard being displayed in the viewer (if it is a whiteboard displayer). Destroy the named whiteboard. Create a new whiteboard entity with the given name (it will initially have no contents). This is a "noop" if a whiteboard with this name already exists. Returns false if new whiteboard can't be created. Take all of the logged changes to the whiteboard viewer and update the whiteboard database to reflect them. The procedures for logging changes to a whiteboard viewer are given below. Check if the named whiteboard exists in the current database. Return the date of the last update to the named whiteboard. Copies the contents of one whiteboard to another. If the "to" whiteboard already exists, it will be erased. Otherwise a new whiteboard is created. Enumerates all whiteboards in the current database whose names satisfy the pattern (case doesn't count). Enumerate all of the whiteboards appearing on the named whiteboard Get the important information out of an icon on a whiteboard. Get the argument information for a tool. Dumping to and loading from a file. Dump the contents of the database to a file. Reload the contents of the database from the given file. Logging procedures: Note that the following procedures do not update the Whiteboard database -- actions are logged behind the viewer until a Save or Reset is performed (Reset erases the logged actions). The whiteboard being operated on is an implicit argument: it is the parent of the viewer provided. In each procedure, the contents of the viewer may be changed and the fact of the change is logged -- but the DB is not updated. Since these operations do not touch the database, they cannot raise any errors. Add a new icon to a whiteboard at the specified coordinates, setting the properties of the icon to be the ones given. The name and type properties can be retrieved using the GetProps operation given above; the label and icon properties are used only for displaying the icon -- the icon property gives the name of the icon to be used and label gives the label to be used (if different from name). Note: the only type used within the whiteboards code is the "whiteboard" type defined above. The viewer that was created is returned. Add a new text box to a viewer at the specified position with the specified contents. The viewer that was created is returned. Delete the child viewer from the whiteboard Log that the contents of the specified text box have been edited Log that the size of the specified text box has been changed Log that the position of the specified child has been changed Erase the entire contents of the whiteboard Reset the log for the whiteboard and redisplay the whiteboard's contents (the version number is ignored here, since the contents are being entirely recreated) Initially set up or reset the user's Whiteboard segment. Shut down all connections with databases necessary for Whiteboards to run. ÊИJšœ™Jšœ=™=J™5Jšœ>™>J™:J˜šÏk ˜ J˜ Jšœœœ˜Jšœœ ˜Jšœ œ˜"šœ˜J˜——šœœ œ˜!Jš˜J˜—Jšœœ˜$Jšœœœ˜J˜Jšœ œ˜J˜šœ œ˜J™Ï—J˜šœ œ œ˜Jšœè™èJ™—J™:J™š Ïnœœœœœ ˜J™;—J™šžœœ œ˜J™’—J˜šž œœ œœœ œœœ˜CJ™h—J˜šž œœœœ œœœ˜>JšœB™B—J˜š ž œœœœœ˜CJ™=—J™šžœœœ œ˜>J™(—J™J™#J™šžœœœ˜J™,—J˜šžœœœ˜J™8—J™J™J˜šžœœœœœœ œœ œœœ˜ˆJšœŽÏbœƒ™•—J™š žœœœ(œœ˜kJ™—J˜šžœœ˜J™+—J˜šžœœ˜J™@—J˜šžœœ˜J™<—J˜šžœœ˜J™=—J˜šžœœ ˜J™+—J˜šžœœ ˜J™ž—J™J™šžœœ œœ˜0Jšœ8™8—J˜šžœœ˜JšœJ™J—J˜Jšœ˜—…—Ž€