'\" t .\" TxtReplA.sgm /main/8 1996/09/08 21:19:09 rws $ .de P! .fl \!!1 setgray .fl \\&.\" .fl \!!0 setgray .fl \" force out current output buffer \!!save /psv exch def currentpoint translate 0 0 moveto \!!/showpage{}def .fl \" prolog .sy sed -e 's/^/!/' \\$1\" bring in postscript file \!!psv restore . .de pF .ie \\*(f1 .ds f1 \\n(.f .el .ie \\*(f2 .ds f2 \\n(.f .el .ie \\*(f3 .ds f3 \\n(.f .el .ie \\*(f4 .ds f4 \\n(.f .el .tm ? font overflow .ft \\$1 .. .de fP .ie !\\*(f4 \{\ . ft \\*(f4 . ds f4\" ' br \} .el .ie !\\*(f3 \{\ . ft \\*(f3 . ds f3\" ' br \} .el .ie !\\*(f2 \{\ . ft \\*(f2 . ds f2\" ' br \} .el .ie !\\*(f1 \{\ . ft \\*(f1 . ds f1\" ' br \} .el .tm ? font underflow .. .ds f1\" .ds f2\" .ds f3\" .ds f4\" .ta 8n 16n 24n 32n 40n 48n 56n 64n 72n .TH "XmTextReplace" 3 .SH "NAME" \fBXmTextReplace\fP \(em A Text function that replaces part of a text string "XmTextReplace" "Text functions" "XmTextReplace" .SH "SYNOPSIS" .PP .nf #include \fBvoid \fBXmTextReplace\fP\fR( \fBWidget \fBwidget\fR\fR, \fBXmTextPosition \fBfrom_pos\fR\fR, \fBXmTextPosition \fBto_pos\fR\fR, \fBchar \fB* value\fR\fR); .fi .SH "DESCRIPTION" .PP \fBXmTextReplace\fP replaces part of the text string in the Text widget\&. The character positions begin at 0 (zero) and are numbered sequentially from the beginning of the text\&. .PP An example text replacement would be to replace the second and third characters in the text string\&. To accomplish this, the parameter \fIfrom_pos\fP must be 1 and \fIto_pos\fP must be 3\&. To insert a string after the fourth character, both parameters, \fIfrom_pos\fP and \fIto_pos\fP, must be 4\&. .PP This routine calls the widget\&'s \fBXmNvalueChangedCallback\fP and verification callbacks, either \fBXmNmodifyVerifyCallback\fP or \fBXmNmodifyVerifyCallbackWcs\fP, or both\&. If both verification callback lists are registered, the procedures of the \fBXmNmodifyVerifyCallback\fP list are executed first and the resulting data is passed to the \fBXmNmodifyVerifyCallbackWcs\fP callbacks\&. The \fBXmNmotionVerifyCallback\fP is generated if \fIto_pos\fP is less than or equal to the cursor position and the length of \fIvalue\fP is not the same as the length of the text being replaced, or if the cursor position is between \fIfrom_pos\fP and \fIto_pos\fP, and the distance from the cursor position to \fIfrom_pos\fP is greater than the length of \fIvalue\fP\&. .IP "\fIwidget\fP" 10 Specifies the Text widget ID .IP "\fIfrom_pos\fP" 10 Specifies the start position of the text to be replaced .IP "\fIto_pos\fP" 10 Specifies the end position of the text to be replaced .IP "\fIvalue\fP" 10 Specifies the character string value to be added to the text widget .PP For a complete definition of Text and its associated resources, see \fBXmText\fP(3)\&. .SH "RELATED" .PP \fBXmText\fP(3) and \fBXmTextReplaceWcs\fP(3)\&. .\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:36