BEGIN
context.SetCP[x: xc, y: yc];
context.SetColor[Graphics.black];
GraphicsOps.DrawBitmap
[self: context,
bitmap: table.cursor[ix].bitmap,
x: 0, y: 0, w: 16, h: 16, xorigin: 8, yorigin: 8];
IF table.current = ix AND table.showCurrent THEN
{Graphics.SetCP[context, xc-11, yc-10];
Graphics.DrawTo[context, xc-11, yc+11];
Graphics.DrawTo[context, xc+10, yc+11];
Graphics.DrawTo[context, xc+10, yc-10];
Graphics.DrawTo[context, xc-11, yc-10];
table.framed ← ix}
ELSE IF table.framed = ix THEN
{table.framed ← -1};
IF table.candidate = ix THEN
{[] ← Graphics.SetPaintMode[context, invert];
Graphics.DrawBox [context, [xmin: xc-9, ymin: yc-9, xmax: xc+9, ymax: yc+9]];
[] ← Graphics.SetPaintMode[context, opaque];
table.reversed ← ix}
ELSE IF table.reversed = ix THEN
{table.reversed ← -1};
IF table.cursor[ix].grayed THEN
{[] ← Graphics.SetPaintMode[context, transparent];
GraphicsOps.DrawTexturedBox
[context, [xmin: xc-9, ymin: yc-9, xmax: xc+9, ymax: yc+9],
[104210B, 000000B, 021042B, 000000B, 104210B, 000000B, 021042B, 000000B,
104210B, 000000B, 021042B, 000000B, 104210B, 000000B, 021042B, 000000B]];
[] ← Graphics.SetPaintMode[context, opaque]};