Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtSetValues(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtSetArg(1)

set_values(4)

set_values_hook(4)

 

Name

XtSetValues — copy resources from an ArgList to a widget. 

Synopsis

void XtSetValues(object, args, num_args)

    Widget object;
    ArgList args;
    Cardinal num_args;

Arguments

objectSpecifies the object whose resources are to be modified; may be of class Object or any subclass thereof. 

argsSpecifies the argument list of name/value pairs that contain the resources to be modified.  The resources and values passed depend on the widget being modified. 

num_argsSpecifies the number of arguments in the argument list. 

Description

XtSetValues modifies the current state of resources associated with a widget instance.  The widget decides what changes it will actually allow and updates all derived fields appropriately. 

The name fields in args contain the names of resources.  The value fields in args contain the new values of resources. 

XtSetValues starts with the resources specified for the Core widget fields and descends the subclass chain to the widget.  At each stage, it copies the new value (if specified in args) or the existing value (if no new value is specified) to a new widget instance record.  XtSetValues then calls the set_values methods for the widget in superclass-to-subclass order.  If the widget has any non-NULL set_values_hook fields, these methods are called immediately after the corresponding set_values method.  (Note, however, that set_values_hook is outmoded;  its code is now placed in set_values.)  This permits access to subpart resource data from XtSetValues. 

If the widget’s parent is a subclass of constraintWidgetClass, XtSetValues also updates the widget’s constraints.  It starts with the constraint resources specified for constraintWidgetClass and proceeds down the subclass chain to the parent’s class.  At each stage, it writes the new value or the existing value to a new constraint record.  It then calls the constraint set_values methods from constraintWidgetClass down to the parent’s class.  The constraint set_values methods are called with widget arguments, as for all set_values methods, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget. 

XtSetValues determines if a geometry request is needed by comparing the current widget to the new widget.  If any geometry changes are required, it makes the request, and the geometry manager returns XtGeometryYes, XtGeometryAlmost, or XtGeometryNo.  If XtGeometryYes is returned, XtSetValues calls the widget’s resize method.  If XtGeometryNo is returned, XtSetValues resets the geometry fields to their original values.  If XtGeometryAlmost is returned, XtSetValues calls the set_values_almost method, which determines what should be done and writes new values for the geometry fields into the new widget.  XtSetValues then repeats this process, deciding once more whether the geometry manager should be called. 

Finally, if any of the set_values methods returned True, XtSetValues causes the widget’s expose method to be invoked by calling the Xlib XClearArea function on the widget’s window. 

The conjugate function XtGetValues retrieves a widget’s values. 

Structures

Arg is defined as follows in <X11/Intrinsic.h>:

typedef struct {
String name;
XtArgVal value;
} Arg, ∗ArgList;

See Also

XtSetArg(1),
set_values(4), set_values_hook(4). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026