GGEditToolImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on October 14, 1986 8:50:45 pm PDT
Contents: Contains Gargoyle routines that are independent of viewer, or that involve the Gargoyle EditTool (a separate one-per-world viewer with Gargoyle functions)..
DIRECTORY
GGEditTool, GGInterfaceTypes, GGUserProfile;
GGEditToolImpl: CEDAR PROGRAM
IMPORTS GGUserProfile
EXPORTS GGEditTool =
BEGIN
No matter how many Gargoyle viewers are present, there is only one MasterData.
MasterData: TYPE = REF MasterDataObj;
MasterDataObj: TYPE = RECORD [
defaultGravityExtent: REAL ← 25.0, -- in screen dots
defaultHeuristics: BOOL,
objectsBeingCopied: LIST OF REF ANY -- for copying objects from viewer to viewer
];
SetDefaultHeuristics: PUBLIC PROC [on: BOOL] = {
When a new viewer is created, should heuristics be turned on?
masterData.defaultHeuristics ← on;
};
GetDefaultHeuristics: PUBLIC PROC RETURNS [on: BOOL] = {
When a new viewer is created, should heuristics be turned on?
on ← masterData.defaultHeuristics;
};
SetDefaultGravityExtent: PUBLIC PROC [inches: REAL] = {
When a new viewer is created, how strong should its gravity be?
masterData.defaultGravityExtent ← inches*72.0;
};
GetDefaultGravityExtent: PUBLIC PROC RETURNS [screenDots: REAL] = {
When a new viewer is created, how strong should its gravity be?
screenDots ← masterData.defaultGravityExtent;
};
masterData: MasterData;
Init: PROC [] = {
masterData ← NEW[MasterDataObj];
GGUserProfile.LookAtProfile[firstTime];
};
Init[];
END.