1XtClass(3) XT FUNCTIONS XtClass(3)
2
3
4
6 XtClass, XtSuperclass, XtIsSubclass, XtCheckSubclass, XtIsObject, XtIs‐
7 RectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIs‐
8 OverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIs‐
9 TopLevelShell, XtIsApplicationShell, XtIsSessionShell - obtain and ver‐
10 ify a widget's class
11
13 #include <X11/Intrinsic.h>
14
15 WidgetClass XtClass(Widget w);
16
17 WidgetClass XtSuperclass(Widget w);
18
19 Boolean XtIsSubclass(Widget w, WidgetClass widget_class);
20
21 void XtCheckSubclass(Widget widget, WidgetClass widget_class, String
22 message);
23
24 Boolean XtIsObject(Widget w);
25
26 Boolean XtIsRectObj(Widget w);
27
28 Boolean XtIsWidget(Widget w);
29
30 Boolean XtIsComposite(Widget w);
31
32 Boolean XtIsConstraint(Widget w);
33
34 Boolean XtIsShell(Widget w);
35
36 Boolean XtIsOverrideShell(Widget w);
37
38 Boolean XtIsWMShell(Widget w);
39
40 Boolean XtIsVendorShell(Widget w);
41
42 Boolean XtIsTransientShell(Widget w);
43
44 Boolean XtIsTopLevelShell(Widget w);
45
46 Boolean XtIsApplicationShell(Widget w);
47
48 Boolean XtIsSessionShell(Widget w);
49
51 w Specifies the widget.
52
53 widget_class
54 Specifies the widget class.
55
56 message Specifies the message that is to be used.
57
59 The XtClass function returns a pointer to the widget's class structure.
60
61 The XtSuperclass function returns a pointer to the widget's superclass
62 class structure.
63
64 The XtIsSubclass function returns True if the class of the specified
65 widget is equal to or is a subclass of the specified class. The wid‐
66 get's class can be any number of subclasses down the chain and need not
67 be an immediate subclass of the specified class. Composite widgets
68 that need to restrict the class of the items they contain can use XtIs‐
69 Subclass to find out if a widget belongs to the desired class of ob‐
70 jects.
71
72 The XtCheckSubclass macro determines if the class of the specified wid‐
73 get is equal to or is a subclass of the specified widget class. The
74 widget can be any number of subclasses down the chain and need not be
75 an immediate subclass of the specified widget class. If the specified
76 widget is not a subclass, XtCheckSubclass constructs an error message
77 from the supplied message, the widget's actual class, and the expected
78 class and calls XtErrorMsg. XtCheckSubclass should be used at the en‐
79 try point of exported routines to ensure that the client has passed in
80 a valid widget class for the exported operation.
81
82 XtCheckSubclass is only executed when the widget has been compiled with
83 the compiler symbol DEBUG defined; otherwise, it is defined as the
84 empty string and generates no code.
85
86 To test if a given widget belongs to a subclass of an Intrinsics-de‐
87 fined class, the Intrinsics defines macros or functions equivalent to
88 XtIsSubclass for each of the built-in classes. These procedures are
89 XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint,
90 XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIs‐
91 TransientShell, XtIsTopLevelShell, XtIsApplicationShell, and XtIsSes‐
92 sionShell.
93
94 The
95
97 XtAppErrorMsg(3), XtDisplay(3)
98 X Toolkit Intrinsics - C Language Interface
99 Xlib - C Language X Interface
100
101
102
103X Version 11 libXt 1.2.1 XtClass(3)