GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmForm(3) LessTif Manuals XmForm(3)

XmForm - Motif-compatible form widget container

#include <Xm/Form.h>

XmForm

XmCreateForm

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.

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® uses a much higher number than this; if the low number in LessTif gives you trouble (it generates a warning message mentioning "bailout") then either the number is too low or you've discovered a bug.

Name Class Type Default Access
XmNmarginWidth XmCMarginWidth HorizontalDimension 0 CSG
XmNmarginHeight XmCMarginHeight VerticalDimension 0 CSG
XmNhorizontalSpacing XmCSpacing HorizontalDimension 0 CSG
XmNverticalSpacing XmCSpacing VerticalDimension 0 CSG
XmNfractionBase XmCMaxValue Int 100 CSG
XmNrubberPositioning XmCRubberPositioning Boolean False CSG

XmNfractionBase 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).

XmNrubberPositioning 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.

XmNmarginWidth

XmNmarginHeight

XmNhorizontalSpacing

XmNverticalSpacing

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.

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).

Name Class Type Default Access
XmNtopAttachment XmCAttachment unsigned char dynamic CSG
XmNbottomAttachment XmCAttachment unsigned char dynamic CSG
XmNleftAttachment XmCAttachment unsigned char dynamic CSG
XmNrightAttachment XmCAttachment unsigned char dynamic CSG
XmNtopWidget XmCWidget Widget NULL CSG
XmNbottomWidget XmCWidget Widget NULL CSG
XmNleftWidget XmCWidget Widget NULL CSG
XmNrightWidget XmCWidget Widget NULL CSG
XmNtopPosition XmCPosition int 0 CSG
XmNbottomPosition XmCPosition int 0 CSG
XmNleftPosition XmCPosition int 0 CSG
XmNrightPosition XmCPosition int 0 CSG
XmNtopOffset XmCOffset int 0 CSG
XmNbottomOffset XmCOffset int 0 CSG
XmNleftOffset XmCOffset int 0 CSG
XmNrightOffset XmCOffset int 0 CSG
XmNresizable XmCBoolean Boolean True CSG

XmNresizable 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.

XmNtopAttachment is the method of attachment for the child's top side XmNtopWidget 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.

XmNtopPosition 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.

XmNtopOffset 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.

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.

Object(3) Rect(3) UnNamedObj(3) Core(3) Composite(3) Constraint(3) XmManager(3) XmBulletinBoard(3) XmForm(3)

XmForm only has callbacks inherited from its superclasses.

April 1998 LessTif Project

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.