Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtRegisterStyle(3)	   Library Functions Manual	   XmtRegisterStyle(3)

NAME
       XmtRegisterStyle(),   XmtRegisterTemplate(),   XmtLookupStyle(),	  Xmt-
       LookupTemplate(), XmtTemplateInstantiate() -  handle  styles  and  tem-
       plates.

SYNOPSIS
       #include	<Xmt/Template.h>

       void XmtRegisterStyle(Widget w, String name, String style)

       void XmtRegisterTemplate(Widget w, String name, String template)

       String XmtLookupStyle(Widget w, String name)

       String XmtLookupTemplate(Widget w, String name)

       void XmtTemplateInstantiate(Widget parent, String instance, String
		      definition, String *args,	Cardinal num_args)

ARGUMENTS
       INPUTS

	    w	   Any widget in the application; specifies the	resource data-
		   base	 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	regis-
		   tered 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.

       RETURNS

	    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.

DESCRIPTION
       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 data-
       base 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	corre-
       sponding	 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.

SEE ALSO
       Chapter 11, Automatic Widget Creation.

Xmt				  Motif	Tools		   XmtRegisterStyle(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtRegisterStyle&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help