Specifications

Athena Widget Set libXaw 1.0.7
end Specifies the ending character position of the text replacement.
text Specifies the text to be inserted into the file.
This function will not be able to replace text in read-only text widgets. It will also only be able to
append text to an append-only text widget.
See section 5.4 for a description of XawTextPosition and XawTextBlock.
This function may return the following values:
XawEditDone The text replacement was successful.
XawPositionError The edit mode is XawtextAppend and start is not the position of the last
character of the source.
XawEditError Either the Source was read-only or the range to be deleted is larger than the
length of the Source.
The XawTextReplace arguments start and end represent the text source character positions for
the existing text that is to be replaced by the text in the text block. The characters from start up to
butnot including end are deleted, and the characters specified on the text block are inserted in
their place. If start and end are equal, no text is deleted and the newtextisinserted after start.
5.4.5. Searching for Text
To search for a string in the Textwidget, use XawTextSearch:
XawTextPosition XawTextSearch(w, dir, text)
Widget w;
XawTextScanDirection dir;
XawTextBlock * text;
w Specifies the Textwidget.
dir Specifies the direction to search in. Legalvalues are XawsdLeft and Xaws-
dRight.
text Specifies a text block structure that contains the text to search for.
See section 5.4 for a description of XawTextPosition and XawTextBlock.The XawTextSearch
function will begin at the insertion point and search in the direction specified for a string that
matches the one passed in text.Ifthe string is found the location of the first character in the string
is returned. If the string could not be found then the value XawTextSearchError is returned.
5.4.6. Redisplaying Text
To redisplay a range of characters, use XawTextInvalidate:
void XawTextInvalidate(w, from, to)
Widget w;
XawTextPosition from, to;
w Specifies the Textwidget.
from Specifies the start of the text to redisplay.
to Specifies the end of the text to redisplay.
See section 5.4 for a description of XawTextPosition.The XawTextInvalidate function causes
the specified range of characters to be redisplayed immediately if redisplay is enabled or the next
time that redisplay is enabled.
To enable redisplay,use XawTextEnableRedisplay:
84