<> <> <> <> <> <> <> DIRECTORY AtomButtons, Feedback, FeedbackOps, FeedbackTypes, FS, GGBasicTypes, GGControlPanelTypes, GGCoreOps, GGInterfaceTypes, GGMenu, GGModelTypes, GGRefreshTypes, GGSceneType, GGSegmentTypes, GGUserInput, Imager, ImagerFont, Menus, Rope, ViewerClasses; GGMenuImplC: CEDAR PROGRAM IMPORTS AtomButtons, Feedback, FeedbackOps, FS, GGCoreOps, GGUserInput, ImagerFont EXPORTS GGMenu, GGModelTypes, GGInterfaceTypes = BEGIN Controls: TYPE = REF ControlsObj; ControlsObj: PUBLIC TYPE = GGControlPanelTypes.ControlsObj; MsgRouter: TYPE = FeedbackTypes.MsgRouter; GGData: TYPE = GGInterfaceTypes.GGData; RefreshDataObj: PUBLIC TYPE = GGRefreshTypes.RefreshDataObj; SceneObj: PUBLIC TYPE = GGSceneType.SceneObj; -- export of opaque type SceneRef: TYPE = REF SceneObj; entryHeight: CARDINAL = 15; -- height of a line of items entryHSpace: CARDINAL = 2; -- horizontal space between items on a line entryVSpace: CARDINAL = 2; -- vertical leading between lines fullColumn: CARDINAL = 600; -- the width of the standard large left column. smallNumberSize: CARDINAL = 60; <> <> <> <<>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<>> <> <> <> <<};>> <<>> <> <> <> <<[popUpButton["Merge", PUChoiceList [>> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, mergeMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Stuff", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, stuffMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["IP", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, interpressMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Script", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, scriptMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Help", PUChoiceList [>> <> <> <> <<],>> <<-1, FALSE, popUpFont, helpMenuDoc, disableDecoding]];>> nextX: INTEGER _ 0; <> <<[button["Clear", LIST[LIST[$Clear]], -1, FALSE, NIL, ConfirmClear]],>> <<[button["Restore", LIST[LIST[$Reset]], -1, FALSE, NIL, ConfirmReset]],>> <<[button["Get", LIST[LIST[$Get]], -1, FALSE, NIL, ConfirmGet]], -- guarded in spite of Tioga viewers menus>> <<[button["Store", LIST[LIST[$Store]], -1, FALSE, NIL, ConfirmStore]],>> <<[button["Save", LIST[LIST[$Save]] ]],>> <> <> <> <<]];>> <<>> <> <> <> <<]];>> <<>> <> <<["Revive!", button, ReviveButton] -- must be unqueued>> <<]];>> <<>> <> <<[button["Typescript", LIST[LIST[$Typescript]] ]]>> <<]];>> ggData.height _ ggData.height + entryHeight; }; >> <> <> <> <> <> <> <<[popUpButton["Stroke", PUChoiceList [>> <> <> <> <> <> <> <, ] " ],>> <, ] "],>> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, strokeMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Color", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, popUpButtonDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Fill", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, fillMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Edit", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, editMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["Select", PUChoiceList [>> <> <> <> <<>> <> <> <> <<>> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, selectMenuDoc, disableDecoding]];>> <<>> <> <> <<[popUpButton["HotSpots", PUChoiceList [>> <> <> <> <> <> <> <> <> <> <> <<],>> <<-1, FALSE, popUpFont, hotSpotsMenuDoc, disableDecoding]];>> <<>> <> <> <> <> <<[popUpButton["Units", PUChoiceList [>> <<[LIST[$SetScaleUnit, NEW[REAL _ pointsPerIn], $Noisy], "Inches", "Set unit value to 1 inch"],>> <<[LIST[$PrintScaleUnit], "ShowValue", "Print current unit value"],>> <<[LIST[$SetScaleUnit, NEW[REAL _ 1.0], $Noisy], "Points", "Set unit value to 1 point"],>> <<[LIST[$RadiusUnitFromSegment], "FromSegment [G]", "Set unit value to length of selected segment"],>> <<[LIST[$RadiusUnitFromValue], "FromRadiusValue", "Set unit value from number in RadiusValue"],>> <<[LIST[$RadiusUnitFromSelection], "FromSelection [T]", "Set unit value from number in the Tioga selection"],>> <<[LIST[$SetScaleUnit, NEW[REAL _ pointsPerCm], $Noisy], "Centimeters", "Set unit value to 1 centimeter"]>> <<],>> <<-1, FALSE, popUpFont, unitsMenuDoc, disableDecoding]];>> <<>> <> <> <<]];>> <<>> <> <<>> <> <<[twoState["Buffer", LIST[$ToggleBuffer], TRUE, BufferInGGData]]>> <<]];>> <<>> <<>> <> <<};>> <<>> <> <> <> <<};>> <<>> <> <> <> <> <<};>> <<>> <> <> <> <<};>> <<>> <> <> <> <> <> <<};>> <<>> <> <<-- This proc is a mess but can't be easily sanitized>> <> <> <> <> <> <> <<[fullName, success, ----] _ GGFileOps.GetGargoyleFileName["Get", filename, ggData.currentWDir, ggData.router, FALSE];>> <> <> <<};>> <<};>> <<>> <> <<-- This proc is a mess but can't be easily sanitized>> <> <> <> <> <> <> <<[fullName, success, ----] _ GGFileOps.GetGargoyleFileName["Store", filename, ggData.currentWDir, ggData.router, FALSE];>> <> <> <<};>> <<};>> <<>> FileExists: PROC [fileName: Rope.ROPE] RETURNS [answer: BOOL _ TRUE] = { [] _ FS.FileInfo[fileName ! FS.Error => IF error.code=$unknownFile THEN { answer _ FALSE; CONTINUE }; <> ]; }; <<>> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <<};>> <<>> <> <> <<};>> <<>> <> <> <> <<};>> <> END.