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

  1.  
  2.  
  3.  
  4. XtSetArg(3Xt)           XT FUNCTIONS            XtSetArg(3Xt)
  5.  
  6.  
  7. NNAAMMEE
  8.        XtSetArg, XtMergeArgLists - set and merge ArgLists
  9.  
  10. SSYYNNTTAAXX
  11.        XtSetArg(_a_r_g, _n_a_m_e, _v_a_l_u_e)
  12.          Arg _a_r_g;
  13.          String _n_a_m_e;
  14.          XtArgVal _v_a_l_u_e;
  15.  
  16.        ArgList XtMergeArgLists(_a_r_g_s_1, _n_u_m___a_r_g_s_1, _a_r_g_s_2,
  17.        _n_u_m___a_r_g_s_2)
  18.         ArgList _a_r_g_s_1;
  19.         Cardinal _n_u_m___a_r_g_s_1;
  20.         ArgList _a_r_g_s_2;
  21.         Cardinal _n_u_m___a_r_g_s_2;
  22.  
  23. AARRGGUUMMEENNTTSS
  24.        _a_r_g     Specifies the name-value pair to set.
  25.  
  26.        _a_r_g_s_1     Specifies the first _A_r_g_L_i_s_t.
  27.  
  28.        _a_r_g_s_2     Specifies the second _A_r_g_L_i_s_t.
  29.  
  30.        _n_u_m___a_r_g_s_1 Specifies the number of arguments in the first
  31.          argument list.
  32.  
  33.        _n_u_m___a_r_g_s_2 Specifies the number of arguments in the second
  34.          argument list.
  35.  
  36.        _n_a_m_e     Specifies the name of the resource.
  37.  
  38.        _v_a_l_u_e     Specifies the value of the resource if it will
  39.          fit in an _X_t_A_r_g_V_a_l or the address.
  40.  
  41. DDEESSCCRRIIPPTTIIOONN
  42.        The _X_t_S_e_t_A_r_g function is usually used in a highly stylized
  43.        manner to minimize the probability of making a mistake;
  44.        for example:
  45.  
  46.        Arg args[20];
  47.        int n;
  48.  
  49.        n = 0;
  50.        XtSetArg(args[n], XtNheight, 100);n++;
  51.        XtSetArg(args[n], XtNwidth, 200);n++;
  52.        XtSetValues(widget, args, n);
  53.  
  54.        Alternatively, an application can statically declare the
  55.        argument list and use _X_t_N_u_m_b_e_r:
  56.  
  57.        static Args args[] = {
  58.         {XtNheight, (XtArgVal) 100},
  59.         {XtNwidth, (XtArgVal) 200},
  60.        };
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XtSetArg(3Xt)           XT FUNCTIONS            XtSetArg(3Xt)
  71.  
  72.  
  73.        XtSetValues(Widget, args, XtNumber(args));
  74.  
  75.        Note that you should not use auto-increment or auto-
  76.        decrement within the first argument to _X_t_S_e_t_A_r_g.     _X_t_S_e_t_A_r_g
  77.        can be implemented as a macro that dereferences the first
  78.        argument twice.
  79.  
  80.        The _X_t_M_e_r_g_e_A_r_g_L_i_s_t_s function allocates enough storage to
  81.        hold the combined _A_r_g_L_i_s_t structures and copies them into
  82.        it.  Note that it does not check for duplicate entries.
  83.        When it is no longer needed, free the returned storage by
  84.        using _X_t_F_r_e_e.
  85.  
  86. SSEEEE AALLSSOO
  87.        XtOffset(3Xt)
  88.        _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
  89.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.