<HTML><HEAD><TITLE>Manpage of XmForm</TITLE>
</HEAD><BODY>
<H1>XmForm</H1>
Section: LessTif Manuals (3)<BR>Updated: April 1998<BR><A HREF="#index">Index</A>
<BR><A HREF="lesstif.html">Return to Main Contents</A>
<HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

XmForm
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>#include &lt;<A HREF="include/Xm/Form.h">Xm/Form.h</A>&gt;</B>

<P>

<B>XmForm</B>

<P>

<B>XmCreateForm</B>

<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>

XmForm is a widget which allows you to specify complicated geometries.
The widget is capable of aligning children widgets with reference to each other.
Widgets can be linked to each other's positions,
hooked to a fixed place, or hooked to the form's edges.
Positioning can be relative as well as absolute.
<P>

The algorithm used to lay out the children is an iterative one.
In development versions of LessTif,
the amount of iterations that the widget supports before it wants
to have reached a steady state is 200.
OSF/Motif&#174; uses a much higher number than this;
if the low number in LessTif gives you trouble
(it generates a warning message mentioning &quot;bailout&quot;)
then either the number is too low or you've discovered a bug.
In either case, please write to <A HREF="mailto:lesstif@lesstif.org">lesstif@lesstif.org</A> about this.
<A NAME="lbAE">&nbsp;</A>
<H2>X RESOURCES</H2>

<TABLE>
<TR VALIGN=top><TD>Name</TD><TD>Class</TD><TD>Type</TD><TD>Default</TD><TD>Access<BR></TD></TR>
<TR VALIGN=top><TD COLSPAN=5><HR></TD></TR>
<TR VALIGN=top><TD>XmNmarginWidth</TD><TD>XmCMarginWidth</TD><TD>HorizontalDimension</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNmarginHeight</TD><TD>XmCMarginHeight</TD><TD>VerticalDimension</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNhorizontalSpacing</TD><TD>XmCSpacing</TD><TD>HorizontalDimension</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNverticalSpacing</TD><TD>XmCSpacing</TD><TD>VerticalDimension</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNfractionBase</TD><TD>XmCMaxValue</TD><TD>Int</TD><TD>100</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNrubberPositioning</TD><TD>XmCRubberPositioning</TD><TD>Boolean</TD><TD>False</TD><TD>CSG<BR></TD></TR>
</TABLE>

<P>

<B>XmNfractionBase</B>

is the resource that allows you to specify the reference value
relative to which values for the constraint resource XmNposition
are to be used.
The default, 100, allows you to specify e.g. 50 to mean that some widget edge
should be positioned at 50% of the form's width (or height).
<P>

<B>XmNrubberPositioning</B>

is a boolean which determines the default layout
if some of the constraint resources aren't set for children of XmForm.
In the default case (False),
children widgets for which the left or top sides haven't been specified,
default their attachment to XmATTACH_FORM.
This means the children will be in the upper left side of the form.
In the other case, the children widgets's left or top attachments
will default to XmATTACH_SELF.
<P>

<B>XmNmarginWidth</B>

<P>

<B>XmNmarginHeight</B>

<P>

<B>XmNhorizontalSpacing</B>

<P>

<B>XmNverticalSpacing</B>

<P>

<A NAME="lbAF">&nbsp;</A>
<H2>CONSTRAINT RESOURCES</H2>

<P>

The constraint resources for XmForm allow us to specify the layout of
children of the form.
These resources should not be set on the form,
they should be set on the children.
They don't work unless the parent of a widget is an XmForm,
they also don't work if the widget is a grandchild of XmForm.
<P>

The latter is a mistake often made in the case of scrolled widgets.
Functions such as XmCreateScrolledText create two (or more) widgets,
and return a grandchild of Form if they are called with the form as parent.
In such case, constraint resources should be set on the parent of the
widget returned by XmCreateScrolledText (or similar).
<P>

