10

Instead of these routines, the Pascal interface to XView defines a separate routine to get and set each attribute.

set—The routine to set an attribute is called set_attrname. Each set routine is a procedure, and takes as its first argument the object for which the attribute is being set. The second argument is the value of the attribute.

get—The routine to get the value of an attribute is called get_attrname. Each get routine is a function, and takes an XView object as the first argument. It returns the value of the attribute requested.

For example:

set_WIN_SHOW ( frame, true );

width := get_CANVAS_WIDTH ( canvas );

These routines are defined in the header file, attrgetset_p.h.

Attribute Lists

Some of the XView C routines can optionally take extra arguments that are lists of attributes and values. The extra arguments vary in number and type. You must pass a 0 to the last argument of these routines.

Since Pascal does not support variable length argument lists, the Pascal definition has a single argument.

Instead, special versions of these routines are provided which take as a last argument an argument of type Attr_avlist. This type is a pointer to an array of attributes and values. The special routines are:

xv_init_l(), xv_create_l(), xv_find_l(), selection_ask_l(), selection_init_request_l().

The XView Toolkit

225