Constant STORY "GSimple"; Constant HEADLINE "^GWindows Demonstration Program 1: Basic Layout^"; Constant DEMO 1; Constant PURPOSE "This program shows a simple GWindows screen layout, emulating the library default screen."; ! GWindows Demo program. ! This is the simplest GWindows layout; it emulates the library's ! layout using the GWindows GStatusWin and TextBuffer objects. ! ! Include Gwindows Definitions include "gwindefs"; include "parser"; include "verblib"; ! Include GWindows base classes include "gwincls"; ! Include GWindows hooks include "gwindows"; include "grammar"; ! Include GWindows predefined widgets include "gstatus"; ! InitGWindows. This is where you set up the active interface and the ! main window [ InitGWindows; Active_UI=top; Main_GWindow=mainwin; ]; ! The window model. To emulate the standard layout, we use one windowpair, ! which holds the status window and the main window WindowPair top; Textbuffer -> mainwin; ! First window created doesn't need a size GStatusWin -> statuswin; ! use the default settings for this widget object r1 "Test room" with description "This is a primitive room. Its only purpose is to give the user somewhere to be while viewing this GWindows Demonstration", has light; [ Initialise; location=r1; print "^^^Welcome to GWindows demo program ", DEMO, ". ", (string) PURPOSE, "^^"; ];