CKViewerPanelImpl.mesa
Last edited by Pier on January 9, 1984 5:32 pm
Last Edited by: Sosinski, August 16, 1983 6:15 pm
DIRECTORY
Containers,
CKViewerPanel,
CKViewerButtons,
CKViewerTables,
ChoiceButtons,
Labels, NumberLabels,
IO, Rope, Rules,
ViewerIO,
ViewerOps,
VFonts
;
CKViewerPanelImpl: PROGRAM IMPORTS
Rules, Labels, NumberLabels, CKViewerPanel, ChoiceButtons, ViewerIO, ViewerOps,
VFonts, Containers, Rope, IO EXPORTS CKViewerPanel = {
OPEN IO, CKViewerTables;
CKViewer: TYPE = CKViewerButtons.CKViewer;
panelHTab1: CARDINAL = 20;
panelHTab2: CARDINAL = 300;
panelSGHTab: CARDINAL = 200;
entryHeight: CARDINAL = 14; -- height of a line of items
entryVSpace: CARDINAL = 6; -- vertical leading between lines
StopGoProc: ChoiceButtons.SelectionNotifierProc =
TRUSTED {
ckv: CKViewer ← NARROW[clientdata];
IF Rope.Equal[name,"GOING"] THEN CKViewerPanel.StartTest[ckv] ELSE CKViewerPanel.StopTest[];
};
BuildPanel:
PUBLIC
PROC [ckViewer: CKViewer] = {
OPEN ChoiceButtons;
rule1, rule2: Rules.Rule;
timeString: LONG STRING ← [60];
stopOptions: ButtonList = CONS["STOPPED",CONS["GOING",NIL]];
tableOpOptions: ButtonList = CONS["WriteReadCheck", CONS["WriteRead", CONS["WriteOnly", CONS["ReadAndCheck", CONS["ReadAndShow", CONS["ReadOnly", CONS["Sweep", NIL]]]]]]];
tableOptions: ButtonList = CONS["ALL", CONS["A", CONS["B", CONS["C", NIL]]]];
actionOptions: ButtonList = CONS["Count", CONS["Random", CONS["Fixed", CONS["Cycle", NIL]]]];
reportOptions: ButtonList = CONS["Short", CONS["None", CONS["Long", NIL]]];
ckViewer.height ← ckViewer.height+entryVSpace+entryHeight;
rule1 ← Rules.Create[info: [wx: 0, wy: ckViewer.height, wh: 1, parent: ckViewer.container]];
Containers.ChildXBound[container: ckViewer.container, child: rule1];
ckViewer.height ← ckViewer.height+entryVSpace;
ckViewer.panel.passLabel ← Labels.Create[info: [name: "PASSES", wx: panelHTab1, wy: ckViewer.height, parent: ckViewer.container]];
ckViewer.panel.passCount ← NumberLabels.CreateNumber[info: [wx: ckViewer.panel.passLabel.wx+ckViewer.panel.passLabel.ww+6, wy: ckViewer.height, parent: ckViewer.container, border: FALSE], chars: 10];
ckViewer.panel.stopGo ← BuildEnumTypeSelection[viewer: ckViewer.container, x: panelSGHTab, y: ckViewer.height, title: "STOP/GO", buttonNames: stopOptions, default: "STOPPED", borderOnButtons: TRUE, notifyClientProc: StopGoProc, permit: NIL, clientdata: ckViewer, style: flipThru, allInOneRow: TRUE, maxWidth: LAST[INTEGER]];
ckViewer.height ← ckViewer.height+entryVSpace+entryHeight;
ckViewer.panel.tableOp ← BuildEnumTypeSelection[viewer: ckViewer.container, x: panelHTab1, y: ckViewer.height, title: "Read/Write", buttonNames: tableOpOptions, default: "WriteReadCheck", borderOnButtons: FALSE, notifyClientProc: NIL, permit: NIL, clientdata: ckViewer, style: flipThru, allInOneRow: TRUE, maxWidth: 200];
ckViewer.panel.table ← BuildEnumTypeSelection[viewer: ckViewer.container, x: panelHTab2, y: ckViewer.height, title: "Table", buttonNames: tableOptions, default: "ALL", borderOnButtons: TRUE, notifyClientProc: NIL, permit: NIL, clientdata: ckViewer, style: flipThru, allInOneRow: TRUE, maxWidth: 200];
ckViewer.height ← ckViewer.height+entryVSpace+entryHeight;
ckViewer.panel.action ← BuildEnumTypeSelection[viewer: ckViewer.container, x: panelHTab1, y: ckViewer.height, title: "PatternAction", buttonNames: actionOptions, default: "Random", borderOnButtons: TRUE, notifyClientProc: NIL, permit: NIL, clientdata: ckViewer, style: flipThru, allInOneRow: TRUE, maxWidth: 200];
ckViewer.panel.pattern ← BuildTextPrompt[viewer: ckViewer.container, x: panelHTab2, y: ckViewer.height, title: "Pattern", default: "123456B", font: VFonts.defaultFont, textViewerWidth: 300, clientdata: ckViewer, notify: NIL, permit: NIL];
ckViewer.height ← ckViewer.height+entryVSpace+entryHeight;
ckViewer.panel.firstAddr← BuildTextPrompt[viewer: ckViewer.container, x: panelHTab1, y: ckViewer.height, title: "First Address:", default: "0000B", font: VFonts.defaultFont, textViewerWidth: 100, clientdata: ckViewer, notify: NIL, permit: NIL];
ckViewer.panel.lastAddr← BuildTextPrompt[viewer: ckViewer.container, x: panelHTab2, y: ckViewer.height, title: "Last Address:", default: "1777B", font: VFonts.defaultFont, textViewerWidth: 100, clientdata: ckViewer, notify: NIL, permit: NIL];
ckViewer.height ← ckViewer.height+entryVSpace+entryHeight;
ckViewer.panel.incAddr← BuildTextPrompt[viewer: ckViewer.container, x: panelHTab1, y: ckViewer.height, title: "Address Increment:", default: "1", font: VFonts.defaultFont, textViewerWidth: 100, clientdata: ckViewer, notify: NIL, permit: NIL];
ckViewer.panel.report ← BuildEnumTypeSelection[viewer: ckViewer.container, x: panelHTab2, y: ckViewer.height, title: "Reports", buttonNames: reportOptions, default: "Long", borderOnButtons: TRUE, notifyClientProc: NIL, permit: NIL, clientdata: ckViewer, style: flipThru, allInOneRow: TRUE, maxWidth: 200];
ckViewer.height ← ckViewer.height+entryVSpace+entryHeight;
rule2 ← Rules.Create[info: [wx: 0, wy: ckViewer.height, wh: 1, parent: ckViewer.container]];
Containers.ChildXBound[container: ckViewer.container, child: rule2];
ckViewer.height ← ckViewer.height+entryVSpace;
ckViewer.panel.script ← ViewerOps.CreateViewer[flavor: $Typescript, info: [name: "ColorTableTest", wx: 0, wy: ckViewer.height, iconic: FALSE, parent: ckViewer.container, border: FALSE]];
Containers.ChildXBound[container: ckViewer.container, child: ckViewer.panel.script];
Containers.ChildYBound[container: ckViewer.container, child: ckViewer.panel.script];
[in: , out: ckViewer.panel.stream] ← ViewerIO.CreateViewerStreams[name: NIL, viewer: ckViewer.panel.script, editedStream: FALSE];
IO.Put[stream: ckViewer.panel.stream, v1: IO.rope["Color Table Tester of August 16, 1983 on "], v2: IO.time[], v3: IO.rope["\n"]];
};
}.