From 4bbacbaaa47e4764d65bec067653adc863125bc1 Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 10 Apr 2018 23:29:14 +0400 Subject: [PATCH] brought sources in sync with current library state. --- src/test/newt/newttest.Mod | 78 +++++++++++++++++++------------------ src/test/newt/newttest2.Mod | 4 +- 2 files changed, 43 insertions(+), 39 deletions(-) diff --git a/src/test/newt/newttest.Mod b/src/test/newt/newttest.Mod index 46d82a8e..ff673863 100644 --- a/src/test/newt/newttest.Mod +++ b/src/test/newt/newttest.Mod @@ -1,46 +1,50 @@ MODULE newttest; -IMPORT newt, oocIntStr, Unix; -VAR i, j, k : newt.Int32; -str : ARRAY 32 OF CHAR; -ch : CHAR; -fo, co : newt.Component; +IMPORT newt, oocIntStr, Platform; + +CONST delayTime = 1000; + +VAR + i, j, k : newt.Int32; + str : ARRAY 32 OF CHAR; + ch : CHAR; + fo, co : newt.Component; BEGIN -i := newt.Init(); -newt.Cls(); -str := "hello world!"; -newt.DrawRootText(5, 7, str); -newt.GetScreenSize(i, j); -oocIntStr.IntToStr(i, str); -newt.DrawRootText(5, 9, str); -str := "x"; -newt.DrawRootText(7, 9, "x"); -oocIntStr.IntToStr(j, str); -newt.DrawRootText(9, 9, str); + i := newt.Init(); + newt.Cls(); + str := "hello world!"; + newt.DrawRootText(5, 7, str); + newt.GetScreenSize(i, j); + oocIntStr.IntToStr(i, str); + newt.DrawRootText(5, 9, str); + str := "x"; + newt.DrawRootText(7, 9, "x"); + oocIntStr.IntToStr(j, str); + newt.DrawRootText(9, 9, str); -newt.PushHelpLine(""); -newt.Refresh(); -i := Unix.Sleep(1); + newt.PushHelpLine(""); + newt.Refresh(); + Platform.Delay(delayTime); -newt.PushHelpLine("A help line"); -newt.Refresh(); -i := Unix.Sleep(1); + newt.PushHelpLine("A help line"); + newt.Refresh(); + Platform.Delay(delayTime); -newt.PopHelpLine(); -newt.Refresh(); -i := Unix.Sleep(1); + newt.PopHelpLine(); + newt.Refresh(); + Platform.Delay(delayTime); -REPEAT -ch := newt.GetKey(); -str[0] := ch; -str[1] := 0X; -newt.DrawRootText(5, 5, str); -newt.PushHelpLine(str); -newt.Refresh; -UNTIL ch = ' '; + REPEAT + ch := newt.GetKey(); + str[0] := ch; + str[1] := 0X; + newt.DrawRootText(5, 5, str); + newt.PushHelpLine(str); + newt.Refresh; + UNTIL ch = ' '; -(* -newt.WaitForKey(); -newt.Delay(30);*) -i := newt.Finished(); + (* + newt.WaitForKey(); + newt.Delay(30);*) + i := newt.Finished(); END newttest. diff --git a/src/test/newt/newttest2.Mod b/src/test/newt/newttest2.Mod index 9cd02d99..a26248ab 100644 --- a/src/test/newt/newttest2.Mod +++ b/src/test/newt/newttest2.Mod @@ -1,6 +1,6 @@ MODULE newttest2; -IMPORT newt, oocIntStr, Unix; +IMPORT newt, oocIntStr; VAR i, j, k : newt.Int32; str : ARRAY 32 OF CHAR; form, b1, b2, comp: newt.Component; @@ -20,7 +20,7 @@ newt.FormAddComponent(form, b1); newt.FormAddComponent(form, b2); comp := newt.RunForm(form); newt.WaitForKey(); -newt.Delay(30); +newt.Delay(3000); newt.FormDestroy(form); i := newt.Finished(); END newttest2.