<> <> <> <> <> <> <<>> DIRECTORY Atom, BiScrollers, CodeTimer, Convert, GGBasicTypes, Feedback, GGEvent, GGInterfaceTypes, GGModelTypes, GGMouseEvent, GGScene, GGSessionLog, GGUserInput, Imager, ImagerTransformation, IO, Menus, RefTab, Rope, SlackProcess, TIPUser, ViewerClasses, ViewerTools; GGUserInputImpl: CEDAR PROGRAM IMPORTS Atom, BiScrollers, CodeTimer, Convert, Feedback, GGScene, GGSessionLog, SlackProcess, GGEvent, GGMouseEvent, IO, RefTab, Rope, ViewerTools EXPORTS GGUserInput = BEGIN CameraData: TYPE = GGModelTypes.CameraData; GGData: TYPE = GGInterfaceTypes.GGData; Outline: TYPE = GGModelTypes.Outline; Point: TYPE = GGBasicTypes.Point; Viewer: TYPE = ViewerClasses.Viewer; SlackHandle: TYPE = SlackProcess.SlackHandle; EventProc: TYPE = SlackProcess.EventProc; Problem: PUBLIC SIGNAL [msg: Rope.ROPE] = Feedback.Problem; <> <> EventNotify: PUBLIC PROC [clientData: REF ANY, event: LIST OF REF ANY] = { <> ggData: GGData _ NARROW[clientData]; ProcessAndQueueEvent[event, ggData]; }; <> PlayAction: PUBLIC PROC [clientData: REF ANY, event: LIST OF REF ANY] = { ggData: GGData _ NARROW[clientData]; ProcessAndQueueEvent[event, ggData]; }; <> InputNotify: PUBLIC PROC [self: ViewerClasses.Viewer, input: LIST OF REF ANY] = { <> <> ggData: GGData _ NARROW[BiScrollers.ClientDataOfViewer[self]]; ProcessAndQueueEvent[input, ggData]; }; ProcessAndQueueEvent: PROC [event: LIST OF REF ANY, ggData: GGData] = { <> <<1) LIST[REF CHAR].>> <<2) LIST[ATOM, ... ].>> handle: SlackHandle _ ggData.slackHandle; optimizeHint: REF ANY; WITH event.first SELECT FROM refChar: REF CHAR => { <> myRefChar: REF CHAR _ NEW[CHAR _ refChar^]; optimizeHint _ NIL; event _ LIST[$AddChar, myRefChar]; }; atom: ATOM => { atomName: Rope.ROPE; found: BOOL; regEvent: RegisteredEvent; refAny: REF ANY; atomName _ Atom.GetPName[atom]; IF atom = $During THEN optimizeHint _ LIST[$During]; IF Rope.Equal[Rope.Substr[atomName, 0, 5], "Start", TRUE] THEN { SlackProcess.QueueInputAction[handle, Dispatch, LIST[$SawTextFinish], ggData, NIL]; <> }; [found, refAny] _ RefTab.Fetch[eventTable, atom]; regEvent _ NARROW[refAny]; IF NOT found THEN { NotYetImplementedMessage[atom, ggData]; } ELSE { IF regEvent.causeMouseEventsToComplete THEN SlackProcess.QueueInputAction[handle, Dispatch, LIST[$SawMouseFinish], ggData, NIL]; event _ GetAnyArguments[event, regEvent, ggData]; }; }; ENDCASE => ERROR; IF printAllInput THEN PrintAllInput[ggData, event]; SlackProcess.QueueInputAction[handle, Dispatch, event, ggData, optimizeHint]; }; GetAnyArguments: PROC [event: LIST OF REF ANY, regEvent: RegisteredEvent, ggData: GGData] RETURNS [newEvent: LIST OF REF ANY] = { atom: ATOM _ NARROW[event.first]; SELECT regEvent.argType FROM none => { IF event.rest # NIL AND ISTYPE[event.rest.first, BiScrollers.ClientCoords] THEN { mousePlace: BiScrollers.ClientCoords _ NARROW[event.rest.first]; refPoint: REF Point _ NEW[Point _ [mousePlace.x, mousePlace.y]]; newEvent _ LIST[event.first, refPoint]; } ELSE newEvent _ event; }; refReal => newEvent _ CheckForSelectedReal[atom, event]; refInt => newEvent _ CheckForSelectedInt[atom, event]; rope => newEvent _ CheckForSelectedRope[atom, event]; ENDCASE => ERROR; }; <> Dispatch: PROC [clientData: REF ANY, event: LIST OF REF ANY] = { ggData: GGData _ NARROW[clientData]; atom: ATOM _ NARROW[event.first]; found: BOOL; regEvent: RegisteredEvent; refAny: REF ANY; [found, refAny] _ RefTab.Fetch[eventTable, atom]; regEvent _ NARROW[refAny]; IF NOT found THEN NotYetImplementedMessage[atom, ggData] ELSE regEvent.eventProc[ggData, event]; }; <> printAllInput: BOOL _ FALSE; -- controlled by Debug menu PrintAllInput: PROC [clientData: REF ANY, event: LIST OF REF ANY] = { ggData: GGData _ NARROW[clientData]; FOR list: LIST OF REF ANY _ event, list.rest UNTIL list = NIL DO WITH list.first SELECT FROM atom: ATOM => Feedback.AppendTypescript[ggData.feedback, Atom.GetPName[atom], oneLiner]; int: REF INT => Feedback.AppendTypescript[ggData.feedback, IO.PutFR["%g ", [integer[int^]]], oneLiner]; refChar: REF CHAR => Feedback.AppendTypescript[ggData.feedback, IO.PutFR["%g ", [character[refChar^]]], oneLiner]; coords: BiScrollers.ClientCoords => Feedback.AppendTypescript[ggData.feedback, IO.PutFR["(%g, %g) ", [real[coords.x]], [real[coords.y]]], oneLiner]; ENDCASE => ERROR; ENDLOOP; }; NotYetImplementedMessage: PROC [atom: ATOM, ggData: GGData] = { Feedback.Append[ggData.feedback, "User event ", begin]; Feedback.Append[ggData.feedback, Atom.GetPName[atom], middle]; Feedback.Append[ggData.feedback, " is not yet implemented", end]; Feedback.Blink[ggData.feedback]; }; CheckForSelectedRope: PROC [atom: ATOM, event: LIST OF REF ANY] RETURNS [newAction: LIST OF REF ANY] = { IF event.rest = NIL THEN { -- interactive call newAction _ LIST[atom, ViewerTools.GetSelectionContents[]]; } ELSE IF ISTYPE[event.rest.first, REF TEXT] THEN { -- TIP table call newAction _ CONS[atom, CONS[Rope.FromRefText[NARROW[event.rest.first]], event.rest.rest]]; } ELSE newAction _ event; -- SessionLog call }; CheckForSelectedReal: PROC [atom: ATOM, event: LIST OF REF ANY] RETURNS [newAction: LIST OF REF ANY] = { rope: Rope.ROPE; real: REAL; IF event.rest = NIL THEN { -- interactive call rope _ ViewerTools.GetSelectionContents[]; real _ Convert.RealFromRope[rope ! Convert.Error => {real _ -1.0; CONTINUE}]; newAction _ LIST[atom, NEW[REAL _ real]]; } ELSE IF ISTYPE[event.rest.first, REF TEXT] THEN { -- TIP table call rope _ Rope.FromRefText[NARROW[event.rest.first]]; real _ Convert.RealFromRope[rope ! Convert.Error => {real _ -1.0; CONTINUE}]; newAction _ LIST[atom, NEW[REAL _ real]]; } ELSE newAction _ event; -- SessionLog call }; CheckForSelectedInt: PROC [atom: ATOM, event: LIST OF REF ANY] RETURNS [newAction: LIST OF REF ANY] = { rope: Rope.ROPE; int: INT; IF event.rest = NIL THEN { -- interactive call rope _ ViewerTools.GetSelectionContents[]; int _ IO.GetInt[IO.RIS[rope] ! IO.EndOfStream, IO.Error => {int _ -1; CONTINUE}]; newAction _ LIST[atom, NEW[INT _ int]]; } ELSE IF ISTYPE[event.rest.first, REF INT] THEN { -- TIP table call or SessionLog call newAction _ event; } ELSE ERROR; }; FSMInfo: PROC [clientData: REF ANY, event: LIST OF REF ANY] = { ggData: GGData _ NARROW[clientData]; mouseMode, state: Rope.ROPE; mouseMode _ Atom.GetPName[ggData.mouseMode]; state _ Atom.GetPName[ggData.state]; Feedback.PutF[ggData.feedback, oneLiner, "mouseMode = %g. state = %g.", [rope[mouseMode]], [rope[state]]]; }; CauseAnError: PROC [clientData: REF ANY, event: LIST OF REF ANY] = { ggData: GGData _ NARROW[clientData]; scene: GGModelTypes.Scene _ ggData.scene; firstSlice, secondSlice: GGModelTypes.Slice; sliceGen: GGModelTypes.SliceGenerator; sliceGen _ GGScene.SlicesInScene[scene]; firstSlice _ GGScene.NextSlice[sliceGen]; secondSlice _ GGScene.NextSlice[sliceGen]; SIGNAL Feedback.Problem[msg: "Client requested SIGNAL"]; }; RegisteredEvent: TYPE = REF RegisteredEventObj; RegisteredEventObj: TYPE = RECORD [ eventProc: EventProc, argType: GGUserInput.ArgumentType, causeMouseEventsToComplete: BOOL ]; RegisterAction: PUBLIC PROC [atom: ATOM, eventProc: EventProc, argType: GGUserInput.ArgumentType, causeMouseEventsToComplete: BOOL _ TRUE] = { regEvent: RegisteredEvent _ NEW[RegisteredEventObj _ [eventProc, argType, causeMouseEventsToComplete]]; notAlreadyRegistered: BOOL _ TRUE; notAlreadyRegistered _ RefTab.Insert[eventTable, atom, regEvent]; IF NOT notAlreadyRegistered THEN SIGNAL Problem[msg: IO.PutFR["Event %g was already registered in Gargoyle's event table.", [rope[Atom.GetPName[atom]]] ]]; }; NoOp: EventProc = {}; PrintAllInputOn: PROC [clientData: REF ANY, event: LIST OF REF ANY] = { printAllInput _ TRUE; }; PrintAllInputOff: PROC [clientData: REF ANY, event: LIST OF REF ANY] = { printAllInput _ FALSE; }; eventTable: RefTab.Ref; RegisterGargoyleActions: PROC = { <> eventTable _ RefTab.Create[240]; RegisterAction[$PaintActionArea, GGEvent.PaintActionArea, none]; RegisterAction[$Abort, GGMouseEvent.HandleMouseless, none, FALSE]; RegisterAction[$NoOp, NoOp, none]; RegisterAction[$AddChar, GGEvent.AddChar, none]; <<>> <> RegisterAction[$Clear, GGEvent.Clear, none]; RegisterAction[$Reset, GGEvent.Reset, none]; RegisterAction[$Get, GGEvent.Get, rope]; RegisterAction[$Merge, GGEvent.Merge, rope]; RegisterAction[$Store, GGEvent.Store, rope]; RegisterAction[$Save, GGEvent.Save, none]; RegisterAction[$Stuff, GGEvent.StuffIt, none]; RegisterAction[$StuffScreen, GGEvent.StuffItScreen, none]; <> RegisterAction[$MergeIPEditable, GGEvent.MergeIPEditable, rope]; RegisterAction[$MergeIPSlice, GGEvent.MergeIPSlice, rope]; RegisterAction[$ToIP, GGEvent.ToIP, rope]; RegisterAction[$ToIPScreen, GGEvent.ToIPScreen, rope]; RegisterAction[$IncludeIPByReference, GGEvent.IncludeIPByReference, none]; RegisterAction[$IncludeIPByValue, GGEvent.IncludeIPByValue, none]; RegisterAction[$ShowIPIncludeMode, GGEvent.ShowIPIncludeMode, none]; RegisterAction[$ToIPLit, GGEvent.ToIPLit, none]; <<>> <> RegisterAction[$Help, GGEvent.Help, none]; <> <<>> <> RegisterAction[$Delete, GGEvent.Delete, none]; RegisterAction[$Undelete, GGEvent.Undelete, none]; RegisterAction[$UndeleteAutoConfirm, GGEvent.UndeleteAutoConfirm, none]; RegisterAction[$UnionCombine , GGEvent.UnionCombine, none]; RegisterAction[$AddHoles, GGEvent.AddHoles, none]; RegisterAction[$DescribeCurve, GGEvent.DescribeCurve, none]; <<>> <> RegisterAction[$ApplyAllDefaults, GGEvent.ApplyAllDefaults, none]; RegisterAction[$SetAllDefaults, GGEvent.SetAllDefaults, none]; RegisterAction[$ShowAllDefaults, GGEvent.ShowAllDefaults, none]; RegisterAction[$StandardDefaults, GGEvent.StandardDefaults, none]; RegisterAction[$Close, GGEvent.Close, none]; RegisterAction[$AddControlPoint, GGEvent.AddControlPoint, none]; RegisterAction[$DeleteControlPoint, GGEvent.DeleteControlPoint, none]; RegisterAction[$AddJoint, GGEvent.AddJoint, none]; RegisterAction[$Weld, GGEvent.Weld, none]; RegisterAction[$SplitSegment, GGEvent.SplitSegment, none]; RegisterAction[$Splice, GGEvent.Splice, none]; <> <> <<>> <> RegisterAction[$Rotate, GGEvent.TransRotScale, rope]; RegisterAction[$Scale, GGEvent.TransRotScale, rope]; RegisterAction[$ScaleX, GGEvent.TransRotScale, rope]; RegisterAction[$ScaleY, GGEvent.TransRotScale, rope]; RegisterAction[$TranslateX, GGEvent.TransRotScale, rope]; RegisterAction[$TranslateY, GGEvent.TransRotScale, rope]; RegisterAction[$SixPointTransform, GGEvent.SixPointTransform, none]; RegisterAction[$FourPointTransform, GGEvent.FourPointTransform, none]; <<>> <> RegisterAction[$Top, GGEvent.Top, none]; RegisterAction[$Bottom, GGEvent.Bottom, none]; RegisterAction[$UpOne, GGEvent.UpOne, none]; RegisterAction[$DownOne, GGEvent.DownOne, none]; <> RegisterAction[$Refresh, GGEvent.Refresh, none]; RegisterAction[$DisableRefresh, GGEvent.DisableRefresh, none]; RegisterAction[$EnableRefresh, GGEvent.EnableRefresh, none]; <<>> <> RegisterAction[$PolygonInCircle, GGEvent.PolygonInCircle, refInt]; RegisterAction[$KnotchedLine, GGEvent.NewKnotchedLine, none]; RegisterAction[$NewCircle, GGEvent.NewCircle, none]; RegisterAction[$NewBox, GGEvent.NewBox, none]; RegisterAction[$NewArrow, GGEvent.NewArrow, none]; RegisterAction[$Frame, GGEvent.Frame, none]; <> RegisterAction[$TestGravity, GGEvent.TestGravity, refInt]; RegisterAction[$ToIPTestGravity, GGEvent.ToIPTestGravity, none]; RegisterAction[$TestMultiGravity, GGEvent.TestMultiGravity, none]; RegisterAction[$Statistics, GGEvent.Statistics, none]; RegisterAction[$PrintSelectedStatistic, GGEvent.PrintSelectedStatistic, rope]; RegisterAction[$ResetStatistics, GGEvent.ResetStatistics, none]; RegisterAction[$DrawTightBoxes, GGEvent.DrawTightBoxes, none]; RegisterAction[$DrawBoundBoxes, GGEvent.DrawBoundBoxes, none]; RegisterAction[$DrawOutlineBoxes, GGEvent.DrawOutlineBoxes, none]; RegisterAction[$DrawSelectionBox, GGEvent.DrawSelectionBox, none]; RegisterAction[$DrawBackgroundBox, GGEvent.DrawMovingBox, none]; RegisterAction[$DrawOverlayBox, GGEvent.DrawMovingBox, none]; RegisterAction[$DrawRubberBox, GGEvent.DrawMovingBox, none]; RegisterAction[$DrawDragBox, GGEvent.DrawMovingBox, none]; RegisterAction[$Typescript, GGEvent.Typescript, none]; RegisterAction[$SlackLog, GGEvent.SlackLog, none]; RegisterAction[$DescribeCaretObject, GGEvent.DescribeCaretObject, none]; RegisterAction[$FSMInfo, FSMInfo, none]; RegisterAction[$PrintAllInput, PrintAllInputOn, none]; RegisterAction[$ResetAllInput, PrintAllInputOff, none]; RegisterAction[$CauseAnError, CauseAnError, none]; <> RegisterAction[$LineWidth, GGEvent.LineWidth, refReal]; RegisterAction[$LineEnd, GGEvent.LineEnds, rope]; RegisterAction[$TrajJoints, GGEvent.TrajJoints, rope]; RegisterAction[$DashesFromSelection, GGEvent.DashesFromSelection, rope]; RegisterAction[$DashesOff, GGEvent.DashesOff, none]; RegisterAction[$PrintStrokeValues, GGEvent.PrintStrokeValues, none]; RegisterAction[$SelectMatchingWidth, GGEvent.SelectMatchingWidth, refReal]; RegisterAction[$SelectMatchingDashes, GGEvent.SelectMatchingDashes, rope]; RegisterAction[$SetDefaultStrokeValues, GGEvent.SetDefaultStrokeValues, none]; RegisterAction[$ShowDefaultStrokeValues, GGEvent.ShowDefaultStrokeValues, none]; <> RegisterAction[$Arrows, GGEvent.Arrows, none]; <> RegisterAction[$AreaColorFromColorTool, GGEvent.AreaColorFromColorTool, none]; RegisterAction[$AreaColorFollowColorTool, GGEvent.AreaColorFollowColorTool, none]; RegisterAction[$AreaColorToColorTool, GGEvent.AreaColorToColorTool, none]; RegisterAction[$AreaColorFromSelectedName, GGEvent.AreaColorFromSelectedName, rope]; RegisterAction[$AreaColorFromSelectedRGB, GGEvent.AreaColorFromSelectedRGB, rope]; RegisterAction[$PrintAreaColor, GGEvent.PrintAreaColor, none]; RegisterAction[$SelectMatchingAreaRGB, GGEvent.SelectMatchingAreaColor, rope]; RegisterAction[$SelectMatchingAreaCNS, GGEvent.SelectMatchingAreaColor, rope]; RegisterAction[$AreaColorBlack, GGEvent.AreaColorBlack, none]; RegisterAction[$AreaColorWhite, GGEvent.AreaColorWhite, none]; RegisterAction[$AreaColorGray, GGEvent.AreaColorGray, none]; RegisterAction[$AreaColorNone, GGEvent.AreaColorNone, none]; RegisterAction[$SetDefaultFillColor, GGEvent.SetDefaultFillColor, none]; RegisterAction[$ShowDefaultFillColor, GGEvent.ShowDefaultFillColor, none]; <> RegisterAction[$LineColorFromColorTool, GGEvent.LineColorFromColorTool, none]; RegisterAction[$LineColorFollowColorTool, GGEvent.LineColorFollowColorTool, none]; RegisterAction[$LineColorToColorTool, GGEvent.LineColorToColorTool, none]; RegisterAction[$LineColorFromSelectedName, GGEvent.LineColorFromSelectedName, rope]; RegisterAction[$LineColorFromSelectedRGB, GGEvent.LineColorFromSelectedRGB, rope]; RegisterAction[$SelectMatchingLineRGB, GGEvent.SelectMatchingLineColor, rope]; RegisterAction[$SelectMatchingLineCNS, GGEvent.SelectMatchingLineColor, rope]; RegisterAction[$PrintLineColor, GGEvent.PrintLineColor, none]; RegisterAction[$LineColorBlack, GGEvent.LineColorBlack, none]; RegisterAction[$LineColorWhite, GGEvent.LineColorWhite, none]; RegisterAction[$LineColorGray, GGEvent.LineColorGray, none]; RegisterAction[$LineColorNone, GGEvent.LineColorNone, none]; RegisterAction[$SetDefaultLineColor, GGEvent.SetDefaultLineColor, none]; RegisterAction[$ShowDefaultLineColor, GGEvent.ShowDefaultLineColor, none]; <> RegisterAction[$AddText, GGEvent.AddText, rope]; RegisterAction[$AmplifySpaceFromSelection, GGEvent.AmplifySpaceFromSelection, refReal]; RegisterAction[$PrintAmplifySpace, GGEvent.PrintAmplifySpace, none]; RegisterAction[$DropShadowOn, GGEvent.DropShadowOn, none]; RegisterAction[$DropShadowOff, GGEvent.DropShadowOff, none]; <<>> <> RegisterAction[$SetPressFont, GGEvent.SetPressFont, rope]; RegisterAction[$SetPrintFont, GGEvent.SetPrintFont, rope]; RegisterAction[$SetScreenFont, GGEvent.SetScreenFont, rope]; RegisterAction[$SetFontDetailed, GGEvent.SetFontDetailed, rope]; RegisterAction[$SetFontLiteral, GGEvent.SetFontLiteral, rope]; RegisterAction[$ShowFontValues, GGEvent.ShowFontValues, none]; RegisterAction[$ShowFontValuesLiteral, GGEvent.ShowFontValuesLiteral, none]; RegisterAction[$CopyFont, GGEvent.CopyFont, none]; RegisterAction[$CopyAll, GGEvent.CopyAll, none]; RegisterAction[$MatchAll, GGEvent.MatchAll, none]; RegisterAction[$MatchSelectedName, GGEvent.MatchSelectedName, rope]; RegisterAction[$MatchSelectedNameLiteral, GGEvent.MatchSelectedNameLiteral, rope]; RegisterAction[$SetDefaultFontValues, GGEvent.SetDefaultFontValues, none]; RegisterAction[$ShowDefaultFontValues, GGEvent.ShowDefaultFontValues, none]; <> RegisterAction[$AddToGroup, GGEvent.AddToGroup, none]; RegisterAction[$SelectGroup, GGEvent.SelectGroup, none]; RegisterAction[$RemoveFromGroup, GGEvent.RemoveFromGroup, none]; RegisterAction[$PrintGroupsOfSelected, GGEvent.PrintGroupsOfSelected, none]; RegisterAction[$PrintAllGroups, GGEvent.PrintAllGroups, none]; <> RegisterAction[$AreaSelectNew, GGEvent.AreaSelectNew, none]; RegisterAction[$AreaSelectExtend, GGEvent.AreaSelectExtend, none]; RegisterAction[$AreaSelectNewAndDelete, GGEvent.AreaSelectNewAndDelete, none]; RegisterAction[$AreaSelectDegenerate, GGEvent.AreaSelectDegenerate, none]; RegisterAction[$SelectAll, GGEvent.SelectAll, none]; <<>> <> RegisterAction[$SetStraight, GGEvent.SetStraight, none]; RegisterAction[$SetArc, GGEvent.SetArc, none]; RegisterAction[$SetSnowflake, GGEvent.SetSnowflake, none]; RegisterAction[$SetConic, GGEvent.SetConic, none]; RegisterAction[$SetBezier, GGEvent.SetBezier, none]; RegisterAction[$SetNaturalSpline, GGEvent.SetNaturalSpline, none]; RegisterAction[$SetBSpline, GGEvent.SetBSpline, none]; RegisterAction[$SelectMatchingCurve, GGEvent.SelectMatchingCurve, rope]; <<>> <> RegisterAction[$GravityChoiceChange, GGEvent.GravityChoiceChange, none, FALSE]; RegisterAction[$GravityExtentChange, GGEvent.GravityExtentChange, none, FALSE]; RegisterAction[$ToggleGravity, GGEvent.ToggleGravity, none, FALSE]; RegisterAction[$ToggleAlignments, GGEvent.ToggleAlignments, none]; RegisterAction[$MakeHot, GGEvent.MakeHot, none]; RegisterAction[$MakeAllHot, GGEvent.MakeAllHot, none]; RegisterAction[$MakeCold, GGEvent.MakeCold, none]; RegisterAction[$MakeAllCold, GGEvent.MakeAllCold, none]; RegisterAction[$ShowHot, GGEvent.ShowHot, none]; RegisterAction[$HideHot, GGEvent.HideHot, none]; RegisterAction[$DropAnchor, GGEvent.DropAnchor, none]; RegisterAction[$LiftAnchor, GGEvent.KillAnchor, none]; RegisterAction[$StandardAlignments, GGEvent.StandardAlignments, none]; <> RegisterAction[$RadiusUnitFromSegment, GGEvent.ScaleUnitFromSegment, none]; RegisterAction[$RadiusUnitFromValue, GGEvent.ScaleUnitFromValue, none]; RegisterAction[$RadiusUnitFromSelection, GGEvent.ScaleUnitFromSelection, refReal]; RegisterAction[$InchScaleUnit, GGEvent.InchScaleUnit, none]; RegisterAction[$CentimeterScaleUnit, GGEvent.CentimeterScaleUnit, none]; RegisterAction[$PointsScaleUnit, GGEvent.PointsScaleUnit, none]; RegisterAction[$PrintScaleUnit, GGEvent.PrintScaleUnit, none]; <<>> <> RegisterAction[$SlopePrompt, GGEvent.SlopePrompt, none]; RegisterAction[$AddSlope, GGEvent.AddSlope, none]; RegisterAction[$GetSlope, GGEvent.GetSlope, none]; RegisterAction[$ToggleSlope, GGEvent.ToggleSlope, none]; RegisterAction[$DeleteSlope, GGEvent.DeleteSlope, none]; <> RegisterAction[$AnglePrompt, GGEvent.AnglePrompt, none]; RegisterAction[$AddAngle, GGEvent.AddAngle, none]; RegisterAction[$GetAngle, GGEvent.GetAngle, none]; RegisterAction[$ToggleAngle, GGEvent.ToggleAngle, none]; RegisterAction[$DeleteAngle, GGEvent.DeleteAngle, none]; <> RegisterAction[$RadiusPrompt, GGEvent.RadiusPrompt, none]; RegisterAction[$AddRadius, GGEvent.AddRadius, none]; RegisterAction[$GetRadius, GGEvent.GetRadius, none]; RegisterAction[$ToggleRadius, GGEvent.ToggleRadius, none]; RegisterAction[$DeleteRadius, GGEvent.DeleteRadius, none]; <> RegisterAction[$DistancePrompt, GGEvent.DistancePrompt, none]; RegisterAction[$AddDistance, GGEvent.AddDistance, none]; RegisterAction[$GetDistance, GGEvent.GetDistance, none]; RegisterAction[$ToggleDistance, GGEvent.ToggleDistance, none]; RegisterAction[$DeleteDistance, GGEvent.DeleteDistance, none]; <<>> <> RegisterAction[$MeasureSlopeHit, GGEvent.MeasureSlopeHit, none]; RegisterAction[$MeasureAngleHit, GGEvent.MeasureAngleHit, none]; RegisterAction[$MeasureRadiusHit, GGEvent.MeasureRadiusHit, none]; RegisterAction[$MeasureLineDistHit, GGEvent.MeasureLineDistHit, none]; <> RegisterAction[$ReloadTipTable, GGEvent.ReloadTipTable, none]; RegisterAction[$AllAlignmentsOff, GGEvent.AllAlignmentsOff, none]; RegisterAction[$InitializeAlignments, GGEvent.InitializeAlignments, none]; RegisterAction[$DeleteCaretSegment, GGEvent.DeleteCaretSegment, none]; RegisterAction[$IPSnapShot, GGEvent.IPSnapShot, none, FALSE]; RegisterAction[$EndOfSessionLogMessage, GGSessionLog.EndOfScriptMessage, none]; RegisterAction[$PrintRope, GGEvent.PrintRope, none, FALSE]; <> RegisterAction[$SetGravityExtent, GGEvent.SetGravityExtent, none, FALSE]; RegisterAction[$SetShowColors, GGEvent.SetShowColors, none, FALSE]; RegisterAction[$SetGravity, GGEvent.SetGravity, none, FALSE]; RegisterAction[$SetMidpoints, GGEvent.SetMidpoints, none, FALSE]; RegisterAction[$SetHeuristics, GGEvent.SetHeuristics, none, FALSE]; RegisterAction[$SetDefaultFont, GGEvent.SetDefaultFont, none, FALSE]; RegisterAction[$ToggleShowColors, GGEvent.ToggleShowColors, none, FALSE]; RegisterAction[$ScreenChoiceChange, GGEvent.ScreenChoiceChange, none]; RegisterAction[$ToggleMidpoints, GGEvent.ToggleMidpoints, none]; RegisterAction[$ToggleHeuristics, GGEvent.ToggleHeuristics, none]; <<>> <> RegisterAction[$SawTextFinish, GGEvent.SawTextFinish, none, FALSE]; RegisterAction[$SawMouseFinish, GGMouseEvent.HandleMouseless, none, FALSE]; <> RegisterAction[$StartCaretPos, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartAdd, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartBox, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartSelectWithBox, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartDrag, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartCopyAndDrag, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartRotate, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartScale, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartSixPoint, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartSelectJoint, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartExtSelectJoint, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartSelectSegment, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartExtSelectSegment, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartSelectTrajectory, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartExtSelectTrajectory, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartSelectTopLevel, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartExtSelectTopLevel, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartExtendSelection, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartDeselectJoint, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartDeselectSegment, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartDeselectTrajectory, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$StartDeselectTopLevel, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$During, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$AllUp, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$GuardUp, GGMouseEvent.HandleMouse, none, FALSE]; RegisterAction[$MouseUp, GGMouseEvent.HandleMouse, none, FALSE]; <<>> <> <> <> <> <> <> <> }; -- end of RegisterGargoyleActions InitStats: PROC [] = { interval: CodeTimer.Interval; interval _ CodeTimer.CreateInterval[$UserInput]; CodeTimer.AddInt[interval, $Gargoyle]; }; RegisterGargoyleActions[]; InitStats[]; END.