<TABLE>
<TR VALIGN=top><TD>Name</TD><TD>Class</TD><TD>Type</TD><TD>Default</TD><TD>Access<BR></TD></TR>
<TR VALIGN=top><TD COLSPAN=5><HR></TD></TR>
<TR VALIGN=top><TD>XmNtopAttachment</TD><TD>XmCAttachment</TD><TD>unsigned char</TD><TD>dynamic</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNbottomAttachment</TD><TD>XmCAttachment</TD><TD>unsigned char</TD><TD>dynamic</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNleftAttachment</TD><TD>XmCAttachment</TD><TD>unsigned char</TD><TD>dynamic</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNrightAttachment</TD><TD>XmCAttachment</TD><TD>unsigned char</TD><TD>dynamic</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNtopWidget</TD><TD>XmCWidget</TD><TD>Widget</TD><TD>NULL</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNbottomWidget</TD><TD>XmCWidget</TD><TD>Widget</TD><TD>NULL</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNleftWidget</TD><TD>XmCWidget</TD><TD>Widget</TD><TD>NULL</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNrightWidget</TD><TD>XmCWidget</TD><TD>Widget</TD><TD>NULL</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNtopPosition</TD><TD>XmCPosition</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNbottomPosition</TD><TD>XmCPosition</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNleftPosition</TD><TD>XmCPosition</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNrightPosition</TD><TD>XmCPosition</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNtopOffset</TD><TD>XmCOffset</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNbottomOffset</TD><TD>XmCOffset</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNleftOffset</TD><TD>XmCOffset</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNrightOffset</TD><TD>XmCOffset</TD><TD>int</TD><TD>0</TD><TD>CSG<BR></TD></TR>
<TR VALIGN=top><TD>XmNresizable</TD><TD>XmCBoolean</TD><TD>Boolean</TD><TD>True</TD><TD>CSG<BR></TD></TR>
</TABLE>

<P>

<B>XmNresizable</B>

specifies whether this widget can resize itself,
if the geometry request doesn't conflict with attachments.
An example of this is a XmLabel widget which modifies its XmNlabelString,
which causes it to try to resize itself.
If XmNresizable is set to False in such a case,
expensive geometry calculations can be avoided.
<P>

<B>XmNtopAttachment</B>

is the method of attachment for the child's top side
<B>XmNtopWidget</B>

is the ID of the widget or gadget that serves as attachment point
for the top of this child.
For this to work, XmNtopAttachment must be set to XmATTACH_WIDGET
or to XmATTACH_OPPOSITE_WIDGET.
<P>

<B>XmNtopPosition</B>

used in conjunction with XmNfractionBase allows you to calculate the
position of the top of a child widget relative to the top of the Form.
This resource only works if XmNtopAttachment has been set to XmATTACH_POSITION.
A position can be a negative number,
which allows you to position a child widget in a place
which is either partially or completely invisible.
Values larger than the value of XmNfractionBase, or close to it,
have similar effect.
<P>

<B>XmNtopOffset</B>

is the distance between the child's top edge and the object it is attached to.
This may be the form (XmATTACH_FORM) or another widget (XmATTACH_WIDGET or
XmATTACH_OPPOSITE_WIDGET).
In the latter case (XmATTACH_OPPOSITE_WIDGET), the offset is relative to
the other widget's top.
In the other cases, the offset is relative to the form's top or
to the other widget's bottom edge.
<P>

As with XmNtopPosition,
values can be specified which are either negative or large,
to position the child widget at a place where it is either partially
or completely invisible.
<P>

<A NAME="lbAG">&nbsp;</A>
<H2>CLASS HIERARCHY</H2>

<B><A HREF="Object.html">Object</A></B>(3)

<B><A HREF="Rect.html">Rect</A></B>(3)

<B><A HREF="UnNamedObj.html">UnNamedObj</A></B>(3)

<B><A HREF="Core.html">Core</A></B>(3)

<B><A HREF="Composite.html">Composite</A></B>(3)

<B><A HREF="Constraint.html">Constraint</A></B>(3)

<B><A HREF="XmManager.html">XmManager</A></B>(3)

<B><A HREF="XmBulletinBoard.html">XmBulletinBoard</A></B>(3)

<B><A HREF="XmForm.html">XmForm</A></B>(3)

<A NAME="lbAH">&nbsp;</A>
<H2>CALLBACKS</H2>

XmForm only has callbacks inherited from its superclasses.
<A NAME="lbAI">&nbsp;</A>
<H2>CONVENIENCE FUNCTIONS</H2>

<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>

<P>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">X RESOURCES</A><DD>
<DT><A HREF="#lbAF">CONSTRAINT RESOURCES</A><DD>
<DT><A HREF="#lbAG">CLASS HIERARCHY</A><DD>
<DT><A HREF="#lbAH">CALLBACKS</A><DD>
<DT><A HREF="#lbAI">CONVENIENCE FUNCTIONS</A><DD>
<DT><A HREF="#lbAJ">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://www.debian.org/Packages/unstable/doc/man2html.html">man2html</A>,
using the manual pages.<BR>
Time: 21:22:18 GMT, September 06, 1999
</BODY>
</HTML>
