1421c997bSmrg<chapter id='Athena_Widgets_and_The_Intrinsics'>
2994689c1Smrg<title>Athena Widgets and The Intrinsics</title>
3994689c1Smrg<para>
4994689c1SmrgThe X Toolkit is made up of two distinct pieces, the Xt Intrinsics and a
5994689c1Smrgwidget set.  The Athena widget set is a sample implementation of a
6994689c1Smrgwidget set built upon the Intrinsics.  In the X Toolkit, a widget is the
7994689c1Smrgcombination of an X window or subwindow and its associated input and
8994689c1Smrgoutput semantics.
9994689c1Smrg</para>
10994689c1Smrg<para>
11994689c1SmrgBecause the Intrinsics provide the same basic functionality to all widget
12994689c1Smrgsets it may be possible to use widgets from the Athena widget set with
13994689c1Smrgother widget sets based upon the Intrinsics.  Since widget sets may also
14994689c1Smrgimplement private protocols, all functionality may not be available when
15994689c1Smrgmixing and matching widget sets.  For information about the Intrinsics, see
165ec34c4cSmrgthe <olink targetdoc='intrinsics' targetptr='intrinsics'
175ec34c4cSmrg><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>.
18994689c1Smrg</para>
19994689c1Smrg<para>
20994689c1SmrgThe Athena widget set is a library package layered on top of the Intrinsics
21994689c1Smrgand Xlib that provides a set of user interface tools sufficient to build
22994689c1Smrga wide variety of applications.  This layer extends the basic
23994689c1Smrgabstractions provided by X and provides the next layer of functionality
24994689c1Smrgprimarily by supplying a cohesive set of sample widgets.  Although the
25994689c1SmrgIntrinsics are a Consortium standard, there is no standard widget set.
26994689c1Smrg</para>
27994689c1Smrg
28994689c1Smrg<para>
29994689c1SmrgTo the extent possible, the Intrinsics are "policy-free".  The application
30994689c1Smrgenvironment and widget set, not the Intrinsics, define, implement, and
31994689c1Smrgenforce:
32994689c1Smrg</para>
33994689c1Smrg
34994689c1Smrg<itemizedlist>
35994689c1Smrg  <listitem><para>Policy</para></listitem>
36994689c1Smrg  <listitem><para>Consistency</para></listitem>
37994689c1Smrg  <listitem><para>Style</para></listitem>
38994689c1Smrg</itemizedlist>
39994689c1Smrg
40994689c1Smrg<para>
41994689c1SmrgEach individual widget implementation defines its own policy.  The X Toolkit
42994689c1Smrgdesign allows for, but does not necessarily encourage, the free mixing
43994689c1Smrgof radically differing widget implementations.
44994689c1Smrg</para>
45994689c1Smrg
46421c997bSmrg<sect1 id='Introduction_to_the_X_Toolkit'>
47994689c1Smrg<title>Introduction to the X Toolkit</title>
48994689c1Smrg<para>
49994689c1Smrg<!-- .LP -->
50994689c1Smrg<!-- .XS -->
51994689c1Smrg<!-- 	Introduction to the X Toolkit -->
52994689c1Smrg<!-- .XE -->
535ec34c4cSmrg<indexterm significance="preferred"><primary>introduction</primary></indexterm>
54994689c1SmrgThe X Toolkit provides tools that simplify the design of
55994689c1Smrgapplication user interfaces in the X Window System programming environment.
56994689c1SmrgIt assists application programmers by providing a set of common
57994689c1Smrgunderlying user-interface functions.  It also lets widget programmers
58994689c1Smrgmodify existing widgets, by subclassing, or add new widgets.  By using
59994689c1Smrgthe X Toolkit in their applications, programmers can present a similar
60994689c1Smrguser interface across applications to all workstation users.
61994689c1Smrg</para>
62994689c1Smrg<para>
63994689c1Smrg<!-- .LP -->
64994689c1SmrgThe X Toolkit consists of:
65994689c1Smrg</para>
66994689c1Smrg<itemizedlist>
67994689c1Smrg  <listitem>
68994689c1Smrg    <para>
69994689c1SmrgA set of Intrinsics functions for building widgets
70994689c1Smrg    </para>
71994689c1Smrg  </listitem>
72994689c1Smrg  <listitem>
73994689c1Smrg    <para>
74994689c1SmrgAn architectural model for constructing widgets
75994689c1Smrg    </para>
76994689c1Smrg  </listitem>
77994689c1Smrg  <listitem>
78994689c1Smrg    <para>
79994689c1SmrgA widget set for application programming
80994689c1Smrg    </para>
81994689c1Smrg  </listitem>
82994689c1Smrg</itemizedlist>
83994689c1Smrg<para>
84994689c1Smrg<!-- .LP -->
85994689c1SmrgWhile the majority of the Intrinsics functions are intended
86994689c1Smrgfor the widget programmer,
87994689c1Smrga subset of the Intrinsics functions are to be used by application programmers
885ec34c4cSmrg(see <olink targetdoc='intrinsics' targetptr='intrinsics'
895ec34c4cSmrg><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink>).
90994689c1SmrgThe architectural model lets the widget programmer design new widgets
91994689c1Smrgby using the Intrinsics and by combining other widgets.
92994689c1SmrgThe application interface layers built on top of the X Toolkit include a
93994689c1Smrgcoordinated set of widgets and composition policies.
94994689c1SmrgSome of these widgets and policies are specific to a single
95994689c1Smrgapplication domain, and others are common to a variety of
96994689c1Smrgapplications.
97994689c1Smrg</para>
98994689c1Smrg<para>
99994689c1Smrg<!-- .LP -->
100994689c1SmrgThe remainder of this chapter discusses the X Toolkit and Athena widget set:
101994689c1Smrg</para>
102994689c1Smrg<itemizedlist>
103994689c1Smrg  <listitem>
104994689c1Smrg    <para>
105994689c1SmrgTerminology
106994689c1Smrg    </para>
107994689c1Smrg  </listitem>
108994689c1Smrg  <listitem>
109994689c1Smrg    <para>
110994689c1SmrgModel
111994689c1Smrg    </para>
112994689c1Smrg  </listitem>
113994689c1Smrg  <listitem>
114994689c1Smrg    <para>
115994689c1SmrgConventions used in this manual
116994689c1Smrg    </para>
117994689c1Smrg  </listitem>
118994689c1Smrg  <listitem>
119994689c1Smrg    <para>
120994689c1SmrgFormat of the Widget Reference Chapters
121994689c1Smrg    </para>
122994689c1Smrg  </listitem>
123994689c1Smrg</itemizedlist>
124994689c1Smrg</sect1>
125994689c1Smrg<sect1 id="Terminology">
126994689c1Smrg<title>Terminology</title>
127994689c1Smrg<!-- .LP -->
128994689c1Smrg<!-- .XS -->
129994689c1Smrg<!-- 	Terminology -->
130994689c1Smrg<!-- .XE -->
131994689c1Smrg<para>
132994689c1Smrg<!-- .LP -->
133421c997bSmrgIn addition to the terms already defined for X programming (see
1345ec34c4cSmrg<olink targetdoc='libX11' targetptr='glossary'
1355ec34c4cSmrg><citetitle>Xlib - C Language Interface</citetitle></olink>),
136994689c1Smrgthe following terms are specific to the Intrinsics and Athena widget set
137994689c1Smrgand used throughout this document.
138994689c1Smrg</para>
1395ec34c4cSmrg<glosslist>
1405ec34c4cSmrg<glossentry>
1415ec34c4cSmrg  <glossterm>Application programmer</glossterm>
1425ec34c4cSmrg<indexterm significance="preferred"><primary>application programmer</primary></indexterm>
1435ec34c4cSmrg  <glossdef>
144994689c1Smrg    <para>
145994689c1SmrgA programmer who uses the X Toolkit to produce an application user interface.
146994689c1Smrg    </para>
1475ec34c4cSmrg  </glossdef>
1485ec34c4cSmrg</glossentry>
1495ec34c4cSmrg<glossentry>
1505ec34c4cSmrg  <glossterm>Child</glossterm>
1515ec34c4cSmrg<indexterm significance="preferred"><primary>child</primary></indexterm>
1525ec34c4cSmrg  <glossdef>
153994689c1Smrg    <para>
154994689c1SmrgA widget that is contained within another "parent" widget.
155994689c1Smrg    </para>
1565ec34c4cSmrg  </glossdef>
1575ec34c4cSmrg</glossentry>
1585ec34c4cSmrg<glossentry>
1595ec34c4cSmrg  <glossterm>Class</glossterm>
1605ec34c4cSmrg<indexterm significance="preferred"><primary>class</primary></indexterm>
1615ec34c4cSmrg  <glossdef>
162994689c1Smrg    <para>
163994689c1SmrgThe general group to which a specific object belongs.
164994689c1Smrg    </para>
1655ec34c4cSmrg  </glossdef>
1665ec34c4cSmrg</glossentry>
1675ec34c4cSmrg<glossentry>
1685ec34c4cSmrg  <glossterm>Client</glossterm>
1695ec34c4cSmrg<indexterm significance="preferred"><primary>client</primary></indexterm>
1705ec34c4cSmrg  <glossdef>
171994689c1Smrg    <para>
172994689c1SmrgA function that uses a widget in an application or for composing
173994689c1Smrgother widgets.
174994689c1Smrg    </para>
1755ec34c4cSmrg  </glossdef>
1765ec34c4cSmrg</glossentry>
1775ec34c4cSmrg<glossentry>
1785ec34c4cSmrg  <glossterm>FullName</glossterm>
1795ec34c4cSmrg<indexterm significance="preferred"><primary>FullName</primary></indexterm>
1805ec34c4cSmrg  <glossdef>
181994689c1Smrg    <para>
182994689c1SmrgThe name of a widget instance appended to the full name of its parent.
183994689c1Smrg    </para>
1845ec34c4cSmrg  </glossdef>
1855ec34c4cSmrg</glossentry>
1865ec34c4cSmrg<glossentry>
1875ec34c4cSmrg  <glossterm>Instance</glossterm>
1885ec34c4cSmrg<indexterm significance="preferred"><primary>instance</primary></indexterm>
1895ec34c4cSmrg  <glossdef>
190994689c1Smrg    <para>
191994689c1SmrgA specific widget object as opposed to a general widget class.
192994689c1Smrg    </para>
1935ec34c4cSmrg  </glossdef>
1945ec34c4cSmrg</glossentry>
1955ec34c4cSmrg<glossentry>
1965ec34c4cSmrg  <glossterm>Method</glossterm>
1975ec34c4cSmrg<indexterm significance="preferred"><primary>method</primary></indexterm>
1985ec34c4cSmrg  <glossdef>
199994689c1Smrg    <para>
200994689c1SmrgA function or procedure implemented by a widget class.
201994689c1Smrg    </para>
2025ec34c4cSmrg  </glossdef>
2035ec34c4cSmrg</glossentry>
2045ec34c4cSmrg<glossentry>
2055ec34c4cSmrg  <glossterm>Name</glossterm>
2065ec34c4cSmrg<indexterm significance="preferred"><primary>name</primary><secondary>widget</secondary></indexterm>
2075ec34c4cSmrg  <glossdef>
208994689c1Smrg    <para>
209994689c1SmrgThe name that is specific to an instance of a widget for a given client.
210994689c1SmrgThis name is specified at creation time and cannot be modified.
211994689c1Smrg    </para>
2125ec34c4cSmrg  </glossdef>
2135ec34c4cSmrg</glossentry>
2145ec34c4cSmrg<glossentry>
2155ec34c4cSmrg  <glossterm>Object</glossterm>
2165ec34c4cSmrg<indexterm significance="preferred"><primary>object</primary></indexterm>
2175ec34c4cSmrg  <glossdef>
218994689c1Smrg    <para>
219994689c1SmrgA data abstraction consisting of private data and private and public
220994689c1Smrgfunctions that operate on the private data.
221994689c1SmrgUsers of the abstraction can interact with the object only through calls
222994689c1Smrgto the object's public functions.
223994689c1SmrgIn the X Toolkit,
224994689c1Smrgsome of the object's public functions are called directly by the application,
225994689c1Smrgwhile others are called indirectly when the application calls the common
226994689c1SmrgIntrinsics functions.
227994689c1SmrgIn general, if a function is common to all widgets,
228994689c1Smrgan application uses a single Intrinsics function to invoke the function for all
229994689c1Smrgtypes of widgets.
230994689c1SmrgIf a function is unique to a single widget type,
231994689c1Smrgthe widget exports the function.
232994689c1Smrg    </para>
2335ec34c4cSmrg  </glossdef>
2345ec34c4cSmrg</glossentry>
2355ec34c4cSmrg<glossentry>
2365ec34c4cSmrg  <glossterm>Parent</glossterm>
2375ec34c4cSmrg<indexterm significance="preferred"><primary>parent</primary></indexterm>
2385ec34c4cSmrg  <glossdef>
239994689c1Smrg    <para>
240994689c1SmrgA widget that contains at least one other ("child") widget.
241994689c1SmrgA parent widget is also known as a composite widget.
242994689c1Smrg    </para>
2435ec34c4cSmrg  </glossdef>
2445ec34c4cSmrg</glossentry>
2455ec34c4cSmrg<glossentry>
2465ec34c4cSmrg  <glossterm>Resource</glossterm>
2475ec34c4cSmrg<indexterm significance="preferred"><primary>resource</primary></indexterm>
2485ec34c4cSmrg  <glossdef>
249994689c1Smrg    <para>
250994689c1SmrgA named piece of data in a widget that can be set by a client,
251994689c1Smrgby an application, or by user defaults.
252994689c1Smrg    </para>
2535ec34c4cSmrg  </glossdef>
2545ec34c4cSmrg</glossentry>
2555ec34c4cSmrg<glossentry>
2565ec34c4cSmrg  <glossterm>Superclass</glossterm>
2575ec34c4cSmrg<indexterm significance="preferred"><primary>superclass</primary></indexterm>
2585ec34c4cSmrg  <glossdef>
259994689c1Smrg    <para>
260994689c1SmrgA larger class of which a specific class is a member.
261994689c1SmrgAll members of a class are also members of the superclass.
262994689c1Smrg    </para>
2635ec34c4cSmrg  </glossdef>
2645ec34c4cSmrg</glossentry>
2655ec34c4cSmrg<glossentry>
2665ec34c4cSmrg  <glossterm>User</glossterm>
2675ec34c4cSmrg<indexterm significance="preferred"><primary>user</primary></indexterm>
2685ec34c4cSmrg  <glossdef>
269994689c1Smrg    <para>
270994689c1SmrgA person interacting with a workstation.
271994689c1Smrg    </para>
2725ec34c4cSmrg  </glossdef>
2735ec34c4cSmrg</glossentry>
2745ec34c4cSmrg<glossentry>
2755ec34c4cSmrg  <glossterm>Widget</glossterm>
2765ec34c4cSmrg<indexterm significance="preferred"><primary>widget</primary></indexterm>
2775ec34c4cSmrg  <glossdef>
278994689c1Smrg    <para>
279994689c1SmrgAn object providing a user-interface abstraction (for example, a Scrollbar
280994689c1Smrgwidget).
281994689c1Smrg    </para>
2825ec34c4cSmrg  </glossdef>
2835ec34c4cSmrg</glossentry>
2845ec34c4cSmrg<glossentry>
2855ec34c4cSmrg  <glossterm>Widget class</glossterm>
2865ec34c4cSmrg<indexterm significance="preferred"><primary>widget class</primary></indexterm>
2875ec34c4cSmrg  <glossdef>
288994689c1Smrg    <para>
289994689c1SmrgThe general group to which a specific widget belongs,
290994689c1Smrgotherwise known as the type of the widget.
291994689c1Smrg    </para>
2925ec34c4cSmrg  </glossdef>
2935ec34c4cSmrg</glossentry>
2945ec34c4cSmrg<glossentry>
2955ec34c4cSmrg  <glossterm>Widget programmer</glossterm>
2965ec34c4cSmrg<indexterm significance="preferred"><primary>widget programmer</primary></indexterm>
2975ec34c4cSmrg  <glossdef>
298994689c1Smrg    <para>
299994689c1SmrgA programmer who adds new widgets to the X Toolkit.
300994689c1Smrg    </para>
3015ec34c4cSmrg  </glossdef>
3025ec34c4cSmrg</glossentry>
3035ec34c4cSmrg</glosslist>
304994689c1Smrg</sect1>
305994689c1Smrg<sect1 id="Underlying_Model">
306994689c1Smrg<title>Underlying Model</title>
307994689c1Smrg<para>
308994689c1Smrg<!-- .LP -->
309994689c1Smrg<!-- .XS -->
310994689c1Smrg<!-- 	Underlying Model -->
311994689c1Smrg<!-- .XE -->
3125ec34c4cSmrg<indexterm significance="preferred"><primary>underlying model</primary></indexterm>
313994689c1SmrgThe underlying architectural model is based on the following premises:
314994689c1Smrg<!-- .KS -->
315994689c1Smrg</para>
3165ec34c4cSmrg<variablelist><?dbfo list-presentation="blocks"?>
3175ec34c4cSmrg<varlistentry>
3185ec34c4cSmrg  <term>Widgets are X windows</term>
319994689c1Smrg  <listitem>
320994689c1Smrg    <para>
321994689c1SmrgEvery user-interface widget is associated with an X window.
322994689c1SmrgThe X window ID for a widget is readily available from the widget.
323994689c1SmrgStandard Xlib calls can be used by widgets for many of their input and
324994689c1Smrgoutput operations.
325994689c1Smrg<!-- .KE -->
326994689c1Smrg<!-- .KS -->
327994689c1Smrg    </para>
328994689c1Smrg  </listitem>
3295ec34c4cSmrg</varlistentry>
3305ec34c4cSmrg<varlistentry>
3315ec34c4cSmrg  <term>Information hiding</term>
332994689c1Smrg  <listitem>
333994689c1Smrg    <para>
334994689c1SmrgThe data for every widget is private to the widget and its subclasses.
335994689c1SmrgThat is, the data is neither directly accessible
336994689c1Smrgnor visible outside of the module implementing the widget.
337994689c1SmrgAll program interaction with the widget is performed by a set of operations
338994689c1Smrg(methods) that are defined for the widget.
339994689c1Smrg<!-- .KE -->
340994689c1Smrg<!-- .KS -->
341994689c1Smrg    </para>
342994689c1Smrg  </listitem>
3435ec34c4cSmrg</varlistentry>
3445ec34c4cSmrg<varlistentry>
3455ec34c4cSmrg  <term>Widget semantics and widget layout geometry</term>
346994689c1Smrg  <listitem>
347994689c1Smrg    <para>
348994689c1SmrgWidget semantics are clearly separated from widget layout geometry.
349994689c1SmrgWidgets are concerned with implementing specific user-interface
350994689c1Smrgsemantics.  They have little control over issues such as their size or
351994689c1Smrgplacement relative to other widget peers.  Mechanisms are provided for
352994689c1Smrgassociating geometric managers with widgets and for widgets to make
353994689c1Smrgsuggestions about their own geometry.
354994689c1Smrg<!-- .KE -->
355994689c1Smrg    </para>
356994689c1Smrg  </listitem>
3575ec34c4cSmrg</varlistentry>
3585ec34c4cSmrg</variablelist>
359994689c1Smrg</sect1>
360994689c1Smrg<sect1 id="Conventions_Used_in_this_Manual">
361994689c1Smrg<title>Conventions Used in this Manual</title>
362994689c1Smrg<itemizedlist>
363994689c1Smrg  <listitem>
364994689c1Smrg    <para>
3655ec34c4cSmrg<indexterm significance="preferred"><primary>conventions</primary><secondary>used in manual</secondary></indexterm>
366994689c1SmrgAll resources available to the widgets are listed with each widget.  Many
367994689c1Smrgof these are available to more than one widget class due to the object
368994689c1Smrgoriented nature of the Intrinsics.  The new resources for each widget are
369994689c1Smrglisted in bold text, and the inherited resources are listed in plain text.
370994689c1Smrg    </para>
371994689c1Smrg  </listitem>
372994689c1Smrg  <listitem>
373994689c1Smrg    <para>
374994689c1SmrgGlobal symbols are printed in <function>bold</function> and can be function names,
375994689c1Smrgsymbols defined in include files, or structure names.  Arguments are
376994689c1Smrgprinted in <emphasis remap='I'>italics</emphasis>.
377994689c1Smrg    </para>
378994689c1Smrg  </listitem>
379994689c1Smrg  <listitem>
380994689c1Smrg    <para>
381994689c1SmrgEach function is introduced by a general discussion that distinguishes
382994689c1Smrgit from other functions.  The function declaration itself follows, and
383994689c1Smrgeach argument is specifically explained.  General discussion of the
384994689c1Smrgfunction, if any is required, follows the arguments.  Where
385994689c1Smrgapplicable, the last paragraph of the explanation lists the return values
386994689c1Smrgof the function.
387994689c1Smrg    </para>
388994689c1Smrg  </listitem>
389994689c1Smrg  <listitem>
390994689c1Smrg    <para>
391994689c1SmrgTo eliminate any ambiguity between those arguments that you pass and
392994689c1Smrgthose that a function returns to you, the explanations for all
393994689c1Smrgarguments that you pass start with the word <emphasis remap='I'>specifies</emphasis> or, in the
394994689c1Smrgcase of multiple arguments, the word <emphasis remap='I'>specify</emphasis>. The explanations
395994689c1Smrgfor all arguments that are returned to you start with the word
396994689c1Smrg<emphasis remap='I'>returns</emphasis> or, in the case of multiple arguments, the word
397994689c1Smrg<emphasis remap='I'>return</emphasis>.  The explanations for all arguments that you can pass
398994689c1Smrgand are returned start with the words <emphasis remap='I'>specifies and returns</emphasis>.
399994689c1Smrg    </para>
400994689c1Smrg  </listitem>
401994689c1Smrg  <listitem>
402994689c1Smrg    <para>
403994689c1SmrgAny pointer to a structure that is used to return a value is
404994689c1Smrgdesignated as such by the <emphasis remap='I'>_return</emphasis> suffix as part of its name.
405994689c1SmrgAll other pointers passed to these functions are used for reading
406994689c1Smrgonly.  A few arguments use pointers to structures that are used for
407994689c1Smrgboth input and output and are indicated by using the <emphasis remap='I'>_in_out</emphasis>
408994689c1Smrgsuffix.
4095ec34c4cSmrg<indexterm significance="preferred"><primary>_return</primary></indexterm>
4105ec34c4cSmrg<indexterm significance="preferred"><primary>_in_out</primary></indexterm>
411994689c1Smrg    </para>
412994689c1Smrg  </listitem>
413994689c1Smrg</itemizedlist>
414994689c1Smrg</sect1>
415994689c1Smrg<sect1 id="Format_of_the_Widget_Reference_Chapters">
416994689c1Smrg<title>Format of the Widget Reference Chapters</title>
417994689c1Smrg<para>
418994689c1Smrg<!-- .LP -->
4195ec34c4cSmrg<indexterm significance="preferred"><primary>conventions</primary><secondary>chapter format</secondary></indexterm>
4205ec34c4cSmrg<indexterm significance="preferred"><primary>chapter format</primary></indexterm>
421994689c1SmrgThe majority of this document is a reference guide for the Athena
422994689c1Smrgwidget set.  Chapters three through six give the programmer all
423994689c1Smrginformation necessary to use the widgets.  The layout of the chapters
424994689c1Smrgfollows a specific pattern to allow the programmer to easily find the
425994689c1Smrgdesired information.
426994689c1Smrg</para>
427994689c1Smrg<para>
428994689c1Smrg<!-- .LP -->
429994689c1SmrgThe first few pages of every chapter give an overview of the widgets
430994689c1Smrgin that section.  Widgets are grouped into chapters by functionality.
4315ec34c4cSmrg<itemizedlist>
4325ec34c4cSmrg  <listitem><para><xref linkend='Simple_Widgets'/></para></listitem>
4335ec34c4cSmrg  <listitem><para><xref linkend='Menus'/></para></listitem>
4345ec34c4cSmrg  <listitem><para><xref linkend='Text_Widgets'/></para></listitem>
4355ec34c4cSmrg  <listitem><para><xref linkend='Composite_and_Constraint_Widgets'/></para></listitem>
4365ec34c4cSmrg</itemizedlist>
437994689c1Smrg</para>
438994689c1Smrg<para>
439994689c1Smrg<!-- .LP -->
440994689c1SmrgFollowing the introduction will be a description of each widget in that
441994689c1Smrgchapter.  When no functional grouping is obvious the widgets are listed
442994689c1Smrgin alphabetical order, such as in chapters three and six.
443994689c1Smrg</para>
444994689c1Smrg<para>
445994689c1Smrg<!-- .LP -->
446994689c1SmrgThe first section of each widget's description is a table that
447994689c1Smrgcontains general information about this widget class.  Here is the
448994689c1Smrgtable for the Box widget, and an explanation of all the entries.
449994689c1Smrg<literallayout class="monospaced">
450994689c1Smrg<!-- .TA 2.0i -->
451994689c1Smrg<!-- .ta 2.0i -->
452994689c1Smrg<!-- .sp -->
453994689c1SmrgApplication Header file	&lt;X11/Xaw/Box.h&gt;
454994689c1SmrgClass Header file	&lt;X11/Xaw/BoxP.h&gt;
455994689c1SmrgClass		boxWidgetClass
456994689c1SmrgClass Name	Box
457994689c1SmrgSuperclass	Composite
458994689c1Smrg<!-- .sp -->
459994689c1Smrg</literallayout>
460994689c1Smrg<variablelist>
461994689c1Smrg  <varlistentry>
462994689c1Smrg    <term>
463994689c1Smrg      <function>Application Header File</function>
464994689c1Smrg    </term>
465994689c1Smrg    <listitem>
466994689c1Smrg      <para>
4675ec34c4cSmrg<indexterm significance="preferred"><primary>application header file</primary></indexterm>
468994689c1SmrgThis file must be included when an application uses this widget.
469994689c1SmrgIt usually contains the class definition, and some resource macros.
4705ec34c4cSmrgThis is often called the <quote>public</quote> header file.
4715ec34c4cSmrg<indexterm significance="preferred"><primary>class header file</primary></indexterm>
472994689c1Smrg      </para>
473994689c1Smrg    </listitem>
474994689c1Smrg  </varlistentry>
475994689c1Smrg  <varlistentry>
476994689c1Smrg    <term>
477994689c1Smrg      <function>Class Header File</function>
478994689c1Smrg    </term>
479994689c1Smrg    <listitem>
480994689c1Smrg      <para>
481994689c1SmrgThis file will only be used by widget programmers.  It will need to be
482994689c1Smrgincluded by any widget that subclasses this widget.  This is often
4835ec34c4cSmrgcalled the <quote>private</quote> header file.
4845ec34c4cSmrg<indexterm significance="preferred"><primary>class</primary></indexterm>
485994689c1Smrg      </para>
486994689c1Smrg    </listitem>
487994689c1Smrg  </varlistentry>
488994689c1Smrg  <varlistentry>
489994689c1Smrg    <term>
490994689c1Smrg      <function>Class</function>
491994689c1Smrg    </term>
492994689c1Smrg    <listitem>
493994689c1Smrg      <para>
494994689c1SmrgThis is the widget class of this widget.  This global symbol is passed to
495994689c1Smrg<function>XtCreateWidget</function> so that the Intrinsics will know which type of widget
496994689c1Smrgto create.
4975ec34c4cSmrg<indexterm significance="preferred"><primary>class name</primary></indexterm>
498994689c1Smrg      </para>
499994689c1Smrg    </listitem>
500994689c1Smrg  </varlistentry>
501994689c1Smrg  <varlistentry>
502994689c1Smrg    <term>
503994689c1Smrg      <function>Class Name</function>
504994689c1Smrg    </term>
505994689c1Smrg    <listitem>
506994689c1Smrg      <para>
507994689c1SmrgThis is the resource name of this class.  This name can be used in
508994689c1Smrga resource file to match any widget of this class.
5095ec34c4cSmrg<indexterm><primary>superclass</primary></indexterm>
510994689c1Smrg      </para>
511994689c1Smrg    </listitem>
512994689c1Smrg  </varlistentry>
513994689c1Smrg  <varlistentry>
514994689c1Smrg    <term>
515994689c1Smrg      <function>Superclass</function>
516994689c1Smrg    </term>
517994689c1Smrg    <listitem>
518994689c1Smrg      <para>
519994689c1SmrgThis is the superclass that this widget class is descended from.  If
520994689c1Smrgyou understand how the superclass works it will allow you to more quickly
521994689c1Smrgunderstand what this widget does, since much of its functionality may be
522994689c1Smrginherited from its superclass.
523994689c1Smrg<!-- .sp -->
524994689c1Smrg    </para>
525994689c1Smrg  </listitem>
526994689c1Smrg  </varlistentry>
527994689c1Smrg</variablelist>
528994689c1Smrg</para>
529994689c1Smrg<para>
530994689c1Smrg<!-- .LP -->
531994689c1SmrgAfter this table follows a general description of the default behavior of
532994689c1Smrgthis widget, as seen by the user.  In many cases this functionality
533994689c1Smrgmay be overridden by the application programmer, or by the user.
534994689c1Smrg</para>
535994689c1Smrg<para>
536994689c1Smrg<!-- .LP -->
537994689c1SmrgThe next section is a table showing the
538994689c1Smrgname, class, type and default value of each resource that is available
539994689c1Smrgto this widget.  There is also a column containing notes describing
540994689c1Smrgspecial restrictions placed upon individual resources.
5415ec34c4cSmrg<indexterm significance="preferred"><primary>notes</primary></indexterm>
5425ec34c4cSmrg<indexterm significance="preferred"><primary>A, note</primary></indexterm>
5435ec34c4cSmrg<indexterm significance="preferred"><primary>D, note</primary></indexterm>
5445ec34c4cSmrg<indexterm significance="preferred"><primary>C, note</primary></indexterm>
5455ec34c4cSmrg<indexterm significance="preferred"><primary>R, note</primary></indexterm>
546994689c1Smrg<variablelist>
547994689c1Smrg  <varlistentry>
548994689c1Smrg    <term>
549994689c1Smrg      A
550994689c1Smrg    </term>
551994689c1Smrg    <listitem>
552994689c1Smrg      <para>
553994689c1SmrgThis resource may be automatically adjusted when another
554994689c1Smrgresource is changed.
555994689c1Smrg      </para>
556994689c1Smrg    </listitem>
557994689c1Smrg  </varlistentry>
558994689c1Smrg  <varlistentry>
559994689c1Smrg    <term>
560994689c1Smrg      C
561994689c1Smrg    </term>
562994689c1Smrg    <listitem>
563994689c1Smrg      <para>
564994689c1SmrgThis resource is only settable at widget creation time, and may not
565421c997bSmrgbe modified with <xref linkend='XtSetValues' xrefstyle='select: title'/>.
566994689c1Smrg      </para>
567994689c1Smrg    </listitem>
568994689c1Smrg  </varlistentry>
569994689c1Smrg  <varlistentry>
570994689c1Smrg    <term>
571994689c1Smrg      D
572994689c1Smrg    </term>
573994689c1Smrg    <listitem>
574994689c1Smrg      <para>
575994689c1SmrgDo not modify this resource.  While setting this resource will
576994689c1Smrgwork, it can cause unexpected behavior.  When this symbol appears
577994689c1Smrgthere is another, preferred, interface provided by the X Toolkit.
578994689c1Smrg      </para>
579994689c1Smrg    </listitem>
580994689c1Smrg  </varlistentry>
581994689c1Smrg  <varlistentry>
582994689c1Smrg    <term>
583994689c1Smrg      R
584994689c1Smrg    </term>
585994689c1Smrg    <listitem>
586994689c1Smrg      <para>
587994689c1SmrgThis resource is READ-ONLY, and may not be modified.
588994689c1Smrg    </para>
589994689c1Smrg  </listitem>
590994689c1Smrg  </varlistentry>
591994689c1Smrg</variablelist>
592994689c1Smrg</para>
593994689c1Smrg<para>
594994689c1Smrg<!-- .LP -->
595994689c1SmrgAfter the resource table is a detailed description of every resource
596994689c1Smrgavailable to that widget.  Many of these are redundant, but printing
597994689c1Smrgthem with each widget saves page flipping.  The names of the resources
598994689c1Smrgthat are inherited are printed in plain text, while the names of the
599994689c1Smrgresources that are new to this class are printed in <function>bold</function>.
600994689c1SmrgIf you have already read the description of the superclass you need
601994689c1Smrgonly pay attention to the resources printed in bold.
602994689c1Smrg</para>
603994689c1Smrg<para>
604994689c1Smrg<!-- .LP -->
605994689c1SmrgFor each composite widget there is a section on layout semantics that
606994689c1Smrgfollows the resource description.  This section will describe the
607994689c1Smrgeffect of constraint resources on the layout of the children, as well
608994689c1Smrgas a general description of where it prefers to place its children.
609994689c1Smrg</para>
610994689c1Smrg<para>
611994689c1Smrg<!-- .LP -->
612994689c1SmrgDescriptions of default translations and action routines come next, for
613994689c1Smrgwidgets to which they apply.  The last item in each widget's
614994689c1Smrgdocumentation is the description of all convenience routines provided by
615994689c1Smrgthe widget.
616994689c1Smrg</para>
617994689c1Smrg</sect1>
618994689c1Smrg<sect1 id="Input_Focus">
619994689c1Smrg<title>Input Focus</title>
620994689c1Smrg<!-- .XS -->
621994689c1Smrg<!-- 	Input Focus -->
622994689c1Smrg<!-- .XE -->
6235ec34c4cSmrg<indexterm significance="preferred"><primary>input focus</primary></indexterm>
6245ec34c4cSmrg<indexterm significance="preferred"><primary>input</primary></indexterm>
6255ec34c4cSmrg<indexterm significance="preferred"><primary>XtNinput</primary></indexterm>
626994689c1Smrg<para>
627994689c1Smrg<!-- .LP -->
628994689c1SmrgThe Intrinsics define a resource on all Shell widgets that interact with
629994689c1Smrgthe window manager called <function>input</function>.  This resource requests the
630994689c1Smrgassistance of window manager in acquiring the input focus.  The
631994689c1Smrgresource defaults to <function>False</function> in the Intrinsics, but is redefined to
632994689c1Smrgdefault to <function>True</function> when an application is using the Athena widget
633994689c1Smrgset.  An application programmer may override this default and set the
634994689c1Smrgresource back to <function>False</function> if the application does not need the window
635421c997bSmrgmanager to give it the input focus.  See the
6365ec34c4cSmrg<olink targetdoc='intrinsics' targetptr='Shell_Widgets'
6375ec34c4cSmrg><citetitle>X Toolkit Intrinsics - C Language Interface</citetitle></olink> for details
638994689c1Smrgon the <emphasis remap='I'>input</emphasis> resource.
639994689c1Smrg
640994689c1Smrg</para>
641994689c1Smrg</sect1>
642994689c1Smrg</chapter>
643