12.07.2015 Views

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

Athena Widget Set - C Language Interface - X Consortium ... - X.Org

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Text <strong>Widget</strong>sCustomizing the Text <strong>Widget</strong>The remainder of this chapter will describe customizing the Text widget. The Textwidget may be customized by subclassing, or by creating new sources and sinks.Subclassing is described in detail in Chapter 7; this section will describe only thosethings that are specific to the Text widget. Attributes of the Text widget base classand creating new sources and sinks will be discussed.The Text widget is made up of a number of different pieces, with the Text widget asthe base widget class. It and the AsciiText widget are the only true "widgets" in theText widget family. The other pieces (sources and sinks) are X Toolkit objects andhave no window associated with them. No source or sink is useful unless assignedto a Text widget.Each of the following pieces of the Text widget has a specific purpose, and will be,or has been, discussed in detail in this chapter:TextTextSinkTextSrcAsciiSinkMultiSinkAsciiSrcMultiSrcThis is the glue that binds everything else together. This widget readsthe text data from the source, and displays the information in the sink.All translations and actions are handled in the Text widget itself.This object is responsible for displaying and clearing the drawing area.It also reports the configuration of the window that contains the drawingarea. The TextSink does not have its own window; instead it doesits drawing on the Text widget's window.This object is responsible for reading, editing and searching throughthe text buffer.This object is a subclass of the TextSink and knows how to display ASCIItext. Support has been added to display any 8-bit character set, giventhe font.This object is a subclass of the TextSink and knows how to display fontsets.This object is a subclass of the TextSrc and knows how to read stringsand files.This object is a subclass of the TextSrc and knows how to read stringsand multibyte files, converting them to wide characters based on locale.AsciiTextText <strong>Widget</strong>This widget is a subclass of the Text widget. When created, the AsciiTextautomatically creates and attaches either an AsciiSrc and AsciiSink,or a MultiSrc and MultiSink, to itself. The AsciiText provides thesimplest interface to the <strong>Athena</strong> Text widgets.Application Header file81

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!