Query: xtvacreateargslist
OS: hpux
Section: 1
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
XtVaCreateArgsList() XtVaCreateArgsList()
Name
XtVaCreateArgsList - create a varargs list for use with the XtVaNestedList symbol.
Synopsis
XtVarArgsList XtVaCreateArgsList(unused, ..., NULL)
XtPointer unused;
Inputs
unused This argument is not currently used and must be specified as NULL.
..., NULL A NULL-terminated variable-length list of resource name/value pairs.
Returns
An XtVarArgsList which can be used in future calls to other XtVa functions.
Availability
Release 4 and later.
Description
XtVaCreateArgsList() allocates, copies its arguments into, and returns a pointer to a structure that can be used in future calls to XtVa
functions using the special symbol XtVaNestedList. When this symbol appears in place of a resource name in a variable-length argument
list, the next value is interpreted not as a resource value itself, but as a nested argument list of resource name/resource value pairs.
When an XtVarArgsList is created, any entries in the list of type XtVaTypedArg are copied as specified without applying conversions; they
will be converted when the list is actually used. Pointer types (including strings) passed to XtVaCreateArgsList() are not copied; the
caller must ensure that the data remains valid for the lifetime of the created XtVarArgsList.
When no longer needed, the returned list should be freed using XtFree().
See XtVaSetValues() for full details on the use of variable length argument lists.
Usage
Nested lists can be useful with the XtVa functions in the same circumstances that statically initialized ArgLists are useful to the non-
XtVa functions: when there are a set of resources that will be applied to more than one widget. The example below presents one such case.
Example
You might want to use nested argument lists to define a set of related resources that will be applied to multiple widgets:
XFontStruct *normal_font, *bold_font;
XtVarArgsList caution_resources;
Widget box, commit, abort;
caution_resources = XtVaCreateArgsList(NULL,
XtNFont, bold_font,
XtVaTypedArg, XtNforeground, XtRString, "red", 4,
XtNborderWidth, 4,
NULL);
commit = XtVaCreateWidget("commit", buttonWidgetClass, box,
XtNlabel, "Commit All Changes",
XtVaNestedList, caution_resources,
NULL);
abort = XtVaCreateWidget("abort", buttonWidgetClass, box,
XtNlabel, "Abort Transaction",
XtVaNestedList, caution_resources,
NULL);
/* free the list since I'm not going to use it again */
XtFree(caution_resources);
Structures
The XtVarArgsList type is defined as follows:
typedef XtPointer XtVarArgsList;
See Also
XtVaSetValues(1).
Xt - Resource Management XtVaCreateArgsList()
| Related Man Pages |
|---|
| xmvacreatesimplecheckbox(3) - redhat |
| xmvacreatesimpleoptionmenu(3) - centos |
| xmvacreatesimplemenubar(3) - hpux |
| xtvacreateargslist(3) - hpux |
| xtvasetvalues(3) - hpux |
| Similar Topics in the Unix Linux Community |
|---|
| PHP Man Pages Now Available (Over 10,000) |
| SAN Migration question |
| Thank you members and admins |
| Shopt -s histappend |