NAME
XtSetSensitive, XtIsSensitive - set and check a widget's sensitivity state
SYNTAX
void XtSetSensitive(Widget _w, Boolean _s_e_n_s_i_t_i_v_e);
Boolean XtIsSensitive(Widget _w);
ARGUMENTS
-
_s_e_n_s_i_t_i_v_e
Specifies a Boolean value that indicates whether the widget should receive
-
keyboard and pointer events.
-
_w
Specifies the widget.
-
DESCRIPTION
The
_X_t_S_e_t_S_e_n_s_i_t_i_v_e
function first calls
_X_t_S_e_t_V_a_l_u_e_s
on the current widget with an argument list specifying that the
sensitive field should change to the new value.
It then recursively propagates the new value
down the managed children tree by calling
_X_t_S_e_t_V_a_l_u_e_s
on each child to set the ancestor_sensitive to the new value if the new
values for sensitive and the child's ancestor_sensitive are not the same.
_X_t_S_e_t_S_e_n_s_i_t_i_v_e
calls
_X_t_S_e_t_V_a_l_u_e_s
to change sensitive and ancestor_sensitive.
Therefore, when one of these changes,
the widget's set_values procedure should
take whatever display actions are needed
(for example, greying out or stippling the widget).
_X_t_S_e_t_S_e_n_s_i_t_i_v_e
maintains the invariant that if parent has either sensitive
or ancestor_sensitive
_F_a_l_s_e,
then all children have ancestor_sensitive
_F_a_l_s_e.
The
_X_t_I_s_S_e_n_s_i_t_i_v_e
function returns
_T_r_u_e
or
_F_a_l_s_e
to indicate whether or not user input events are being dispatched.
If both core.sensitive and core.ancestor_sensitive are
_T_r_u_e,
_X_t_I_s_S_e_n_s_i_t_i_v_e
returns
_T_r_u_e;
otherwise, it returns
_F_a_l_s_e.
SEE ALSO
_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