SilDisplayCursors:
CEDAR
DEFINITIONS =
BEGIN
SilData:
TYPE ~ SilKernel.SilData;
SilCursorsInit:
PROC [];
Initialize the behavior of the Sil Carets.
SilCursorsBlink:
PROC [];
Make sure all of the Sil Carets blink.
SilCaretSize:
PROC [newMarkWidth, newMarkLength, newOriginWidth, newOriginLength:
NAT];
User can set the size of mark and origin
SilCaretPaint:
PROC [data: SilData, ctx: Imager.Context];
For this window, blink the carets which should be blinking.
AquireAndDisableTheMark:
PROC [data: SilData, ctx: Imager.Context ←
NIL];
Turn off the mark, wherever it is, and make sure the system knows the correct window for the mark to be in.
AquireAndDisableTheOrigin:
PROC [data: SilData, ctx: Imager.Context ←
NIL];
Turn off the origin, wherever it is, and make sure the system knows the correct window for the origin to be in.
CheckSelectionWindow:
PROC [data: SilData];
Make sure that if data is not the current selection window it is safe to change selection windows.
MoveOriginToMark:
PROC [data: SilData, ctx: Imager.Context ←
NIL];
Move the origin To the mark
InterchangeMarkAndOrigin:
PROC [data: SilData, ctx: Imager.Context ←
NIL];
Move the mark To the origin and the origin to the mark
DeleteAndEraseSelection:
PROC[data: SilData, ctx: Imager.Context ←
NIL, cache:
BOOL ←
FALSE];
Delete the selection. IF cache, put deleted objects on delete queue.
DeselectAndRedraw:
PUBLIC PROC [];
Deselect and Redraw the elements which are selected.
InitiateNewSelection:
PUBLIC PROC [data: SilData];
Set the current Selection Window.
MouseAndMarkInSameWindow:
PROC [data: SilData]
RETURNS [
BOOL];
True if data is same window as window where mark is.
MouseAndOriginInSameWindow:
PROC [data: SilData]
RETURNS [
BOOL];
True if data is same window as window where origin is.
MouseAndSelectionInSameWindow:
PROC [data: SilData]
RETURNS [
BOOL];
True if data is same window as window where selection is.
MarkAndOriginInSameWindow:
PROC []
RETURNS [
BOOL];
True if mark is same window as window where origin is.
MarkAndSelectionInSameWindow:
PROC []
RETURNS [
BOOL];
True if mark is same window as window where selection is.
OriginAndSelectionInSameWindow:
PROC []
RETURNS [
BOOL];
True if origin is same window as window where selection is.
DisableRopeInput:
PROC [data: SilData, ctx: Imager.Context ←
NIL];
Make sure that any textual input with respect to the current window is stopped
SetMarkX:
PROC [mX:
INTEGER];
Set the Mark's x position.
SetMarkY:
PROC [mY:
INTEGER];
Set the Mark's y position.
SetOriginX:
PROC [oX:
INTEGER];
Set the Origin's x position.
SetOriginY:
PROC [oY:
INTEGER];
Set the Origin's y position.
GetMarkX:
PROC []
RETURNS [mX:
INTEGER];
Get the Mark's x position.
GetMarkY:
PROC []
RETURNS [mY:
INTEGER];
Get the Mark's y position.
GetOriginX:
PROC []
RETURNS [oX:
INTEGER];
Get the Origin's x position.
GetOriginY:
PROC []
RETURNS [oY:
INTEGER];
Get the Origin's y position.
GetBoundingBoxOfLast2Marks:
PROC [data: SilData]
RETURNS [legalBox:
BOOL ←
TRUE, xMin, yMin, xMax, yMax:
INTEGER ← 0];
Return the bounding box for the last 2 marks in this window.
BitmapToCursor:
PROC [x, y:
NAT, viewer: ViewerClasses.Viewer];
Transfer the 16x16 bitmap with x,y as mark or origin to the terminal cursor bitmap