From: ewt Date: Mon, 16 Feb 1998 22:40:34 +0000 (+0000) Subject: test newtWinMenu() X-Git-Tag: r0-22~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce852af92a6f5b9757b804c5b4602345c0bfa9e0;p=thirdparty%2Fnewt.git test newtWinMenu() --- diff --git a/testgrid.c b/testgrid.c index 1a42b73..198308f 100644 --- a/testgrid.c +++ b/testgrid.c @@ -10,10 +10,12 @@ int main(void) { newtComponent answer, f, t; newtGrid grid, subgrid; char * flowedText; - int textWidth, textHeight; + int textWidth, textHeight, rc; + char * menuContents[] = { "One", "Two", "Three", "Four", "Five", NULL }; newtInit(); newtCls(); + newtOpenWindow(2, 2, 40, 15, "first window"); b1 = newtButton(-1, -1, "Button 1"); @@ -76,7 +78,14 @@ int main(void) { newtWinMessage("Simple", "Ok", "This is a simple message window"); newtWinChoice("Simple", "Ok", "Cancel", "This is a simple choice window"); + textWidth = 0; + rc = newtWinMenu("Test Menu", "This is a sample invovation of the " + "newtWinMenu() call. It may or may not have a scrollbar, " + "depending on the need for one.", 50, 5, 5, 3, + menuContents, &textWidth, "Ok", "Cancel", NULL); + newtFinished(); + printf("rc = 0x%x item = %d\n", rc, textWidth); return 0; }