newt wrapper -- noch

This commit is contained in:
Norayr Chilingarian 2015-02-22 01:56:44 +04:00
parent 669735779f
commit 8d73a74432
2 changed files with 23 additions and 1 deletions

View file

@ -67,6 +67,14 @@ BEGIN
newtResizeScreen(redraw);
END ResizeScreen;
PROCEDURE -newtRefresh()
"newtRefresh()";
PROCEDURE Refresh*();
BEGIN
newtRefresh();
END Refresh;
PROCEDURE -newtWaitForKey()
"newtWaitForKey()";

View file

@ -1,6 +1,6 @@
MODULE newttest;
IMPORT newt, oocIntStr;
IMPORT newt, oocIntStr, Unix;
VAR i, j, k : newt.Int32;
str : ARRAY 32 OF CHAR;
BEGIN
@ -15,6 +15,20 @@ 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("A help line");
newt.Refresh();
i := Unix.Sleep(1);
newt.PopHelpLine();
newt.Refresh();
i := Unix.Sleep(1);
newt.WaitForKey();
newt.Delay(30);
i := newt.Finished();