XtVaCreateArgsList man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

XtVaCreateArgsList()					  XtVaCreateArgsList()

Name
  XtVaCreateArgsList  -	 create a varargs list for use with the XtVaNest‐
  edList 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  func‐
  tions.

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 func‐
  tions	 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 circum‐
  stances 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()
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net