home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xtcallbackexclusive.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  7.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. XtPopup(3Xt)           XT FUNCTIONS             XtPopup(3Xt)
  5.  
  6.  
  7. NNAAMMEE
  8.        XtPopup, XtPopupSpringLoaded, XtCallbackNone, XtCallback-
  9.        Nonexclusive, XtCallbackExclusive - map a pop-up
  10.  
  11. SSYYNNTTAAXX
  12.        void XtPopup(_p_o_p_u_p___s_h_e_l_l, _g_r_a_b___k_i_n_d)
  13.          Widget _p_o_p_u_p___s_h_e_l_l;
  14.          XtGrabKind _g_r_a_b___k_i_n_d;
  15.  
  16.        void XtPopupSpringLoaded(_p_o_p_u_p___s_h_e_l_l)
  17.          Widget _p_o_p_u_p___s_h_e_l_l;
  18.  
  19.        void XtCallbackNone(_w, _c_l_i_e_n_t___d_a_t_a, _c_a_l_l___d_a_t_a)
  20.          Widget _w;
  21.          XtPointer _c_l_i_e_n_t___d_a_t_a;
  22.          XtPointer _c_a_l_l___d_a_t_a;
  23.  
  24.        void XtCallbackNonexclusive(_w, _c_l_i_e_n_t___d_a_t_a, _c_a_l_l___d_a_t_a)
  25.          Widget _w;
  26.          XtPointer _c_l_i_e_n_t___d_a_t_a;
  27.          XtPointer _c_a_l_l___d_a_t_a;
  28.  
  29.        void XtCallbackExclusive(_w, _c_l_i_e_n_t___d_a_t_a, _c_a_l_l___d_a_t_a)
  30.          Widget _w;
  31.          XtPointer _c_l_i_e_n_t___d_a_t_a;
  32.          XtPointer _c_a_l_l___d_a_t_a;
  33.  
  34.        void MenuPopup(_s_h_e_l_l___n_a_m_e)
  35.          String _s_h_e_l_l___n_a_m_e;
  36.  
  37. AARRGGUUMMEENNTTSS
  38.        _c_a_l_l___d_a_t_a Specifies the callback data, which is not used
  39.          by this procedure.
  40.  
  41.        _c_l_i_e_n_t___d_a_t_a
  42.          Specifies the pop-up shell.
  43.  
  44.        _g_r_a_b___k_i_n_d Specifies the way in which user events should be
  45.          constrained.
  46.  
  47.        _p_o_p_u_p___s_h_e_l_l
  48.          Specifies the widget shell.
  49.  
  50.        _w     Specifies the widget.
  51.  
  52. DDEESSCCRRIIPPTTIIOONN
  53.        The _X_t_P_o_p_u_p function performs the following:
  54.  
  55.        +o    Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to ensure popup_shell is a sub-
  56.         class of _S_h_e_l_l.
  57.  
  58.        +o    Generates an error if the shell's popped_up field is
  59.         already _T_r_u_e.
  60.  
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XtPopup(3Xt)           XT FUNCTIONS             XtPopup(3Xt)
  71.  
  72.  
  73.        +o    Calls the callback procedures on the shell's
  74.         popup_callback list.
  75.  
  76.        +o    Sets the shell popped_up field to _T_r_u_e, the shell
  77.         spring_loaded field to _F_a_l_s_e, and the shell grab_kind
  78.         field from grab_kind.
  79.  
  80.        +o    If the shell's create_popup_child field is non-NULL,
  81.         _X_t_P_o_p_u_p calls it with popup_shell as the parameter.
  82.  
  83.        +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
  84.         _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e, it calls:
  85.  
  86.        XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), False)
  87.  
  88.        +o    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.
  89.  
  90.        +o    Calls _X_M_a_p_W_i_n_d_o_w with popup_shell specified.
  91.  
  92.        The _X_t_P_o_p_u_p_S_p_r_i_n_g_L_o_a_d_e_d function performs exactly as
  93.        _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
  94.        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
  95.        _s_p_r_i_n_g___l_o_a_d_e_d _T_r_u_e.
  96.  
  97.        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
  98.        _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
  99.        specified by the client data argument and grab_kind set as
  100.        the name specifies.  _X_t_C_a_l_l_b_a_c_k_N_o_n_e,
  101.        _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
  102.        _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,
  103.        respectively.  Each function then sets the widget that
  104.        executed the callback list to be insensitive by using
  105.        _X_t_S_e_t_S_e_n_s_i_t_i_v_e.    Using these functions in callbacks is not
  106.        required.  In particular, an application must provide cus-
  107.        tomized code for callbacks that create pop-up shells
  108.        dynamically or that must do more than desensitizing the
  109.        button.
  110.  
  111.        _M_e_n_u_P_o_p_u_p is known to the translation manager, which must
  112.        perform special actions for spring-loaded pop-ups.  Calls
  113.        to _M_e_n_u_P_o_p_u_p in a translation specification are mapped
  114.        into calls to a nonexported action procedure, and the
  115.        translation manager fills in parameters based on the event
  116.        specified on the left-hand side of a translation.
  117.  
  118.        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-
  119.        ifiers), the translation manager pops up the shell with
  120.        grab_kind set to _X_t_G_r_a_b_E_x_c_l_u_s_i_v_e and spring_loaded set to
  121.        _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
  122.        with modifiers), the translation manager pops up the shell
  123.        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
  124.        set to _F_a_l_s_e.  Otherwise, the translation manager gener-
  125.        ates an error.  When the widget is popped up, the follow-
  126.        ing actions occur:
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XtPopup(3Xt)           XT FUNCTIONS             XtPopup(3Xt)
  137.  
  138.  
  139.        +o    Calls _X_t_C_h_e_c_k_S_u_b_c_l_a_s_s to ensure popup_shell is a sub-
  140.         class of _S_h_e_l_l.
  141.  
  142.        +o    Generates an error if the shell's popped_up field is
  143.         already _T_r_u_e.
  144.  
  145.        +o    Calls the callback procedures on the shell's
  146.         popup_callback list.
  147.  
  148.        +o    Sets the shell popped_up field to _T_r_u_e and the shell
  149.         grab_kind and spring_loaded fields appropriately.
  150.  
  151.        +o    If the shell's create_popup_child field is non-NULL,
  152.         it is called with popup_shell as the parameter.
  153.  
  154.        +o    Calls:
  155.  
  156.        XtAddGrab(popup_shell, (grab_kind == XtGrabExclusive), spring_loaded)
  157.  
  158.        +o    Calls _X_t_R_e_a_l_i_z_e_W_i_d_g_e_t with popup_shell specified.
  159.  
  160.        +o    Calls _X_M_a_p_W_i_n_d_o_w with popup_shell specified.
  161.  
  162.        (Note that these actions are the same as those for
  163.        _X_t_P_o_p_u_p.)  _M_e_n_u_P_o_p_u_p tries to find the shell by searching
  164.        the widget tree starting at the parent of the widget in
  165.        which it is invoked.  If it finds a shell with the speci-
  166.        fied name in the pop-up children of that parent, it pops
  167.        up the shell with the appropriate parameters.  Otherwise,
  168.        it moves up the parent chain as needed.    If _M_e_n_u_P_o_p_u_p gets
  169.        to the application widget and cannot find a matching
  170.        shell, it generates an error.
  171.  
  172. SSEEEE AALLSSOO
  173.        XtCreatePopupShell(3Xt), XtPopdown(3Xt)
  174.        _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
  175.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.