


XtPopup(3Xt)							 XtPopup(3Xt)
X11R5									X11R5



NAME
  XtPopup, XtCallbackNone, XtCallbackNonexclusive, XtCallbackExclusive,	Menu-
  Popup	- map a	pop-up

SYNTAX
  void XtPopup(_p_o_p_u_p__s_h_e_l_l, _g_r_a_b__k_i_n_d)
	Widget _p_o_p_u_p__s_h_e_l_l;
	XtGrabKind _g_r_a_b__k_i_n_d;

  void XtCallbackNone(_w, _c_l_i_e_n_t__d_a_t_a, _c_a_l_l__d_a_t_a)
	Widget _w;
	XtPointer _c_l_i_e_n_t__d_a_t_a;
	XtPointer _c_a_l_l__d_a_t_a;

  void XtCallbackNonexclusive(_w, _c_l_i_e_n_t__d_a_t_a, _c_a_l_l__d_a_t_a)
	Widget _w;
	XtPointer _c_l_i_e_n_t__d_a_t_a;
	XtPointer _c_a_l_l__d_a_t_a;

  void XtCallbackExclusive(_w, _c_l_i_e_n_t__d_a_t_a, _c_a_l_l__d_a_t_a)
	Widget _w;
	XtPointer _c_l_i_e_n_t__d_a_t_a;
	XtPointer _c_a_l_l__d_a_t_a;

  void MenuPopup(_s_h_e_l_l__n_a_m_e)
	String _s_h_e_l_l__n_a_m_e;

ARGUMENTS

  _c_a_l_l__d_a_t_a Specifies the callback data, which is not used by this procedure.

  _c_l_i_e_n_t__d_a_t_a
	    Specifies the pop-up shell.

  _g_r_a_b__k_i_n_d Specifies the way in which user events should be constrained.

  _p_o_p_u_p__s_h_e_l_l
	    Specifies the widget shell.

  _w	    Specifies the widget.

DESCRIPTION
  The _X_t_P_o_p_u_p function performs	the following:

  oo++    Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to	ensure popup_shell is a	subclass of _S_h_e_l_l.

  oo++    Generates an error if the shell's popped_up field is already _T_r_u_e.

  oo++    Calls the callback procedures on	the shell's popup_callback list.

  oo++    Sets the	shell popped_up	field to _T_r_u_e, the shell spring_loaded field
       to _F_a_l_s_e, and the shell grab_kind field from grab_kind.

  oo++    If the shell's create_popup_child field is non-NULL, _X_t_P_o_p_u_p calls it
       with popup_shell	as the parameter.

  oo++    If grab_kind is either _X_t_G_r_a_b_N_o_n_e_x_c_l_u_s_i_v_e or _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e, it
       calls:

  XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)

  oo++    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.

  oo++    Calls _X_M_a_p_W_i_n_d_o_w	with popup_shell specified.

  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 func-
  tions	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.  Other-
  wise,	the translation	manager	generates an error.  When the widget is
  popped up, the following actions occur:

  oo++    Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to	ensure popup_shell is a	subclass of _S_h_e_l_l.

  oo++    Generates an error if the shell's popped_up field is already _T_r_u_e.

  oo++    Calls the callback procedures on	the shell's popup_callback list.

  oo++    Sets the	shell popped_up	field to _T_r_u_e and the shell grab_kind and
       spring_loaded fields appropriately.

  oo++    If the shell's create_popup_child field is non-NULL, it is called with
       popup_shell as the parameter.

  oo++    Calls:

  XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)

  oo++    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.

  oo++    Calls _X_M_a_p_W_i_n_d_o_w	with popup_shell specified.

  (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 speci-
  fied 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.


SEE ALSO
  XtCreatePopupShell(3Xt), XtPopdown(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	delim off


