/* * Labels * ------ * This program demonstates the use of text labels. * * Labels display text on a window. The words in the label are * automatically redrawn when a window is resized or redrawn. */ #include label title, question; void quit(button b) { exitapp(); } void main(void) { window w; w = newwindow("Question", rect(0,0,200,180), StandardWindow); title = newlabel("GraphApp!", rect(10,10,180,40), Center); settextfont(title, Courier); question = newlabel("Are you happy?", rect(10,60,180,40), AlignLeft); newbutton("Yes", rect(100,120,80,40), quit); show(w); mainloop(); }