XmForm(3Xm) — UNIX Programmer’s Manual
NAME
XmForm — the Form widget class.
SYNOPSIS
#include <Xm/Form.h>
DESCRIPTION
Form is a container widget with no input semantics of its own. Constraints are placed on children of the Form to define attachments for each of the child’s four sides. These attachments can be to the Form, to another child widget or gadget, to a relative position within the Form, or to the initial position of the child. The attachments determine the layout behavior of the Form when resizing occurs.
Classes
Form inherits behavior and resources from Core, Composite, Constraint, XmManager, and XmBulletinBoard classes.
The class pointer is xmFormWidgetClass.
The class name is XmForm.
New Resources
The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource values for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lower case or upper case, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A).
| XmForm Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNfractionBase | XmCMaxValue | int | 100 | CSG |
| XmNhorizontalSpacing | XmCSpacing | int | 0 | CSG |
| XmNrubberPositioning | XmCRubberPositioning | Boolean | False | CSG |
| XmNverticalSpacing | XmCSpacing | int | 0 | CSG |
XmNfractionBase
Specifies the denominator used in calculating the relative position of a child widget using XmATTACH_POSITION constraints.
XmNhorizontalSpacing
Specifies the offset for right and left attachments.
XmNrubberPositioning
Indicates the default attachment for a child of the Form. If this Boolean resource is set to False, then the left and top of the child defaults to being attached to the left and top side of the Form. If this resource is set to True, then the child defaults to being attached to its initial position in the Form.
XmNverticalSpacing
Specifies the offset for top and bottom attachments.
| XmForm Constraint Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNbottomAttachment | XmCAttachment | unsigned char | XmATTACH_NONE | CSG |
| XmNbottomOffset | XmCOffset | int | 0 | CSG |
| XmNbottomPosition | XmCAttachment | int | 0 | CSG |
| XmNbottomWidget | XmCWidget | Widget | NULL | CSG |
| XmNleftAttachment | XmCAttachment | unsigned char | XmATTACH_NONE | CSG |
| XmNleftOffset | XmCOffset | int | 0 | CSG |
| XmNleftPosition | XmCAttachment | int | 0 | CSG |
| XmNleftWidget | XmCWidget | Widget | NULL | CSG |
| XmNresizable | XmCBoolean | Boolean | True | CSG |
| XmNrightAttachment | XmCAttachment | unsigned char | XmATTACH_NONE | CSG |
| XmNrightOffset | XmCOffset | int | 0 | CSG |
| XmNrightPosition | XmCAttachment | int | 0 | CSG |
| XmNrightWidget | XmCWidget | Widget | NULL | CSG |
| XmNtopAttachment | XmCAttachment | unsigned char | XmATTACH_NONE | CSG |
| XmNtopOffset | XmCOffset | int | 0 | CSG |
| XmNtopPosition | XmCAttachment | int | 0 | CSG |
| XmNtopWidget | XmCWidget | Widget | NULL | CSG |
XmNbottomAttachment
Specifies attachment of the bottom side of the child. It can have the following data values:
•XmATTACH_NONE — do not attach this side.
•XmATTACH_FORM — attach the bottom side of the child to the bottom side of the Form.
•XmATTACH_OPPOSITE_FORM — attach the bottom side of the child to the top side of the Form.
•XmATTACH_WIDGET — attach the bottom side of the child to the top side of the widget or gadget specified in the XmNbottomWidget resource.
•XmATTACH_OPPOSITE_WIDGET — attach the bottom side of the child to the bottom side of the widget or gadget specified in the XmNbottomWidget resource.
•XmATTACH_POSITION — attach the bottom side of the child to a relative position in the Form. This position is specified by the XmNbottomPosition resource.
•XmATTACH_SELF — attach the bottom of the child to its initial position in the Form.
XmNbottomOffset
Specifies the constant offset between the bottom side of the child and the object to which it is attached. This resource is ignored if XmNbottomAttachment is set to XmATTACH_POSITION. The relationship established remains, regardless of any resizing operations that occur.
XmNbottomPosition
Determines the relative position of the bottom side of the child. The relative position is a fractional value of the height of the Form. The fractional value is equal to the value of this resource divided by the value of XmNfractionBase. This resource is only used if XmNbottomAttachment is set to XmATTACH_POSITION.
XmNbottomWidget
Specifies the widget or gadget to which the bottom side of the child is attached. This resource is used if XmNbottomAttachment is set to either XmATTACH_WIDGET or XmATTACH_OPPOSITE_WIDGET.
XmNleftAttachment
Specifies attachment of the left side of the child. It can have the following data values:
•XmATTACH_NONE — do not attach this side.
•XmATTACH_FORM — attach the left side of the child to the left side of the Form.
•XmATTACH_OPPOSITE_FORM — attach the left side of the child to the right side of the Form.
•XmATTACH_WIDGET — attach the left side of the child to the right side of the widget or gadget specified in the XmNleftWidget resource.
•XmATTACH_OPPOSITE_WIDGET — attach the left side of the child to the left side of the widget or gadget specified in the XmNleftWidget resource.
•XmATTACH_POSITION — attach the left side of the child to a relative position in the Form. This position is specified by the XmNleftPosition resource.
•XmATTACH_SELF — attach the left side of the child to its initial position in the Form.
XmNleftOffset
Specifies the constant offset between the left side of the child and the object to which it is attached. This resource is ignored if XmNleftAttachment is set to XmATTACH_POSITION. The relationship established remains, regardless of any resizing operations that occur.
XmNleftPosition
Determines the relative position of the left side of the child. The relative position is a fractional value of the width of the Form. The fractional value is equal to the value of this resource divided by the value of XmNfractionBase. This resource is only used if XmNleftAttachment is set to XmATTACH_POSITION.
XmNleftWidget
Specifies the widget or gadget to which the left side of the child is attached. This resource is used if XmNleftAttachment is set to either XmATTACH_WIDGET or XmATTACH_OPPOSITE_WIDGET.
XmNresizable
Specifies whether a child widget can be resized by the Form. The default value is True.
XmNrightAttachment
Specifies attachment of the right side of the child. It can have the following data values:
•XmATTACH_NONE — do not attach this side.
•XmATTACH_FORM — attach the right side of the child to the right side of the Form.
•XmATTACH_OPPOSITE_FORM — attach the right side of the child to the left side of the Form.
•XmATTACH_WIDGET — attach the right side of the child to the left side of the widget or gadget specified in the XmNrightWidget resource.
•XmATTACH_OPPOSITE_WIDGET — attach the right side of the child to the right side of the widget or gadget specified in the XmNrightWidget resource.
•XmATTACH_POSITION — attach the right side of the child to a relative position in the Form. This position is specified by the XmNrightPosition resource.
•XmATTACH_SELF — attach the right side of the child to its initial position in the Form.
XmNrightOffset
Specifies the constant offset between the right side of the child and the object to which it is attached. This resource is ignored if XmNrightAttachment is set to XmATTACH_POSITION. The relationship established remains, regardless of any resizing operations that occur.
XmNrightPosition
Determines the relative position of the right side of the child. The relative position is a fractional value of the width of the Form. The fractional value is equal to the value of this resource divided by the value of XmNfractionBase. This resource is only used if XmNrightAttachment is set to XmATTACH_POSITION.
XmNrightWidget
Specifies the widget or gadget to which the right side of the child is attached. This resource is used if XmNrightAttachment is set to either XmATTACH_WIDGET or XmATTACH_OPPOSITE_WIDGET.
XmNtopAttachment
Specifies attachment of the top side of the child. It can have the following data values:
•XmATTACH_NONE — do not attach this side.
•XmATTACH_FORM — attach the top side of the child to the top side of the Form.
•XmATTACH_OPPOSITE_FORM — attach the top side of the child to the bottom side of the Form.
•XmATTACH_WIDGET — attach the top side of the child to the bottom side of the widget or gadget specified in the XmNtopWidget resource.
•XmATTACH_OPPOSITE_WIDGET — attach the top side of the child to the top side of the widget or gadget specified in the XmNtopWidget resource.
•XmATTACH_POSITION — attach the top side of the child to a relative position in the Form. This position is specified by the XmNtopPosition resource.
•XmATTACH_SELF — attach the top side of the child to its initial position in the Form.
XmNtopOffset
Specifies the constant offset between the top side of the child and the object to which it is attached. This resource is ignored if XmNtopAttachment is set to XmATTACH_POSITION. The relationship established remains, regardless of any resizing operations that occur.
XmNtopPosition
Determines the relative position of the top side of the child. The relative position is a fractional value of the height of the Form. The fractional value is equal to the value of this resource divided by the value of XmNfractionBase. This resource is only used if XmNtopAttachment is set to XmATTACH_POSITION.
XmNtopWidget
Specifies the widget or gadget to which the top side of the child is attached. This resource is used if XmNtopAttachment is set to either XmATTACH_WIDGET or XmATTACH_OPPOSITE_WIDGET.
Inherited Resources
Form inherits behavior and resources from the following superclasses. For a complete description of these resources, refer to the man page for that superclass.
| XmBulletinBoard Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNallowOverlap | XmCAllowOverlap | Boolean | True | N/A |
| XmNautoUnmanage | XmCAutoUnmanage | Boolean | True | N/A |
| XmNbuttonFontList | XmCButtonFontList | XmFontList | NULL | N/A |
| XmNcancelButton | XmCWidget | Widget | NULL | N/A |
| XmNdefaultButton | XmCWidget | Widget | NULL | N/A |
| XmNdefaultPosition | XmCDefaultPosition | Boolean | True | N/A |
| XmNdialogStyle | XmCDialogStyle | unsigned char | dynamic | N/A |
| XmNdialogTitle | XmCXmString | XmString | NULL | N/A |
| XmNfocusCallback | XmCCallback | XtCallbackList | NULL | C |
| XmNlabelFontList | XmCLabelFontList | XmFontList | NULL | N/A |
| XmNmapCallback | XmCCallback | XtCallbackList | NULL | C |
| XmNmarginHeight | XmCMarginHeight | short | 10 | N/A |
| XmNmarginWidth | XmCMarginWidth | short | 10 | N/A |
| XmNnoResize | XmCNoResize | Boolean | False | N/A |
| XmNresizePolicy | XmCResizePolicy | unsigned char | XmRESIZE_ANY | CSG |
| XmNshadowType | XmCShadowType | unsigned char | XmSHADOW_OUT | N/A |
| XmNstringDirection | XmCStringDirection | XmStringDirection | XmSTRING_DIRECTION_L_TO_R | N/A |
| XmNtextFontList | XmCTextFontList | XmFontList | NULL | N/A |
| XmNtextTranslations | XmCTranslations | XtTranslations | NULL | N/A |
| XmNunmapCallback | XmCCallback | XtCallbackList | NULL | C |
| XmManager Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNbottomShadowColor | XmCForeground | Pixel | dynamic | CSG |
| XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNforeground | XmCForeground | Pixel | dynamic | CSG |
| XmNhelpCallback | XmCCallback | XtCallbackList | NULL | C |
| XmNhighlightColor | XmCForeground | Pixel | Black | CSG |
| XmNhighlightPixmap | XmCHighlightPixmap | Pixmap | dynamic | CSG |
| XmNshadowThickness | XmCShadowThickness | short | 0 | N/A |
| XmNtopShadowColor | XmCBackground | Pixel | dynamic | CSG |
| XmNtopShadowPixmap | XmCTopShadowPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNunitType | XmCUnitType | unsigned char | XmPIXELS | CSG |
| XmNuserData | XmCUserData | caddr_t | NULL | CSG |
| Composite Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNinsertPosition | XmCInsertPosition | XmRFunction | NULL | CSG |
| Core Resource Set | ||||
| Name | Class | Type | Default | Access |
| XmNaccelerators | XmCAccelerators | XtTranslations | NULL | CSG |
| XmNancestorSensitive | XmCSensitive | Boolean | True | G |
| XmNbackground | XmCBackground | Pixel | dynamic | CSG |
| XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNborderColor | XmCBorderColor | Pixel | Black | CSG |
| XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG |
| XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG |
| XmNcolormap | XmCColormap | Colormap | XtCopyFromParent | CG |
| XmNdepth | XmCDepth | int | XtCopyFromParent | CG |
| XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C |
| XmNheight | XmCHeight | Dimension | 0 | CSG |
| XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG |
| XmNscreen | XmCScreen | Pointer | XtCopyScreen | CG |
| XmNsensitive | XmCSensitive | Boolean | True | CSG |
| XmNtranslations | XmCTranslations | XtTranslations | NULL | CSG |
| XmNwidth | XmCWidth | Dimension | 0 | CSG |
| XmNx | XmCPosition | Position | 0 | CSG |
| XmNy | XmCPosition | Position | 0 | CSG |
Behavior
Form inherits BulletinBoard’s behavior.
Default Translations
Form inherits BulletinBoard’s default translations.
Keyboard Traversal
For information on keyboard traversal, see the man page for XmManager(3Xm) and its sections on behavior and default translations.
RELATED INFORMATION
Composite(3Xm), Constraint(3Xm), Core(3Xm), XmBulletinBoard(3Xm), XmCreateForm, XmCreateFormDialog(3Xm), and XmManager(3Xm).
7th Edition