DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

XmFrame(X3mot)


XmFrame -- the Frame widget class

Synopsis

#include <Xm/Frame.h>

Description

Frame is a very simple manager used to enclose a single work area child in a border drawn by Frame. It uses the Manager class resources for border drawing and performs geometry management so that its size always matches its child's outer size plus the Frame's margins and shadow thickness.

Frame is most often used to enclose other managers when the application developer desires the manager to have the same border appearance as the primitive widgets. Frame can also be used to enclose primitive widgets that do not support the same type of border drawing. This gives visual consistency when you develop applications using diverse widget sets. Constraint resources are used to designate a child as the Frame title, align its text, and control its vertical alignment in relation to Frame's top shadow. The title appears only at the top of the Frame.

If the Frame's parent is a Shell widget, XmNshadowType defaults to XmSHADOW_OUT, and Manager's resource XmNshadowThickness defaults to 1.

If the Frame's parent is not a Shell widget, XmNshadowType defaults to XmSHADOW_ETCHED_IN, and Manager's resource XmNshadowThickness defaults to 2.

Classes

Frame inherits behavior and resources from the Core, Composite, Constraint, and XmManager classes.

The class pointer is xmFrameWidgetClass.

The class name is XmFrame.

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 lowercase or uppercase, 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).

XmFrame resource set

Name Class Type Default Access
XmNmarginWidth XmCMarginWidth Dimension 0 CSG
XmNmarginHeight XmCMarginHeight Dimension 0 CSG
XmNshadowType XmCShadowType unsigned char dynamic CSG

 +----------------+-----------------+---------------+---------+--------+
 |Name            | Class           | Type          | Default | Access |
 +----------------+-----------------+---------------+---------+--------+
 |XmNmarginWidth  | XmCMarginWidth  | Dimension     | 0       | CSG    |
 +----------------+-----------------+---------------+---------+--------+
 |XmNmarginHeight | XmCMarginHeight | Dimension     | 0       | CSG    |
 +----------------+-----------------+---------------+---------+--------+
 |XmNshadowType   | XmCShadowType   | unsigned char | dynamic | CSG    |
 +----------------+-----------------+---------------+---------+--------+

XmNmarginWidth
Specifies the padding space on the left and right sides between Frame's child and Frame's shadow drawing.

XmNmarginHeight
Specifies the padding space on the top and bottom sides between Frame's child and Frame's shadow drawing. When a title is present, the top margin equals the value specified by this resource plus the distance (if any) that the title extends below the top shadow.

XmNshadowType
Describes the drawing style for Frame. This resource can have the following values:

XmFrame constraint resource set

Name Class Type Default Access
XmNchildType XmCChildType unsigned char XmFRAME_WORKAREA_CHILD
CSG        
XmNchildHorizontalAlignment XmCChildHorizontalAlignment unsigned char XmALIGNMENT_BEGINNING
CSG        
XmNchildHorizontalSpacing XmCChildHorizontalSpacing Dimension dynamic CSG
XmNchildVerticalAlignment XmCChildVerticalAlignment unsigned char XmALIGNMENT_CENTER
CSG        

 +----------------------------+-----------------------------+-----------+---------+------------------------+
 |Name                        | Class                       | Type      | Default | Access                 |
 +----------------------------+-----------------------------+-----------+---------+------------------------+
 |XmNchildType                | XmCChildType                | unsigned  | char    | XmFRAME_WORKAREA_CHILD |
 +----------------------------+-----------------------------+-----------+---------+------------------------+
 |XmNchildHorizontalAlignment | XmCChildHorizontalAlignment | unsigned  | char    | XmALIGNMENT_BEGINNING  |
 +----------------------------+-----------------------------+-----------+---------+------------------------+
 |XmNchildHorizontalSpacing   | XmCChildHorizontalSpacing   | Dimension | dynamic | CSG                    |
 +----------------------------+-----------------------------+-----------+---------+------------------------+
 |XmNchildVerticalAlignment   | XmCChildVerticalAlignment   | unsigned  | char    | XmALIGNMENT_CENTER     |
 +----------------------------+-----------------------------+-----------+---------+------------------------+

XmNchildType
Specifies whether a child is a title or work area. Frame supports a single title and/or work area child. The possible values are:

The Frame geometry manager ignores any child of type XmFRAME_GENERIC_CHILD.


XmNchildHorizontalAlignment
Specifies the alignment of the title. This resource has the following values:

See the description of XmNalignment in the XmLabel man page for an explanation of these values.


XmNchildHorizontalSpacing
Specifies the minimum distance between either edge of the title text and the inner edge of the Frame shadow. Clipping of the title text occurs in order to maintain this spacing. The default value is the margin width of the Frame.

XmNchildVerticalAlignment
Specifies the vertical alignment of the title text, or the title area in relation to the top shadow of the Frame.

Inherited resources

Frame inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the man page for that superclass.

XmManager resource set

