DIRECTORY Buttons, Carets, ChoiceButtons, Commander, Containers, Convert, Imager, ImagerBackdoor, ImagerTerminal, InterminalBackdoor, IO, Labels, LFBoundingBox, Menus, MessageWindow, PieViewers, PressScreen, Process, Real, Rope, Rules, RuntimeError, SirPress, ViewerClasses, ViewerOps, ViewerSpecs, ViewerTools; PressScreenToolImpl: CEDAR MONITOR IMPORTS Buttons, ChoiceButtons, Commander, Containers, Convert, Imager, ImagerBackdoor, ImagerTerminal, InterminalBackdoor, IO, Labels, LFBoundingBox, Menus, MessageWindow, PieViewers, PressScreen, Process, Real, Rope, Rules, RuntimeError, ViewerSpecs, ViewerOps, ViewerTools EXPORTS PressScreen = { OPEN PressScreen; ROPE: TYPE = Rope.ROPE; ScreenArea: TYPE = {leftColumn, rightColumn, wholeScreen, desiredArea}; indent: INTEGER ~ 4; baseline: INTEGER ~ 16; NewPressScreenTool: PUBLIC PROCEDURE [serverName: ROPE] RETURNS[psTool: PressScreenTool] = { ENABLE UNWIND => NULL; viewer: ViewerClasses.Viewer _ ViewerOps.CreateViewer[ flavor: $PressScreen, info: [ name: IF serverName.Length = 0 THEN "PressScreen" ELSE Rope.Concat["PressScreen to ", serverName], column: right, scrollable: FALSE ], paint: TRUE ]; psTool _ NARROW[ViewerOps.FetchProp[viewer, $PressScreenData]]; }; InitPressScreenViewer: ViewerClasses.InitProc = { psTool: PressScreenTool _ NEW[PressScreenToolRec]; nextX: INTEGER; curY: INTEGER _ indent/2; NextY: PROCEDURE RETURNS [y:NAT] = {y _ curY _ curY+baseline}; button: ViewerClasses.Viewer; menu: Menus.Menu _ Menus.CreateMenu[]; InsertMenu: PROCEDURE [name: ROPE, proc: Menus.ClickProc, doc: ROPE] = { Menus.InsertMenuEntry[menu, Menus.CreateEntry[ name: name, proc: proc, clientData: psTool, documentation: doc ]]; }; LabelledTextViewer: PROCEDURE [name: ROPE] RETURNS [v: ViewerClasses.Viewer] = { v _ ViewerTools.MakeNewTextViewer[ info:[wx: button.wx+button.ww, wy: curY, ww: 50, wh: button.wh, parent: self, scrollable: FALSE, border: TRUE], paint: TRUE ]; button _ Labels.Create[ info: [name: name, wx: v.wx + v.ww, wy: curY+1, wh: button.wh, parent: self, scrollable: FALSE, border: FALSE], paint: TRUE ]; }; MyButton: PROCEDURE [name: ROPE, proc: Buttons.ButtonProc, doc: ROPE] RETURNS [Buttons.Button] = { RETURN [Buttons.Create[ info: [name: name, wx: indent, wy: NextY[], parent: self, border: FALSE], clientData: psTool, proc: proc, fork: TRUE, paint: TRUE, documentation: doc ]]}; triggerName: ROPE _ Rope.Concat["PS", GenSym[]]; ViewerOps.AddProp[self, $PressScreenData, psTool]; psTool.tool _ self; containerInitProc[self]; -- since I know its really a $Container, I need to init it for him [] _ Buttons.Create[info: [name: triggerName], proc: PSButton, clientData: psTool, documentation: "Convert the identified area of the screen image into an AIS/Press file"]; InsertMenu["SaveState", SaveStateButton, "Saves the state of the PressScreen tool."]; InsertMenu["GetSelectedViewer", GetSelectedViewerButton, "Gets the corners of the selected viewer for PressScreening."]; InsertMenu["FlashImage", FlashImageButton, "Flashes the identified area of the screen image."]; InsertMenu["SetCorners", SetCornersButton, "Permits designation of a rectangular screen area"]; InsertMenu["DoIt", DoItButton, "Convert the identified area of the screen image into an AIS/Press file"]; ViewerOps.SetMenu[self, menu]; psTool.outputStyleChoice _ ChoiceButtons.BuildEnumTypeSelection[ viewer: self, x: indent, y: curY, title: "Output Style:", buttonNames: LIST["AIS/Press file", "Interpress file", "Stuff into Tioga"], default: "AIS/Press file", style: menuSelection]; psTool.screenAreaChoice _ ChoiceButtons.BuildEnumTypeSelection[ viewer: self, x: indent, y: NextY[], title: "Screen Area:", buttonNames: CONS["DesiredArea", CONS["WholeScreen", CONS["LeftColumn", CONS["RightColumn", NIL]]]], default: "WholeScreen", style: menuSelection]; button _ MyButton["Area Corners: ", AreaCornersButton, "Set the corners of the identified area of the screen"]; psTool.ulx _ LabelledTextViewer["x "]; psTool.uly _ LabelledTextViewer["y "]; psTool.lrx _ LabelledTextViewer["x "]; psTool.lry _ LabelledTextViewer["y"]; psTool.magnificationChoice _ ChoiceButtons.BuildEnumTypeSelection[ viewer: self, x: indent, y: NextY[], title: "Magnification:", buttonNames: CONS["FullPage", CONS["HalfPage", CONS["UseFactorBelow", NIL]]], default: "FullPage", style: menuSelection]; button _ MyButton["MagnificationFactor: ", MagnificationFactorButton, "Set the magnification factor"]; psTool.magnificationViewer _ LabelledTextViewer["%"]; psTool.formatViewer _ ChoiceButtons.BuildEnumTypeSelection[ viewer: self, x: indent, y: NextY[], title: "Page Format:", buttonNames: CONS["Portrait", CONS["Landscape", NIL]], default: "Portrait", style: menuSelection]; button _ MyButton["BlackBorder: ", BlackBorderButton, "Set the black border width surrounding the identified image area."]; psTool.borderViewer _ LabelledTextViewer["pixels"]; button _ MyButton["PageMargin: ", PageMarginButton, "Set the white space provided around the page"]; psTool.pageMarginViewer _ LabelledTextViewer["inches"]; button _ MyButton["CountDownTimer: ", CountDownTimerButton, "Set the time before the screen is copied"]; psTool.countDownTimerViewer _ LabelledTextViewer["seconds "]; psTool.countDownPieViewer _ PieViewers.Create[parent: self, x: button.wx+button.ww, y: curY]; button _ Labels.Create[ info: [name: "Viewer Controls: ", wx: indent, wy: NextY[]+1, wh: button.wh, parent: self, scrollable: FALSE, border: FALSE], paint: TRUE ]; [psTool.lockViewersTriState, nextX] _ ChoiceButtons.BuildTriStateButton[ viewer: self, x: button.wx+button.ww, y: curY, name: "LockViewers"]; [psTool.displayCursorTriState, nextX] _ ChoiceButtons.BuildTriStateButton[ viewer: self, x: nextX, y: curY, name: "DisplayCursor"]; [psTool.displayCaretsTriState, nextX] _ ChoiceButtons.BuildTriStateButton[ viewer: self, x: nextX, y: curY, name: "DisplayCarets"]; Containers.ChildXBound[self, Rules.Create[info: [wx: 0, wy: NextY[], wh: 1, parent: self]]]; psTool.logViewer _ ViewerTools.MakeNewTextViewer[ info: [wx: 0, wy: curY+2, parent: self, scrollable: TRUE, border: FALSE] ]; Containers.ChildXBound[self, psTool.logViewer]; Containers.ChildYBound[self, psTool.logViewer]; AppendLogMessage[psTool, "To set the area corners: left-click SetCorners and cursor changes to cross-hair; left-click-and-hold to set first corner; drag mouse to second corner and release the mouse button."]; AppendLogMessage[psTool, "To use GetSelectedViewer: make a point selection within a viewer or make the selection the name of a viewer and left-click GetSelectedViewer."]; [] _ psTool.logViewer.class.scroll[psTool.logViewer, thumb, 0]; ChoiceButtons.UpdateChoiceButtons[self, psTool.outputStyleChoice, "AIS/Press file"]; ChoiceButtons.UpdateChoiceButtons[self, psTool.screenAreaChoice, "WholeScreen"]; ChoiceButtons.UpdateChoiceButtons[self, psTool.magnificationChoice, "FullPage"]; ViewerTools.SetContents[psTool.magnificationViewer, IO.PutFR["%g", IO.real[100.0]]]; ViewerTools.SetContents[psTool.ulx, IO.PutFR["%g", IO.int[0]]]; ViewerTools.SetContents[psTool.uly, IO.PutFR["%g", IO.int[808]]]; ViewerTools.SetContents[psTool.lrx, IO.PutFR["%g", IO.int[1024]]]; ViewerTools.SetContents[psTool.lry, IO.PutFR["%g", IO.int[0]]]; ChoiceButtons.UpdateChoiceButtons[self, psTool.formatViewer, "Portrait"]; ViewerTools.SetContents[psTool.borderViewer, IO.PutFR["%g", IO.int[2]]]; ViewerTools.SetContents[psTool.pageMarginViewer, IO.PutFR["%g", IO.real[0.75]]]; ViewerTools.SetContents[psTool.countDownTimerViewer, IO.PutFR["%g", IO.int[0]]]; PieViewers.Set[psTool.countDownPieViewer, 100.0]; ViewerOps.PaintViewer[self, all]; }; DestroyPressScreenViewer: ViewerClasses.DestroyProc = { psTool: PressScreenTool _ NARROW[ViewerOps.FetchProp[self, $PressScreenData]]; SaveState[psTool]; psTool.destroyed _ TRUE; IF containerDestroyProc # NIL THEN containerDestroyProc[self]; }; GetSelectedViewerButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; selectedViewer: ViewerClasses.Viewer _ ViewerTools.GetSelectedViewer[]; sourceName: ROPE _ NIL; sourceName _ IF selectedViewer = NIL OR selectedViewer.class.get = NIL THEN NIL ELSE NARROW[selectedViewer.class.get[selectedViewer, $SelChars ! RuntimeError.UNCAUGHT => CONTINUE]]; IF sourceName.Length <= 1 THEN { IF (selectedViewer = NIL) THEN { AppendLogMessage[psTool, "Selection not in text viewer"]; RETURN; } ELSE { WHILE sourceName.Length <= 1 AND selectedViewer # NIL DO sourceName _ selectedViewer.name; selectedViewer _ selectedViewer.parent; ENDLOOP; }; }; IF sourceName.Length > 1 THEN { selectedViewer _ ViewerOps.FindViewer[sourceName]; IF selectedViewer = NIL THEN AppendLogMessage[psTool, Rope.Cat["Viewer \"", sourceName, "\" wasn't found."]] ELSE { ViewerTools.SetContents[psTool.ulx, IO.PutFR["%g", IO.int[selectedViewer.wx]]]; ViewerTools.SetContents[psTool.uly, IO.PutFR["%g", IO.int[selectedViewer.wy+selectedViewer.wh]]]; ViewerTools.SetContents[psTool.lrx, IO.PutFR["%g", IO.int[selectedViewer.wx+selectedViewer.ww]]]; ViewerTools.SetContents[psTool.lry, IO.PutFR["%g", IO.int[selectedViewer.wy]]]; ChoiceButtons.UpdateChoiceButtons[psTool.tool, psTool.screenAreaChoice, "DesiredArea"]; FlashScreenArea[psTool]; }; }; }; FlashImageButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; FlashScreenArea[psTool]; }; flashTime: Process.Milliseconds ~ 600; FlashScreenArea: PROCEDURE [psTool: PressScreenTool] = { ulx, uly, lrx, lry: REAL; context: Imager.Context _ ImagerTerminal.BWContext[vt: InterminalBackdoor.terminal, pixelUnits: TRUE]; context.SetColor[ImagerBackdoor.invert]; [ulx, uly, lrx, lry] _ ReadScreenCorners[psTool]; context.MaskBox[[lrx, lry, ulx, uly]]; Process.Pause[Process.MsecToTicks[flashTime]]; context.MaskBox[[lrx, lry, ulx, uly]]; }; SetCornersButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; x, y, w, h: NAT; [x, y, w, h] _ LFBoundingBox.GetArea[ ! LFBoundingBox.AbortAdjust => GOTO DoNothing]; ViewerTools.SetContents[psTool.ulx, IO.PutFR["%g", IO.int[x]]]; ViewerTools.SetContents[psTool.uly, IO.PutFR["%g", IO.int[y+h]]]; ViewerTools.SetContents[psTool.lrx, IO.PutFR["%g", IO.int[x+w]]]; ViewerTools.SetContents[psTool.lry, IO.PutFR["%g", IO.int[y]]]; ChoiceButtons.UpdateChoiceButtons[psTool.tool, psTool.screenAreaChoice, "DesiredArea"]; FlashScreenArea[psTool]; EXITS DoNothing => NULL; }; SaveStateButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; SaveState[psTool]; }; SaveState: PROCEDURE [psTool: PressScreenTool] = { IF psTool.destroyed THEN RETURN; psTool.outputStyleRope _ ChoiceButtons.GetSelectedButton[psTool.outputStyleChoice]; psTool.screenAreaRope _ ChoiceButtons.GetSelectedButton[psTool.screenAreaChoice]; psTool.magnificationRope _ ChoiceButtons.GetSelectedButton[psTool.magnificationChoice]; psTool.pageMargin _ ConvertRopeToReal[ViewerTools.GetContents[psTool.pageMarginViewer]]; psTool.magnificationFactor _ ConvertRopeToReal[ViewerTools.GetContents[psTool.magnificationViewer]]/100.0; [psTool.ulX, psTool.ulY, psTool.lrX, psTool.lrY] _ ReadScreenCorners[psTool]; psTool.formatRope _ ChoiceButtons.GetSelectedButton[psTool.formatViewer]; psTool.borderWidth _ ConvertRopeToReal[ViewerTools.GetContents[psTool.borderViewer]]; psTool.pageMargin _ ConvertRopeToReal[ViewerTools.GetContents[psTool.pageMarginViewer]]; psTool.countDownTime _ Process.SecondsToTicks[MIN[100000, MAX[0, Real.FixC[ConvertRopeToReal[ViewerTools.GetContents[psTool.countDownTimerViewer]]]]]]; psTool.lockViewers _ psTool.lockViewersTriState.state = on; psTool.displayCursor _ psTool.displayCursorTriState.state = on; psTool.displayCarets _ psTool.displayCaretsTriState.state = on; psTool.stateSaved _ TRUE; }; PSButton: Buttons.ButtonProc = { SELECT mouseButton FROM red, blue => DoItButton[parent, clientData, mouseButton, shift, control]; yellow => SetCornersButton[parent, clientData, mouseButton, shift, control]; ENDCASE => ERROR; }; DoItButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; SaveState[psTool]; DoIt[psTool]; }; DoIt: PROCEDURE [psTool: PressScreenTool] = { IF psTool.stateSaved THEN { sp: ScreenParameters _ [ borderWidth: psTool.borderWidth, lockViewers: psTool.lockViewers, displayCursor: psTool.displayCursor, displayCarets: psTool.displayCarets ]; pp: PageParameters = [ magnification: psTool.magnificationFactor, scaleToFit: SELECT TRUE FROM psTool.magnificationRope.Equal["UseFactorBelow"] => useMagnification, psTool.magnificationRope.Equal["HalfPage"] => halfPage, psTool.magnificationRope.Equal["FullPage"] => fullPage, ENDCASE => halfPage, leftMarginInches: psTool.pageMargin, rightMarginInches: psTool.pageMargin, landscape: SELECT TRUE FROM psTool.formatRope.Equal["Landscape"] => TRUE, ENDCASE => FALSE ]; SELECT TRUE FROM psTool.screenAreaRope.Equal["LeftColumn"] => { sp.sourceHeight _ InterminalBackdoor.terminal.bwHeight; sp.sourceWidth _ ViewerSpecs.openLeftWidth; sp.sourceBottom _ 0; sp.sourceLeft _ ViewerSpecs.openLeftLeftX; }; psTool.screenAreaRope.Equal["RightColumn"] => { sp.sourceHeight _ InterminalBackdoor.terminal.bwHeight; sp.sourceWidth _ ViewerSpecs.openRightWidth; sp.sourceBottom _ 0; sp.sourceLeft _ ViewerSpecs.openRightLeftX; }; psTool.screenAreaRope.Equal["WholeScreen"] => { sp.sourceHeight _ InterminalBackdoor.terminal.bwHeight; sp.sourceWidth _ InterminalBackdoor.terminal.bwWidth; sp.sourceBottom _ 0; sp.sourceLeft _ 0; }; psTool.screenAreaRope.Equal["DesiredArea"] => { ulx, uly, lrx, lry: REAL; [ulx, uly, lrx, lry] _ ReadScreenCorners[psTool]; sp.sourceHeight _ Real.Fix[uly - lry + 1]; sp.sourceWidth _ Real.Fix[lrx - ulx + 1]; sp.sourceBottom _ Real.Fix[lry]; sp.sourceLeft _ Real.Fix[ulx]; }; ENDCASE => { sp.sourceHeight _ InterminalBackdoor.terminal.bwHeight; sp.sourceWidth _ InterminalBackdoor.terminal.bwWidth; sp.sourceBottom _ 0; sp.sourceLeft _ 0; }; IF psTool.countDownTime > 0 THEN { FOR i: CARDINAL IN [1..25] DO Process.Pause[psTool.countDownTime/25]; IF NOT psTool.countDownPieViewer.destroyed THEN PieViewers.Set[psTool.countDownPieViewer, 100.0-4*i]; ENDLOOP; }; SELECT TRUE FROM psTool.outputStyleRope.Equal["AIS/Press file"] => { fileName: ROPE; fileName _ AISPressScreen[ pressFileName: NewAISPressName[], screenParms: sp, pageParms: pp ! MagnificationFactorTooLarge => GOTO ReportError]; AppendLogMessage[psTool, Rope.Concat[fileName, " written."]]; }; psTool.outputStyleRope.Equal["Interpress file"] => { fileName: ROPE; fileName _ IPScreen[ ipFileName: NewIPName[], screenParms: sp, pageParms: pp ! MagnificationFactorTooLarge => GOTO ReportError]; AppendLogMessage[psTool, Rope.Concat[fileName, " written."]]; }; psTool.outputStyleRope.Equal["Stuff into Tioga"] => { StuffScreen[ screenParms: sp ! MagnificationFactorTooLarge => GOTO ReportError]; AppendLogMessage[psTool, "Stuffed."]; }; ENDCASE => AppendLogMessage[psTool, "Internal Error."]; IF NOT psTool.countDownPieViewer.destroyed THEN PieViewers.Set[psTool.countDownPieViewer, 100.0]; EXITS ReportError => AppendLogMessage[psTool, "Magnification factor too large for identified area"]; }; }; MagnificationFactorButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; IF mouseButton = blue THEN ViewerTools.SetContents[psTool.magnificationViewer, ""]; ViewerTools.SetSelection[psTool.magnificationViewer]; }; AreaCornersButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; sourceHeight, sourceWidth, sourceBottom, sourceLeft: NAT _ 0; screenAreaChoice: ROPE _ ChoiceButtons.GetSelectedButton[psTool.screenAreaChoice]; SELECT TRUE FROM screenAreaChoice.Equal["LeftColumn"] => { sourceHeight _ InterminalBackdoor.terminal.bwHeight; sourceWidth _ ViewerSpecs.openLeftWidth; sourceBottom _ 0; sourceLeft _ ViewerSpecs.openLeftLeftX; }; screenAreaChoice.Equal["RightColumn"] => { sourceHeight _ InterminalBackdoor.terminal.bwHeight; sourceWidth _ ViewerSpecs.openRightWidth; sourceBottom _ 0; sourceLeft _ ViewerSpecs.openRightLeftX; }; screenAreaChoice.Equal["WholeScreen"] => { sourceHeight _ InterminalBackdoor.terminal.bwHeight; sourceWidth _ InterminalBackdoor.terminal.bwWidth; sourceBottom _ 0; sourceLeft _ 0; }; screenAreaChoice.Equal["DesiredArea"] => { sourceHeight _ sourceWidth _ sourceBottom _ sourceLeft _ 0; }; ENDCASE => { sourceHeight _ InterminalBackdoor.terminal.bwHeight; sourceWidth _ InterminalBackdoor.terminal.bwWidth; sourceBottom _ 0; sourceLeft _ 0; }; ViewerTools.SetContents[psTool.ulx, IO.PutFR["%g", IO.int[sourceLeft]]]; ViewerTools.SetContents[psTool.uly, IO.PutFR["%g", IO.int[sourceBottom+sourceHeight-1]]]; ViewerTools.SetContents[psTool.lrx, IO.PutFR["%g", IO.int[sourceLeft+sourceWidth-1]]]; ViewerTools.SetContents[psTool.lry, IO.PutFR["%g", IO.int[sourceBottom]]]; ViewerTools.SetSelection[psTool.ulx]; }; BlackBorderButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; IF mouseButton = blue THEN ViewerTools.SetContents[psTool.borderViewer, ""]; ViewerTools.SetSelection[psTool.borderViewer]; }; PageMarginButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; IF mouseButton = blue THEN ViewerTools.SetContents[psTool.pageMarginViewer, ""]; ViewerTools.SetSelection[psTool.pageMarginViewer]; }; CountDownTimerButton: Buttons.ButtonProc = { psTool: PressScreenTool _ NARROW[clientData]; IF mouseButton = blue THEN ViewerTools.SetContents[psTool.countDownTimerViewer, "0"]; ViewerTools.SetSelection[psTool.countDownTimerViewer]; }; AppendLogMessage: PROCEDURE [psTool: PressScreenTool, msg: ROPE] = { psTool.logMessage _ psTool.logMessage.Cat[msg, "\n"]; IF NOT psTool.logViewer.destroyed THEN { ViewerTools.SetContents[psTool.logViewer, psTool.logMessage]; [] _ psTool.logViewer.class.scroll[psTool.logViewer, thumb, 100]; } ELSE MessageWindow.Append[msg, TRUE]; }; ReadScreenCorners: PROCEDURE [psTool: PressScreenTool] RETURNS [ulx, uly, lrx, lry: REAL] = { ulx _ ConvertRopeToReal[ViewerTools.GetContents[psTool.ulx]]; uly _ ConvertRopeToReal[ViewerTools.GetContents[psTool.uly]]; lrx _ ConvertRopeToReal[ViewerTools.GetContents[psTool.lrx]]; lry _ ConvertRopeToReal[ViewerTools.GetContents[psTool.lry]]; }; ConvertRopeToReal: PROCEDURE [rope: ROPE] RETURNS [value: REAL] = { success: BOOLEAN _ TRUE; value _ 0.0; value _ Convert.RealFromRope[rope ! Convert.Error => {success _ FALSE; CONTINUE}]; IF NOT success THEN value _ Convert.IntFromRope[rope ! Convert.Error => CONTINUE]; }; GetName: PROC [stream: IO.STREAM] RETURNS [name: ROPE] ~ { name _ NIL; name _ IO.GetTokenRope[stream, IO.IDProc ! IO.EndOfStream => CONTINUE].token; }; PressScreenExecCommand: Commander.CommandProc = TRUSTED { stream: IO.STREAM _ IO.RIS[cmd.commandLine]; serverName: ROPE _ GetName[stream]; [] _ NewPressScreenTool[serverName]; }; sym: INT _ 0; GenSym: ENTRY PROC RETURNS [ROPE] ~ {s: INT _ sym; sym _ sym + 1; RETURN [IF s = 0 THEN "" ELSE Convert.RopeFromInt[s]]}; pressScreenViewerClass: ViewerClasses.ViewerClass ~ NEW[ViewerClasses.ViewerClassRec _ ViewerOps.FetchViewerClass[$Container]^]; containerInitProc: ViewerClasses.InitProc _ pressScreenViewerClass.init; containerDestroyProc: ViewerClasses.InitProc _ pressScreenViewerClass.destroy; pressScreenViewerClass.init _ InitPressScreenViewer; pressScreenViewerClass.destroy _ DestroyPressScreenViewer; ViewerOps.RegisterViewerClass[$PressScreen, pressScreenViewerClass]; Commander.Register[ key: "PressScreen", proc: PressScreenExecCommand, doc: "Create a tool to make AIS/Press files of portions of the bitmap display screen" ]; }. 6-Apr-82 12:01:31 Teitelman fixed PressScreenButton to clear message window first. May 4, 1982 4:39 pm Cattell: print msg saying whether half or full screen. Also, no longer need config 'cause SirPressPackage is external. June 18, 1982 1:58 pm Cattell: convert to 3.2; leave a little left margin to avoid printer truncation. November 15, 1982 12:30 pm Plass: Made client-callable interface. November 15, 1982 2:30 pm Plass: Made rightSide work, removed button interface, made half-screen resolution match what Spruce can sometimes handle. November 16, 1982 10:57 am Plass: Tracked SirPress changes. –PressScreenToolImpl.mesa Tool to make AIS/press file of display Last Edited by: Plass, April 25, 1985 11:51:04 am PST Last Edited by: Beach, May 7, 1984 4:39:28 pm PDT Spreitzer, February 4, 1986 1:48:24 pm PST Creates a PressScreen tool viewer. The only way this proc is called is to init a new $PressScreen viewer. There is no reset menu entry posted. Create the PressScreen menu OutputStyle: AIS/Press file Interpress file Stuff into Tioga Screen Area: DesiredArea WholeScreen LeftColumn RightColumn Area Corners: #### x #### y #### x #### y Magnification: FullPage HalfPage UseFactorBelow MagnificationFactor: xxxx % Page Format: Landscape Portrait BlackBorder: xxxx pixels PageMargin: xxxx inches CountDownTimer: xxxx seconds Viewer Controls: LockViewers DisplayCursor DisplayCarets Rule between buttons and log viewer Create log viewer for file completion messages Display default settings Edited on May 7, 1984 4:39:28 pm PDT, by Beach changes to: GetSelectedViewerButton to catch ERROR returned if viewer does not support $SelChars, DIRECTORY, PressScreenToolImpl, DIRECTORY, InitPressScreenViewer, SetCornersButton, PressScreenToolImpl Κ‹˜šΟc™Jš&™&Jšœ%™5Jš1™1Icode™*—J˜šΟk ˜ J˜J˜J˜J˜ J˜ J˜Jšœ˜Jšœ˜Jšœ˜J˜J˜J˜J˜J˜J˜J˜ J˜ J˜J˜Jšœ˜J˜J˜ Jšœ ˜ Jšœ˜Jšœ ˜ Jšœ ˜ Jšœ ˜ J˜—šœž ˜"JšžœŒ˜“Jšžœ˜Jšžœ ˜J˜—Jšžœžœžœ˜Iunitšœ žœ7˜GJšœžœ˜šœ žœ˜J˜—šΟnœžœžœžœ˜\J™"Jšžœžœžœ˜˜˜J˜šœ˜Jšœžœžœžœ,˜bJšœ˜Jšœ ž˜J˜—Jšœž˜ J˜——Jšœ žœ0˜?J˜J˜—šŸœ˜1J™FJ™$Jšœžœ˜2Jšœžœ˜Jšœžœ ˜JšŸœž œžœžœ˜>J˜J˜&šŸ œž œžœžœ˜H˜.Jšœ ˜ J˜ J˜Jšœ˜J˜—J˜—šŸœž œžœžœ˜Pšœ"˜"šœ?˜?Jšœžœ žœ˜/—Jšœž˜ J˜—˜JšœYžœ žœ˜oJšœž˜ J˜—J˜—š Ÿœž œžœ!žœžœ˜bšžœ˜JšœBžœ˜IJ˜Jšœ ˜ Jšœžœ˜ Jšœžœ˜ Jšœ˜Jšœ˜—J˜—Jšœ žœ˜0J˜Jšœ2˜2J˜J˜JšœB˜\J˜J˜¬J™J™J™J˜UJ˜xJ˜_J˜_J˜iJ˜J™Jšœ>™>šœ@˜@Jšœ ˜ Jšœ ˜ Jšœ˜Jšœ˜Jšœ žœ:˜KJšœ˜Jšœ˜—J™Jšœ;™;šœ?˜?Jšœ ˜ Jšœ ˜ Jšœ ˜ Jšœ˜Jš œ žœžœžœžœžœ˜dJšœ˜Jšœ˜—J™Jš œΟeœ œ œ œ™*Jšœo˜oJšœ'˜'Jšœ'˜'Jšœ&˜&Jšœ%˜%J™Jšœ/™/šœB˜BJšœ ˜ Jšœ ˜ Jšœ ˜ Jšœ˜Jš œ žœ žœ žœžœ˜MJ˜Jšœ˜—J™J™Jšœf˜fJšœ6˜6J™J™šœ;˜;Jšœ ˜ Jšœ ˜ Jšœ ˜ Jšœ˜Jšœ žœ žœžœ˜6Jšœ˜Jšœ˜—J™Jšœ™Jšœ{˜{Jšœ3˜3J™J™Jšœd˜dJšœ7˜7J™Jšœ™Jšœh˜hJšœ>˜>Jšœ^˜^J™J™8˜Jšœfžœ žœ˜|Jšœž˜ J˜—šœH˜HJšœ ˜ Jšœ˜Jšœ˜Jšœ˜—šœJ˜JJšœ ˜ Jšœ ˜ Jšœ˜Jšœ˜—šœJ˜JJšœ ˜ Jšœ ˜ Jšœ˜Jšœ˜—J™J™#J˜\J™J™.˜1Jšœ4žœ žœ˜HJ˜—J˜/J˜/J˜J˜ΠJ˜ͺJšœ?˜?J˜J™JšœT˜TJšœP˜PJšœP˜PJšœ4žœ žœ˜TJšœ$žœ žœ ˜?Jšœ$žœ žœ ˜AJšœ$žœ žœ ˜BJšœ$žœ žœ ˜?JšœI˜IJšœ-žœ žœ ˜HJšœ1žœ žœ˜PJšœ5žœ žœ ˜PJ˜1J˜J˜!J˜J˜—šŸœ˜7Jšœžœ.˜NJ˜Jšœžœ˜Jšžœžœžœ˜>J˜—šŸœ˜/Jšœžœ ˜-J˜GJšœ žœžœ˜š œ žœžœžœžœžœž˜Ošžœžœ5˜@Jšœ žœžœ˜$——šžœžœ˜ šžœžœžœ˜ Jšœ9˜9Jšžœ˜Jšœ˜—šžœ˜šžœžœžœž˜8Jšœ!˜!J˜'Jšž˜—Jšœ˜—J˜—šžœžœ˜J˜2šžœž˜JšœO˜O—šžœ˜Jšœ$žœ žœ˜OJšœ$žœ žœ,˜aJšœ$žœ žœ,˜aJšœ$žœ žœ˜OJšœW˜WJšœ˜J˜—Jšœ˜—J˜J˜—šŸœ˜(Jšœžœ ˜-Jšœ˜J˜J˜—J˜&šŸœž œ˜8Jšœžœ˜J•StartOfExpansion4[vt: Terminal.Virtual, pixelUnits: BOOL _ FALSE]šœ`žœ˜fJšœ(˜(Jšœ1˜1Jšœ&˜&J˜.Jšœ&˜&J˜J˜—šΟaœ˜(Jšœžœ ˜-Jšœ ž˜JšœEžœ ˜UJšœ$žœ žœ ˜?Jšœ$žœ žœ ˜AJšœ$žœ žœ ˜AJšœ$žœ žœ ˜?JšœW˜WJšœ˜šž˜Jšœ žœ˜—J˜J˜—šŸœ˜'Jšœžœ ˜-J˜J˜—šŸ œž œ˜2Jšžœžœžœ˜ JšœS˜SJšœQ˜QJšœW˜WJšœX˜XJšœj˜jJšœN˜NJšœI˜IJšœU˜UJšœX˜XJšœ.žœ žœZ˜—Jšœ;˜;Jšœ?˜?Jšœ?˜?Jšœžœ˜J˜—šŸœ˜ šžœ ž˜J˜IJ˜LJšžœžœ˜—Jšœ˜—šŸ œ˜"Jšœžœ ˜-J˜Jšœ ˜ Jšœ˜—šŸœž œ˜-šžœžœ˜šœ˜Jšœ ˜ Jšœ ˜ Jšœ$˜$Jšœ#˜#J˜—šœ˜Jšœ*˜*šœ žœžœž˜JšœE˜EJšœ7˜7Jšœ7˜7Jšžœ ˜—Jšœ$˜$Jšœ%˜%šœ žœžœž˜Jšœ(žœ˜-Jšžœž˜—J˜—šžœžœž˜šœ.˜.Jšœ7˜7Jšœ+˜+Jšœ˜Jšœ*˜*Jšœ˜—šœ/˜/Jšœ7˜7Jšœ,˜,Jšœ˜Jšœ+˜+Jšœ˜—šœ/˜/Jšœ7˜7Jšœ5˜5Jšœ˜Jšœ˜Jšœ˜—šœ/˜/Jšœžœ˜Jšœ1˜1Jšœ*˜*Jšœ)˜)Jšœ ˜ Jšœ˜Jšœ˜—šžœ˜ Jšœ7˜7Jšœ5˜5Jšœ˜Jšœ˜Jšœ˜——šžœžœ˜"šžœžœžœ ž˜Jšœ'˜'šžœžœ%ž˜/Jšœ5˜5—Jšžœ˜—Jšœ˜—šžœžœž˜šœ3˜3Jšœ žœ˜šœ˜Jšœ!˜!Jšœ˜J˜ Jšœ!žœ˜3—Jšœ=˜=J˜—šœ4˜4Jšœ žœ˜šœ˜Jšœ˜Jšœ˜J˜ Jšœ!žœ˜3—Jšœ=˜=J˜—šœ5˜5šœ ˜ Jšœ˜Jšœ!žœ˜3—Jšœ%˜%J˜—Jšžœ0˜7—šžœžœ%ž˜/Jšœ1˜1—šž˜šœ˜JšœO˜O——Jšœ˜—J˜J˜—šŸœ˜1Jšœžœ ˜-Jšžœžœ9˜SJšœ5˜5J˜J˜—šŸœ˜)Jšœžœ ˜-Jšœ5žœ˜=Jšœžœ<˜Ršžœžœž˜šœ)˜)Jšœ4˜4Jšœ(˜(Jšœ˜Jšœ'˜'Jšœ˜—šœ*˜*Jšœ4˜4Jšœ)˜)Jšœ˜Jšœ(˜(Jšœ˜—šœ*˜*Jšœ4˜4Jšœ2˜2Jšœ˜Jšœ˜Jšœ˜—šœ*˜*Jšœ;˜;Jšœ˜—šžœ˜ Jšœ4˜4Jšœ2˜2Jšœ˜Jšœ˜Jšœ˜——Jšœ$žœ žœ˜HJšœ$žœ žœ$˜YJšœ$žœ žœ!˜VJšœ$žœ žœ˜JJšœ%˜%J˜J˜—šŸœ˜)Jšœžœ ˜-Jšžœžœ2˜LJšœ.˜.J˜J˜—šŸœ˜(Jšœžœ ˜-Jšžœžœ6˜PJšœ2˜2J˜J˜—šŸœ˜,Jšœžœ ˜-Jšžœžœ;˜UJšœ6˜6J˜J˜—šŸœž œ žœ˜D˜5šžœžœžœ˜(Jšœ=˜=JšœA˜AJšœ˜—Jšžœžœ˜%—J˜J˜—šŸœž œžœžœ˜]J˜=J˜=J˜=J˜=J˜J˜—š Ÿœž œžœžœ žœ˜CJšœ žœžœ˜Jšœ ˜ Jšœ@žœžœ˜RJšžœžœ žœ5žœ˜RJ˜J˜—š Ÿœžœ žœžœžœžœ˜:Jšœžœ˜ Jš œžœžœ žœžœ˜MJ˜J˜—šŸœžœ˜9Jš œžœžœžœžœ˜,Jšœ žœ˜#Jšœ$˜$J˜J˜—Lšœžœ˜ LšŸœžœžœžœžœžœžœžœžœžœ˜y˜3JšžœI˜L—JšœH˜HJšœN˜NJ˜Jšœ4˜4Jšœ:˜:J˜J˜DJ˜šœ˜Jšœ˜Jšœ˜JšœU˜UJ˜—J˜šœ˜J˜RJ˜ŠJ˜J˜hJ˜AJ˜“J˜;—™.Jšœ Οrœ žœ.’i™Ι—J™J™J™J™J™—…—N~dŸ