The Layout Widget Class
=======================

The Layout widget class is a very powerful constraint widget with TeX like
semantics developed by 

Keith Packard, MIT X Consortium

The Layout Widget Class implements a constraint wiget class based on
glue and boxes. One can specify the desired arrangement and the
stretchablility of its children widgets (and the space (glue) between these)
using a single resosurce, which can be altered at arbitrary times. For
example, the layout specification 

     horizontal {a b <+inf -100% *> c}

defines a horizontal box with three children widgets named "a", "b" and "c",
where the middle widget can be stretched or shrinked arbitrarily, when the
Widget is resized horizontally, while the outer widgets keep their size. 

A detailed documentation of the capabilities of the Layout widget class can
be found in: 

ftp.wu-wien.ac.at:pub/src/X11/wafe/Layout-xconf93-paper.ps 

The version of the Layout widget class provided with Wafe derived from
the Layout widget as it is distributed in the standard Xaw3d distributions,
but differs in the following items: 

 o Better support for Motif: 
   When the Layout widget is compiled with the flag -DMOTIF, it is
   defined as a subclass of XmManager (in order to make traversal
   working correct) and it is capable to deal with gadgets.

 o Several Fixes: 
    o The string to Layout converter (CvtStringToLayout) in the
      original version was defective and worked only via resource
      mechanisms. Setting the 'layout' resource via XtSetValues
      lead to a segmentation violation.

    o The original version handled a variable definition like a glue
      specification, each time a variable was set, glue was added.

    o Using calloc instead of malloc to allocate new boxes in the
      Layout structure. Before that, the original version showed
      sometimes a weird sizingbehavior (For example: after
      realizing, an application was infintely stretched in some
      dimension).

    o minor items: make it compile cleaner (replaces NULL by
      FALSE etc), added static to only locally used procedures, and
      similar 

The mentioned changes were implemented by Gustaf Neumann. 


Gustaf Neumann 
neumann@wu-wien.ac.at 

