Specifications

Athena Widget Set libXaw 1.0.7
If this resource is True,the AsciiSrc will compress its data to the mini-
mum size required every time the text string is saved, or the value of the
string is queried.
editType This is the type of editing that will be allowed in this text widget. Legal
values are XawtextRead, XawtextEdit,and XawtextAppend.Acon-
verter is registered for this resource that will convert the following
strings: read, edit, and append.
length If the useStringInPlace resource is False this attribute has no effect. If
that resource is True,howev e r, then the length resource specifies the
length of the buffer passed to the text widget in the string resource.
pieceSize This is the size of the internal chunks into which the text buffer is broken
down for memory management. The larger this value the less segmented
your memory will be, but the slower your editing will be. The text wid-
gets will always allocate a chunk of memory this size to stuffthe string
into, so when using small strings, having this buffer large can waste
memory.This resource has no effect if useStringInPlace is True.
string If type is XawAsciiString then this string contains the buffer to be dis-
played in the widget. If type is XawAsciiFile then the string contains
the name of the file to be displayed. This string is normally copied by
the text widget into internal memory,but may be used in place by setting
the useStringInPlace resource. As of X11R4 this is a settable resource.
When the string resource is queried, using XtGetValues,and useString-
InPlace is false, the value returned is valid until the next time the string
resource is queried, or until the application writer calls XawAsciiSource-
FreeString.If useStringInPlace is true, a pointer to the actual string is
returned. See also section 5.6.
type This resource may be either XawAsciiString or XawAsciiFile.The
value of this resource determines whether the string resource contains
the name of a file to be opened or a buffer to be displayed by the text
widget. A converter has been registered for this resource and accepts the
values string and file.
useStringInPlace Setting this resource to True will disable the memory management pro-
vided by the Textwidget, updating the string resource in place. Using
the string in place can be much more efficient for text widgets that dis-
play static data, or where the programmer wishes to impose strict con-
straints on the contents of the string.When using the string in place be
sure that: the length of the string is specified by setting the length
resource, the type of the Textwidget is XawAsciiString,and that the
string exists for the lifetime of the text widget, or until it has been reset.
Note: Since the MultiSrcand AsciiSrchave different data formats, use of
this resource forces application code to be cognisant as to whichofthe
two is being used. Application programming is simplified when use of
this resource is avoided.
5.6.2. Convenience Routines
The AsciiSrc has a fewconvenience routines that allowthe application programmer quicker or
easier access to some of the commonly used functionality of the AsciiSrc.
5.6.2.1. Conserving Memory
When the AsciiSrc widget is not in useStringInPlace mode space must be allocated whenever
the file is saved, or the string is requested with a call to XtGetValues.This memory is allocated
on the fly,and remains valid until the next time a string needs to be allocated. Yo umay save
93