home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / x / xcu16.zip / Readme.dir / tbl < prev    next >
Text File  |  1991-10-03  |  2KB  |  40 lines

  1. CuTbl is a geometry manager that lays out a fixed number of widgets
  2. according to a specification patterned after the "tbl" preprocessor
  3. for creating tables in documents.  Thus, to get a bunch of widgets
  4. to look like this:
  5.  
  6.                      --------------------- ----------
  7.                     |                     |          |
  8.                     |                     |          |
  9.                     |                     |          |
  10.                     |---------- ----------|          |
  11.                     |          |          |          |
  12.                     |          |          |          |
  13.                     |          |          |          |
  14.                      ---------- ---------- ----------
  15.  
  16. The "tbl" input specification would look like this:
  17.  
  18.                                    c s c
  19.                                    c c ^.
  20.  
  21. This is just a very simple example.  Actually, the widget is loaded up
  22. with lots of bells and whistles, such as the ability to specify
  23. equal sized columns and/or rows, left, right, or center justify the strings
  24. of the children widgets when they contain newlines (assuming the children can
  25. handle such a request, which the accompanying label widget, "XcuLabel", does),
  26. and certain widgets can be marked to "take up the slack" when adjusting the
  27. children to fit into the layout. The widget resizes elegantly (it allows
  28. resize requests from the children), looking at resources to determine whether
  29. the widgets, the internal padding, or the inter-child padding (or any
  30. combination of the three) adjust to fit the layout into the new size.
  31.  
  32. Since an "m by n" layout array of widgets is a simple subset of this widget's
  33. capabilities, I have made it easy to subclass a widget that accepts a different
  34. input specification and merely transforms it into a tbl specification.  For
  35. example, the derived widget "XcuRc" transforms "2 x 2" into "c c\nc c.".
  36.  
  37. XcuRc is a geometry manager subclassed from XcuTbl.  It is a trivial example
  38. of a XcuTbl subclass and is not meant to do anything very useful.
  39.  
  40.