DeskTops.mesa
Last edited by: John Maxwell on: February 15, 1983 10:23 am
DIRECTORY
Rope USING [ROPE],
ViewerClasses USING [Viewer];
DeskTops: DEFINITIONS = BEGIN OPEN ViewerClasses;
DeskTop: TYPE = Viewer;
A desktop is a configuration of viewers as they are layed out on a screen. There is always one desktop which represents the current configuration of viewers. This desktop (called the current desktop) is indicated on its icon by having its name inverted. Opening a desktop viewer will reveal a list of buttons, one for each viewer in the configuration. Clicking one of these buttons will cause the corresponding viewer to be moved to the screen. Clicking a button for a icon that is currently on the screen opens the icon. Clicking a button while holding down the shift key causes the viewer to grow to full size.
Create: PROC [name: Rope.ROPE] RETURNS [desktop: DeskTop];
Searches for an existing desktop named 'name'. If Create finds one, the existing desktop is returned, otherwise a new desktop is created. If the existing desktop is currently off the screen Create will move it onto the screen.
FlyTo: PROC [desktop: DeskTop];
FlyTo causes the current configuration of viewers to be saved in the current desktop and to be replaced by the configuration in `desktop'. `Desktop' then becomes current. It is possible to fly to an iconic desktop by holding the control key down and clicking at it with the middle mouse button, or by selecting the icon and typing control 'O.
MoveViewer: PROC[viewer: Viewer, desktop: DeskTop];
Moves the viewer to the indicated desktop, removing it from the screen.
ClearIcons: PROC;
Destroys all of the unedited Tioga documents in the icon area and lists their names in a special tool called the MRUCache. Clicking a name in the MRUCache will cause the document to be recreated.
Extraneous viewers are saved off of the screen in 'hyperspace'. Viewers in 'hyperspace' have their offDeskTop bit set to TRUE. If a client program attempts to open, close, reposition, or blink a top-level viewer that is in hyperspace it will automatically be moved onto the screen. Painting a viewer does not move a viewer onto the screen. All viewers are made iconic before being moved into hyperspace, so client programs only has to worry about viewers in hyperspace if they want to repaint existing icons. A client program can explicitly move a viewer onto the screen with ViewerOps.ChangeColumn[viewer, {left, right}];
If a user or client destroys a viewer, the viewer is destroyed. If a desktop which contains that viewer is subsequently opened, the desktop will attempt to recreate the viewer by calling ViewerOps.CreateViewer[$ViewerFlavor, viewerName]. This may not always work. Programs which purvey special viewers should create their own viewer flavor and use the ViewerClasses.InitProc to make sure that new instances are initialized properly.
END . . .