THEN {
x: Args.Arg ← Args.ArgInt[cmd, 0];
y: Args.Arg ← Args.ArgInt[cmd, 1];
text: Args.Arg ← Args.ArgRope[cmd, 2];
IF NOT x.ok OR NOT y.ok OR NOT text.ok THEN RETURN[$Failure, NIL];
ColorTrixMisc.PrintRope[text.rope, x.int, y.int];
}
ELSE {
ProcButton:
PROC [x, y:
NAT, name:
ROPE, proc: Buttons.ButtonProc]
RETURNS [v: Viewer] ~ {
v ← Buttons.Create[
info: [parent: data.viewer, name: name, wx: x, wy: y],
proc: proc,
clientData: data,
paint: TRUE];
};
TextButton:
PROC [x, y, w:
NAT, name, text:
ROPE]
RETURNS [v: Viewer] ~ {
v ← ChoiceButtons.BuildTextPrompt[data.viewer, x, y, name, text, , w].textViewer;
};
data: CtTextData ← NEW[CtTextDataRec];
data.context ← ColorTrixBasics.InitCd[smooth, TRUE, FALSE, FALSE];
data.bounds ← ImagerBackdoor.GetBounds[data.context];
data.viewer ← ViewerOps.CreateViewer[
flavor: $CtText,
info: [openHeight: 34, name: "Ct Text", data: data, scrollable: FALSE, column: right, iconic: TRUE]];
ViewerOps.OpenIcon[data.viewer];
data.x ← TextButton[0, 3, 40, "x:", "0"];
data.y ← TextButton[60, 3, 40, "y:", "0"];
data.c ← TextButton[125, 3, 50, "color:", "Black"];
data.trackButton ← ProcButton[225, 3, "Track-Off", ToggleTrack];
data.styleButton ← ProcButton[295, 3, "PrintStyle ", ToggleStyle];
data.printButton ← ProcButton[370, 3, "PRINT", Print];
};