#include #include #include #include #include #include #include #include #include static char *CellPadding; static int CellWidth; /* * Very quick and dirty 3x4 version. */ main() { int i; CellWidth = 10; CellPading = (char *) malloc(CellWidth+1); for (i=0; iInsertApplication( /*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 HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)),*/ new Frame(new StringEditor(st, "Homework 1:")), /* new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)),*/ new Frame(new StringEditor(st, "Homework 2:")), /* new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)),*/ new Frame(new StringEditor(st, "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( new VBox( new Frame(new StringEditor(st, "Jones")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "Smith")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "Zeno")) ), /* new HGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new VBox( new Frame(new StringEditor(st, "100")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "100")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "95")) ), /* new HGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new VBox( new Frame(new StringEditor(st, "100")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "100")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "95")) ), /* new HGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new VBox( new Frame(new StringEditor(st, "100")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "100")), /* new VGlue(round(0.2*inch),round(1.0*inch),round(1.0*inch)),*/ new Frame(new StringEditor(st, "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 Frame(new StringEditor(st, "STATS:")), /* new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)),*/ new Frame(new StringEditor(st, "295/3")), /* new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)),*/ new Frame(new StringEditor(st, "295/3")), /* new HGlue(round(0.2*inch), round(1.0*inch), round(1.0*inch)),*/ new Frame(new StringEditor(st, "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*/