<> <> <> <> <<>> 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.