upload tizen2.0 source
[framework/uifw/xorg/lib/libxaw.git] / specs / TextCustom.xml
1 <sect1 id="Customizing_the_Text_Widget">
2 <title>Customizing the Text Widget</title>
3 <para>
4 <!-- .LP -->
5 <!-- .XS -->
6 <!--    Customizing the Text Widget -->
7 <!-- .XE -->
8 <!-- .IN "Text widget" "customizing" "@DEF@" -->
9 </para>
10 <para>
11 <!-- .LP -->
12 The remainder of this chapter will describe customizing the Text
13 widget.  The Text widget may be customized by subclassing, or by
14 creating new sources and sinks.  Subclassing is described in
15 detail in Chapter 7; this section will describe only those things that
16 are specific to the Text widget.  Attributes of the Text widget base
17 class and creating new sources and sinks will be discussed.
18 </para>
19 <para>
20 <!-- .LP -->
21 The Text widget is made up of a number of different pieces, with the
22 Text widget as the base widget class.  It and the AsciiText widget are
23 the only true "widgets" in the Text widget family.  The other pieces
24 (sources and sinks) are X Toolkit objects and have no window
25 associated with them.  No source or sink is useful unless assigned to
26 a Text widget.
27 </para>
28 <para>
29 <!-- .LP -->
30 Each of the following pieces of the Text widget has a specific purpose,
31 and will be, or has been, discussed in detail in this chapter:
32 <!-- .IN "Text widget" "" -->
33 </para>
34 <para>
35 <variablelist>
36   <varlistentry>
37     <term><function>Text</function></term>
38     <listitem>
39       <para>
40 This is the glue that binds everything else together.  This widget reads
41 the text data from the source, and displays the information in the sink.
42 All translations and actions are handled in the Text widget itself.
43       </para>
44     </listitem>
45   </varlistentry>
46 <!-- .IN "TextSink object" "" -->
47   <varlistentry>
48     <term><function>TextSink</function></term>
49     <listitem>
50       <para>
51 This object is responsible for displaying and clearing the drawing area.
52 It also reports the configuration of the window that contains the
53 drawing area.  The TextSink does not have its own window; instead it does
54 its drawing on the Text widget's window.
55       </para>
56     </listitem>
57   </varlistentry>
58 <!-- .IN "TextSrc object" "" -->
59   <varlistentry>
60     <term><function>TextSrc</function></term>
61     <listitem>
62       <para>
63 This object is responsible for reading, editing and searching through the
64 text buffer.
65       </para>
66     </listitem>
67   </varlistentry>
68 <!-- .IN "AsciiSink object" "" -->
69   <varlistentry>
70     <term><function>AsciiSink</function></term>
71     <listitem>
72       <para>
73 This object is a subclass of the TextSink and knows how to display
74 ASCII text.  Support has been added to display any 8-bit character set, given
75 the font.
76       </para>
77     </listitem>
78   </varlistentry>
79 <!-- .IN "MultiSink object" "" -->
80   <varlistentry>
81     <term><function>MultiSink</function></term>
82     <listitem>
83       <para>
84 This object is a subclass of the TextSink and knows how to display
85 font sets.
86       </para>
87     </listitem>
88   </varlistentry>
89 <!-- .IN "AsciiSrc object" "" -->
90   <varlistentry>
91     <term><function>AsciiSrc</function></term>
92     <listitem>
93       <para>
94 This object is a subclass of the TextSrc and knows how to read strings
95 and files.
96       </para>
97     </listitem>
98   </varlistentry>
99 <!-- .IN "MultiSrc object" "" -->
100   <varlistentry>
101     <term><function>MultiSrc</function></term>
102     <listitem>
103       <para>
104 This object is a subclass of the TextSrc and knows how to read strings
105 and multibyte files, converting them to wide characters based on locale.
106       </para>
107     </listitem>
108   </varlistentry>
109 <!-- .IN "AsciiText widget" "" -->
110   <varlistentry>
111     <term><function>AsciiText</function></term>
112     <listitem>
113       <para>
114 This widget is a subclass of the Text widget.  When created, the AsciiText
115 automatically creates and attaches either an AsciiSrc and AsciiSink, or a
116 MultiSrc and MultiSink, to itself.  The AsciiText provides the simplest
117 interface to the Athena Text widgets.
118       </para>
119     </listitem>
120   </varlistentry>
121 </variablelist>
122 </para>
123 </sect1>