PressScreen.mesa
Interface to make AIS/press file of display
Last edited by Michael Plass on April 25, 1985 11:11:01 am PST
Last Edited by: Beach, May 7, 1984 1:34:16 pm PDT
Spreitzer, February 4, 1986 1:45:58 pm PST
DIRECTORY
ChoiceButtons,
PieViewers,
Process,
Rope,
ViewerClasses;
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.
ScreenParameters:
TYPE =
RECORD [
sourceHeight: NAT ← NAT.LAST,
sourceWidth: NAT ← NAT.LAST,
sourceBottom: NAT ← 0,
sourceLeft: NAT ← 0,
borderWidth: REAL ← 2.0,
lockViewers: BOOLEAN ← TRUE,
displayCursor: BOOLEAN ← FALSE,
displayCarets: BOOLEAN ← FALSE
];
PageParameters:
TYPE =
RECORD [
magnification: REAL ← 0.5,
scaleToFit: MagnificationType ← useMagnification,
leftMarginInches, rightMarginInches: REAL ← 0.75,
landscape: BOOLEAN ← FALSE
];
MagnificationType:
TYPE = {fullPage, halfPage, useMagnification};
AISPressScreen:
PROCEDURE [
pressFileName: ROPE,
screenParms: ScreenParameters ← [],
pageParms: PageParameters ← []
] 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).
IPScreen:
PROCEDURE [ipFileName:
ROPE, screenParms: ScreenParameters ← [], pageParms: PageParameters ← []]
RETURNS [fileName:
ROPE];
Converts the specified region of the bit mapped screen into an Interpress Master file.
Such files can be used by the Imager or printed by the TSetter.
May raise MagnificationFactorTooLarge.
StuffScreen:
PROCEDURE [screenParms: ScreenParameters ← []];
Stuffs the specified region of the bit mapped screen after the current Tioga selection.
Such files can be used by the Imager or printed by the TSetter.
May raise MagnificationFactorTooLarge.
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.
NewIPName:
PROCEDURE
RETURNS [ipFileName:
ROPE];
Returns a file name like "Screen1.IP", "Screen2.IP", etc.
PressScreenTool: TYPE = REF PressScreenToolRec;
PressScreenToolRec:
TYPE =
RECORD[
stateSaved: BOOLEAN ← FALSE,
destroyed: BOOLEAN ← FALSE,
tool: ViewerClasses.Viewer,
outputStyleChoice: ChoiceButtons.EnumTypeRef,
outputStyleRope: ROPE,
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