Composite()Composite()NameComposite widget class - fundamental widget with children.
Synopsis
Public Headers: <X11/StringDefs.h>
<X11/Composite.h>
Private Header: <X11/CompositeP.h>
Class Name: Composite
Class Hierarchy: Core → Composite
Class Pointer: compositeWidgetClass
Instantiation: Composite is an Intrinsics meta-class, and is not
normally instantiated.
Functions/Macros: XtIsComposite()DescriptionComposite is the superclass of all classes that can have children. It
defines methods for geometry management of those children.
New ResourcesComposite defines the following resources:
Name Class Type Default Access
XtNchildren XtCReadOnly WidgetList NULL G
XtNinsertPosition XtCInsertPosition (*)() NULL CSG
XtNnumChildren XtCReadOnly Cardinal 0 G
XtNchildren
List of widget's children.
XtNinsertPosition
Points to an XtOrderProc() function which is to be called to
determine the position at which each child should be inserted into
the XtNchildren array.
XtNnumChildren
Length of the array in XtNchildren.
Inherited ResourcesComposite inherits the following resources. The resources are listed
alphabetically, along with the superclass that defines them.
Resource Inherited From Resource Inherited From
XtNaccelerators Core XtNheight Core
XtNancestor- Core XtNinitialResources- Core
Sensitive Persistent
XtNbackground Core XtNmappedWhen- Core
Managed
XtNbackground- Core XtNscreen Core
PixmapXtNborderColor Core XtNsensitive Core
XtNborderPixmap Core XtNtranslations Core
XtNborderWidth Core XtNwidth Core
XtNcolormap Core XtNx Core
XtNdepth Core XtNy Core
XtNdestroyCallback CoreClass Structure
The composite class structure is defined as follows:
typedef struct {
XtGeometryHandler geometry_manager;/* geometry manager for children */
XtWidgetProc change_managed;/* change managed state of child */
XtWidgetProc insert_child;/* physically add child to parent */
XtWidgetProc delete_child;/* physically remove child */
XPointer extension; /* pointer to extension record */
} CompositeClassPart;
typedef struct {
CoreClassPart core_class;
CompositeClassPart composite_class;
} CompositeClassRec, *CompositeWidgetClass;
The fields of this class structure have the following meanings:
geometry_manager()
The geometry_manager() method called when a child widget requests
a new size or location. See the reference page in Section 4. Use
XtInheritGeometryManager to inherit the geometry_manager() method
of the superclass.
change_managed()
The change_managed() method called when a child or children become
managed or unmanaged. See the reference page in Section 4. Use
XtInheritChangeManaged to inherit the change_managed() method of
the superclass.
insert_child()
The insert_child() method called to add a child to the widgets
children instance array. See the reference page in Section 4.
Use XtInheritInsertChild to inherit the insert_child() method of
the superclass.
delete_child()
The delete_child() method called to add a child to the widgets
children instance array. See the reference page in Section 4.
Use XtInheritDeleteChild to inherit the delete_child() method of
the superclass.
extension
A linked list of extension records, or NULL. There is currently
one extension defined for Composite which allows the class to
specify whether it accepts non-widget children. See below.
Extension Structure
There is one extension defined for the Composite class. The extension
structure is shown below; the record_type field should be NULLQUARK,
and the version field should be XtCompositeExtensionVersion. The
accepts_objects field should be True if the class should accept non-
widget objects as children, or False if it should not accept them.
typedef struct {
XtPointer next_extension; /* next record is linked list, or NULL */
XrmQuark record_type; /* NULLQUARK */
long version; /* XtCompositeExtensionVersion */
Cardinal record_size; /* use sizeof() */
Boolean accepts_objects;
} CompositeClassExtensionRec, *CompositeClassExtension;
Instance Structure
The composite instance structure contains at least the following fields
(which need not be in this order):
typedef struct {
WidgetList children; /* array of ALL widget children */
Cardinal num_children;/* total number of widget children */
Cardinal num_slots;/* number of slots in children array */
XtOrderProc insert_position;/* compute position of new child */
} CompositePart;
typedef struct {
CorePart core;
CompositePart composite;
} CompositeRec, *CompositeWidget;
See AlsoXtManageChildren(1),
XtOrderProc(2),
Core(3),
change_managed(4), delete_child(4), geometry_manager(4),
insert_child(4).
Intrinsics ClassesComposite()