|
Next: Widget Independence Up: Widgets Previous: Object Oriented Style
ResourcesThe client resources for an application that uses a widget set can be divided into to groups, application resources and widget resources. Application resources are variables declared by the application programmer, widget resources are variables declared by the class of a widget. In both cases, they allow the application programmer and/or user to configure and customize the application. The normal mechanism is for the application, on start up, to retrieve any external resource settings from the resource manager and from various text files. Afterwards, those resources set internally within the program code will be applied, possibly overriding some of the previous, external settings. Sometimes, it is necessary for the application programmer to override user resource settings. As an example, consider a push button widget used to quit an application. The user may have a resource setting that specifies the button's label as ``Save'', instead of ``Quit''. Widget resources can be specified by a class name as well as by resource name. For example, the resource names foreground, border, block cursor, etc belong to the resource class Foreground. A resource setting which specifies the class name Foreground will affect all those resources within that class, whereas one which specifies the resource name foreground will only affect that one particular resource.
JR Pitchers Wed May 3 16:45:04 BST 1995 |
|||||||||||||||||
With any suggestions or questions please feel free to contact us |