GGUserProfileImpl.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Last edited by Bier on October 14, 1986 8:02:15 pm PDT
Contents: Routines for reading the Gargoyle entries in the user profile and setting Gargoyle options.
DIRECTORY
GGEditTool, GGUserProfile, IO, UserProfile;
GGUserProfileImpl: CEDAR PROGRAM
IMPORTS GGEditTool, IO, UserProfile
EXPORTS GGUserProfile = BEGIN
LookAtProfile: PUBLIC UserProfile.ProfileChangedProc = {
[reason: UserProfile.ProfileChangeReason]
gravExtent: REAL; -- in inches
heuristics: BOOL ← UserProfile.Boolean[key: "Gargoyle.Heuristics", default: FALSE];
gravExtent ← IO.GetReal[IO.RIS[UserProfile.Token[key: "Gargoyle.GravityExtent", default: "-1.0"]]
! IO.Error => IF ec = SyntaxError THEN {
gravExtent ← -1.0;
CONTINUE;
} ELSE REJECT]; -- gravExtent in inches
IF gravExtent=-1.0 THEN gravExtent ← 25.0/72.0;
GGEditTool.SetDefaultHeuristics[on: heuristics];
GGEditTool.SetDefaultGravityExtent[inches: gravExtent];
};
Init: PROC [] = {
UserProfile.CallWhenProfileChanges[LookAtProfile];
};
Init[];
END.