PressScreen.mesa
Interface to make AIS/press file of display
Last edited by Michael Plass on November 15, 1982 1:50 pm
Last Edited by: Beach, May 7, 1984 1:34:16 pm PDT
DIRECTORY
ChoiceButtons,
PieViewers,
Process,
Rope,
ViewerClasses,
ViewerSpecs;
PressScreen: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
Side: TYPE = {leftSide, bothSides, rightSide};
PressScreen: PROCEDURE [pressFileName: ROPE, which: Side];
Old interface to convert part or all of the bit mapped screen into a press file.
MagnificationType: TYPE = {fullPage, halfPage, useMagnification};
AISPressScreen: PROCEDURE [
pressFileName: ROPE,
sourceHeight: NAT ← ViewerSpecs.screenH,
sourceWidth: NAT ← ViewerSpecs.screenW,
sourceBottom: NAT ← 0,
sourceLeft: NAT ← 0,
magnification: REAL ← 0.5,
scaleToFit: MagnificationType ← useMagnification,
leftMarginInches, rightMarginInches: REAL ← 0.75,
landscape: BOOLEANFALSE,
borderWidth: REAL ← 2.0,
lockViewers: BOOLEANTRUE,
displayCursor: BOOLEANFALSE,
displayCarets: BOOLEANFALSE] RETURNS[fileName: ROPE];
Converts the specified region of the bit mapped screen into a combination AIS and Press file.
Such files can be used by CedarGraphics or printed by the TSetter.
AISPressScreen can raise two signals: MagnificationFactorTooLarge when the specified rectangle will not fit on an 8.5 by 11 inch page with the supplied margins and magnifications; and AISPageAlignmentHackFailed for an internal error expected when the size of SirPress record definitions change (low probability).
MagnificationFactorTooLarge: SIGNAL;
The specified rectangle will not fit on an 8.5 by 11 inch page with the supplied margins and magnifications
AISPageAlignmentHackFailed: SIGNAL;
An internal error expected when the size of SirPress record definitions change (low probability)
NewPressName: PROCEDURE RETURNS [pressFileName: ROPE];
Returns a file name like "Screen1.press", "Screen2.press", etc.
NewAISPressName: PROCEDURE RETURNS [pressFileName: ROPE];
Returns a file name like "Screen1.ais", "Screen2.ais", etc.
PressScreenTool: TYPE = REF PressScreenToolRec;
PressScreenToolRec: TYPE = RECORD[
stateSaved: BOOLEANFALSE,
destroyed: BOOLEANFALSE,
screenAreaChoice: ChoiceButtons.EnumTypeRef,
screenAreaRope: ROPE,
magnificationChoice: ChoiceButtons.EnumTypeRef,
magnificationRope: ROPE,
magnificationViewer: ViewerClasses.Viewer, -- magnification factor
magnificationFactor: REAL,
ulx, uly, lrx, lry: ViewerClasses.Viewer, -- upper left, lower right coordinates
ulX, ulY, lrX, lrY: REAL,
formatViewer: ChoiceButtons.EnumTypeRef,
formatRope: ROPE,
borderViewer: ViewerClasses.Viewer, -- border width
borderWidth: REAL,
pageMarginViewer: ViewerClasses.Viewer,
pageMargin: REAL,
countDownTimerViewer: ViewerClasses.Viewer,
countDownTime: Process.Ticks,
countDownPieViewer: PieViewers.PieViewer,
lockViewersTriState: ChoiceButtons.ThreeStateRef,
lockViewers: BOOLEAN,
displayCursorTriState: ChoiceButtons.ThreeStateRef,
displayCursor: BOOLEAN,
displayCaretsTriState: ChoiceButtons.ThreeStateRef,
displayCarets: BOOLEAN,
logViewer: ViewerClasses.Viewer,
logMessage: ROPE
];
NewPressScreenTool: PROCEDURE [serverName: ROPE] RETURNS[psTool: PressScreenTool];
Creates a PressScreen tool viewer.
END.
Edited on May 7, 1984 1:34:16 pm PDT, by Beach
changes to: move PressScreenToolRec into the interface eliminating an opaque TYPE, DIRECTORY, PressScreenTool, PressScreenToolRec, END