Init:
PROCEDURE [f:Rope.
ROPE ←
NIL] = {
s:State ← NEW[StateRec];
SetUpProfileGlobals[s];
s.container ← ViewerOps.CreateViewer[flavor: $Container, info: [name: "Apply TRC", column: right, scrollable: FALSE, openHeight: 120, data: s]];
s.wdViewer ← ViewerTools.MakeNewTextViewer[info:[wx:170, wy:10, ww:230, wh:15, parent:s.container, border:FALSE]];
[] ← Buttons.Create[info:[name:"WD", wx:115, wy:10, parent:s.container], proc:Select, clientData:s.wdViewer];
ViewerTools.SetContents[s.wdViewer, s.wd];
s.inFnViewer ← ViewerTools.MakeNewTextViewer[info:[wx:170, wy:30, ww:230, wh:15, parent:s.container, border:FALSE]];
[] ← Buttons.Create[info:[name:"Input", wx:115, wy:30, parent:s.container], proc:Select, clientData:s.inFnViewer];
s.outFnViewer ← ViewerTools.MakeNewTextViewer[info:[wx:170, wy:50, ww:230, wh:15, parent:s.container, border:FALSE]];
[] ← Buttons.Create[info:[name:"Output", wx:115, wy:50, parent:s.container], proc:Select, clientData:s.outFnViewer];
s.trcFnViewer ← ViewerTools.MakeNewTextViewer[info:[wx:170, wy:70, ww:230, wh:15, parent:s.container, border:FALSE]];
[] ← Buttons.Create[info:[name:"TRC", wx:115, wy:70, parent:s.container], proc:Select, clientData:s.trcFnViewer];
[] ← Buttons.Create[info:[name:"R", wx:10, wy:50, parent:s.container], proc:Go, clientData:NEW[GoSpecRec ← [s, $R]]];
[] ← Buttons.Create[info:[name:"G", wx:30, wy:50, parent:s.container], proc:Go, clientData:NEW[GoSpecRec ← [s, $G]]];
[] ← Buttons.Create[info:[name:"B", wx:50, wy:50, parent:s.container], proc:Go, clientData:NEW[GoSpecRec ← [s, $B]]];
[] ← Buttons.Create[info:[name:"B/W", wx:70, wy:50, parent:s.container], proc:Go, clientData:NEW[GoSpecRec ← [s, $BW]]];
[] ← Buttons.Create[info:[name:" RGB ", wx:10, wy:30, parent:s.container], proc:Go, clientData:NEW[GoSpecRec ← [s, $RGB]]];
[] ← Buttons.Create[info:[name:"ABORT", wx:10, wy:10, parent: s.container], proc:Abort, clientData:s, guarded: TRUE];
s.logViewer ← ViewerOps.CreateViewer[flavor: $TypeScript, info:[wx:10, wy:90, ww:400, wh:15, parent:s.container]];
Containers.ChildYBound[s.container, s.logViewer];
Containers.ChildXBound[s.container, s.logViewer];
[ , s.out] ← ViewerIO.CreateViewerStreams[viewer: s.logViewer, name:NIL];
[] ← Rules.Create[info:[wx:0, wy:67, ww:1000, wh:2, parent:s.container, data:s]];
s.pieR ← PieViewers.Create[parent:s.container, x:10, y:70];
s.pieG ← PieViewers.Create[parent:s.container, x:30, y:70];
s.pieB ← PieViewers.Create[parent:s.container, x:50, y:70];
s.pieBW ← PieViewers.Create[parent:s.container, x:70, y:70];
};
Commander.Register[key:"ApplyTRC", proc:StartNewTRCProcess, doc:"TRC program"];