'\"!  tbl | tbl | tbl | tbl | tbl | tbl | tbl | tbl | tbl | mmdoc
'\"macro stdmacro
.if n .pH g3w.olFlatLayout @(#)olFlatLayout	40.2 of 1/8/90
.SO BP.HEADER
.nr X
.if \nX=0 .ds x} ""FLAT WIDGET LAYOUT" 3W "\&"
.if \nX=1 .ds x} ""FLAT WIDGET LAYOUT" 3W
.if \nX=2 .ds x} ""FLAT WIDGET "" "\&"
.if \nX=3 .ds x} ""FLAT "" "" "\&"
.TH \*(x}
.SH "DESCRIPTION"
.sp
All of the flat containers have the same layout characteristics.
The superclass of all flat widgets is a generic row/column
manager.  Though each column has its own width and each row has its own
height, all columns can have the same width and all rows can have the
same height, if desired.\*F
.P
.in +0.25i 
\f(HBNote:\fP
.br
As a programming note, the efficiency in both processing steps and
data requirements increases as the grid becomes more regular in shape.
For example, a grid \fIspecifying\fP that all rows must have the same height
and all columns must have the same width is the most efficient configuration.
.in
.P
The flat row/column manager lays out each
\fImanaged\fP sub-object in row-major order or in column-major order
depending on the attributes of the container, starting with
with the NorthWest corner of the container.
.P
.in +0.25i 
\f(HBNote:\fP
.br
Row-major order implies every column in the current row is filled
before filling any columns in the next row.
Column-major order implies every row in the current column is filled
before filling any rows in the next column.
.in
.br
Sub-objects of flat containers are placed within the grid.  If the
sub-object's width (or height) is less than the column's width (or
row's height), the sub-object is positioned in accordance to the
XtNitemGravity resource.
The following table lists the layout resources of all flat containers:
.P 
.in +0.25i 
\f(HBNote:\fP
.br
See the resource tables for each flat container for a more accurate
accounting of the default/allowable values for each layout resource.
.in
.TS H
expand, allbox;
cb s s s s
lbp-2|lbp-2|lbp-2|lbp-2|cp-2b
lp-2 | lp-2 |lp-2|lp-2|lp-2.
Common Flat Container Layout Resources
Name	Class	Type	Default	Access
_
.TH
XtNgravity	XtCGravity	int	CenterGravity	SGI
XtNhPad	XtCHPad	Dimension	0	SGI
XtNhSpace	XtCHSpace	Dimension	0	SGI
XtNitemGravity	XtCItemGravity	int	NorthWestGravity	SGI
XtNitemMaxHeight	XtCItemMaxHeight	Dimension	OL_IGNORE	SGI
XtNitemMaxWidth	XtCItemMaxWidth	Dimension	OL_IGNORE	SGI
XtNitemMinHeight	XtCItemMinHeight	Dimension	OL_IGNORE	SGI
XtNitemMinWidth	XtCItemMinWidth	Dimension	OL_IGNORE	SGI
XtNlayoutHeight	XtCLayoutHeight	OlDefine	OL_MINIMIZE	SGI
XtNlayoutType	XtCLayoutType	OlDefine	OL_FIXEDROWS	SGI
XtNlayoutWidth	XtCLayoutWidth	OlDefine	OL_MINIMIZE	SGI
XtNmeasure	XtCMeasure	int	1	SGI
XtNsameHeight	XtCSameHeight	OlDefine	OL_ALL	SGI
XtNsameWidth	XtCSameWidth	OlDefine	OL_COLUMNS	SGI
XtNvPad	XtCVPad	Dimension	0	SGI
XtNvSpace	XtCVSpace	Dimension	0	SGI
.TE
.sp 
.nf
\fBXtNgravity\fP
.sp 0.5
Range of Values:
	EastGravity/"east"
	WestGravity/"west"
	CenterGravity/"center"
	NorthGravity/"north"
	NorthEastGravity/"northEast"
	NorthWestGravity/"northWest"
	SouthGravity/"south"
	SouthEastGravity/"southEast"
	SouthWestGravity/"southWest"
.fi
.sp
The gravity resource specifies the position of all sub-objects (i.e., as a
group) whenever a
tight-fitting bounding box that surrounds the sub-objects has a width, or
height, less than the container's width or height, respectively.
Essentially, this resource specifies how the sub-objects, as a group,
float within its container.
.sp
.nf
\fBXtNhPad\fP
\fBXtNvPad\fP
.sp 0.5
Range of Values:
	0 \(<= XtNhPad
	0 \(<= XtNvPad
.fi
.sp
These resources specify the minimum spacing to leave
round the edges of the container, left
and right, and top and bottom, respectively.
.sp
.nf
\fBXtNhSpace\fP
\fBXtNvSpace\fP
.sp 0.5
Range of Values:
	0 \(<= XtNhSpace
	0 \(<= XtNvSpace
.fi
.sp
These resource specify the amount of space to leave
between sub-objects horizontally and vertically, respectively.  If the
sub-objects are of different sizes in a row or column, the spacing applies to
the widest or tallest dimension all sub-objects in the row or column.
.sp
.nf
\fBXtNitemGravity\fP
.sp 0.5
Range of Values:
	EastGravity/"east"
	WestGravity/"west"
	CenterGravity/"center"
	NorthGravity/"north"
.bp

	NorthEastGravity/"northEast"
	NorthWestGravity/"northWest"
	SouthGravity/"south"
	SouthEastGravity/"southEast"
	SouthWestGravity/"southWest"
.fi
.sp
This resource specifies how an item fits into its row or column whenever
the item's width or height is less than the column's width or the row's
height.  The values of XtNsameWidth and XtNsameHeight govern the column's
width and the row's height.
.sp
.nf
\fBXtNitemMaxHeight\fP
\fBXtNitemMaxWidth\fP
.sp 0.5
Range of Values:
	OL_IGNORE != XtNitemMaxHeight
	OL_IGNORE != XtNitemMaxWidth
.fi
.sp
These resources specify the maximum allowable width and height (respectively)
of all sub-objects.  If the either of these resources have a value of OL_IGNORE,
the maximum size constraint is ignored.
.sp
.nf
\fBXtNitemMinHeight\fP
\fBXtNitemMinWidth\fP
.sp 0.5
Range of Values:
	OL_IGNORE != XtNitemMinHeight
	OL_IGNORE != XtNitemMinWidth
.fi
.sp
These resources specify the minimum allowable width and height (respectively)
of all sub-objects. If the either resource has a value of OL_IGNORE, it is ignored.
.sp
.nf
\fBXtNlayoutHeight\fP
\fBXtNlayoutWidth\fP
.sp 0.5
Range of Values:
	OL_MINIMIZE/"minimize"
	OL_MAXIMIZE/"maximize"
	OL_IGNORE/"ignore"
.fi
.sp
These resources specify the resize policy of flat containers whenever a
sub-object is added, removed or altered.  These resources have no affect
when an external force applies a size change to the container, e.g., if the
application resizes a container.  The explanation of the values are:
.IP OL_MINIMIZE 1i
.sp -1
The container will modify its width (or height) to be just large 
enough to tightly
wrap around its sub-objects regardless of its current width (or height).  Thus
the container will grow and shrink depending on the size needs of its
sub-objects.
.bp
.IP OL_MAXIMIZE
.sp -1
The container will increase its width (or height) to be just large 
enough to tightly
wrap around its sub-objects regardless of its current width (or height), but
will not give up extra space.  Thus
the container will grow but never shrink depending on the size needs of its
sub-objects.
.IP OL_IGNORE
.sp -1
The container will honor its own width and height, i.e., it will not grow or
shrink in response to the addition, deletion or altering of its sub-objects.
.in
.sp
.nf
\fBXtNlayoutType\fP
.sp 0.5
Range of Values:
	OL_FIXEDCOLS/"fixedcols"
	OL_FIXEDROWS/"fixedrows"
.fi
.sp
This resource controls the number of rows and columns used to layout
the sub-objects.
.IP OL_FIXEDCOLS 1.25i
.sp -1
The layout should have a maximum number of columns equal to the value
specified by the XtNmeasure resource, and there will be enough rows to
hold all sub-objects.  Sub-objects are placed in row-major order,
i.e., the columns of the current row are filled before filling any
columns in the next row.
.IP OL_FIXEDROWS
.sp -1
The layout should have a maximum number of rows equal to the value
specified by the XtNmeasure resource, and there will be enough columns to
hold all sub-objects.  Sub-objects are placed in column-major order,
i.e., the rows of the current column are filled before filling any
rows in the next column.
.in
.sp
.nf
\fBXtNmeasure\fP
.sp 0.5
Range of Values:
	0 < XtNmeasure
.fi
.sp
This resource gives the number of rows or columns that were requested from the
XtNlayoutType resource.
.sp
.nf
\fBXtNsameHeight\fP
.sp 0.5
Range of Values:
	OL_ALL/"all"
	OL_ROWS/"rows"
	OL_NONE/"none"
.fi
.sp
.bp
This resource defines which sub-objects are forced to be the same height within
the container:
.IP OL_ALL 1i
.sp -1
All sub-objects are to be the same height.
.IP OL_ROWS
.sp -1
All sub-objects appearing in the same row should be the same height.
.IP OL_NONE
.sp -1
The sub-objects are placed in fixed-height rows but the height of each item is
left alone.  The height of each row is the height of the tallest sub-object.
.in
.sp
.nf
\fBXtNsameWidth\fP
.sp 0.5
Range of Values:
	OL_ALL/"all"
	OL_COLUMNS/"columns"
	OL_NONE/"none"
.fi
.sp
This resource defines that sub-objects are forced to be the same width within
the container:
.IP "OL_ALL" 1.5i
All sub-objects are to be the same width.
.IP "OL_COLUMNS"
All sub-objects appearing in the same column should be the same width.
.IP "OL_NONE"
The sub-objects are placed in fixed-width columns but the width of each item is
left alone.  The width of each column is the width of the widest
sub-object.
