NAME

XtSetValues, XtVaSetValues, XtSetSubvalues, XtVaSetSubvalues, XtGetValues, XtVaGetValues, XtGetSubvalues, XtVaGetSubvalues - obtain and set widget resources

SYNTAX

void XtSetValues(Widget _w, ArgList _a_r_g_s, Cardinal _n_u_m___a_r_g_s); void XtVaSetValues(Widget _w, ...); void XtSetSubvalues(XtPointer _b_a_s_e, XtResourceList _r_e_s_o_u_r_c_e_s, Cardinal _n_u_m___r_e_s_o_u_r_c_e_s, ArgList _a_r_g_s, Cardinal _n_u_m___a_r_g_s); void XtVaSetSubvalues(XtPointer _b_a_s_e, XtResourceList _r_e_s_o_u_r_c_e_s, Cardinal _n_u_m___r_e_s_o_u_r_c_e_s, ...); void XtGetValues(Widget _w, ArgList _a_r_g_s, Cardinal _n_u_m___a_r_g_s); void XtVaGetValues(Widget _w, ...); void XtGetSubvalues(XtPointer _b_a_s_e, XtResourceList _r_e_s_o_u_r_c_e_s, Cardinal _n_u_m___r_e_s_o_u_r_c_e_s, ArgList _a_r_g_s, Cardinal _n_u_m___a_r_g_s); void XtVaGetSubvalues(XtPointer _b_a_s_e, XtResourceList _r_e_s_o_u_r_c_e_s, Cardinal _n_u_m___r_e_s_o_u_r_c_e_s, ...);

ARGUMENTS

and either the address into which the resource value is to be stored or their new values
_a_r_g_s Specifies the argument list of name/address pairs that contain the resource name .
_b_a_s_e Specifies the base address of the subpart data structure where the resources
should be retrieved or written.
_n_u_m___a_r_g_s Specifies the number of arguments in the argument list.
_r_e_s_o_u_r_c_e_s Specifies the nonwidget resource list or values.
_n_u_m___r_e_s_o_u_r_c_e_s Specifies the number of resources in the resource list.
_w Specifies the widget.
_._._. Specifies the variable argument list of name/address pairs that contain the resource name .

DESCRIPTION

The _X_t_S_e_t_V_a_l_u_e_s function starts with the resources specified for the _C_o_r_e widget fields and proceeds down the subclass chain to the widget. At each stage, it writes the new value (if specified by one of the arguments) or the existing value (if no new value is specified) to a new widget data record. _X_t_S_e_t_V_a_l_u_e_s then calls the set_values procedures for the widget in superclass-to-subclass order. If the widget has any non-NULL set_values_hook fields, these are called immediately after the corresponding set_values procedure. This procedure permits subclasses to set nonwidget data for _X_t_S_e_t_V_a_l_u_e_s.

If the widget's parent is a subclass of _c_o_n_s_t_r_a_i_n_t_W_i_d_g_e_t_C_l_a_s_s, _X_t_S_e_t_V_a_l_u_e_s also updates the widget's constraints. It starts with the constraint resources specified for _c_o_n_s_t_r_a_i_n_t_W_i_d_g_e_t_C_l_a_s_s and proceeds down the subclass chain to the parent's class. At each stage, it writes the new value or the existing value to a new constraint record. It then calls the constraint set_values procedures from _c_o_n_s_t_r_a_i_n_t_W_i_d_g_e_t_C_l_a_s_s down to the parent's class. The constraint set_values procedures are called with widget arguments, as for all set_values procedures, not just the constraint record arguments, so that they can make adjustments to the desired values based on full information about the widget.

_X_t_S_e_t_V_a_l_u_e_s determines if a geometry request is needed by comparing the current widget to the new widget. If any geometry changes are required, it makes the request, and the geometry manager returns _X_t_G_e_o_m_e_t_r_y_Y_e_s, _X_t_G_e_o_m_e_t_r_y_A_l_m_o_s_t, or _X_t_G_e_o_m_e_t_r_y_N_o. If _X_t_G_e_o_m_e_t_r_y_Y_e_s, _X_t_S_e_t_V_a_l_u_e_s calls the widget's resize procedure. If _X_t_G_e_o_m_e_t_r_y_N_o, _X_t_S_e_t_V_a_l_u_e_s resets the geometry fields to their original values. If _X_t_G_e_o_m_e_t_r_y_A_l_m_o_s_t, _X_t_S_e_t_V_a_l_u_e_s calls the set_values_almost procedure, which determines what should be done and writes new values for the geometry fields into the new widget. _X_t_S_e_t_V_a_l_u_e_s then repeats this process, deciding once more whether the geometry manager should be called.

Finally, if any of the set_values procedures returned _T_r_u_e, _X_t_S_e_t_V_a_l_u_e_s causes the widget's expose procedure to be invoked by calling the Xlib _X_C_l_e_a_r_A_r_e_a function on the widget's window.

The _X_t_S_e_t_S_u_b_v_a_l_u_e_s function stores resources into the structure identified by base.

The _X_t_G_e_t_V_a_l_u_e_s function starts with the resources specified for the core widget fields and proceeds down the subclass chain to the widget. The value field of a passed argument list should contain the address into which to store the corresponding resource value. It is the caller's responsibility to allocate and deallocate this storage according to the size of the resource representation type used within the widget.

If the widget's parent is a subclass of _c_o_n_s_t_r_a_i_n_t_W_i_d_g_e_t_C_l_a_s_s, _X_t_G_e_t_V_a_l_u_e_s then fetches the values for any constraint resources requested. It starts with the constraint resources specified for _c_o_n_s_t_r_a_i_n_t_W_i_d_g_e_t_C_l_a_s_s and proceeds down to the subclass chain to the parent's constraint resources. If the argument list contains a resource name that is not found in any of the resource lists searched, the value at the corresponding address is not modified. Finally, if the get_values_hook procedures are non-NULL, they are called in superclass-to-subclass order after all the resource values have been fetched by _X_t_G_e_t_V_a_l_u_e_s. This permits a subclass to provide nonwidget resource data to _X_t_G_e_t_V_a_l_u_e_s.

The _X_t_G_e_t_S_u_b_v_a_l_u_e_s function obtains resource values from the structure identified by base.

SEE ALSO


_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