XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
The _X_t_P_o_p_u_p_S_p_r_i_n_g_L_o_a_d_e_d function performs exactly as _X_t_P_o_p_u_p except that it sets the shell _s_p_r_i_n_g___l_o_a_d_e_d field to _T_r_u_e and always calls _X_t_A_d_d_G_r_a_b with _e_x_c_l_u_s_i_v_e _T_r_u_e and _s_p_r_i_n_g___l_o_a_d_e_d _T_r_u_e.
The _X_t_C_a_l_l_b_a_c_k_N_o_n_e, _X_t_C_a_l_l_b_a_c_k_N_o_n_e_x_c_l_u_s_i_v_e, and _X_t_C_a_l_l_b_a_c_k_E_x_c_l_u_s_i_v_e functions call _X_t_P_o_p_u_p with the shell specified by the client data argument and grab_kind set as the name specifies. _X_t_C_a_l_l_b_a_c_k_N_o_n_e, _X_t_C_a_l_l_b_a_c_k_N_o_n_e_x_c_l_u_s_i_v_e, and _X_t_C_a_l_l_b_a_c_k_E_x_c_l_u_s_i_v_e specify _X_t_G_r_a_b_N_o_n_e, _X_t_G_r_a_b_N_o_n_e_x_c_l_u_s_i_v_e, and _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e, respectively. Each function then sets the widget that executed the callback list to be insensitive by using _X_t_S_e_t_S_e_n_s_i_t_i_v_e. Using these functions in callbacks is not required. In particular, an application must provide customized code for callbacks that create pop-up shells dynamically or that must do more than desensitizing the button.
_M_e_n_u_P_o_p_u_p is known to the translation manager, which must perform special actions for spring-loaded pop-ups. Calls to _M_e_n_u_P_o_p_u_p in a translation specification are mapped into calls to a nonexported action procedure, and the translation manager fills in parameters based on the event specified on the left-hand side of a translation.
If _M_e_n_u_P_o_p_u_p is invoked on _B_u_t_t_o_n_P_r_e_s_s (possibly with modifiers), the translation manager pops up the shell with grab_kind set to _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e and spring_loaded set to _T_r_u_e. If _M_e_n_u_P_o_p_u_p is invoked on _E_n_t_e_r_W_i_n_d_o_w (possibly with modifiers), the translation manager pops up the shell with grab_kind set to _X_t_G_r_a_b_N_o_n_e_x_c_l_u_s_i_v_e and spring_loaded set to _F_a_l_s_e. Otherwise, the translation manager generates an error. When the widget is popped up, the following actions occur:
XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
(Note that these actions are the same as those for _X_t_P_o_p_u_p.) _M_e_n_u_P_o_p_u_p tries to find the shell by searching the widget tree starting at the parent of the widget in which it is invoked. If it finds a shell with the specified name in the pop-up children of that parent, it pops up the shell with the appropriate parameters. Otherwise, it moves up the parent chain as needed. If _M_e_n_u_P_o_p_u_p gets to the application widget and cannot find a matching shell, it generates an error.