Name Class Type Default Access
XmNbottomShadowColor XmCBottomShadowColor Pixel dynamic CSG
XmNbottomShadowPixmap XmCBottomShadowPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNforeground XmCForeground Pixel dynamic CSG
XmNhelpCallback XmCCallback XtCallbackList NULL C
XmNhighlightColor XmCHighlightColor Pixel dynamic CSG
XmNhighlightPixmap XmCHighlightPixmap Pixmap dynamic CSG
XmNinitialFocus XmCInitialFocus Widget NULL CSG
XmNnavigationType XmCNavigationType XmNavigationType XmTAB_GROUP CSG
XmNshadowThickness XmCShadowThickness Dimension dynamic CSG
XmNstringDirection XmCStringDirection XmStringDirection dynamic CG
XmNtopShadowColor XmCTopShadowColor Pixel dynamic CSG
XmNtopShadowPixmap XmCTopShadowPixmap Pixmap dynamic CSG
XmNtraversalOn XmCTraversalOn Boolean True CSG
XmNunitType XmCUnitType unsigned char dynamic CSG
XmNuserData XmCUserData XtPointer NULL CSG

 +----------------------+-----------------------+-------------------+----------------------+--------+
 |Name                  | Class                 | Type              | Default              | Access |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNbottomShadowColor  | XmCBottomShadowColor  | Pixel             | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNbottomShadowPixmap | XmCBottomShadowPixmap | Pixmap            | XmUNSPECIFIED_PIXMAP | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNforeground         | XmCForeground         | Pixel             | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNhelpCallback       | XmCCallback           | XtCallbackList    | NULL                 | C      |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNhighlightColor     | XmCHighlightColor     | Pixel             | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNhighlightPixmap    | XmCHighlightPixmap    | Pixmap            | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNinitialFocus       | XmCInitialFocus       | Widget            | NULL                 | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNnavigationType     | XmCNavigationType     | XmNavigationType  | XmTAB_GROUP          | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNshadowThickness    | XmCShadowThickness    | Dimension         | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNstringDirection    | XmCStringDirection    | XmStringDirection | dynamic              | CG     |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNtopShadowColor     | XmCTopShadowColor     | Pixel             | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNtopShadowPixmap    | XmCTopShadowPixmap    | Pixmap            | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNtraversalOn        | XmCTraversalOn        | Boolean           | True                 | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNunitType           | XmCUnitType           | unsigned char     | dynamic              | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+
 |XmNuserData           | XmCUserData           | XtPointer         | NULL                 | CSG    |
 +----------------------+-----------------------+-------------------+----------------------+--------+

Composite resource set

Name Class Type Default Access
XmNchildren XmCReadOnly WidgetList NULL G
XmNinsertPosition XmCInsertPosition XtOrderProc NULL CSG
XmNnumChildren XmCReadOnly Cardinal 0 G

 +------------------+-------------------+-------------+---------+--------+
 |Name              | Class             | Type        | Default | Access |
 +------------------+-------------------+-------------+---------+--------+
 |XmNchildren       | XmCReadOnly       | WidgetList  | NULL    | G      |
 +------------------+-------------------+-------------+---------+--------+
 |XmNinsertPosition | XmCInsertPosition | XtOrderProc | NULL    | CSG    |
 +------------------+-------------------+-------------+---------+--------+
 |XmNnumChildren    | XmCReadOnly       | Cardinal    | 0       | G      |
 +------------------+-------------------+-------------+---------+--------+

Core resource set

Name Class Type Default Access
XmNaccelerators XmCAccelerators XtAccelerators dynamic CSG
XmNancestorSensitive XmCSensitive Boolean dynamic G
XmNbackground XmCBackground Pixel dynamic CSG
XmNbackgroundPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderColor XmCBorderColor Pixel XtDefaultForeground CSG
XmNborderPixmap XmCPixmap Pixmap XmUNSPECIFIED_PIXMAP CSG
XmNborderWidth XmCBorderWidth Dimension 0 CSG
XmNcolormap XmCColormap Colormap dynamic CG
XmNdepth XmCDepth int dynamic CG
XmNdestroyCallback XmCCallback XtCallbackList NULL C
XmNheight XmCHeight Dimension dynamic CSG
XmNinitialResourcesPersistent XmCInitialResourcesPersistent Boolean True C
XmNmappedWhenManaged XmCMappedWhenManaged Boolean True CSG
XmNscreen XmCScreen Screen * dynamic CG
XmNsensitive XmCSensitive Boolean True CSG
XmNtranslations XmCTranslations XtTranslations dynamic CSG
XmNwidth XmCWidth Dimension dynamic CSG
XmNx XmCPosition Position 0 CSG
XmNy XmCPosition Position 0 CSG

 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |Name                          | Class                         | Type           | Default              | Access |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNaccelerators               | XmCAccelerators               | XtAccelerators | dynamic              | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNancestorSensitive          | XmCSensitive                  | Boolean        | dynamic              | G      |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNbackground                 | XmCBackground                 | Pixel          | dynamic              | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNbackgroundPixmap           | XmCPixmap                     | Pixmap         | XmUNSPECIFIED_PIXMAP | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNborderColor                | XmCBorderColor                | Pixel          | XtDefaultForeground  | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNborderPixmap               | XmCPixmap                     | Pixmap         | XmUNSPECIFIED_PIXMAP | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNborderWidth                | XmCBorderWidth                | Dimension      | 0                    | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNcolormap                   | XmCColormap                   | Colormap       | dynamic              | CG     |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNdepth                      | XmCDepth                      | int            | dynamic              | CG     |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNdestroyCallback            | XmCCallback                   | XtCallbackList | NULL                 | C      |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNheight                     | XmCHeight                     | Dimension      | dynamic              | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean        | True                 | C      |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNmappedWhenManaged          | XmCMappedWhenManaged          | Boolean        | True                 | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNscreen                     | XmCScreen                     | Screen *       | dynamic              | CG     |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNsensitive                  | XmCSensitive                  | Boolean        | True                 | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNtranslations               | XmCTranslations               | XtTranslations | dynamic              | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNwidth                      | XmCWidth                      | Dimension      | dynamic              | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNx                          | XmCPosition                   | Position       | 0                    | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+
 |XmNy                          | XmCPosition                   | Position       | 0                    | CSG    |
 +------------------------------+-------------------------------+----------------+----------------------+--------+

Translations

XmFrame inherits translations from XmManager.

References

Composite(X3mot), Constraint(X3mot), Core(X3mot), XmCreateFrame(X3mot) and
XmManager(X3mot).
25 April 2004
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004