Specifications

Athena Widget Set libXaw 1.0.7
with MultiSink differences noted only as theyoccur.The AsciiSink will display all printing char-
acters in an 8 bit font, along with handling Tab and Carriage Return. The name has been left as
‘‘AsciiSink’’for compatibility. The MultiSink will display all printing charactersinafont set,
along with handling Tab and Carriage Return. The source object also reports the text window
metrics to the text widgets.
5.7.1. Resources
When creating an AsciiSink object instance, the following resources are retrievedfrom the argu-
ment list or from the resource database:
Name Class Type Notes Default Value
background Background Pixel XtDefaultBackground
destroyCallback Callback XtCallbackList NULL
displayNonprinting Output Boolean True
echo Output Boolean True
font Font XFontStruct* XtDefaultFont
fontSet FontSet XFontSet XtDefaultFontSet
foreground Foreground Pixel XtDefaultForeground
background Apixel value which indexesthe widget’scolormap to derive the back-
ground color of the widget’swindow. This resource is retrievedbythe
AsciiSink instead of being copied from the Textwidget.
destroyCallback All functions on this list are called when this widget is destroyed.
displayNonprinting If this resource is True,the Textwidget will display all non-printable
characters as the string ˆ@.If False,the Textwidget will just leave a
blank space where a non-printable character exists in the text buffer.
echo Whether or not to echo characters to the screen. The buffer can still be
edited, but nothing is displayed. This mode can be useful for entering
passwords and other sensitive information.
font The text font to use when displaying the string.(This resource is present
in the AsciiSink, but not the MultiSink.)
fontSet The text font set to use when displaying the string.(This resource is
present in the MultiSink, but not the AsciiSink.)
5.8. Customizing the Text Widget
The remainder of this chapter will describe customizing the Textwidget. The Te x twidget may be
customized by subclassing, or by creating newsources and sinks. Subclassing is described in
detail in Chapter 7; this section will describe only those things that are specific to the Textwidget.
Attributes of the Textwidget base class and creating newsources and sinks will be discussed.
The Textwidget is made up of a number of different pieces, with the Textwidget as the base wid-
get class. It and the AsciiTextwidget are the only true "widgets" in the Textwidget family.The
other pieces (sources and sinks) are X Toolkit objects and have nowindowassociated with them.
No source or sink is useful unless assigned to a Textwidget.
Each of the following pieces of the Textwidget has a specific purpose, and will be, or has been,
discussed in detail in this chapter:
Text This is the glue that binds everything else together.This widget reads the text
data from the source, and displays the information in the sink. All translations
and actions are handled in the Textwidget itself.
95