Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XtIsSubclas(3) — OSF1 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XtCheckSubclass(1)

XtClass(1)

XtSuperclass(1)

Composite(3)

Core(3)

 

Name

XtIsSubclass — determine whether a widget is a subclass of a class. 

Synopsis

Boolean XtIsSubclass(object, object_class)

    Widget object;
    WidgetClass object_class;

Arguments

objectSpecifies the object instance whose class is to be checked; may be of class Object or any subclass thereof. 

object_class
Specifies the widget class to test against.

Description

If object belongs to a derived class of object_class, then it is a subclass.  XtIsSubclass returns True if the specified widget is a subclass of the given class. 

A widget is trivially a subclass of its own widget class, or it can be any number of subclasses removed.  XtIsSubclass starts with the widget_class field in the Core class part of object’s widget structure and follows the superclass pointer until it reaches the top of the class hierarchy.  If it finds any match to the class of the specified widget, it returns True. 

Composite widgets that restrict the class of widgets they will adopt as children can use XtIsSubclass to find out whether a widget belongs to the desired widget class. 

To test whether a given widget is a subclass of an Intrinsics-defined class, the Intrinsics define macros or functions equivalent to XtIsSubclass for each of the built-in classes.  These procedures are XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell and XtIsApplicationShell. 

All of these macros and functions have the same argument description: Boolean XtIsclass(object)

    Widget object;

objectSpecifies the object instance whose class is to be checked. May be of class objectClass or any subclass thereof. 

These procedures may be faster than calling XtIsSubclass directly for the built-in classes. 

See Also

XtCheckSubclass(1), XtClass(1), XtSuperclass(1),
Composite(3), Core(3). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026