WeisersTest.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Weiser, November 17, 1992 8:30 pm PST
Chauser, December 14, 1992 4:33 pm PST
DIRECTORY
Commander, IO, Xl, XTk, XTkWidgets, XTkXBiScroller;
WeisersTest: CEDAR PROGRAM
IMPORTS Commander, IO, XTkWidgets, XTk, XTkXBiScroller
~ BEGIN
Widget: TYPE = XTk.Widget;
TestCmd: Commander.CommandProc = {
shell: Widget ~ XTkWidgets.CreateShell[
className: $ThreadsVis,
windowHeader: "ThreadsVis -- ctrl = type point; shift = erase",
packageName: "ThreadsVis",
shortName: "ThreadsVis",
standardMigration: TRUE
];
doneButton, streamWidget, scroller, innerContainer, container: Widget;
stream: IO.STREAM;
doneButton ← XTkWidgets.CreateButton[[geometry: [size: [-1, 20]]], " Done", [], DoneProc];
streamWidget ← XTkWidgets.CreateStreamWidget[widgetSpec: [geometry: [size: [-1, 100]]]];
scroller ← XTkXBiScroller.CreateXBiScroller[widgetSpec: [geometry: [size: [-1, 100]]], child: streamWidget, hsbar: FALSE];
container ← XTkWidgets.CreateYStack[widgetSpec: [geometry: [size: [200, 100]]], stack: LIST[doneButton, scroller]];
stream ← XTkWidgets.CreateStream[streamWidget];
XTkWidgets.SetShellChild[shell, container];
XTkWidgets.BindScreenShell[shell, "zwilnik:2.0"];
XTkWidgets.RealizeShell[shell];
IO.PutRope[stream, "1 hi there, this is a long sentence to see what happens with rool over at the end of lines.\nmark\n"];
IO.PutRope[stream, "2 bye there\nclark\n"];
IO.PutRope[stream, "3 bye there\nclark\n"];
IO.PutRope[stream, "4 bye there\nclark\n"];
IO.PutRope[stream, "5 bye there\nclark\n"];
IO.PutRope[stream, "6 hi there, this is a long sentence to see what happens with rool over at the end of lines.\nmark\n"];
IO.PutRope[stream, "7 hi there, this is a long sentence to see what happens with rool over at the end of lines.\nmark\n"];
};
DoneProc: XTkWidgets.ButtonHitProcType = {
XTkWidgets.DestroyShell[XTk.RootWidget[widget]];
};
Commander.Register["WeisersTest", TestCmd, "Weiser's Test"];
END.