Understanding X Resources - Neoware c50 - Thin Client User Manual

Teemtalk 5.0 for unix
Hide thumbs Also See for Neoware c50 - Thin Client:
Table of Contents

Advertisement

Understanding X Resources

Most X clients now implement a simple mechanism of specifying application prefer-
ences using preference strings. These preference strings comprise the name of the X
client followed by the name of the resource to be set. A colon and then the value to be
assigned to the resource follow.
The following example specifies that the TeemTalk background colour should be set
to blue:
xteemx340*background: blue
Note that if the X client name (xteemx340) is omitted, then the resource entry will
match all applications that recognise the background resource name. Consequently the
resource entry:
*background: blue
will set the background colour of all X clients to blue.
Since most applications are now object-orientated, they comprise of many sub-objects
and hence many windows. TeemTalk for example comprises a main application
window, a scroll bar, a menu bar and many pull down menus. When the background
resource for TeemTalk is used, it changes the background colour of all objects. That is,
in our example, the main window, scroll bar background, and menu bar background
all become blue. In order to have more precise control over specific elements of an
application, the resource preference string should be considered to be a heirarchy of
objects and sub-objects of the form:
object..subobject..attribute: value
where each object and sub-object corresponds to various major components of an
application. There is no limit on the number of object name or sub-objects that may
be specified. For example the following allows different components of the TeemTalk
window to have different colours,:
xteemx340*vt220*background:
xteemx340*scrollbar*background: red
Note: The *vt220*background can be specified as the single
resource *vtBackground
The object names are hard-coded into the application and therefore fixed. With the
level of application configurability offered by this technique, careless use of re-
sources can seriously affect the operation of the application. For this reason only a
subset of all the object names and attributes are made available by the manufacturer
to the end-user.
Resources & Command Line Options
black
25-33

Advertisement

Table of Contents
loading

Table of Contents