NAME

XtSetArg, XtMergeArgLists - set and merge ArgLists

SYNTAX

int XtSetArg(Arg _a_r_g, String _n_a_m_e, XtArgVal _v_a_l_u_e); ArgList XtMergeArgLists(ArgList _a_r_g_s_1, Cardinal _n_u_m___a_r_g_s_1, ArgList _a_r_g_s_2, Cardinal _n_u_m___a_r_g_s_2);

ARGUMENTS

_a_r_g Specifies the name-value pair to set.
_a_r_g_s_1 Specifies the first
_A_r_g_L_i_s_t.
_a_r_g_s_2 Specifies the second
_A_r_g_L_i_s_t.
_n_u_m___a_r_g_s_1 Specifies the number of arguments in the first argument list.
_n_u_m___a_r_g_s_2 Specifies the number of arguments in the second argument list.
_n_a_m_e Specifies the name of the resource.
_v_a_l_u_e Specifies the value of the resource if it will fit in an
_X_t_A_r_g_V_a_l or the address.

DESCRIPTION

The _X_t_S_e_t_A_r_g function is usually used in a highly stylized manner to minimize the probability of making a mistake; for example:


Arg args[20];
int n;

n = 0; XtSetArg(args[n], XtNheight, 100);n++; XtSetArg(args[n], XtNwidth, 200);n++; XtSetValues(widget, args, n);

Alternatively, an application can statically declare the argument list and use _X_t_N_u_m_b_e_r:


static Args args[] = {
     {XtNheight, (XtArgVal) 100},
     {XtNwidth, (XtArgVal) 200},
};
XtSetValues(Widget, args, XtNumber(args));


Note that you should not use auto-increment or auto-decrement within the first argument to _X_t_S_e_t_A_r_g. _X_t_S_e_t_A_r_g can be implemented as a macro that dereferences the first argument twice.

The _X_t_M_e_r_g_e_A_r_g_L_i_s_t_s function allocates enough storage to hold the combined _A_r_g_L_i_s_t structures and copies them into it. Note that it does not check for duplicate entries. When it is no longer needed, free the returned storage by using _X_t_F_r_e_e.

SEE ALSO

XtOffset(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