<!-- $XConsortium: FetchSet.sgm /main/9 1996/09/08 21:25:15 rws $ -->
<!-- (c) Copyright 1995 Digital Equipment Corporation. -->
<!-- (c) Copyright 1995 Hewlett-Packard Company. -->
<!-- (c) Copyright 1995 International Business Machines Corp. -->
<!-- (c) Copyright 1995 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1995 Novell, Inc. -->
<!-- (c) Copyright 1995 FUJITSU LIMITED. -->
<!-- (c) Copyright 1995 Hitachi. -->

<RefEntry Id="CDEMMA.MAN12.rsml.1">
<RefMeta>
<RefEntryTitle>MrmFetchSetValues</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>MrmFetchSetValues</Function></RefName>
<RefPurpose>Fetches the values to be set from literals stored in
UID files
<IndexTerm>
<Primary>MrmFetchSetValues</Primary>
</IndexTerm><IndexTerm>
<Primary>uil functions</Primary>
<Secondary>MrmFetchSetValues</Secondary>
</IndexTerm></RefPurpose>
</RefNameDiv>
<!-- -->
<!-- @OSF_COPYRIGHT@-->
<!-- COPYRIGHT NOTICE-->
<!-- Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.-->
<!-- ALL RIGHTS RESERVED (MOTIF). See the file named COPY.MOTIF.DOC for-->
<!-- the full copyright text.-->
<!-- -->
<!-- HISTORY-->
<!-- -->
<!-- **-->
<!-- **-->
<!-- **  (c) Copyright 1989, 1990, 1992 by Open Software Foundation, Inc.-->
<!-- **      All Rights Reserved.-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988, 1989, by Hewlett-Packard Company-->
<!-- **-->
<!-- **  (c) Copyright 1987, 1988 by Digital Equipment Corporation,-->
<!-- **      Maynard, MA.  All Rights Reserved.-->
<!-- **-->
<!-- **-->
<RefSynopsisDiv>
<FuncSynopsis>
<FuncSynopsisInfo>#include &lt;Mrm/MrmPublic.h>
</FuncSynopsisInfo>
<FuncDef>Cardinal <Function>MrmFetchSetValues</Function></FuncDef>
<!--<ParamDef><Replaceable>hierarchy_id, widget, args, num_args</Replaceable></ParamDef>-->
<ParamDef>MrmHierarchy <Parameter>hierarchy_id</Parameter></ParamDef>
<ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
<ParamDef>ArgList <Parameter>args</Parameter></ParamDef>
<ParamDef>Cardinal <Parameter>num_args</Parameter></ParamDef>
</FuncSynopsis><IndexTerm>
<Primary>MRM function</Primary>
<Secondary>MrmFetchSetValues</Secondary>
</IndexTerm><IndexTerm>
<Primary>MrmFetchSetValues</Primary>
<Secondary>definition</Secondary>
</IndexTerm>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para>The
<Function>MrmFetchSetValues</Function>
function
is similar to
<Function>XtSetValues</Function>,
except that the values to be set are defined by the UIL named
values that are stored in the UID hierarchy.<IndexTerm>
<Primary>MrmFetchSetValues</Primary>
<Secondary>description</Secondary>
</IndexTerm>
<Function>MrmFetchSetValues</Function>
fetches the values to be set from literals stored in UID files.
</Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">hierarchy_id</Symbol></Term>
<ListItem>
<Para>Specifies the ID of the UID hierarchy that contains the
specified literal.
The value of <Symbol Role="Variable">hierarchy_id</Symbol>
was returned in a previous call to <Function>MrmOpenHierarchyPerDisplay</Function>.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">widget</Symbol></Term>
<ListItem>
<Para>Specifies the widget that is modified.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">args</Symbol></Term>
<ListItem>
<Para>Specifies an argument list that identifies the widget arguments to be
modified as well as the index (UIL name) of the literal that
defines the value for that argument.
The name part of each argument (<Symbol Role="Variable">args[n].name</Symbol>) must begin with the string
<SystemItem Class="Constant">XmN</SystemItem> followed by the name that uniquely identifies this attribute tag.
For example, <SystemItem Class="Resource">XmNwidth</SystemItem>
is the attribute name associated with the core argument <Symbol Role="Variable">width</Symbol>.
The value part (<Symbol Role="Variable">args[n].value</Symbol>) must be a string
that gives the index (UIL name) of the literal.
You must define all literals in UIL as exported values.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">num_args</Symbol></Term>
<ListItem>
<Para>Specifies the number of entries in <Symbol Role="Variable">args</Symbol>.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>This function
sets the values
on a widget, evaluating the
values as public literal resource references resolvable from
a UID hierarchy.
Each literal is fetched from the hierarchy, and
its value is modified and converted as required.
This value is
then placed in the argument list and used as the actual value for an
<Function>XtSetValues</Function>
call.
<Function>MrmFetchSetValues</Function>
allows a widget to be modified
after creation using UID file values the same way
creation values are used in <Function>MrmFetchWidget</Function>.
</Para>
<Para>As in
<Function>MrmFetchWidget</Function>,
each argument whose value can be evaluated
from
the UID hierarchy is set in the widget.
Values that are not
found
or values in which conversion errors occur are not modified.
</Para>
<Para>Each entry in the argument list identifies an argument to be modified
in the widget.
The name part identifies the tag, which begins with
<SystemItem Class="Constant">XmN</SystemItem>.
The value part must be a string
whose value is the index of
the literal.
Thus, the following code would modify the label resource of the widget
to have the value of the literal accessed by the index
<Literal>OK_button_label</Literal> in the hierarchy:
</Para>
<InformalExample>
<ProgramListing>args[n].name = XmNlabel;
args[n].value = "OK_button_label";
</ProgramListing>
</InformalExample>
</RefSect1>
<RefSect1>
<Title>RETURN VALUE</Title>
<IndexTerm>
<Primary>MrmSUCCESS</Primary>
</IndexTerm><IndexTerm>
<Primary>MrmPARTIAL_SUCCESS</Primary>
</IndexTerm><IndexTerm>
<Primary>MrmBAD_HIERARCHY</Primary>
</IndexTerm><IndexTerm>
<Primary>MrmFAILURE</Primary>
</IndexTerm>
<Para>This function returns one of the following status return constants:
</Para>
<VariableList>
<VarListEntry>
<Term><SystemItem Class="Constant">MrmSUCCESS</SystemItem></Term>
<ListItem>
<Para>The function executed successfully.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">MrmPARTIAL_SUCCESS</SystemItem></Term>
<ListItem>
<Para>At least one literal was successfully fetched.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">MrmBAD_HIERARCHY</SystemItem></Term>
<ListItem>
<Para>The hierarchy ID was invalid.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><SystemItem Class="Constant">MrmFAILURE</SystemItem></Term>
<ListItem>
<Para>The function failed.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.MrmOpenHierarchyPerDisplay;,
<Filename MoreInfo="RefEntry">XtSetValues</Filename>(3).
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
