CH1.xml revision 421c997b
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 16994689c1Smrgthe <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>. 17994689c1Smrg</para> 18994689c1Smrg<para> 19994689c1SmrgThe Athena widget set is a library package layered on top of the Intrinsics 20994689c1Smrgand Xlib that provides a set of user interface tools sufficient to build 21994689c1Smrga wide variety of applications. This layer extends the basic 22994689c1Smrgabstractions provided by X and provides the next layer of functionality 23994689c1Smrgprimarily by supplying a cohesive set of sample widgets. Although the 24994689c1SmrgIntrinsics are a Consortium standard, there is no standard widget set. 25994689c1Smrg</para> 26994689c1Smrg 27994689c1Smrg<para> 28994689c1SmrgTo the extent possible, the Intrinsics are "policy-free". The application 29994689c1Smrgenvironment and widget set, not the Intrinsics, define, implement, and 30994689c1Smrgenforce: 31994689c1Smrg</para> 32994689c1Smrg 33994689c1Smrg<itemizedlist> 34994689c1Smrg <listitem><para>Policy</para></listitem> 35994689c1Smrg <listitem><para>Consistency</para></listitem> 36994689c1Smrg <listitem><para>Style</para></listitem> 37994689c1Smrg</itemizedlist> 38994689c1Smrg 39994689c1Smrg<para> 40994689c1SmrgEach individual widget implementation defines its own policy. The X Toolkit 41994689c1Smrgdesign allows for, but does not necessarily encourage, the free mixing 42994689c1Smrgof radically differing widget implementations. 43994689c1Smrg</para> 44994689c1Smrg 45421c997bSmrg<sect1 id='Introduction_to_the_X_Toolkit'> 46994689c1Smrg<title>Introduction to the X Toolkit</title> 47994689c1Smrg<para> 48994689c1Smrg<!-- .LP --> 49994689c1Smrg<!-- .XS --> 50994689c1Smrg<!-- Introduction to the X Toolkit --> 51994689c1Smrg<!-- .XE --> 52994689c1Smrg<!-- .IN "introduction" "" "@DEF@" --> 53994689c1SmrgThe X Toolkit provides tools that simplify the design of 54994689c1Smrgapplication user interfaces in the X Window System programming environment. 55994689c1SmrgIt assists application programmers by providing a set of common 56994689c1Smrgunderlying user-interface functions. It also lets widget programmers 57994689c1Smrgmodify existing widgets, by subclassing, or add new widgets. By using 58994689c1Smrgthe X Toolkit in their applications, programmers can present a similar 59994689c1Smrguser interface across applications to all workstation users. 60994689c1Smrg</para> 61994689c1Smrg<para> 62994689c1Smrg<!-- .LP --> 63994689c1SmrgThe X Toolkit consists of: 64994689c1Smrg</para> 65994689c1Smrg<itemizedlist> 66994689c1Smrg <listitem> 67994689c1Smrg <para> 68994689c1SmrgA set of Intrinsics functions for building widgets 69994689c1Smrg </para> 70994689c1Smrg </listitem> 71994689c1Smrg <listitem> 72994689c1Smrg <para> 73994689c1SmrgAn architectural model for constructing widgets 74994689c1Smrg </para> 75994689c1Smrg </listitem> 76994689c1Smrg <listitem> 77994689c1Smrg <para> 78994689c1SmrgA widget set for application programming 79994689c1Smrg </para> 80994689c1Smrg </listitem> 81994689c1Smrg</itemizedlist> 82994689c1Smrg<para> 83994689c1Smrg<!-- .LP --> 84994689c1SmrgWhile the majority of the Intrinsics functions are intended 85994689c1Smrgfor the widget programmer, 86994689c1Smrga subset of the Intrinsics functions are to be used by application programmers 87994689c1Smrg(see <emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis>). 88994689c1SmrgThe architectural model lets the widget programmer design new widgets 89994689c1Smrgby using the Intrinsics and by combining other widgets. 90994689c1SmrgThe application interface layers built on top of the X Toolkit include a 91994689c1Smrgcoordinated set of widgets and composition policies. 92994689c1SmrgSome of these widgets and policies are specific to a single 93994689c1Smrgapplication domain, and others are common to a variety of 94994689c1Smrgapplications. 95994689c1Smrg</para> 96994689c1Smrg<para> 97994689c1Smrg<!-- .LP --> 98994689c1SmrgThe remainder of this chapter discusses the X Toolkit and Athena widget set: 99994689c1Smrg</para> 100994689c1Smrg<itemizedlist> 101994689c1Smrg <listitem> 102994689c1Smrg <para> 103994689c1SmrgTerminology 104994689c1Smrg </para> 105994689c1Smrg </listitem> 106994689c1Smrg <listitem> 107994689c1Smrg <para> 108994689c1SmrgModel 109994689c1Smrg </para> 110994689c1Smrg </listitem> 111994689c1Smrg <listitem> 112994689c1Smrg <para> 113994689c1SmrgConventions used in this manual 114994689c1Smrg </para> 115994689c1Smrg </listitem> 116994689c1Smrg <listitem> 117994689c1Smrg <para> 118994689c1SmrgFormat of the Widget Reference Chapters 119994689c1Smrg </para> 120994689c1Smrg </listitem> 121994689c1Smrg</itemizedlist> 122994689c1Smrg</sect1> 123994689c1Smrg<sect1 id="Terminology"> 124994689c1Smrg<title>Terminology</title> 125994689c1Smrg<para> 126994689c1Smrg<!-- .LP --> 127994689c1Smrg<!-- .XS --> 128994689c1Smrg<!-- Terminology --> 129994689c1Smrg<!-- .XE --> 130994689c1Smrg</para> 131994689c1Smrg<para> 132994689c1Smrg<!-- .LP --> 133421c997bSmrgIn addition to the terms already defined for X programming (see 134994689c1Smrg<emphasis remap='I'>Xlib - C Language Interface</emphasis>), 135994689c1Smrgthe following terms are specific to the Intrinsics and Athena widget set 136994689c1Smrgand used throughout this document. 137994689c1Smrg</para> 138994689c1Smrg<para> 139994689c1Smrg<!-- .LP --> 140994689c1Smrg<function>Application programmer</function> 141994689c1Smrg<!-- .IN "application programmer" "" "@DEF@" --> 142994689c1Smrg</para> 143994689c1Smrg<itemizedlist> 144994689c1Smrg <listitem> 145994689c1Smrg <para> 146994689c1SmrgA programmer who uses the X Toolkit to produce an application user interface. 147994689c1Smrg </para> 148994689c1Smrg </listitem> 149994689c1Smrg</itemizedlist> 150994689c1Smrg<para> 151994689c1Smrg<!-- .LP --> 152994689c1Smrg<function>Child</function> 153994689c1Smrg<!-- .IN "child" "" "@DEF" --> 154994689c1Smrg</para> 155994689c1Smrg<itemizedlist> 156994689c1Smrg <listitem> 157994689c1Smrg <para> 158994689c1SmrgA widget that is contained within another "parent" widget. 159994689c1Smrg </para> 160994689c1Smrg </listitem> 161994689c1Smrg</itemizedlist> 162994689c1Smrg<para> 163994689c1Smrg<!-- .LP --> 164994689c1Smrg<function>Class</function> 165994689c1Smrg<!-- .IN "class" "" "@DEF@" --> 166994689c1Smrg</para> 167994689c1Smrg<itemizedlist> 168994689c1Smrg <listitem> 169994689c1Smrg <para> 170994689c1SmrgThe general group to which a specific object belongs. 171994689c1Smrg </para> 172994689c1Smrg </listitem> 173994689c1Smrg</itemizedlist> 174994689c1Smrg<para> 175994689c1Smrg<!-- .LP --> 176994689c1Smrg<function>Client</function> 177994689c1Smrg<!-- .IN "client" "" "@DEF@" --> 178994689c1Smrg</para> 179994689c1Smrg<itemizedlist> 180994689c1Smrg <listitem> 181994689c1Smrg <para> 182994689c1SmrgA function that uses a widget in an application or for composing 183994689c1Smrgother widgets. 184994689c1Smrg </para> 185994689c1Smrg </listitem> 186994689c1Smrg</itemizedlist> 187994689c1Smrg<para> 188994689c1Smrg<!-- .LP --> 189994689c1Smrg<function>FullName</function> 190994689c1Smrg<!-- .IN "FullName" "" "@DEF" --> 191994689c1Smrg</para> 192994689c1Smrg<itemizedlist> 193994689c1Smrg <listitem> 194994689c1Smrg <para> 195994689c1SmrgThe name of a widget instance appended to the full name of its parent. 196994689c1Smrg </para> 197994689c1Smrg </listitem> 198994689c1Smrg</itemizedlist> 199994689c1Smrg<para> 200994689c1Smrg<!-- .LP --> 201994689c1Smrg<function>Instance</function> 202994689c1Smrg<!-- .IN "instance" "" "@DEF@" --> 203994689c1Smrg</para> 204994689c1Smrg<itemizedlist> 205994689c1Smrg <listitem> 206994689c1Smrg <para> 207994689c1SmrgA specific widget object as opposed to a general widget class. 208994689c1Smrg </para> 209994689c1Smrg </listitem> 210994689c1Smrg</itemizedlist> 211994689c1Smrg<para> 212994689c1Smrg<!-- .LP --> 213994689c1Smrg<function>Method</function> 214994689c1Smrg<!-- .IN "method" "" "@DEF@" --> 215994689c1Smrg</para> 216994689c1Smrg<itemizedlist> 217994689c1Smrg <listitem> 218994689c1Smrg <para> 219994689c1SmrgA function or procedure implemented by a widget class. 220994689c1Smrg </para> 221994689c1Smrg </listitem> 222994689c1Smrg</itemizedlist> 223994689c1Smrg<para> 224994689c1Smrg<!-- .LP --> 225994689c1Smrg<function>Name</function> 226994689c1Smrg<!-- .IN "name" "widget" "@DEF@" --> 227994689c1Smrg</para> 228994689c1Smrg<itemizedlist> 229994689c1Smrg <listitem> 230994689c1Smrg <para> 231994689c1SmrgThe name that is specific to an instance of a widget for a given client. 232994689c1SmrgThis name is specified at creation time and cannot be modified. 233994689c1Smrg </para> 234994689c1Smrg </listitem> 235994689c1Smrg</itemizedlist> 236994689c1Smrg<para> 237994689c1Smrg<!-- .LP --> 238994689c1Smrg<function>Object</function> 239994689c1Smrg<!-- .IN "object" "" "@DEF@" --> 240994689c1Smrg</para> 241994689c1Smrg<itemizedlist> 242994689c1Smrg <listitem> 243994689c1Smrg <para> 244994689c1SmrgA data abstraction consisting of private data and private and public 245994689c1Smrgfunctions that operate on the private data. 246994689c1SmrgUsers of the abstraction can interact with the object only through calls 247994689c1Smrgto the object's public functions. 248994689c1SmrgIn the X Toolkit, 249994689c1Smrgsome of the object's public functions are called directly by the application, 250994689c1Smrgwhile others are called indirectly when the application calls the common 251994689c1SmrgIntrinsics functions. 252994689c1SmrgIn general, if a function is common to all widgets, 253994689c1Smrgan application uses a single Intrinsics function to invoke the function for all 254994689c1Smrgtypes of widgets. 255994689c1SmrgIf a function is unique to a single widget type, 256994689c1Smrgthe widget exports the function. 257994689c1Smrg </para> 258994689c1Smrg </listitem> 259994689c1Smrg</itemizedlist> 260994689c1Smrg<para> 261994689c1Smrg<!-- .LP --> 262994689c1Smrg<function>Parent</function> 263994689c1Smrg<!-- .IN "parent" "" "@DEF@" --> 264994689c1Smrg</para> 265994689c1Smrg<itemizedlist> 266994689c1Smrg <listitem> 267994689c1Smrg <para> 268994689c1SmrgA widget that contains at least one other ("child") widget. 269994689c1SmrgA parent widget is also known as a composite widget. 270994689c1Smrg </para> 271994689c1Smrg </listitem> 272994689c1Smrg</itemizedlist> 273994689c1Smrg<para> 274994689c1Smrg<!-- .LP --> 275994689c1Smrg<function>Resource</function> 276994689c1Smrg<!-- .IN "resource" "" "@DEF@" --> 277994689c1Smrg</para> 278994689c1Smrg<itemizedlist> 279994689c1Smrg <listitem> 280994689c1Smrg <para> 281994689c1SmrgA named piece of data in a widget that can be set by a client, 282994689c1Smrgby an application, or by user defaults. 283994689c1Smrg </para> 284994689c1Smrg </listitem> 285994689c1Smrg</itemizedlist> 286994689c1Smrg<para> 287994689c1Smrg<!-- .LP --> 288994689c1Smrg<function>Superclass</function> 289994689c1Smrg<!-- .IN "superclass" "" "@DEF@" --> 290994689c1Smrg</para> 291994689c1Smrg<itemizedlist> 292994689c1Smrg <listitem> 293994689c1Smrg <para> 294994689c1SmrgA larger class of which a specific class is a member. 295994689c1SmrgAll members of a class are also members of the superclass. 296994689c1Smrg </para> 297994689c1Smrg </listitem> 298994689c1Smrg</itemizedlist> 299994689c1Smrg<para> 300994689c1Smrg<!-- .LP --> 301994689c1Smrg<function>User</function> 302994689c1Smrg<!-- .IN "user" "" "@DEF@" --> 303994689c1Smrg</para> 304994689c1Smrg<itemizedlist> 305994689c1Smrg <listitem> 306994689c1Smrg <para> 307994689c1SmrgA person interacting with a workstation. 308994689c1Smrg </para> 309994689c1Smrg </listitem> 310994689c1Smrg</itemizedlist> 311994689c1Smrg<para> 312994689c1Smrg<!-- .LP --> 313994689c1Smrg<function>Widget</function> 314994689c1Smrg<!-- .IN "widget" "" "@DEF@" --> 315994689c1Smrg</para> 316994689c1Smrg<itemizedlist> 317994689c1Smrg <listitem> 318994689c1Smrg <para> 319994689c1SmrgAn object providing a user-interface abstraction (for example, a Scrollbar 320994689c1Smrgwidget). 321994689c1Smrg </para> 322994689c1Smrg </listitem> 323994689c1Smrg</itemizedlist> 324994689c1Smrg<para> 325994689c1Smrg<!-- .LP --> 326994689c1Smrg<function>Widget class</function> 327994689c1Smrg<!-- .IN "widget class" "" "@DEF@" --> 328994689c1Smrg</para> 329994689c1Smrg<itemizedlist> 330994689c1Smrg <listitem> 331994689c1Smrg <para> 332994689c1SmrgThe general group to which a specific widget belongs, 333994689c1Smrgotherwise known as the type of the widget. 334994689c1Smrg </para> 335994689c1Smrg </listitem> 336994689c1Smrg</itemizedlist> 337994689c1Smrg<para> 338994689c1Smrg<!-- .LP --> 339994689c1Smrg<function>Widget programmer</function> 340994689c1Smrg<!-- .IN "widget programmer" "" "@DEF@" --> 341994689c1Smrg</para> 342994689c1Smrg<itemizedlist> 343994689c1Smrg <listitem> 344994689c1Smrg <para> 345994689c1SmrgA programmer who adds new widgets to the X Toolkit. 346994689c1Smrg </para> 347994689c1Smrg </listitem> 348994689c1Smrg</itemizedlist> 349994689c1Smrg</sect1> 350994689c1Smrg<sect1 id="Underlying_Model"> 351994689c1Smrg<title>Underlying Model</title> 352994689c1Smrg<para> 353994689c1Smrg<!-- .LP --> 354994689c1Smrg<!-- .XS --> 355994689c1Smrg<!-- Underlying Model --> 356994689c1Smrg<!-- .XE --> 357994689c1Smrg<!-- .IN "underlying model" "" "@DEF@" --> 358994689c1SmrgThe underlying architectural model is based on the following premises: 359994689c1Smrg<!-- .KS --> 360994689c1Smrg</para> 361994689c1Smrg<itemizedlist> 362994689c1Smrg <listitem> 363994689c1Smrg <para> 364994689c1Smrg </para> 365994689c1Smrg </listitem> 366994689c1Smrg <listitem> 367994689c1Smrg <para> 368994689c1SmrgEvery user-interface widget is associated with an X window. 369994689c1SmrgThe X window ID for a widget is readily available from the widget. 370994689c1SmrgStandard Xlib calls can be used by widgets for many of their input and 371994689c1Smrgoutput operations. 372994689c1Smrg<!-- .KE --> 373994689c1Smrg<!-- .KS --> 374994689c1Smrg </para> 375994689c1Smrg </listitem> 376994689c1Smrg <listitem> 377994689c1Smrg <para> 378994689c1Smrg </para> 379994689c1Smrg </listitem> 380994689c1Smrg <listitem> 381994689c1Smrg <para> 382994689c1SmrgThe data for every widget is private to the widget and its subclasses. 383994689c1SmrgThat is, the data is neither directly accessible 384994689c1Smrgnor visible outside of the module implementing the widget. 385994689c1SmrgAll program interaction with the widget is performed by a set of operations 386994689c1Smrg(methods) that are defined for the widget. 387994689c1Smrg<!-- .KE --> 388994689c1Smrg<!-- .KS --> 389994689c1Smrg </para> 390994689c1Smrg </listitem> 391994689c1Smrg <listitem> 392994689c1Smrg <para> 393994689c1Smrg </para> 394994689c1Smrg </listitem> 395994689c1Smrg <listitem> 396994689c1Smrg <para> 397994689c1SmrgWidget semantics are clearly separated from widget layout geometry. 398994689c1SmrgWidgets are concerned with implementing specific user-interface 399994689c1Smrgsemantics. They have little control over issues such as their size or 400994689c1Smrgplacement relative to other widget peers. Mechanisms are provided for 401994689c1Smrgassociating geometric managers with widgets and for widgets to make 402994689c1Smrgsuggestions about their own geometry. 403994689c1Smrg<!-- .KE --> 404994689c1Smrg </para> 405994689c1Smrg </listitem> 406994689c1Smrg</itemizedlist> 407994689c1Smrg</sect1> 408994689c1Smrg<sect1 id="Conventions_Used_in_this_Manual"> 409994689c1Smrg<title>Conventions Used in this Manual</title> 410994689c1Smrg<itemizedlist> 411994689c1Smrg <listitem> 412994689c1Smrg <para> 413994689c1Smrg<!-- .IN "conventions" "used in manual" "@DEF@" --> 414994689c1SmrgAll resources available to the widgets are listed with each widget. Many 415994689c1Smrgof these are available to more than one widget class due to the object 416994689c1Smrgoriented nature of the Intrinsics. The new resources for each widget are 417994689c1Smrglisted in bold text, and the inherited resources are listed in plain text. 418994689c1Smrg </para> 419994689c1Smrg </listitem> 420994689c1Smrg <listitem> 421994689c1Smrg <para> 422994689c1SmrgGlobal symbols are printed in <function>bold</function> and can be function names, 423994689c1Smrgsymbols defined in include files, or structure names. Arguments are 424994689c1Smrgprinted in <emphasis remap='I'>italics</emphasis>. 425994689c1Smrg </para> 426994689c1Smrg </listitem> 427994689c1Smrg <listitem> 428994689c1Smrg <para> 429994689c1SmrgEach function is introduced by a general discussion that distinguishes 430994689c1Smrgit from other functions. The function declaration itself follows, and 431994689c1Smrgeach argument is specifically explained. General discussion of the 432994689c1Smrgfunction, if any is required, follows the arguments. Where 433994689c1Smrgapplicable, the last paragraph of the explanation lists the return values 434994689c1Smrgof the function. 435994689c1Smrg </para> 436994689c1Smrg </listitem> 437994689c1Smrg <listitem> 438994689c1Smrg <para> 439994689c1SmrgTo eliminate any ambiguity between those arguments that you pass and 440994689c1Smrgthose that a function returns to you, the explanations for all 441994689c1Smrgarguments that you pass start with the word <emphasis remap='I'>specifies</emphasis> or, in the 442994689c1Smrgcase of multiple arguments, the word <emphasis remap='I'>specify</emphasis>. The explanations 443994689c1Smrgfor all arguments that are returned to you start with the word 444994689c1Smrg<emphasis remap='I'>returns</emphasis> or, in the case of multiple arguments, the word 445994689c1Smrg<emphasis remap='I'>return</emphasis>. The explanations for all arguments that you can pass 446994689c1Smrgand are returned start with the words <emphasis remap='I'>specifies and returns</emphasis>. 447994689c1Smrg </para> 448994689c1Smrg </listitem> 449994689c1Smrg <listitem> 450994689c1Smrg <para> 451994689c1SmrgAny pointer to a structure that is used to return a value is 452994689c1Smrgdesignated as such by the <emphasis remap='I'>_return</emphasis> suffix as part of its name. 453994689c1SmrgAll other pointers passed to these functions are used for reading 454994689c1Smrgonly. A few arguments use pointers to structures that are used for 455994689c1Smrgboth input and output and are indicated by using the <emphasis remap='I'>_in_out</emphasis> 456994689c1Smrgsuffix. 457994689c1Smrg<!-- .IN "_return" "" "@DEF@" --> 458994689c1Smrg<!-- .IN "_in_out" "" "@DEF@" --> 459994689c1Smrg </para> 460994689c1Smrg </listitem> 461994689c1Smrg</itemizedlist> 462994689c1Smrg</sect1> 463994689c1Smrg<sect1 id="Format_of_the_Widget_Reference_Chapters"> 464994689c1Smrg<title>Format of the Widget Reference Chapters</title> 465994689c1Smrg<para> 466994689c1Smrg<!-- .LP --> 467994689c1Smrg<!-- .IN "conventions" "chapter format" "@DEF@" --> 468994689c1Smrg<!-- .IN "chapter format" "" "@DEF@" --> 469994689c1SmrgThe majority of this document is a reference guide for the Athena 470994689c1Smrgwidget set. Chapters three through six give the programmer all 471994689c1Smrginformation necessary to use the widgets. The layout of the chapters 472994689c1Smrgfollows a specific pattern to allow the programmer to easily find the 473994689c1Smrgdesired information. 474994689c1Smrg</para> 475994689c1Smrg<para> 476994689c1Smrg<!-- .LP --> 477994689c1SmrgThe first few pages of every chapter give an overview of the widgets 478994689c1Smrgin that section. Widgets are grouped into chapters by functionality. 479994689c1Smrg<variablelist> 480994689c1Smrg <varlistentry> 481994689c1Smrg <term> 482994689c1Smrg "Chapter <!-- xref --> 483994689c1Smrg </term> 484994689c1Smrg <listitem> 485994689c1Smrg <para> 486994689c1SmrgSimple Widgets 487994689c1Smrg </para> 488994689c1Smrg </listitem> 489994689c1Smrg </varlistentry> 490994689c1Smrg <varlistentry> 491994689c1Smrg <term> 492994689c1Smrg "Chapter <!-- xref --> 493994689c1Smrg </term> 494994689c1Smrg <listitem> 495994689c1Smrg <para> 496994689c1SmrgMenus 497994689c1Smrg </para> 498994689c1Smrg </listitem> 499994689c1Smrg </varlistentry> 500994689c1Smrg <varlistentry> 501994689c1Smrg <term> 502994689c1Smrg "Chapter <!-- xref --> 503994689c1Smrg </term> 504994689c1Smrg <listitem> 505994689c1Smrg <para> 506994689c1SmrgText Widgets 507994689c1Smrg </para> 508994689c1Smrg </listitem> 509994689c1Smrg </varlistentry> 510994689c1Smrg <varlistentry> 511994689c1Smrg <term> 512994689c1Smrg "Chapter <!-- xref --> 513994689c1Smrg </term> 514994689c1Smrg <listitem> 515994689c1Smrg <para> 516994689c1SmrgComposite and Constraint Widget 517994689c1Smrg </para> 518994689c1Smrg </listitem> 519994689c1Smrg </varlistentry> 520994689c1Smrg</variablelist> 521994689c1Smrg</para> 522994689c1Smrg<para> 523994689c1Smrg<!-- .LP --> 524994689c1SmrgFollowing the introduction will be a description of each widget in that 525994689c1Smrgchapter. When no functional grouping is obvious the widgets are listed 526994689c1Smrgin alphabetical order, such as in chapters three and six. 527994689c1Smrg</para> 528994689c1Smrg<para> 529994689c1Smrg<!-- .LP --> 530994689c1SmrgThe first section of each widget's description is a table that 531994689c1Smrgcontains general information about this widget class. Here is the 532994689c1Smrgtable for the Box widget, and an explanation of all the entries. 533994689c1Smrg<literallayout class="monospaced"> 534994689c1Smrg<!-- .TA 2.0i --> 535994689c1Smrg<!-- .ta 2.0i --> 536994689c1Smrg<!-- .sp --> 537994689c1SmrgApplication Header file <X11/Xaw/Box.h> 538994689c1SmrgClass Header file <X11/Xaw/BoxP.h> 539994689c1SmrgClass boxWidgetClass 540994689c1SmrgClass Name Box 541994689c1SmrgSuperclass Composite 542994689c1Smrg<!-- .sp --> 543994689c1Smrg</literallayout> 544994689c1Smrg<variablelist> 545994689c1Smrg <varlistentry> 546994689c1Smrg <term> 547994689c1Smrg <function>Application Header File</function> 548994689c1Smrg </term> 549994689c1Smrg <listitem> 550994689c1Smrg <para> 551994689c1Smrg<!-- .IN "application header file" "" "@DEF@" --> 552994689c1SmrgThis file must be included when an application uses this widget. 553994689c1SmrgIt usually contains the class definition, and some resource macros. 554994689c1SmrgThis is often called the ``public'' header file. 555994689c1Smrg<!-- .IN "class header file" "" "@DEF@" --> 556994689c1Smrg </para> 557994689c1Smrg </listitem> 558994689c1Smrg </varlistentry> 559994689c1Smrg <varlistentry> 560994689c1Smrg <term> 561994689c1Smrg <function>Class Header File</function> 562994689c1Smrg </term> 563994689c1Smrg <listitem> 564994689c1Smrg <para> 565994689c1SmrgThis file will only be used by widget programmers. It will need to be 566994689c1Smrgincluded by any widget that subclasses this widget. This is often 567994689c1Smrgcalled the ``private'' header file. 568994689c1Smrg<!-- .IN "class" "" "@DEF@" --> 569994689c1Smrg </para> 570994689c1Smrg </listitem> 571994689c1Smrg </varlistentry> 572994689c1Smrg <varlistentry> 573994689c1Smrg <term> 574994689c1Smrg <function>Class</function> 575994689c1Smrg </term> 576994689c1Smrg <listitem> 577994689c1Smrg <para> 578994689c1SmrgThis is the widget class of this widget. This global symbol is passed to 579994689c1Smrg<function>XtCreateWidget</function> so that the Intrinsics will know which type of widget 580994689c1Smrgto create. 581994689c1Smrg<!-- .IN "class name" "" "@DEF@" --> 582994689c1Smrg </para> 583994689c1Smrg </listitem> 584994689c1Smrg </varlistentry> 585994689c1Smrg <varlistentry> 586994689c1Smrg <term> 587994689c1Smrg <function>Class Name</function> 588994689c1Smrg </term> 589994689c1Smrg <listitem> 590994689c1Smrg <para> 591994689c1SmrgThis is the resource name of this class. This name can be used in 592994689c1Smrga resource file to match any widget of this class. 593994689c1Smrg<!-- .IN "superclass" "" --> 594994689c1Smrg </para> 595994689c1Smrg </listitem> 596994689c1Smrg </varlistentry> 597994689c1Smrg <varlistentry> 598994689c1Smrg <term> 599994689c1Smrg <function>Superclass</function> 600994689c1Smrg </term> 601994689c1Smrg <listitem> 602994689c1Smrg <para> 603994689c1SmrgThis is the superclass that this widget class is descended from. If 604994689c1Smrgyou understand how the superclass works it will allow you to more quickly 605994689c1Smrgunderstand what this widget does, since much of its functionality may be 606994689c1Smrginherited from its superclass. 607994689c1Smrg<!-- .sp --> 608994689c1Smrg </para> 609994689c1Smrg </listitem> 610994689c1Smrg </varlistentry> 611994689c1Smrg</variablelist> 612994689c1Smrg</para> 613994689c1Smrg<para> 614994689c1Smrg<!-- .LP --> 615994689c1SmrgAfter this table follows a general description of the default behavior of 616994689c1Smrgthis widget, as seen by the user. In many cases this functionality 617994689c1Smrgmay be overridden by the application programmer, or by the user. 618994689c1Smrg</para> 619994689c1Smrg<para> 620994689c1Smrg<!-- .LP --> 621994689c1SmrgThe next section is a table showing the 622994689c1Smrgname, class, type and default value of each resource that is available 623994689c1Smrgto this widget. There is also a column containing notes describing 624994689c1Smrgspecial restrictions placed upon individual resources. 625994689c1Smrg<!-- .IN "notes" "" "@DEF@" --> 626994689c1Smrg<!-- .IN "A, note" "" "@DEF@" --> 627994689c1Smrg<!-- .IN "D, note" "" "@DEF@" --> 628994689c1Smrg<!-- .IN "C, note" "" "@DEF@" --> 629994689c1Smrg<!-- .IN "R, note" "" "@DEF@" --> 630994689c1Smrg<variablelist> 631994689c1Smrg <varlistentry> 632994689c1Smrg <term> 633994689c1Smrg A 634994689c1Smrg </term> 635994689c1Smrg <listitem> 636994689c1Smrg <para> 637994689c1SmrgThis resource may be automatically adjusted when another 638994689c1Smrgresource is changed. 639994689c1Smrg </para> 640994689c1Smrg </listitem> 641994689c1Smrg </varlistentry> 642994689c1Smrg <varlistentry> 643994689c1Smrg <term> 644994689c1Smrg C 645994689c1Smrg </term> 646994689c1Smrg <listitem> 647994689c1Smrg <para> 648994689c1SmrgThis resource is only settable at widget creation time, and may not 649421c997bSmrgbe modified with <xref linkend='XtSetValues' xrefstyle='select: title'/>. 650994689c1Smrg </para> 651994689c1Smrg </listitem> 652994689c1Smrg </varlistentry> 653994689c1Smrg <varlistentry> 654994689c1Smrg <term> 655994689c1Smrg D 656994689c1Smrg </term> 657994689c1Smrg <listitem> 658994689c1Smrg <para> 659994689c1SmrgDo not modify this resource. While setting this resource will 660994689c1Smrgwork, it can cause unexpected behavior. When this symbol appears 661994689c1Smrgthere is another, preferred, interface provided by the X Toolkit. 662994689c1Smrg </para> 663994689c1Smrg </listitem> 664994689c1Smrg </varlistentry> 665994689c1Smrg <varlistentry> 666994689c1Smrg <term> 667994689c1Smrg R 668994689c1Smrg </term> 669994689c1Smrg <listitem> 670994689c1Smrg <para> 671994689c1SmrgThis resource is READ-ONLY, and may not be modified. 672994689c1Smrg </para> 673994689c1Smrg </listitem> 674994689c1Smrg </varlistentry> 675994689c1Smrg</variablelist> 676994689c1Smrg</para> 677994689c1Smrg<para> 678994689c1Smrg<!-- .LP --> 679994689c1SmrgAfter the resource table is a detailed description of every resource 680994689c1Smrgavailable to that widget. Many of these are redundant, but printing 681994689c1Smrgthem with each widget saves page flipping. The names of the resources 682994689c1Smrgthat are inherited are printed in plain text, while the names of the 683994689c1Smrgresources that are new to this class are printed in <function>bold</function>. 684994689c1SmrgIf you have already read the description of the superclass you need 685994689c1Smrgonly pay attention to the resources printed in bold. 686994689c1Smrg</para> 687994689c1Smrg<para> 688994689c1Smrg<!-- .LP --> 689994689c1SmrgFor each composite widget there is a section on layout semantics that 690994689c1Smrgfollows the resource description. This section will describe the 691994689c1Smrgeffect of constraint resources on the layout of the children, as well 692994689c1Smrgas a general description of where it prefers to place its children. 693994689c1Smrg</para> 694994689c1Smrg<para> 695994689c1Smrg<!-- .LP --> 696994689c1SmrgDescriptions of default translations and action routines come next, for 697994689c1Smrgwidgets to which they apply. The last item in each widget's 698994689c1Smrgdocumentation is the description of all convenience routines provided by 699994689c1Smrgthe widget. 700994689c1Smrg</para> 701994689c1Smrg</sect1> 702994689c1Smrg<sect1 id="Input_Focus"> 703994689c1Smrg<title>Input Focus</title> 704994689c1Smrg<!-- .XS --> 705994689c1Smrg<!-- Input Focus --> 706994689c1Smrg<!-- .XE --> 707994689c1Smrg<!-- .IN "input focus" "" "@DEF@" --> 708994689c1Smrg<!-- .IN "input" "" "@DEF@" --> 709994689c1Smrg<!-- .IN "XtNinput" "" "@DEF@" --> 710994689c1Smrg<para> 711994689c1Smrg<!-- .LP --> 712994689c1SmrgThe Intrinsics define a resource on all Shell widgets that interact with 713994689c1Smrgthe window manager called <function>input</function>. This resource requests the 714994689c1Smrgassistance of window manager in acquiring the input focus. The 715994689c1Smrgresource defaults to <function>False</function> in the Intrinsics, but is redefined to 716994689c1Smrgdefault to <function>True</function> when an application is using the Athena widget 717994689c1Smrgset. An application programmer may override this default and set the 718994689c1Smrgresource back to <function>False</function> if the application does not need the window 719421c997bSmrgmanager to give it the input focus. See the 720994689c1Smrg<emphasis remap='I'>X Toolkit Intrinsics - C Language Interface</emphasis> for details 721994689c1Smrgon the <emphasis remap='I'>input</emphasis> resource. 722994689c1Smrg 723994689c1Smrg</para> 724994689c1Smrg</sect1> 725994689c1Smrg</chapter> 726