You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_Base object:
Cvo_Base
The Cvo_Base class contains information global to the application.
There should only be a single instance of this object for any given
application. Cvo automatically creates it and names it
_Cvo_Base
.
This object defines the following public data members.
char *InstanceName
XrmQuark QInstanceName
The instance name for the X application. By default this is the same as the program name, but may be overridden by the user via the -name command line option.
char *ProgramName
XrmQuark QProgramName
This is the final component of argv[0]
.
char *ClassName
XrmQuark QClassName
This is the class name of the application. If not specified in the
application, it defaults to ProgramName
with the first character
changed to uppercase.
char *ResourceName
XrmQuark QResourceName
This contains the resource name given to X.
char *DisplayName
XrmQuark QDisplayName
This contains the name of the default display for this application.
char *Locale
XrmQuark QLocale
This contains the locale this application is running in. Cvo will
have already called setlocale()
with this string.
This object defines the following member functions.
Display *FindDisplay (
int fd )
Return the X Display
structure which is using the file descriptor
fd.
Cvo_DisplayList *FindDisplayList (
Display *dpy )
Return the Cvo_DisplayList which corresponds to the X Display
dpy.
char *GetResource (
char *name,
char *class )
Return the string associated with the X Resource name(class). Note that the names are used as is with no prepending of the instance name.
char *GetOption (
char *name,
char *class )
Similar to GetResource()
, this routine will prepend name and
class with the instance name and class name respectively.
For example, _Cvo_Base.GetOption("foo", "Foo")
might be the same
as _Cvo_Base.GetResource("instance.foo", "Class.Foo")
.
char *GetLocaleOption (
char *name,
char *class )
Similar to GetResource()
, this routine will prepend name and
class with the instance name and class name respectively,
followed by the locale.
For instance, _Cvo_Base.GetLocaleOption("foo", "Foo")
might be
the same as _Cvo_Base.GetOption("locale.foo", "locale.Foo")
and
the same as _Cvo_Base.GetResource("instance.locale.foo",
"Class.locale.Foo")
.
See the legend for information about the conventions used in this documentation.