#include #include #include #include #include /* * Very quick and dirty 3x4 version. */ main() { World* world = new World(); world->InsertApplication( /*Init3X4Sheet() { */ new Tray( /* * Outermost vbox contains 3 rows: top-row labels, spread sheet proper, * bottom rows of stats. */ new VBox( new VGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), /* * Here's the hbox for the top-row labels. */ new HBox( new Message("Student Name:"), new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), new Message("Homework 1:"), new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), new Message("Homework 2:"), new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), new Message("Final:") ), new VGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), /* * Here's the hbox for the spread sheet proper. */ new HBox( VBox( new Message("Jones"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("Smith"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("Zeno") ), new HGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), VBox( new Message("100"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("100"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("95") ), new HGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), VBox( new Message("100"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("100"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("95") ), new HGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), VBox( new Message("100"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("100"), new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)), new Message("95") ) ); new VGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), /* * Here's the hbox for the bottom-row stats. */ new HBox( new Message("STATS:"), new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), new Message("295/3"), new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), new Message("295/3"), new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)), new Message("295/3") ), new VGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)) ) )); world->Run(); delete world; return 0; } /* * Put m x n Cells in the display sheet. */ /*InitSheet*/