DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

Composite(X3mot)


Composite -- the Composite widget class

Synopsis

#include <Xm/Xm.h>

Description

Composite widgets are intended to be containers for other widgets and can have an arbitrary number of children. Their responsibilities (implemented either directly by the widget class or indirectly by Intrinsics functions) include:

Classes

Composite inherits behavior and resources from Core.

The class pointer is compositeWidgetClass.

The class name is Composite.

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

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      |
 +------------------+-------------------+-------------+---------+--------+

XmNchildren
A read-only list of the children of the widget.

XmNinsertPosition
Points to the XtOrderProc function described below.

XmNnumChildren
A read-only resource specifying the length of the list of children in XmNchildren.

The following procedure pointer in a composite widget instance is of type XtOrderProc:

   Cardinal (* XtOrderProc) (widget)
   Widget w;

w
Specifies the widget.

Composite widgets that allow clients to order their children (usually homogeneous boxes) can call their widget instance's insert_position procedure from the class's insert_child procedure to determine where a new child should go in its children array. Thus, a client of a composite class can apply different sorting criteria to widget instances of the class, passing in a different insert_position procedure when it creates each composite widget instance.

The return value of the insert_position procedure indicates how many children should go before the widget. Returning zero indicates that the widget should go before all other children; returning num_children indicates that it should go after all other children. The default insert_position function returns num_children and can be overridden by a specific composite widget's resource list or by the argument list provided when the composite widget is created.

Inherited resources

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

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 1 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      | 1                    | 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

There are no translations for Composite.

References

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