<!-- $XConsortium: LstReplE.sgm /main/8 1996/09/08 20:51:50 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.MAN307.rsml.1">
<RefMeta>
<RefEntryTitle>XmListReplacePositions</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmListReplacePositions</Function></RefName>
<RefPurpose>A List function that replaces items
in a list based on position
<IndexTerm>
<Primary>XmListReplacePositions</Primary>
</IndexTerm><IndexTerm>
<Primary>List functions</Primary>
<Secondary>XmListReplacePositions</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-->
<!-- **-->
<!-- **-->
<RefSynopsisDiv>
<FuncSynopsis>
<FuncSynopsisInfo>#include &lt;Xm/List.h>
</FuncSynopsisInfo>
<FuncDef>void <Function>XmListReplacePositions</Function></FuncDef>
<!--<ParamDef><Replaceable>widget, position_list, item_list, item_count</Replaceable></ParamDef>-->
<ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
<ParamDef>int *<Parameter>position_list</Parameter></ParamDef>
<ParamDef>XmString *<Parameter>item_list</Parameter></ParamDef>
<ParamDef>int <Parameter>item_count;</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Function>XmListReplacePositions</Function> replaces noncontiguous items
in a list. The item at each position specified in <Symbol Role="Variable">position_list</Symbol>
is replaced with the corresponding entry in <Symbol Role="Variable">item_list</Symbol>.
When the items are inserted into the list, they are compared with the
current <SystemItem Class="Resource">XmNselectedItems</SystemItem> list. Any of the new items that match
items on the selected list appear selected. A warning message
is displayed if a specified position is invalid; that is, the value is 0 (zero),
a negative integer, or a number greater than the number of items
in the list.
</Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">widget</Symbol></Term>
<ListItem>
<Para>Specifies the ID of the List widget.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">position_list</Symbol></Term>
<ListItem>
<Para>Specifies an array of the positions of items to be replaced. The
position of the first item in the list is 1; the position of the
second item is 2; and so on.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">item_list</Symbol></Term>
<ListItem>
<Para>Specifies an array of the replacement items.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">item_count</Symbol></Term>
<ListItem>
<Para>Specifies the number of elements in <Symbol Role="Variable">position_list</Symbol> and
<Symbol Role="Variable">item_list</Symbol>.
This number must be nonnegative.
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>For a complete definition of List and its associated resources, see
&cdeman.XmList;.
</Para>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.XmList;.
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
