|w||Any widget in the application; specifies the resource database in which styles or templates are to be registered, looked up, or instantiated.|
|name||The name under which the style or template is to be registered or looked up.|
|style||A string that defines the style to be registered.|
|template||A string that defines the template to be registered.|
|parent||For XmtTemplateInstantiate(), the parent of the widget for which the style or template is to be instantiated.|
|instance||For XmtTemplateInstantiate(), the name of widget for which the style or template is to be instantiated (this widget will not have been created yet.)|
|definition||The definition of the style or template to instantiate.|
|args||An array of strings to be substituted for numeric arguments in template.|
|num_args||The number of strings in args.|
XmtLookupStyle() and XmtLookupTemplate() return the definition of the named style or template, or NULL if none is found. This string is owned by Xmt and must not be modified or freed.
A style is a reusable set of resource definitions that can be copied (instantiated) into the resource database so that they apply to any individual widget. A template is like a style, but may also define a reusable widget subtree. Both styles and templates are used by the Xmt automatic widget creation facilities described in Chapter 12, Automatic Widget Creation. See that chapter for more information on defining styles and templates.
Styles and templates are usually defined and used directly in resource files. These functions also allow you to use them in your C code.
XmtRegisterStyle() registers style with name name in the resource database of w.
XmtRegisterTemplate() registers template under the name name in the resource database of w.
XmtLookupStyle() looks for and returns a definition of the style named name in the resource database of w. The returned value should not be modified or freed.
XmtLookupTemplate() looks for and returns a definition of the template named name in the resource database of w. The returned value should not be modified or freed.
XmtTemplateInstantiate() instantiates a style or template. First it replaces any %digit substitutions in definition with the corresponding strings in the args array. Then it copies each of the resource specifications in definition into the resource database of parent. The resource are copied into the database so that they appear as resources of the child named instance of the parent widget.
Chapter 11, Automatic Widget Creation.
|Xmt||XMTREGISTERSTYLE (3)||Motif Tools|