GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtRegisterStyle(3) FreeBSD Library Functions Manual XmtRegisterStyle(3)

XmtRegisterStyle(), XmtRegisterTemplate(), XmtLookupStyle(), XmtLookupTemplate(), XmtTemplateInstantiate() - handle styles and templates.

#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)

INPUTS
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.

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.

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.
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.