Frame is a simple manager that encloses a child and displays a shadow around it. An application usually uses a Frame to provide a shadow for a widget, such as a RowColumn WorkArea, that does not display a shadow itself. The Frame resource XmNshadowType determines the type of shadow to draw. The resources XmNmarginHeight and XmNmarginWidth specify the margin between the shadow and the border of the child.
Frame can also have one other child that serves as a title. Frame places the title above the principal child of the Frame. The following constraint resources determine the Frame's treatment of the child:
The value is a constant that tells the Frame whether the child is the work area child, the title, or another kind of child. Following are the possible values:
This value specifies that the child is the principal (work area) component. This is the default.
This value specifies that the child is the Frame title.
This value specifies that the child is a component other than the work area and the title. When the value is XmFRAME_GENERIC_CHILD, Frame does not include the child in its layout.
The value specifies the alignment of the title with respect to the left and right inner edges of the Frame (determined by the child's XmNchildHorizontalSpacing). Following are the possible values:
This value specifies that the title is placed at the left inner edge when the Frame's XmNstringDirection has the value XmSTRING_DIRECTION_L_TO_R; otherwise, the title is placed at the right inner edge. This is the default.
This value specifies that the title is placed at the right inner edge when the Frame's XmNstringDirection has the value XmSTRING_DIRECTION_L_TO_R; otherwise, the title is placed at the left inner edge.
This value specifies that the title is centered between the edges.
The value is the minimum distance between the title and the shadow along the left and right edges of the Frame. The default is the Frame's XmNmarginWidth.
The value specifies the alignment of the title with respect to the shadow along the top edge of the Frame. Following are the possible values:
The baseline of the last line of text in the title is even with the shadow along the top edge of the Frame.
The baseline of the first line of text in the title is even with the shadow along the top edge of the Frame.
The center of the title is even with the shadow along the top edge of the Frame. This is the default.
The bottom edge of the title is even with the shadow along the top edge of the Frame.
The top edge of the title is even with the shadow along the top edge of the Frame.
Following is a UIL specification for an example Frame with a Label title and a Form child (not defined here):
object exampleFrame: XmFrame { controls { XmLabel { arguments { XmNframeChildType = XmFRAME_TITLE_CHILD; XmNchildHorizontalSpacing = 4; XmNchildVerticalAlignment = XmALIGNMENT_WIDGET_BOTTOM; }; }; XmForm exampleForm; }; };