You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_BasicObject object:
Cvo_BasicObject
The Cvo_BasicObject is just that, the most basic object in the tree of visual objects. It should not be created directly by an application. It is documented only to provide information for the most basic member functions available to all visual objects.
This object defines the following member functions.
BOOL IsValid (
)
This function returns True
if the object pointer still appears to
point to a valid object. Hopefully the application will not ever
need to use this feature as it will keep track of which objects it
deletes.
long Type (
)
Each derived class has a unique number associated with it. This member function returns that number.
long Serial (
)
This function returns a unique number associated with this object for the life of the application.
Cvo_Object *ToObject (
)
Cvo_LayoutWindow *ToLayoutWindow (
)
Cvo_Window *ToWindow (
)
Cvo_Pixmap *ToPixmap (
)
These functions typecast the current object into the specified type
if the object was actually derived from the specified type. If not,
the function returns a NULL
value. For instance, if you wanted to
set the icon pixmap for an object, which requires it to be a
Cvo_Window, you might use the following code:
Cvo_Window *w = object->ToWindow();
if (w) w->SetIconPixmap(icon_pixmap);
Window Win (
)
This function returns the Window
ID associated with the object. It
will return zero if either the object is a pixmap, or the object has
not yet been created.
Drawable Object (
)
This function returns the Drawable
ID, which is either a
Window
ID or a Pixmap
ID, associated with the object. It will
return zero if the object has not been created yet.
Pixmap Pix (
)
This function returns the Pixmap
ID associated with the object. It
will return zero if either the object is a window, or the pixmap was not
able to be created.
Display *Dpy (
)
This function returns the X Display
associated with the object.
int XScreen (
)
This function returns the screen number that this object is on.
Window Root (
)
This function returns the root window of the screen that this object is on.
Cvo_DisplayList *DisplayList (
)
This function returns the Cvo_DisplayList structure for this object.
short Width (
)
short Height (
)
These functions returns the width and height of the object. It is important to note that this width is Cvo's idea of the width of the object. It does not include any padding, chamfers, or borders.
BOOL Sunken (
)
This function returns True
if this object's window has a sunken
background, False
if not.
short Depth (
)
This function returns the depth of the object in planes. An object of depth 8 would have 2^8 (256) possible colors, while an object of depth 1 (monochrome) would only have 2^1 (two) colors available.
CARD32 White (
)
CARD32 Black (
)
These functions return the constant pixel values for the white and black pixels.
Colormap Cmap (
)
This function returns the color map used by this object.
BOOL Mapped (
)
BOOL Unmapped (
)
These functions return True
if the object has been
mapped/unmapped, False
if not. They will always return opposite
values.
BOOL Configured (
)
This function returns True if the object has generated at least one
X ConfigureEvent
.
BOOL Monochrome (
)
BOOL Color (
)
These functions will return True
if the object is monochrome/color,
False
if not. They will always return opposite values.
BOOL Exposed (
)
This function will return True
if the object has been exposed,
False
if not.
BOOL Sensitive (
)
This function will return True
if the object is currently
sensitive, False
if not.
See the legend for information about the conventions used in this documentation.