Removed May 18, 1984 10:23:47 pm PDT PDT from JunoCursorMenuImpl.mesa:
From RemoveCursor:
IF ix=-1 THEN -- DEBUG
{ViewerOps.NotifyViewer -- DEBUG
[menu.parent, LIST[$Debug, $NotFound, name]]; -- DEBUG
RETURN}; -- DEBUG
From PickUpCursor:
IF ix=-1 THEN -- DEBUG
{ViewerOps.NotifyViewer -- DEBUG
[menu.parent, LIST[$Debug, $NotFound, name]]; -- DEBUG
RETURN}; -- DEBUG
From HighlightCursor:
IF champ=-1 THEN -- DEBUG
{ViewerOps.NotifyViewer -- DEBUG
[menu.parent, LIST[$Debug, $NotFound, name]]; -- DEBUG
RETURN}; -- DEBUG
From MousedCursor:
IF table.cursor[champ].type = blank THEN -- no luck
BEGIN
Try exhaustive search
champ ← -1;
zcol, zrow: INTEGER;
xc, yc: INTEGER; -- center of current candidate cursor
ix: INTEGER ← 0;
champDist: INTEGER ← 2*cursorDelta+1; -- distance between champ and click
dist: INTEGER;
yc ← extraMargin+cursorMargin+8 + (table.rows-1)*cursorDelta;
FOR zrow IN [1..table.rows] DO
xc ← extraMargin+cursorMargin+8;
FOR zcol IN [1..table.cols] DO
IF table.cursor[ix].type # blank THEN
{dist ← MAX [ABS[y - yc], ABS[x - xc]];
IF dist < champDist THEN
{champ ← ix; champDist ← dist; col ← zcol; row ← zrow}};
ix ← ix+1;
xc ← xc + cursorDelta
ENDLOOP;
yc ← yc - cursorDelta
ENDLOOP
END;
From ProcessMenuClicks:
ViewerOps.NotifyViewer [self.parent, CONS [$Debug, input]]; -- DEBUG
IF champ = -1 THEN -- DEBUG
{ViewerOps.NotifyViewer -- DEBUG
[self.parent, LIST[$Debug, $Missed]]; -- DEBUG
RETURN}; -- DEBUG