SilDisplayInternal:
CEDAR
DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
This is the concrete representation of an opaque type defined in SilKernel. The SilDisplayDataRec contains state that the Display modules needs to operate.
SilDisplayDataRec:
TYPE =
MONITORED
RECORD [
Information about the state of the Rebuilder
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
Information about the tic marks:
ticSpacing: INTEGER ← defaultTicSpacing,
ticsOn: BOOL ← FALSE,
framesOn: BOOL ← FALSE,
Information about the transform from Sil coordinates to Client coordinates:
Client Coords = (Sil Coords + offset) * scale
xScale = gridMagnification,
yScale = - gridMagnification,
xOffset, yOffset: REAL ← 0.0,
magnificationOn: BOOL ← FALSE,
trans: Imager.Transformation,
Was the last box we drew one that will interact with a new box?
lastBoxLeftToRight: BOOL ← FALSE,
lastBoxTopToBottom: BOOL ← FALSE,
lastBoxPointX: INTEGER,
lastBoxPointY: INTEGER,
What happens to input Characters?
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,
If we are confirming a macro def, what is its name?
macroDefName: CHAR,
If we are making a PD file, what device is it for?
pdDev: DeviceType ← raven300,
currentFontRef: ImagerFont.Font,
Details about this Sil reported in the command line
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};
Defaults for various Sil values - the current values of which are used in the record, above.
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;
Screen parameters which are used to determine appropriate magnification or clipping on output.
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
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.
InputCharMode: TYPE = {
WaitingToInputRope, InputingRope, EditingExistingRope,
InputingInputFileName, EditingExistingInputFileName,
InputingOutputFileName, EditingExistingOutputFileName,
InputingHardFileName, EditingExistingHardFileName, -- HardFile means HardcopyFile, not DifficultFile
WaitingForKillConfirmation, WaitingForMacroDefConfirmation,
WaitingForMacroDeleteConfirmation};