<!-- $XConsortium: TxtSetSB.sgm /main/8 1996/09/08 21:20:09 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.MAN541.rsml.1">
<RefMeta>
<RefEntryTitle>XmTextSetSource</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmTextSetSource</Function></RefName>
<RefPurpose>A Text function that sets the source of the widget
<IndexTerm>
<Primary>XmTextSetSource</Primary>
</IndexTerm><IndexTerm>
<Primary>Text functions</Primary>
<Secondary>XmTextSetSource</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;Xm/Text.h>
</FuncSynopsisInfo>
<FuncDef>void <Function>XmTextSetSource</Function></FuncDef>
<!--<ParamDef><Replaceable>widget, source, top_character, cursor_position</Replaceable></ParamDef>-->
<ParamDef>Widget <Parameter>widget</Parameter></ParamDef>
<ParamDef>XmTextSource <Parameter>source</Parameter></ParamDef>
<ParamDef>XmTextPosition <Parameter>top_character</Parameter></ParamDef>
<ParamDef>XmTextPosition <Parameter>cursor_position</Parameter></ParamDef>
</FuncSynopsis>
</RefSynopsisDiv>
<RefSect1>
<Title>DESCRIPTION</Title>
<Para><Function>XmTextSetSource</Function> sets the source of the Text widget. Text
widgets can share sources of text so that editing in one widget is
reflected in another. This function sets the source of one widget
so that it can share the source of another widget.
</Para>
<Para>Setting a new text source destroys the old text source if no other Text
widgets are using that source.
To replace a text source but keep it for later use, create an unmanaged
Text widget and set its source to the text source you want to keep.
</Para>
<VariableList>
<VarListEntry>
<Term><Symbol Role="Variable">widget</Symbol></Term>
<ListItem>
<Para>Specifies the Text widget ID.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">source</Symbol></Term>
<ListItem>
<Para>Specifies the source with which the widget displays text. This can be a
value returned by the &cdeman.XmTextGetSource; function. If no source
is specified, the widget creates a default string source.
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">top_character</Symbol></Term>
<ListItem>
<Para>Specifies the position in the text to display at the top of the widget.
This is an integer number of characters from the beginning of the text
buffer. The first character position is 0 (zero).
</Para>
</ListItem>
</VarListEntry>
<VarListEntry>
<Term><Symbol Role="Variable">cursor_position</Symbol></Term>
<ListItem>
<Para>Specifies the position in the text at which the insert cursor is
located. This is an integer number of characters from the beginning of
the text buffer. The first character position is 0 (zero).
</Para>
</ListItem>
</VarListEntry>
</VariableList>
<Para>For a complete definition of Text and its associated resources, see
&cdeman.XmText;.
</Para>
</RefSect1>
<RefSect1>
<Title>RELATED</Title>
<Para>&cdeman.XmText;.
</Para>
</RefSect1>
</RefEntry>
<!--fickle 1.09 7/2/95-->
