DIRECTORY
Icons USING [IconFlavor],
Rope USING [ROPE],
ViewerClasses USING [PaintProc, SaveProc, Viewer],
Imager USING [Context],
SilKernel USING [SilData, SilDisplayData]
;
SilDisplay:
CEDAR
DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
SilDisplayData: TYPE = SilKernel.SilDisplayData;
The first four procs are called by SilKernel to initialize things, start a new Sil display, find out the state of a display, or force the blinking of the Sil Carets.
InitSil:
PROC[];
This procedure will initialize all of Sil's internal structure related to the display by creating the correct font references.
InitSilDisplayInstance:
PROC [data: SilKernel.SilData, name:
ROPE ←
NIL, instance:
NAT]
RETURNS [viewer: ViewerClasses.Viewer];
Get the display on the screen and initialize all pertinent structures.
NeedRebuild:
PROC[displayData: SilDisplayData]
RETURNS [rebuild:
BOOL];
TRUE if the display should be rebuilt.
CancelRebuild:
PROC[displayData: SilDisplayData];
May be called to cancel a rebuild IF the viewer has gone iconic.
CaretBlink:
PROC[];
Make sure that all the appropriate Sil Instances know to blink their carets.
GetIcon:
PROC [dirtyIcon:
BOOL ←
FALSE]
RETURNS [Icons.IconFlavor];
Returns either of the two Sil icons, the clean or the dirty, depending on the BOOL
The next two procs are registered with Viewers.
SilSaveProc: ViewerClasses.SaveProc;
[self: Viewer, force: BOOL ← FALSE]
Save the contents of the viewer.
SilPaintProc: ViewerClasses.PaintProc;
[self: Viewer, context: Graphics.Context, whatChanged: REF, clear: BOOL.
SilUIPaint:
PROC [data: SilKernel.SilData, viewer: ViewerClasses.Viewer, ctx: Imager.Context];