- find named
resource files and read them into the resource database
Boolean XmtLoadResourceFile(Widget w, String
filename, Boolean user, Boolean override)
void XmtLoadResourceFileList(Widget w, String
- Any widget in the application.
- The base name of the resource file to be included.
- Whether user directories should be searched for the named resource file,
in addition to the regular directories.
- Whether the resources in the named file should override or augment those
already in the resource database.
- For XmtLoadResourceFileList(), a whitespace separated list of files
to read in, each filename enclosed in angle brackets or double
if the named file was
successfully loaded, and returns False
looks for the named resource file in a number of
places and merges it into the application resource database. filename
specifies the file to read; if it is an absolute filename beginning with
``/'', or a relative name, beginning with ``./'' or ``../'', then the file is
simply read. Otherwise, XmtLoadResourceFile()
to look for the named resource file in several standard places. If the
application resource is specified,
will look in the places it specifies. If that
resource is not specified, or if the file is not found there,
also looks in the places specified by the
application resource, and in the ``standard Xt path'' (which
on many systems is relative to /usr/lib/X11
.) See Chapter 6,
Managing Auxiliary Files
, for details on how the search
for named files is performed.
If the user
argument is True
, then the function will also look for
a user-specific version of the resource file. If it finds such a file, it
reads it in so that resource specifications in the user's file override any
conflicting specifications in the application file. If user
searches for a user file in the
places specified by the userConfigPath
application resource, or as
specified by the XUSERSEARCHPATH
variables. Again, see Chapter 6, for details.
argument is True
, then the resources in the specified
file will override resources with the same specifica tion in the database. If
, then these new resources will augment those already in the
database, but will not override them when conflicts occur. Prior to X11R5, you
must specify True
for this argument, because in X11R4 it is not
possible to augment resource files in this way.
remembers the full name of each resource file it
reads, and will not read any file twice. Note that it does not check whether
two different filenames refer to the same actual file (through a symbolic
link, for example), nor does it check whether a file has been modified since
the last time it was read.
to read in a
list of resource files. The files are specified in the same way that they are
on the xmtRequires
pseudo-resource that is read by
and related functions. The list
a whitespace-separate list of filenames each of which is enclosed in angle
brackets (`<' and `>') or in quotation marks.
Each filename in this list is passed (with its angle brackets or quotes removed)
as the filename
argument in a call to XmtLoadResourceFile()
it was enclosed in angle-brackets, the user
argument will be
, and if it was enclosed in quotation marks the user
The list of filenames may also be interspersed with two special directives: ``
'' and ``#augment
''. By default,
set to True
. If the #augment
encountered in the file list, then any subsequent files will be loaded with
, until an #override
directive is found.
Chapter 6, Managing Auxiliary Files
Chapter 11, Automatic Widget Creation