xref: /386bsd/usr/X386/man/man3/XtClass.3x (revision a2142627)
.\\$1D \\$2 \\$1
.if \\n(VS>=40 .vs \\n(VSu
.if \\n(VS<=39 .vs \\n(VSp
..

0 .nr BD 0

..

.KS .TA .5i 3i

..
.KE

.. .. .KS

.D

choose appropriate monospace font
the imagen conditional, 480,
may be changed to L if LB is too
heavy for your eyes...

.. .R .. .. .. .TB

\\*(NO .R .. . \" Note End -- doug kraft 3/85

0 .. .ny0

XtClass 3Xt "Release 3" "X Version 11" "XT FUNCTIONS"
NAME
XtClass, XtSuperClass, XtIsSubclass, XtCheckSubclass, XtIsComposite, XtIsManaged - obtain and verify a widget's class
SYNTAX
WidgetClass XtClass(w)

Widget w;

WidgetClass XtSuperclass(w)

Widget w;

Boolean XtIsSubclass(w, widget_class)

Widget w;

WidgetClass widget_class;

void XtCheckSubclass(w, widget_class, message)

Widget w;

WidgetClass widget_class;

String message;

Boolean XtIsComposite(w)

Widget w;

Boolean XtIsManaged(w)

Widget w\^;

ARGUMENTS
w 1i
Specifies the widget.
widget_class 1i
Specifies the widget class\*(Wc.
message 1i
Specifies the message that is to be \*(Me.
DESCRIPTION
The .ZN XtClass function returns a pointer to the widget's class structure.

The .ZN XtSuperclass function returns a pointer to the widget's superclass class structure.

The .ZN XtIsSubclass function returns .ZN True if the class of the specified widget is equal to or is a subclass of the specified widget class. The specified widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. Composite widgets that need to restrict the class of the items they contain can use .ZN XtIsSubclass to find out if a widget belongs to the desired class of objects.

The .ZN XtCheckSubclass macro determines if the class of the specified widget is equal to or is a subclass of the specified widget class. The widget can be any number of subclasses down the chain and need not be an immediate subclass of the specified widget class. If the specified widget is not a subclass, .ZN XtCheckSubclass constructs an error message from the supplied message, the widget's actual class, and the expected class and calls .ZN XtErrorMsg . .ZN XtCheckSubclass should be used at the entry point of exported routines to ensure that the client has passed in a valid widget class for the exported operation.

.ZN XtCheckSubclass is only executed when the widget has been compiled with the compiler symbol DEBUG defined; otherwise, it is defined as the empty string and generates no code.

The .ZN XtIsComposite function is a convenience function that is equivalent to .ZN XtIsSubclass with .ZN compositeWidgetClass specified.

The .ZN XtIsManaged macro (for widget programmers) or function (for application programmers) returns .ZN True if the specified child widget is managed or .ZN False if it is not.

"SEE ALSO"
XtAppErrorMsg(3Xt), XtDisplay(3Xt)

\*(xT

\*(xL