BEGIN
OPEN Curs;
cm: ViewerClasses.Viewer ← CreateCursorMenu
[parent: imageViewer, x: -1, y: -2, rows: 15, cols: 1];
cmBox ← [xmin: cm.wx, ymin: cm.wy, xmax: cm.wx+cm.ww, ymax: cm.wy+cm.wh];
AddCursor [name: $Pencil, menu: cm,
help: "Draws straight line or Bezier arc. Click two or four points, then ESC.",
bits: [004440B, 004440B, 004440B, 004440B, 004440B, 004440B, 004440B, 004440B,
004040B, 004040B, 002100B, 002100B, 001600B, 001600B, 000400B, 000400B],
row: 1, col: 1, hotX: -8, hotY: -16];
PickUpCursor [menu: cm, name: $Pencil];
AddCursor [name: $Typewriter, menu: cm,
help: "Inserts a text label. Click reference point, type text, end with ESC.",
bits: [000000B, 000000B, 000000B, 000000B, 017760B, 010020B, 010020B, 037770B,
045244B, 040004B, 100002B, 132532B, 100002B, 117762B, 040004B, 037770B],
row: 2, col: 1, hotX: -5, hotY: -4];
AddCursor [name: $CallProc, menu: cm,
help: "Calls a Juno procedure. Select procedure name, click arguments, end with ESC",
bits: [040001B, 020002B, 010004B, 004010B, 002020B, 001040B, 000500B, 000200B,
000500B, 001040B, 002020B, 004010B, 010004B, 020002B, 040001B, 000000B],
row: 3, col: 1, hotX: -8, hotY: -8];
AddCursor [name: $HorTee, menu: cm,
help: "Horizontal alignment constraint. Click two points, end with ESC",
bits: [000000B, 000000B, 020000B, 060000B, 060000B, 060000B, 160000B, 177777B,
177777B, 160000B, 060000B, 060000B, 060000B, 020000B, 000000B, 000000B],
row: 5, col: 1, hotX: -9, hotY: -6];
AddCursor [name: $VerTee, menu: cm,
help: "Vertical alignment constraint. Click two points, end with ESC",
bits: [001700B, 017770B, 037774B, 000600B, 000600B, 000600B, 000600B, 000600B,
000600B, 000600B, 000600B, 000600B, 000600B, 000600B, 000600B, 000600B],
row: 6, col: 1, hotX: -10, hotY: -9];
AddCursor [name: $Compass, menu: cm,
help: "Congruence constraint. Click two pairs of points, end with ESC",
bits: [004000B, 004000B, 006000B, 016000B, 013000B, 011000B, 031540B, 020700B,
023600B, 076200B, 040300B, 040100B, 140140B, 100040B, 100040B, 100000B],
row: 7, col: 1, hotX: 0, hotY: -16];
AddCursor [name: $Parallels, menu: cm,
help: "Parallelism constraint. Click two pairs of points, end with ESC",
bits: [001040B, 001040B, 001040B, 001040B, 001040B, 001040B, 001040B, 001040B,
001040B, 001040B, 001040B, 001040B, 001040B, 001040B, 001040B, 001040B],
row: 8, col: 1, hotX: -7, hotY: -8];
AddCursor [name: $RightAngle, menu: cm,
help: "Perpendicularity constraint. Click two pairs of points, end with ESC",
bits: [040000B, 060000B, 060000B, 050000B, 044000B, 044000B, 042000B, 041000B,
041000B, 044400B, 046200B, 046200B, 045100B, 040040B, 040040B, 077760B],
row: 9, col: 1, hotX: -7, hotY: -8];
AddCursor [name: $Snowman, menu: cm,
help: "Yellow-click points to be to frozen or unfrozen.",
bits: [001700B, 001700B, 037774B, 004020B, 011110B, 010010B, 004020B, 003140B,
014030B, 020004B, 040002B, 040002B, 040002B, 020004B, 014030B, 003740B],
row: 11, col: 1, hotX: -9, hotY: -12];
AddCursor [name: $MoveArrow, menu: cm,
help: "Moves things. Click from-to pairs, end with ESC or TAB. Use baloon selection to get affine map.",
bits: [000000B, 000000B, 000000B, 000400B, 001600B, 003700B, 007740B, 017760B,
037770B, 003700B, 003700B, 003700B, 003700B, 003700B, 003700B, 003700B],
row: 12, col: 1, hotX: -8, hotY: -3];
AddCursor [name: $CopyArrow, menu: cm,
help: "Copies things. Click from/to pairs, end with ESC or TAB. Use baloon selection to get affine map.",
bits: [000400B, 001200B, 002100B, 004440B, 011620B, 033730B, 007740B, 017760B,
037770B, 003700B, 003700B, 003700B, 003700B, 003700B, 003700B, 003700B],
row: 13, col: 1, hotX: -8, hotY: 0];
AddCursor [name: $Eraser, menu: cm,
help: "Erases baloon-selected things.",
bits: [004440B, 004440B, 004440B, 004440B, 004440B, 004440B, 004440B, 007740B,
004040B, 004040B, 004040B, 004040B, 004040B, 004040B, 004040B, 003700B],
row: 14, col: 1, hotX: -8, hotY: -16];
AddCursor [name: $MakeProc, menu: cm,
help: "Makes a symbolic procedure. Baloon-select body, click one or more formal parameters, end with ESC.",
bits: [040001B, 020002B, 010004B, 004010B, 002020B, 001040B, 000500B, 000200B,
000200B, 000200B, 000200B, 000200B, 000200B, 000200B, 000200B, 000000B],
row: 15, col: 1, hotX: 8, hotY: 8];
PickUpCursor[cm, initialCursor]