home *** CD-ROM | disk | FTP | other *** search
-
-
-
- XtPopup(3Xt) XT FUNCTIONS XtPopup(3Xt)
-
-
- NNAAMMEE
- XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallback-
- Nonexclusive, XtCallbackExclusive - map a pop-up
-
- SSYYNNTTAAXX
- 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 XtPopupSpringLoaded(_p_o_p_u_p___s_h_e_l_l)
- Widget _p_o_p_u_p___s_h_e_l_l;
-
- 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;
-
- AARRGGUUMMEENNTTSS
- _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.
-
- DDEESSCCRRIIPPTTIIOONN
- The _X_t_P_o_p_u_p function performs the following:
-
- +o Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to ensure popup_shell is a sub-
- class of _S_h_e_l_l.
-
- +o Generates an error if the shell's popped_up field is
- already _T_r_u_e.
-
-
-
-
- X Version 11 Release 6.1 1
-
-
-
-
-
- XtPopup(3Xt) XT FUNCTIONS XtPopup(3Xt)
-
-
- +o Calls the callback procedures on the shell's
- popup_callback list.
-
- +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 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 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 Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.
-
- +o Calls _X_M_a_p_W_i_n_d_o_w with popup_shell specified.
-
- 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 cus-
- tomized 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 mod-
- ifiers), 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 gener-
- ates an error. When the widget is popped up, the follow-
- ing actions occur:
-
-
-
- X Version 11 Release 6.1 2
-
-
-
-
-
- XtPopup(3Xt) XT FUNCTIONS XtPopup(3Xt)
-
-
- +o Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to ensure popup_shell is a sub-
- class of _S_h_e_l_l.
-
- +o Generates an error if the shell's popped_up field is
- already _T_r_u_e.
-
- +o Calls the callback procedures on the shell's
- popup_callback list.
-
- +o Sets the shell popped_up field to _T_r_u_e and the shell
- grab_kind and spring_loaded fields appropriately.
-
- +o If the shell's create_popup_child field is non-NULL,
- it is called with popup_shell as the parameter.
-
- +o Calls:
-
- XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
-
- +o Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.
-
- +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.
-
- SSEEEE AALLSSOO
- 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- X Version 11 Release 6.1 3
-
-
-