|
Next: Resource Matching Up: Widget Resource Management Previous: Widget Resource Management
Setting ResourcesA resource setting consists of a specification and a string value, separated by a colon. For widget resources, the specification part should follow the widget's hierarchy, using instance names, class names or a combination of both, and arrive at a resource variable instance name or class name. For example: 1 xbutton.quit.label: exit The first example says that the label resource instance of the widget instance named quit, in the application instance xbutton should have the value exit. The second example says that the label resource instance of all widgets belonging to the Command widget class, in all applications belonging to the application class XButton, should have the value quit. The third example says that all resource instances belonging to the resource class Label, for a widget instance named quit, in all applications belonging to the application class XButton, should have the value done. Using a period to delimit entries in the specification part of resource settings, as in the previous examples, is known as tight binding. Another method using an asterisk as a wildcard to match any number of class or instance names is known as loose binding For example: 1 *quit.label: exit The first example says that the label resource instance of widget instances named quit, in any application, should have the value exit. The second example says that the label resource instance of all widgets that have such a resource, in the application instance xbutton, should have the value quit. The third example says that the label resource instance of all widgets that have such a resource, in all applications, should have the value done.
Next: Resource Matching Up: Widget Resource Management Previous: Widget Resource Management
JR Pitchers Wed May 3 16:45:04 BST 1995 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |