DIRECTORY Rope USING [ROPE], ImagerFont USING [Font], Imager USING [Transformation], SilFile, SilUserInput, ViewRec USING [RecordViewer] ; SilDisplayInternal: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; SilDisplayDataRec: TYPE = MONITORED RECORD [ needRebuild: BOOL _ FALSE, inRebuild: BOOL _ FALSE, selectedOnly: BOOL _ FALSE, rebuildMinX, rebuildMinY: INTEGER, rebuildMaxX, rebuildMaxY: INTEGER, rebuildStage: RebuildStage, currentFgndObj: SilFile.SilObject _ NIL, --current foreground object currentBkgndObj: SilFile.SilObject _ NIL, --current background object ticSpacing: INTEGER _ defaultTicSpacing, ticsOn: BOOL _ FALSE, framesOn: BOOL _ FALSE, xOffset, yOffset: REAL _ 0.0, magnificationOn: BOOL _ FALSE, trans: Imager.Transformation, lastBoxLeftToRight: BOOL _ FALSE, lastBoxTopToBottom: BOOL _ FALSE, lastBoxPointX: INTEGER, lastBoxPointY: INTEGER, mode: InputCharMode _ WaitingToInputRope, collectingObject: SilFile.SilObjectRec, collectingText: REF TEXT, collectingFileName: REF TEXT, clipOutputFile: BOOL _ TRUE, -- after collecting an output file name, clip to alto size? largeFormat: BOOL _ FALSE, -- us standard AltoSil file format or new large file format? relativeInput: BOOL _ FALSE, -- put objects at (0,0) origin or at (MarkX, MarkY) origin oldText: ROPE, macroDefName: CHAR, pdDev: DeviceType _ raven300, currentFontRef: ImagerFont.Font, currentGridSpacing: NAT _ SilUserInput.defaultGridSpacing, currentBoxWidth: NAT _ defaultBoxWidth, currentMagnification: NAT _ defaultMagnification, currentFont: SilFile.UserFonts _ defaultFont, currentBoldState: BOOL _ defaultBoldState, currentItalicState: BOOL _ defaultItalicState, currentOneLevel: BOOL _ FALSE, yLock: BOOL _ defaultYLock, currentColor: SilFile.Color _ defaultColor, currentNumObjectsSelected: NAT _ 0, yInc: INTEGER _ defaultYInc, viewRec: ViewRec.RecordViewer, commandLine: REF ANY, edited: BOOL _ FALSE --TRUE if display edited since file read in ]; CommandChange: TYPE = {Grid, LineWidth, Mag, Font, Bold, Italic, Color, MacExpand, Ylock, Selections, Pos, PosX, PosY}; defaultTicSpacing: NAT = 16; defaultGrid: NAT = 4; defaultBoxWidth: NAT = 1; defaultMagnification: NAT = 1; defaultColor: NAT = 0; defaultFont: NAT = 0; defaultItalicState: BOOL = FALSE; defaultBoldState: BOOL = FALSE; defaultOneLevel: BOOL = FALSE; defaultYLock: BOOL = FALSE; defaultYInc: NAT = 0; AltoScreenWidth: INTEGER = 606; AltoScreenLength: INTEGER = 808; maxMagnification: INTEGER = 9; RebuildStage: TYPE = {Background, SelectedBackground, Foreground, SelectedForeground}; DeviceType: TYPE = {nil, raven300, raven384, plateMaker, reticleMaker, puffin, versatec, colorVersatec, spare1, spare2, spare3}; --copy of ImagerPD.DeviceType, but we don't want "clients" to use ImagerPD interface InputCharMode: TYPE = { WaitingToInputRope, InputingRope, EditingExistingRope, InputingInputFileName, EditingExistingInputFileName, InputingOutputFileName, EditingExistingOutputFileName, InputingHardFileName, EditingExistingHardFileName, -- HardFile means HardcopyFile, not DifficultFile WaitingForKillConfirmation, WaitingForMacroDefConfirmation, WaitingForMacroDeleteConfirmation}; END. VSilDisplayInternal.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Tracy Larrabee: March 29, 1984 1:10:35 pm PST Last Edited by: Ken Pier, August 16, 1985 4:59:28 pm PDT A module allowing for the shared use of an opaque type definition by all of the display modules: SilDisplay, SilDisplayCursors, and SilDisplayUtils. This is the concrete representation of an opaque type defined in SilKernel. The SilDisplayDataRec contains state that the Display modules needs to operate. Information about the state of the Rebuilder Information about the tic marks: Information about the transform from Sil coordinates to Client coordinates: Client Coords = (Sil Coords + offset) * scale xScale = gridMagnification, yScale = - gridMagnification, Was the last box we drew one that will interact with a new box? What happens to input Characters? If we are confirming a macro def, what is its name? If we are making a PD file, what device is it for? Details about this Sil reported in the command line Defaults for various Sil values - the current values of which are used in the record, above. Screen parameters which are used to determine appropriate magnification or clipping on output. At all times Sil will be in one of the below modes. Most of the time it will be "WaitingToInputRope". The current state is saved in the monitored record, above. Ê ˜code™Kšœ Ïmœ1™<—K™-™8K™—K™”K™šÏk ˜ Kšœžœžœ˜Kšœ žœ˜Kšœžœ˜Kšœ ˜ Kšœ ˜ Kšœžœ˜Kšœ˜K˜—šÏbœžœž œžœ˜.K˜Kšžœžœžœ˜K˜Kšœœ™œK™šœžœž œžœ˜,K™-Kšœ žœžœ˜Kšœ žœžœ˜Kšœžœžœ˜Kšœžœ˜"Kšœžœ˜"Kšœ˜Kšœ$žœÏc˜DKšœ%žœ ˜EK™ Kšœ žœ˜(Kšœžœžœ˜Kšœ žœžœ˜™KK™-Kšœ™Kšœ™—Kšœžœ˜Kšœžœžœ˜K˜K™?Kšœžœžœ˜!Kšœžœžœ˜!Kšœžœ˜Kšœžœ˜K™!Kšœ)˜)Kšœ'˜'Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ ;˜XKšœ žœžœ <˜WKšœžœžœ :˜WKšœ žœ˜K™3Kšœžœ˜K™2K˜Kšœ ˜ K™3Kšœžœ#˜:Kšœžœ˜'Kšœžœ˜1Kšœ-˜-Kšœžœ˜*Kšœžœ˜.Kšœžœžœ˜Kšœžœ˜Kšœ+˜+Kšœžœ˜#Kšœžœ˜Kšœ˜Kšœ žœžœ˜Kšœžœžœ +˜AK˜—K˜Kšœžœd˜wK˜K™\Kšœžœ˜Kšœ žœ˜Kšœžœ˜Kšœžœ˜Kšœžœ˜Kšœ žœ˜Kšœžœžœ˜!Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜Kšœ žœ˜K˜K™^Kšœžœ˜Kšœžœ˜ Kšœžœ˜KšœžœD˜VKšœ žœq T˜ÕK˜Kšœ¢™¢KšœžœÛ 2œ_˜ÿK˜—Kšžœ˜—…— V·