NAME

XtClass, XtSuperclass, XtIsSubclass, XtCheckSubclass, XtIsObject, XtIsRectObj, XtIsWidget, XtIsComposite, XtIsConstraint, XtIsShell, XtIsOverrideShell, XtIsWMShell, XtIsVendorShell, XtIsTransientShell, XtIsTopLevelShell, XtIsApplicationShell, XtIsSessionShell - obtain and verify a widget's class

SYNTAX

WidgetClass XtClass(Widget _w); WidgetClass XtSuperclass(Widget _w); Boolean XtIsSubclass(Widget _w, WidgetClass _w_i_d_g_e_t___c_l_a_s_s); void XtCheckSubclass(Widget _w_i_d_g_e_t, WidgetClass _w_i_d_g_e_t___c_l_a_s_s, String _m_e_s_s_a_g_e); Boolean XtIsObject(Widget _w); Boolean XtIsRectObj(Widget _w); Boolean XtIsWidget(Widget _w); Boolean XtIsComposite(Widget _w); Boolean XtIsConstraint(Widget _w, Boolean XtIsShell(Widget _w); Boolean XtIsOverrideShell(Widget _w); Boolean XtIsWMShell(Widget _w); Boolean XtIsVendorShell(Widget _w); Boolean XtIsTransientShell(Widget _w); Boolean XtIsTopLevelShell(Widget _w); Boolean XtIsApplicationShell(Widget _w); Boolean XtIsSessionShell(Widget _w);

ARGUMENTS

_w Specifies the widget.
_w_i_d_g_e_t___c_l_a_s_s Specifies the widget class.
_m_e_s_s_a_g_e Specifies the message that is to be used.

DESCRIPTION

The _X_t_C_l_a_s_s function returns a pointer to the widget's class structure.

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

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

The _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s 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, _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s constructs an error message from the supplied message, the widget's actual class, and the expected class and calls _X_t_E_r_r_o_r_M_s_g. _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s 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.

_X_t_C_h_e_c_k_S_u_b_c_l_a_s_s 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.

To test if a given widget belongs to a subclass of an Intrinsics-defined class, the Intrinsics defines macros or functions equivalent to _X_t_I_s_S_u_b_c_l_a_s_s for each of the built-in classes. These procedures are _X_t_I_s_O_b_j_e_c_t, _X_t_I_s_R_e_c_t_O_b_j, _X_t_I_s_W_i_d_g_e_t, _X_t_I_s_C_o_m_p_o_s_i_t_e, _X_t_I_s_C_o_n_s_t_r_a_i_n_t, _X_t_I_s_S_h_e_l_l, _X_t_I_s_O_v_e_r_r_i_d_e_S_h_e_l_l, _X_t_I_s_W_M_S_h_e_l_l, _X_t_I_s_V_e_n_d_o_r_S_h_e_l_l, _X_t_I_s_T_r_a_n_s_i_e_n_t_S_h_e_l_l, _X_t_I_s_T_o_p_L_e_v_e_l_S_h_e_l_l, _X_t_I_s_A_p_p_l_i_c_a_t_i_o_n_S_h_e_l_l, and _X_t_I_s_S_e_s_s_i_o_n_S_h_e_l_l.

The

SEE ALSO

XtAppErrorMsg(3Xt), XtDisplay(3Xt)
_X _T_o_o_l_k_i_t _I_n_t_r_i_n_s_i_c_s _- _C _L_a_n_g_u_a_g_e _I_n_t_e_r_f_a_c_e
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e