|
NAMEXmtRegisterStyle(), XmtRegisterTemplate(), XmtLookupStyle(), XmtLookupTemplate(), XmtTemplateInstantiate() - handle styles and templates.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) ARGUMENTSINPUTS
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. DESCRIPTIONA ``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. SEE ALSOChapter 11, Automatic Widget Creation.
Visit the GSP FreeBSD Man Page Interface. |