Specifications

Athena Widget Set libXaw 1.0.7
memory by freeing this string as soon as you are done with it by calling XawAsciiSource-
FreeString.
void XawAsciiSourceFreeString(w)
Widget w;
w Specifies the AsciiSrc object.
This function will free the memory that contains the string pointer returned by XtGetValues.
This will normally happen automatically when the next call to XtGetValues occurs, or when the
widget is destroyed.
5.6.2.2. Saving Files
To sav e the changes made in the current text source into a file use XawAsciiSave.
Boolean XawAsciiSave(w)
Widget w;
w Specifies the AsciiSrc object.
XawAsciiSave returns True if the save was successful. It will update the file named in the string
resource. If the buffer has not been changed, no action will be taken. This function only works
on an AsciiSrc of type XawAsciiFile.
To sav e the contents of the current text buffer into a named file use XawAsciiSaveAsFile.
Boolean XawAsciiSaveAsFile(w, name)
Widget w;
String name;
w Specifies the AsciiSrc object.
name The name of the file to save the current buffer into.
This function returns True if the save was successful. XawAsciiSaveAsFile will work with a
buffer of either type XawAsciiString or type XawAsciiFile.
5.6.2.3. Seeing if the Source has Changed
To find out if the text buffer in an AsciiSrc object has changed since the last time it was saved
with XawAsciiSave or queried use XawAsciiSourceChanged.
Boolean XawAsciiSourceChanged(w)
Widget w;
w Specifies the AsciiSrc object.
This function will return True if the source has changed since the last time it was savedor
queried. The internal change flag is reset wheneverthe string is queried via XtGetValues or the
buffer is savedvia XawAsciiSave.
5.7. Ascii Sink Object and Multi Sink Object
Application Header file <X11/Xaw/AsciiSink.h>
Class Header file <X11/Xaw/AsciiSinkP.h>
Class asciiSinkObjectClass
Class Name AsciiSink
Superclass TextSink
The AsciiSink or MultiSink object is used by a text widget to render the text. Depending on its
international resource, a AsciiTextwidget will create one or the other of these when the Asci-
iTextitself is created. Both types are nearly identical; the following discussion applies to both,
94