From: ewt Date: Fri, 12 Sep 1997 15:50:03 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: r0-12~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03b35855e4127ae3068a4fac957dae7d6236bb46;p=thirdparty%2Fnewt.git *** empty log message *** --- diff --git a/testgrid.c b/testgrid.c index fb49eb0..65f930d 100644 --- a/testgrid.c +++ b/testgrid.c @@ -9,6 +9,8 @@ int main(void) { newtComponent b1, b2, b3, b4; newtComponent answer, f, t; newtGrid grid, subgrid; + char * flowedText; + int textWidth, textHeight; newtInit(); newtCls(); @@ -38,11 +40,17 @@ int main(void) { newtPopWindow(); - t = newtTextbox(-1, -1, 40, 4, NEWT_FLAG_WRAP); - newtTextboxSetText(t, "This is a quite a bit of text. It is 40 " - "columns long, so some wrapping should be " - "done. Did you know that the quick, brown " - "fox jumped over the lazy dog?"); + flowedText = newtReflowText("This is a quite a bit of text. It is 40 " + "columns long, so some wrapping should be " + "done. Did you know that the quick, brown " + "fox jumped over the lazy dog?\n\n" + "In other news, it's pretty important that we " + "can properly force a line break.", + 40, 5, 5, &textWidth, &textHeight); + t = newtTextbox(-1, -1, textWidth, textHeight, NEWT_FLAG_WRAP); + newtTextboxSetText(t, flowedText); + free(flowedText); + b1 = newtButton(-1, -1, "Okay"); b2 = newtButton(-1, -1, "Cancel"); @@ -62,6 +70,10 @@ int main(void) { newtFormAddComponents(f, b1, t, b2, NULL); answer = newtRunForm(f); + newtPopWindow(); + + newtWinMessage("Simple", "Ok", "This is a simple message window"); + newtFinished(); return 0;