Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

DXmCSTextReplace(3X)  —  Subroutines

Digital

NAME

DXmCSTextReplace − Replaces a specified segment of text in a compound string text widget. 

SYNOPSIS

DXmCSTextStatus DXmCSTextReplace(widget, from_pos, to_pos, value)
         Widget  widget;
         int    from_pos;
         int    to_pos;
         XmString value;

DESCRIPTION

The DXmCSTextReplace routine replaces part of the text in the compound string text widget.  Within the widget, positions are numbered starting at 0 and increasing sequentially.  For example, to replace the second and third characters in the text, from_pos should be 1 and to_pos should be 3. To insert text after the fourth character, from_pos and to_pos should both be 4. 

Arguments

widgetThe identifier (widget ID) of the compound string text widget. 

from_posAn integer that represents the first character position of the text being replaced. 

to_posAn integer that represents the last character position of the text being replaced. 

valueReplacement text for part of the current text in the compound string text widget, or additional text to be inserted into the compound string text widget. 

RETURN VALUES

A value that represents the status (success or failure) of the replace operation, as follows:

Value Description
DXmCSTextStatusEditDone Text replaced successfully. 
DXmCSTextStatusEditError Text not replaced (failure). 

RELATED INFORMATION

DXmCreateCSText , DXmCSTextSetString , and DXmCSTextGetString. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026