1mAthena Widget Set -- C Language Interface0m 1mX Window System0m 1mX Version 11, Release 6.40m Chris D. Peterson formerly MIT X Consortium X Window System is a trademark of X Consortium, Inc. Copyright © 1985, 1986, 1987, 1988, 1989, 1991, 1994 X Con- sortium Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documenta- tion files (the ``Software''), to deal in the Software with- out restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the fol- lowing conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PUR- POSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSOR- TIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of the X Con- sortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. Copyright © 1985, 1986, 1987, 1988, 1989, 1991 Digital Equipment Corporation, Maynard, Massachusetts. Permission to use, copy, modify and distribute this documen- tation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permis- sion notice appear in supporting documentation, and that the name of Digital not be used in in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Digital makes no representations about the suitability of the software described herein for any purpose. It is provided ``as is'' without express or implied warranty. 1mAcknowledgments0m Many thanks go to Ralph Swick (Project Athena / Digital) who has contributed much time and effort to this widget set. Previous versions of the widget set are largely due to his time and effort. Many of the improvements that I have been able to make are because he provided a solid foundation to build upon. While much of the effort has been Ralph's, many other people have contributed to the code. Mark Ackerman (formerly Project Athena) Donna Converse (MIT X Consortium) Jim Fulton (formerly MIT X Consortium) Loretta Guarino-Reid (Digital WSL) Charles Haynes (Digital WSL) Rich Hyde (Digital WSL) Mary Larson (Digital UEG) Joel McCormack (Digital WSL) Ron Newman (formerly Project Athena) Jeanne Rich (Digital WSL) Terry Weissman (formerly Digital WSL) While not much remains of the X10 toolkit, many of the ideas for this widget set come from that original version. The design and implementation of the X10 toolkit were done by: Mike Gancarz (formerly Digital UEG) Charles Haynes (Digital WSL) Phil Karlton (formerly Digital WSL) Kathleen Langone (Digital UEG) Mary Larson (Digital UEG) Ram Rao (Digital UEG) Smokey Wallace (formerly Digital WSL) Terry Weissman (formerly Digital WSL) I have used the formatting ideas, and some of the words from previous versions of this document. The X11R3 Athena widget document was written by: Ralph R. Swick (Project Athena/ Digital) Terry Weissman (formerly Digital WSL) Al Mento (Digital UEG) Putting this manual together was a major task in and of itself. I would like to thank Ralph Swick, Donna Converse, 1mv0m and Jim Fulton for taking the time to help convert my tech- nical knowledge into legible text. A special thanks to Jean Diaz (O'Reilly and Associates) for spending nearly a month with me working out all the annoying little details. Chris D. Peterson MIT X Consortium 1989 The R5 edition of this document has been edited by the research staff of the MIT X Consortium, with significant contributions by Jim Fulton (NCD). Donna Converse MIT X Consortium 1991 The R6 edition of this document has been edited to reflect changes brought about by research staff of the Omron Corpo- ration, with special recognition to Li Yuhong, Seiji Kuwari, and Hiroshi Kuribayashi for the X11R5/contrib/lib/Xaw inter- nationalization that inspired this version. Frank Sheeran Omron Corporation 1994 1mvi0m 1mChapter 10m 1mAthena Widgets and The Intrinsics0m The X Toolkit is made up of two distinct pieces, the Xt Intrinsics and a widget set. The Athena widget set is a sample implementation of a widget set built upon the Intrin- sics. In the X Toolkit, a widget is the combination of an X window or subwindow and its associated input and output semantics. Because the Intrinsics provide the same basic functionality to all widget sets it may be possible to use widgets from the Athena widget set with other widget sets based upon the Intrinsics. Since widget sets may also implement private protocols, all functionality may not be available when mix- ing and matching widget sets. For information about the Intrinsics, see the 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage0m 4mInterface24m. The Athena widget set is a library package layered on top of the Intrinsics and Xlib that provides a set of user inter- face tools sufficient to build a wide variety of applica- tions. This layer extends the basic abstractions provided by X and provides the next layer of functionality primarily by supplying a cohesive set of sample widgets. Although the Intrinsics are a Consortium standard, there is no standard widget set. To the extent possible, the Intrinsics are "policy-free". The application environment and widget set, not the Intrin- sics, define, implement, and enforce: · Policy · Consistency · Style Each individual widget implementation defines its own pol- icy. The X Toolkit design allows for, but does not neces- sarily encourage, the free mixing of radically differing widget implementations. 1m1.1. Introduction to the X Toolkit0m The X Toolkit provides tools that simplify the design of application user interfaces in the X Window System program- ming environment. It assists application programmers by providing a set of common underlying user-interface 1m10m 1mAthena Widget Set X11, Release 6.40m functions. It also lets widget programmers modify existing widgets, by subclassing, or add new widgets. By using the X Toolkit in their applications, programmers can present a similar user interface across applications to all worksta- tion users. The X Toolkit consists of: · A set of Intrinsics functions for building widgets · An architectural model for constructing widgets · A widget set for application programming While the majority of the Intrinsics functions are intended for the widget programmer, a subset of the Intrinsics func- tions are to be used by application programmers (see 4mX0m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m). The architec- tural model lets the widget programmer design new widgets by using the Intrinsics and by combining other widgets. The application interface layers built on top of the X Toolkit include a coordinated set of widgets and composition poli- cies. Some of these widgets and policies are specific to a single application domain, and others are common to a vari- ety of applications. The remainder of this chapter discusses the X Toolkit and Athena widget set: · Terminology · Model · Conventions used in this manual · Format of the Widget Reference Chapters 1m1.2. Terminology0m In addition to the terms already defined for X programming (see 4mXlib24m 4m--24m 4mC24m 4mLanguage24m 4mX24m 4mInterface24m), the following terms are specific to the Intrinsics and Athena widget set and used throughout this document. 1mApplication programmer0m A programmer who uses the X Toolkit to produce an application user interface. 1mChild0m A widget that is contained within another "parent" wid- get. 1m20m 1mAthena Widget Set X11, Release 6.40m 1mClass0m The general group to which a specific object belongs. 1mClient0m A function that uses a widget in an application or for composing other widgets. 1mFullName0m The name of a widget instance appended to the full name of its parent. 1mInstance0m A specific widget object as opposed to a general widget class. 1mMethod0m A function or procedure implemented by a widget class. 1mName0m The name that is specific to an instance of a widget for a given client. This name is specified at creation time and cannot be modified. 1mObject0m A data abstraction consisting of private data and pri- vate and public functions that operate on the private data. Users of the abstraction can interact with the object only through calls to the object's public func- tions. In the X Toolkit, some of the object's public functions are called directly by the application, while others are called indirectly when the application calls the common Intrinsics functions. In general, if a function is common to all widgets, an application uses a single Intrinsics function to invoke the function for all types of widgets. If a function is unique to a single widget type, the widget exports the function. 1mParent0m A widget that contains at least one other ("child") widget. A parent widget is also known as a composite widget. 1mResource0m A named piece of data in a widget that can be set by a client, by an application, or by user defaults. 1m30m 1mAthena Widget Set X11, Release 6.40m 1mSuperclass0m A larger class of which a specific class is a member. All members of a class are also members of the super- class. 1mUser0m A person interacting with a workstation. 1mWidget0m An object providing a user-interface abstraction (for example, a Scrollbar widget). 1mWidget class0m The general group to which a specific widget belongs, otherwise known as the type of the widget. 1mWidget programmer0m A programmer who adds new widgets to the X Toolkit. 1m1.3. Underlying Model0m The underlying architectural model is based on the following premises: Widgets are X windows Every user-interface widget is associated with an X window. The X window ID for a widget is readily avail- able from the widget. Standard Xlib calls can be used by widgets for many of their input and output opera- tions. Information hiding The data for every widget is private to the widget and its subclasses. That is, the data is neither directly accessible nor visible outside of the module implement- ing the widget. All program interaction with the wid- get is performed by a set of operations (methods) that are defined for the widget. 1m40m 1mAthena Widget Set X11, Release 6.40m Widget semantics and widget layout geometry Widget semantics are clearly separated from widget lay- out geometry. Widgets are concerned with implementing specific user-interface semantics. They have little control over issues such as their size or placement relative to other widget peers. Mechanisms are pro- vided for associating geometric managers with widgets and for widgets to make suggestions about their own geometry. 1m1.4. Conventions Used in this Manual0m · All resources available to the widgets are listed with each widget. Many of these are available to more than one widget class due to the object oriented nature of the Intrinsics. The new resources for each widget are listed in bold text, and the inherited resources are listed in plain text. · Global symbols are printed in 1mbold 22mand can be function names, symbols defined in include files, or structure names. Arguments are printed in 4mitalics24m. · Each function is introduced by a general discussion that distinguishes it from other functions. The func- tion declaration itself follows, and each argument is specifically explained. General discussion of the function, if any is required, follows the arguments. Where applicable, the last paragraph of the explanation lists the return values of the function. · To eliminate any ambiguity between those arguments that you pass and those that a function returns to you, the explanations for all arguments that you pass start with the word 4mspecifies24m or, in the case of multiple argu- ments, the word 4mspecify24m. The explanations for all argu- ments that are returned to you start with the word 4mreturns24m or, in the case of multiple arguments, the word 4mreturn24m. The explanations for all arguments that you can pass and are returned start with the words 4mspeci-0m 4mfies24m 4mand24m 4mreturns24m. · Any pointer to a structure that is used to return a value is designated as such by the 4m_return24m suffix as part of its name. All other pointers passed to these functions are used for reading only. A few arguments use pointers to structures that are used for both input and output and are indicated by using the 4m_in_out24m suf- fix. 1m50m 1mAthena Widget Set X11, Release 6.40m 1m1.5. Format of the Widget Reference Chapters0m The majority of this document is a reference guide for the Athena widget set. Chapters three through six give the pro- grammer all information necessary to use the widgets. The layout of the chapters follows a specific pattern to allow the programmer to easily find the desired information. The first few pages of every chapter give an overview of the widgets in that section. Widgets are grouped into chapters by functionality. Chapter 3 Simple Widgets Chapter 4 Menus Chapter 5 Text Widgets Chapter 6 Composite and Constraint Widget Following the introduction will be a description of each widget in that chapter. When no functional grouping is obvious the widgets are listed in alphabetical order, such as in chapters three and six. The first section of each widget's description is a table that contains general information about this widget class. Here is the table for the Box widget, and an explanation of all the entries. Application Header file Class Header file Class boxWidgetClass Class Name Box Superclass Composite 1mApplication Header File0m This file must be included when an application uses this widget. It usu- ally contains the class definition, and some resource macros. This is often called the ``public'' header file. 1mClass Header File 22mThis file will only be used by widget programmers. It will need to be included by any widget that subclasses this widget. This is often called the 1m60m 1mAthena Widget Set X11, Release 6.40m ``private'' header file. 1mClass 22mThis is the widget class of this widget. This global symbol is passed to 1mXtCre-0m 1mateWidget 22mso that the Intrinsics will know which type of widget to create. 1mClass Name 22mThis is the resource name of this class. This name can be used in a resource file to match any widget of this class. 1mSuperclass 22mThis is the superclass that this widget class is descended from. If you under- stand how the superclass works it will allow you to more quickly understand what this widget does, since much of its functionality may be inherited from its superclass. After this table follows a general description of the default behavior of this widget, as seen by the user. In many cases this functionality may be overridden by the application programmer, or by the user. The next section is a table showing the name, class, type and default value of each resource that is available to this widget. There is also a column containing notes describing special restrictions placed upon individual resources. A This resource may be automatically adjusted when another resource is changed. C This resource is only settable at widget creation time, and may not be modified with 1mXtSetValues22m. D Do not modify this resource. While setting this resource will work, it can cause unexpected behavior. When this symbol appears there is another, preferred, interface provided by the X Toolkit. R This resource is READ-ONLY, and may not be modified. After the resource table is a detailed description of every resource available to that widget. Many of these are redun- dant, but printing them with each widget saves page flip- ping. The names of the resources that are inherited are printed in plain text, while the names of the resources that are new to this class are printed in 1mbold22m. If you have already read the description of the superclass you need only pay attention to the resources printed in bold. For each composite widget there is a section on layout semantics that follows the resource description. This 1m70m 1mAthena Widget Set X11, Release 6.40m section will describe the effect of constraint resources on the layout of the children, as well as a general description of where it prefers to place its children. Descriptions of default translations and action routines come next, for widgets to which they apply. The last item in each widget's documentation is the description of all convenience routines provided by the widget. 1m1.6. Input Focus0m The Intrinsics define a resource on all Shell widgets that interact with the window manager called 1minput22m. This resource requests the assistance of window manager in acquiring the input focus. The resource defaults to 1mFalse0m in the Intrinsics, but is redefined to default to 1mTrue 22mwhen an application is using the Athena widget set. An applica- tion programmer may override this default and set the resource back to 1mFalse 22mif the application does not need the window manager to give it the input focus. See the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for details on the 4minput24m resource. 1m80m 1mAthena Widget Set X11, Release 6.40m 1mChapter 20m 1mUsing Widgets0m Widgets serve as the primary tools for building a user interface or application environment. The Athena widget set consists of primitive widgets that contain no children (for example, a command button) and composite widgets which may contain one or more widget children (for example, a Box wid- get). The remaining chapters explain the widgets that are provided by the Athena widget set. These user-interface components serve as an interface for application programmers who do not want to implement their own widgets. In addition, they serve as a starting point for those widget programmers who, using the Intrinsics mechanisms, want to implement alterna- tive application programming interfaces. This chapter is a brief introduction to widget programming. The examples provided use the Athena widgets, though most of the concepts will apply to all widget sets. Although there are several programming interfaces to the X Toolkit, only one is described here. A full description of the program- ming interface is provided in the document 4mX24m 4mToolkit24m 4mIntrin-0m 4msics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. 1m2.1. Setting the Locale0m If it is desirable that the application take advantage of internationalization (i18n), you must establish locale with 4mXtSetLanguageProc24m before 1mXtDisplayInitialize 22mor 1mXtAppIni-0m 1mtialize 22mis called. For full details, please refer to the document 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m, sec- tion 2.2. However, the following simplest-case call is suf- ficient in many or most applications. XtSetLanguageProc(NULL, NULL, NULL); Most notably, this will affect the Standard C locale, deter- mine which resource files will be loaded, and what fonts will be required of FontSet specifications. In many cases, the addition of this line is the only source change required to internationalize Xaw programs, and will not disturb the function of programs in the default "C" locale. 1m90m 1mAthena Widget Set X11, Release 6.40m 1m2.2. Initializing the Toolkit0m You must call a toolkit initialization function before invoking any other toolkit routines (besides locale setting, above). 4mXtAppInitialize24m opens the X server connection, parses the command line, and creates an initial widget that will serve as the root of a tree of widgets created by this application. Widget XtAppInitialize(4mapp_context_return24m, 4mapplication_class24m, 4moptions24m, 4mnum_options24m, 4margc_in_out24m, 4margv_in_out24m, 4mfallback_resources24m, 4margs24m, 4mnum_args24m) XtAppContext *4mapp_context_return24m; String 4mapplication_class24m; XrmOptionDescRec 4moptions24m[]; Cardinal 4mnum_options24m; int *4margc_in_out24m; String *4margv_in_out24m[]; String *4mfallback_resources24m; ArgList 4margs24m; Cardinal 4mnum_args24m; 4mapp_con_return24m Returns the application context of this application, if non-NULL. 4mapplication_class0m Specifies the class name of this application, which is usually the generic name for all instances of this application. A useful con- vention is to form the class name by capital- izing the first letter of the application name. For example, the application named ``xman'' has a class name of ``Xman''. 4moptions24m Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to 4mXrmParseCommand24m. For further information, see 4mXlib24m 4m--24m 4mC24m 4mLanguage24m 4mX24m 4mInterface24m. 4mnum_options24m Specifies the number of entries in the options list. 4margc_in_out24m Specifies a pointer to the number of command line parameters. 4margv_in_out24m Specifies the command line parameters. 4mfallback_resources0m Specifies resource values to be used if the site-wide application class defaults file cannot be opened, or NULL. 1m100m 1mAthena Widget Set X11, Release 6.40m 4margs24m Specifies the argument list to use when cre- ating the Application shell. 4mnum_args24m Specifies the number of arguments in 4margs24m. This function will remove the command line arguments that the toolkit reads from 4margc_in_out24m, and 4margv_in_out24m. It will then attempt to open the display. If the display can- not be opened, an error message is issued and XtAppInitial- ize terminates the application. Once the display is opened, all resources are read from the locations specified by the Intrinsics. This function returns an ApplicationShell wid- get to be used as the root of the application's widget tree. 1m2.3. Creating a Widget0m Creating a widget is a three-step process. First, the wid- get instance is allocated, and various instance-specific attributes are set by using 1mXtCreateWidget22m. Second, the widget's parent is informed of the new child by using 1mXtMan-0m 1mageChild22m. Finally, X windows are created for the parent and all its children by using 1mXtRealizeWidget 22mand specifying the top-most widget. The first two steps can be combined by using 1mXtCreateManagedWidget22m. In addition, 1mXtRealizeWidget0m is automatically called when the child becomes managed if the parent is already realized. To allocate, initialize, and manage a widget, use 4mXtCreateM-0m 4managedWidget24m. Widget XtCreateManagedWidget(4mname24m, 4mwidget_class24m, 4mparent24m, 4margs24m, 4mnum_args24m) String 4mname24m; WidgetClass 4mwidget_class24m; Widget 4mparent24m; ArgList 4margs24m; Cardinal 4mnum_args24m; 4mname24m Specifies the instance name for the created widget that is used for retrieving widget resources. 4mwidget_class0m Specifies the widget class pointer for the created widget. 4mparent24m Specifies the parent widget ID. 4margs24m Specifies the argument list. The argument list is a variable-length list composed of name and value pairs that contain information pertaining to the specific widget instance being created. For fur- ther information, see Section 2.7.2. 1m110m 1mAthena Widget Set X11, Release 6.40m 4mnum_args24m Specifies the number of arguments in the argument list. If the num_args is zero, the argument list is never referenced. When a widget instance is successfully created, the widget identifier is returned to the application. If an error is encountered, the 4mXtError24m routine is invoked to inform the user of the error. For further information, see 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLan-0m 4mguage24m 4mInterface24m. 1m2.4. Common Resources0m Although a widget can have unique arguments that it under- stands, all widgets have common arguments that provide some regularity of operation. The common arguments allow arbi- trary widgets to be managed by higher-level components with- out regard for the individual widget type. Widgets will ignore any argument that they do not understand. The following resources are retrieved from the argument list or from the resource database by all of the Athena widgets: -------------------------------------------------------------------------------- 1mName Class Type Default Value0m -------------------------------------------------------------------------------- accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitive Boolean True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 colormap Colormap Colormap Parent's Colormap depth Depth int Parent's Depth destroyCallback Callback XtCallbackList NULL height Height Dimension 4mwidget24m 4mdependent0m mappedWhenManaged MappedWhenManaged Boolean True screen Screen Screen Parent's Screen sensitive Sensitive Boolean True translations Translations TranslationTable 4mwidget24m 4mdependent0m width Width Dimension 4mwidget24m 4mdependent0m x Position Position 0 y Position Position 0 -------------------------------------------------------------------------------- The following additional resources are retrieved from the argument list or from the resource database by many of the Athena widgets: 1m120m 1mAthena Widget Set X11, Release 6.40m ------------------------------------------------------------------------ 1mName Class Type Default Value0m ------------------------------------------------------------------------ callback Callback XtCallbackList NULL cursor Cursor Cursor 4mwidget24m 4mdependent0m foreground Foreground Pixel XtDefaultForeground insensitiveBorder Insensitive Pixmap GreyPixmap ------------------------------------------------------------------------ 1m2.5. Resource Conversions0m Most resources in the Athena widget set have a converter registered that will translate the string in a resource file to the correct internal representation. While some are obvious (string to integer, for example), others need spe- cific mention of the allowable values. Three general con- verters are described here: · Cursor · Pixel · Bitmap Many widgets have defined special converters that apply only to that widget. When these occur, the documentation section for that widget will describe the converter. 1m2.5.1. Cursor Conversion0m The value for the 1mcursorName 22mresource is specified in the resource database as a string, and is of the following forms: · A standard X cursor name from 1m< X11/cursorfont.h >22m. The names in 1mcursorfont.h 22meach describe a specific cur- sor. The resource names for these cursors are exactly like the names in this file except the 1mXC_ 22mis not used. The cursor definition 1mXC_gumby 22mhas a resource name of 1mgumby22m. · Glyphs, as in 4mFONT24m 4mfont-name24m 4mglyph-index24m 4m[[24m 4mfont-name24m 4m]0m 4mglyph-index24m 4m]24m. The first font and glyph specify the cursor source pixmap. The second font and glyph spec- ify the cursor mask pixmap. The mask font defaults to the source font, and the mask glyph index defaults to the source glyph index. · A relative or absolute file name. If a relative or absolute file name is specified, that file is used to create the source pixmap. Then the string "Mask" is appended to locate the cursor mask pixmap. If the "Mask" file does not exist, the suffix "msk" is tried. 1m130m 1mAthena Widget Set X11, Release 6.40m If "msk" fails, no cursor mask will be used. If the filename does not start with '/' or './' the the bitmap file path is used (see section 2.4.3). 1m2.5.2. Pixel Conversion0m The string-to-pixel converter takes any name that is accept- able to XParseColor (see 4mXlib24m 4m--24m 4mC24m 4mLanguage24m 4mX24m 4mInterface24m). In addition this routine understands the special toolkit symbols `XtDefaultForeground' and `XtDefaultBackground', described in 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. In short the acceptable pixel names are: · Any color name for the rgb.txt file (typically in the directory /usr/lib/X11 on POSIX systems). · A numeric specification of the form # where these numeric values are hexadecimal digits (both upper and lower case). · The special strings `XtDefaultForeground' and `XtDe- faultBackground' 1m2.5.3. Bitmap Conversion0m The string-to-bitmap converter attempts to locate a file containing bitmap data whose name is specified by the input string. If the file name is relative (i.e. does not begin with / or ./), the directories to be searched are specified in the 1mbitmapFilePath 22mresource--class 1mBitmapFilePath22m. This resource specifies a colon (:) separated list of directories that will be searched for the named bitmap or cursor glyph (see section 2.4.1). The 1mbitmapFilePath 22mresource is global to the application, and may 1mnot 22mbe specified differently for each widget that wishes to convert a cursor to bitmap. In addition to the directories specified in the 1mbitmapFilePath0m resource a default directory is searched. When using POSIX the default directory is 4m/usr/include/X11/bitmaps24m. 1m2.6. Realizing a Widget0m The 4mXtRealizeWidget24m function performs two tasks: · Calculates the geometry constraints of all managed descendants of this widget. The actual calculation is put off until realize time for performance reasons. · Creates an X window for the widget and, if it is a com- posite widget, realizes each of its managed children. void XtRealizeWidget(4mw24m) Widget 4mw24m; 1m140m 1mAthena Widget Set X11, Release 6.40m 4mw24m Specifies the widget. For further information about this function, see the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. 1m2.7. Processing Events0m Now that the application has created, managed and realized its widgets, it is ready to process the events that will be delivered by the X Server to this client. A function call that will process the events is 1mXtAppMainLoop22m. void XtAppMainLoop(4mapp_context24m) XtAppContext 4mapp_context24m; 4mapp_context0m Specifies the application context of this applica- tion. The value is normally returned by 1mXtAppIni-0m 1mtialize22m. This function never returns: it is an infinite loop that processes the X events. User input can be handled through callback procedures and application defined action routines. More details are provided in 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLan-0m 4mguage24m 4mInterface24m. 1m2.8. Standard Widget Manipulation Functions0m After a widget has been created, a client can interact with that widget by calling one of the standard widget manipula- tion routines provided by the Intrinsics, or a widget class- specific manipulation routine. The Intrinsics provide generic routines to give the applica- tion programmer access to a set of standard widget func- tions. The common widget routines let an application or composite widget perform the following operations on widgets without requiring explicit knowledge of the widget type. · Control the mapping of widget windows · Destroy a widget instance · Obtain an argument value · Set an argument value 1m2.8.1. Mapping Widgets0m By default, widget windows are mapped (made viewable) auto- matically by 1mXtRealizeWidget22m. This behavior can be disabled by using 1mXtSetMappedWhenManaged22m, making the client responsi- ble for calling 1mXtMapWidget 22mto make the widget viewable. 1m150m 1mAthena Widget Set X11, Release 6.40m void XtSetMappedWhenManaged(4mw24m, 4mmap_when_managed24m) Widget 4mw24m; Boolean 4mmap_when_managed24m; 4mw24m Specifies the widget. 4mmap_when_managed0m Specifies the new value. If map_when_managed is 1mTrue22m, the widget is mapped automatically when it is realized. If map_when_managed is 1mFalse22m, the client must call 4mXtMapWidget24m or make a second call to 4mXtSetMappedWhenManaged24m to cause the child win- dow to be mapped. The definition for 4mXtMapWidget24m is: void XtMapWidget(4mw24m) Widget 4mw24m; 4mw24m Specifies the widget. When you are creating several children in sequence for a previously realized common parent it is generally more effi- cient to construct a list of children as they are created (using 1mXtCreateWidget22m) and then use 1mXtManageChildren 22mto request that their parent managed them all at once. By man- aging a list of children at one time, the parent can avoid wasteful duplication of geometry processing and the associ- ated ``screen flash''. void XtManageChildren(4mchildren24m, 4mnum_children24m) WidgetList 4mchildren24m; Cardinal 4mnum_children24m; 4mchildren24m Specifies a list of children to add. 4mnum_children0m Specifies the number of children to add. If the parent is already visible on the screen, it is espe- cially important to batch updates so that the minimum amount of visible window reconfiguration is performed. For further information about these functions, see the 4mX0m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. 1m2.8.2. Destroying Widgets0m To destroy a widget instance of any type, use 4mXtDestroyWid-0m 4mget24m. 1m160m 1mAthena Widget Set X11, Release 6.40m void XtDestroyWidget(4mw24m) Widget 4mw24m; 4mw24m Specifies the widget. 4mXtDestroyWidget24m destroys the widget and recursively destroys any children that it may have, including the windows created by its children. After calling 4mXtDestroyWidget24m, no further references should be made to the widget or any children that the destroyed widget may have had. 1m2.8.3. Retrieving Widget Resource Values0m To retrieve the current value of a resource attribute asso- ciated with a widget instance, use 4mXtGetValues24m. void XtGetValues(4mw24m, 4margs24m, 4mnum_args24m) Widget 4mw24m; ArgList 4margs24m; Cardinal 4mnum_args24m; 4mw24m Specifies the widget. 4margs24m Specifies a variable-length argument list of name and 1maddress 22mpairs that contain the resource name and the address into which the resource value is stored. 4mnum_args24m Specifies the number of arguments in the argument list. The arguments and values passed in the argument list are dependent on the widget. Note that the caller is responsible for providing space into which the returned resource value is copied; the 1mArgList 22mcontains a pointer to this storage (e.g. x and y must be allocated as Position). For further information, see the 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage0m 4mInterface24m. 1m2.8.4. Modifying Widget Resource Values0m To modify the current value of a resource attribute associ- ated with a widget instance, use 4mXtSetValues24m. void XtSetValues(4mw24m, 4margs24m, 4mnum_args24m) Widget 4mw24m; ArgList 4margs24m; Cardinal 4mnum_args24m; 4mw24m Specifies the widget. 1m170m 1mAthena Widget Set X11, Release 6.40m 4margs24m Specifies an array of name and 1mvalue 22mpairs that contain the arguments to be modified and their new values. 4mnum_args24m Specifies the number of arguments in the argument list. The arguments and values that are passed will depend on the widget being modified. Some widgets may not allow certain resources to be modified after the widget instance has been created or realized. No notification is given if any part of a 1mXtSetValues 22mrequest is ignored. For further information about these functions, see the 4mX0m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. Note The argument list entry for 4mXtGetValues24m specifies the address to which the caller wants the value copied. The argument list entry for 4mXtSetValues24m, however, contains the new value itself, if the size of value is less than sizeof(XtArgVal) (architecture dependent, but at least sizeof(long)); otherwise, it is a pointer to the value. String resources are always passed as pointers, regardless of the length of the string. 1m2.9. Using the Client Callback Interface0m Widgets can communicate changes in their state to their clients by means of a callback facility. The format for a client's callback handler is: void 4mCallbackProc24m(4mw24m, 4mclient_data24m, 4mcall_data24m) Widget 4mw24m; XtPointer 4mclient_data24m; XtPointer 4mcall_data24m; 4mw24m Specifies widget for which the callback is regis- tered. 4mclient_data0m Specifies arbitrary client-supplied data that the widget should pass back to the client when the widget executes the client's callback procedure. This is a way for the client registering the call- back to also register client-specific data: a pointer to additional information about the wid- get, a reason for invoking the callback, and so on. If no additional information is necessary, NULL may be passed as this argument. This field 1m180m 1mAthena Widget Set X11, Release 6.40m is also frequently known as the 4mclosure24m. 4mcall_data24m Specifies any callback-specific data the widget wants to pass to the client. For example, when Scrollbar executes its 1mjumpProc 22mcallback list, it passes the current position of the thumb in 4mcall_data24m. Callbacks can be registered either by creating an argument containing the callback list described below or by using the special convenience routines 1mXtAddCallback 22mand 1mXtAddCall-0m 1mbacks22m. When the widget is created, a pointer to a list of callback procedure and data pairs can be passed in the argu- ment list to 4mXtCreateWidget24m. The list is of type 4mXtCall-0m 4mbackList24m: typedef struct { XtCallbackProc callback; XtPointer closure; } XtCallbackRec, *XtCallbackList; The callback list must be allocated and initialized before calling 4mXtCreateWidget24m. The end of the list is identified by an entry containing NULL in callback and closure. Once the widget is created, the client can change or de-allocate this list; the widget itself makes no further reference to it. The closure field contains the client_data passed to the callback when the callback list is executed. The second method for registering callbacks is to use 4mXtAdd-0m 4mCallback24m after the widget has been created. void XtAddCallback(4mw24m, 4mcallback_name,24m 4mcallback24m, 4mclient_data24m) Widget 4mw24m; String 4mcallback_name24m; XtCallbackProc 4mcallback24m; XtPointer 4mclient_data24m; 4mw24m Specifies the widget to add the callback to. 4mcallback_name0m Specifies the callback list within the widget to append to. 4mcallback24m Specifies the callback procedure to add. 4mclient_data0m Specifies the data to be passed to the callback when it is invoked. 1m190m 1mAthena Widget Set X11, Release 6.40m 4mXtAddCallback24m adds the specified callback to the list for the named widget. All widgets provide a callback list named 4mdestroyCallback0m where clients can register procedures that are to be exe- cuted when the widget is destroyed. The destroy callbacks are executed when the widget or an ancestor is destroyed. The 4mcall_data24m argument is unused for destroy callbacks. 1m2.10. Programming Considerations0m This section provides some guidelines on how to set up an application program that uses the X Toolkit. 1m2.10.1. Writing Applications0m When writing an application that uses the X Toolkit, you should make sure that your application performs the follow- ing: 1. Include <4mX11/Intrinsic.h24m> in your application programs. This header file automatically includes <4mX11/Xlib.h24m>, so all Xlib functions also are defined. It may also be necessary to include 1m< X11/StringDefs.h > 22mwhen setting up argument lists, as many of the XtN4msomething24m defini- tions are only defined in this file. 2. Include the widget-specific header files for each wid- get type that you need to use. For example, <4mX11/Xaw/Label.h24m> and <4mX11/Xaw/Command.h24m>. 3. Call the 4mXtAppInitialize24m function before invoking any other toolkit or Xlib functions. For further informa- tion, see Section 2.1 and the 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC0m 4mLanguage24m 4mInterface24m. 4. To pass attributes to the widget creation routines that will override any site or user customizations, set up argument lists. In this document, a list of valid argument names is provided in the discussion of each widget. The names each have a global symbol defined that begins with 1mXtN 22mto help catch spelling errors. For example, 1mXtNlabel 22mis defined for the 1mlabel 22mresource of many widgets. For further information, see Section 2.9.2.2. 5. When the argument list is set up, create the widget with the 1mXtCreateManagedWidget 22mfunction. For further information, see Section 2.2 and the 4mX24m 4mToolkit24m 4mIntrin-0m 4msics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. 6. If the widget has any callback routines, set by the 4mXtNcallback24m argument or the 4mXtAddCallback24m function, 1m200m 1mAthena Widget Set X11, Release 6.40m declare these routines within the application. 7. After creating the initial widget hierarchy, windows must be created for each widget by calling 4mXtReal-0m 4mizeWidget24m on the top level widget. 8. Most applications now sit in a loop processing events using 4mXtAppMainLoop24m, for example: XtCreateManagedWidget(4mname24m, 4mclass24m, 4mparent24m, 4margs24m, 4mnum_args24m); XtRealizeWidget(4mshell24m); XtAppMainLoop(4mapp_context24m); For information about this function, see the 4mX24m 4mToolkit0m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. 9. Link your application with 4mlibXaw24m (the Athena widgets), 4mlibXmu24m (miscellaneous utilities), 4mlibXt24m (the X Toolkit Intrinsics), 4mlibSM24m (Session Management), 4mlibICE24m (Inter- Client Exchange), 4mlibXext24m (the extension library needed for the shape extension code which allows rounded Com- mand buttons), and 4mlibX1124m (the core X library). The following provides a sample command line: cc -o 4mapplication24m 4mapplication24m.c -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 1m2.10.2. Changing Resource Values0m The Intrinsics support two methods of changing the default resource values; the resource manager, and an argument list passed into XtCreateWidget. While resources values will get updated no matter which method you use, the two methods pro- vide slightly different functionality. Resource Manager This method picks up resource definitions described in 4mXlib24m 4m--24m 4mC24m 4mLanguage24m 4mX24m 4mInterface0m from many different locations at run time. The locations most important to the applica- tion programmer are the 4mfallback24m 4mresources0m and the 4mapp-defaults24m file, (see 4mX24m 4mToolkit0m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for the complete list). Since these resource are loaded at run time, they can be overridden by the user, allowing an application to be cus- tomized to fit the particular needs of each individual user. These values can also be modified without the need to rebuild the application, allowing rapid prototyping of user interfaces. Application programmers 1m210m 1mAthena Widget Set X11, Release 6.40m should use resources in preference to hard- coded values whenever possible. Argument Lists The values passed into the widget at creation time via an argument list cannot be modified by the user, and allow no opportunity for customization. It is used to set resources that cannot be specified as strings (e.g. callback lists) or resources that should not be overridden (e.g. window depth) by the user. 1m2.10.2.1. Specifying Resources0m It is important for all X Toolkit application programmers to understand how to use the X Resource Manager to specify resources for widgets in an X application. This section will describe the most common methods used to specify these resources, and how to use the X Resource manager. 1mXrdb 22mThe 1mxrdb 22mutility may be used to load a file containing resources into the X server. Once the resources are loaded, the resources will affect any new applications started on the display that they were loaded onto. 1mApplication Defaults0m The application defaults (app-defaults) file (normally in /usr/lib/X11/app-defaults/4mclass-0m 4mname24m) for an application is loaded whenever the application is started. The resource specification has two colon-separated parts, a name, and a value. The 4mvalue24m is a string whose format is dependent on the resource specified by 4mname24m. 4mName24m is con- structed by appending a resource name to a full widget name. The full widget name is a list of the name of every ancestor of the desired widget separated by periods (.). Each widget also has a class associated with it. A class is a type of widget (e.g. Label or Scrollbar or Box). Notice that class names, by convention, begin with capital letters and instance names begin with lower case letters. The class of any widget may be used in place of its name in a resource specification. Here are a few examples: xman.form.button1 This is a fully specified resource name, and will affect only widgets called button1 that are children of widgets called form that are children of applications named xman. (Note that while typically two widgets that are siblings will have different names, it is not prohibited.) 1m220m 1mAthena Widget Set X11, Release 6.40m Xman.Form.Command This will match any Command widget that is a child of a Form widget that is itself a child of an application of class 4mXman24m. Xman.Form.button1 This is a mixed resource name with both wid- get names and classes specified. This syntax allows an application programmer to specify any widget in the widget tree. To match more than one widget (for example a user may want to make all Command buttons blue), use an asterisk (*) instead of a period. When an asterisk is used, any number of widgets (including zero) may exist between the two widget names. For example: Xman*Command This matches all Command widgets in the Xman application. Foo*button1 This matches any widget in the Foo applica- tion that is named 4mbutton124m. The root of all application widget trees is the widget returned by 1mXtAppInitialize22m. Even though this is actually an ApplicationShell widget, the toolkit replaces its widget class with the class name of the application. The name of this widget is either the name used to invoke the applica- tion (1margv[0]22m) or the name of the application specified using the standard 4m-name24m command line option supported by the Intrinsics. The last step in constructing the resource name is to append the name of the resource with either a period or asterisk to the full or partial widget name already constructed. *foreground:Blue Specifies that all widgets in all applications will have a foreground color of blue. Xman*borderWidth:10 Specifies that all widgets in an application whose class is Xman will have a border width of 10 (pixels). xman.form.button1.label:Testing Specifies that a particular widget in the xman application will have a label named 4mTesting24m. An exclamation point (!) in the first column of a line indi- cates that the rest of the line should be treated as a com- ment. 1mFinal Words0m 1m230m 1mAthena Widget Set X11, Release 6.40m The Resource manager is a powerful tool that can be used very effectively to customize X Toolkit applications at run time by either the application programmer or the user. Some final points to note: · An application programmer may add new resources to their application. These resources are associated with the global application, and not any particular widget. The X Toolkit function used for adding the application resources is 1mXtGetApplicationResources22m. · Be careful when creating resource files. Since widgets will ignore resources that they do not understand, any spelling errors will cause a resource to have no effect. · Only one resource line will match any given resource. There is a set of precedence rules, which take the fol- lowing general stance. · More specific overrides less specific, thus period always overrides asterisk. · Names on the left are more specific and override names on the right. · When resource specifications are exactly the same, user defaults will override program defaults. For a complete explanation of the rules of precedence, and other specific topics see 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage0m 4mInterface24m and 4mXlib24m 4m--24m 4mC24m 4mLanguage24m 4mX24m 4mInterface24m. 1m2.10.2.2. Creating Argument Lists0m To set up an argument list for the inline specification of widget attributes, you may use any of the four approaches discussed in this section. Each resource name has a global symbol associated with it. This global symbol has the form XtN4mresource24m 4mname24m. For example, the symbol for ``fore- ground'' is 1mXtNforeground22m. For further information, see the 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m. Argument are specified by using the following structure: typedef struct { String name; XtArgVal value; } Arg, *ArgList; 1m240m 1mAthena Widget Set X11, Release 6.40m The first approach is to statically initialize the argument list. For example: static Arg arglist[] = { {XtNwidth, (XtArgVal) 400}, {XtNheight, (XtArgVal) 300}, }; This approach is convenient for lists that do not need to be computed at runtime and makes adding or deleting new ele- ments easy. The 4mXtNumber24m macro is used to compute the num- ber of elements in the argument list, preventing simple pro- gramming errors: XtCreateWidget(4mname24m, 4mclass24m, 4mparent24m, 4marglist24m, XtNumber(4marglist24m)); The second approach is to use the 4mXtSetArg24m macro. For exam- ple: Arg arglist[10]; XtSetArg(arglist[1], XtNwidth, 400); XtSetArg(arglist[2], XtNheight, 300); To make it easier to insert and delete entries, you also can use a variable index: Arg arglist[10]; Cardinal i=0; XtSetArg(arglist[i], XtNwidth, 400); i++; XtSetArg(arglist[i], XtNheight, 300); i++; The i variable can then be used as the argument list count in the widget create function. In this example, 4mXtNumber0m would return 10, not 2, and therefore is not useful. Note You should not use auto-increment or auto-decre- ment within the first argument to 4mXtSetArg24m. As it is currently implemented, 4mXtSetArg24m is a macro that dereferences the first argument twice. The third approach is to individually set the elements of the argument list array: 1m250m 1mAthena Widget Set X11, Release 6.40m Arg arglist[10]; arglist[0].name = XtNwidth; arglist[0].value = (XtArgVal) 400; arglist[1].name = XtNheight; arglist[1].value = (XtArgVal) 300; Note that in this example, as in the previous example, 4mXtNumber24m would return 10, not 2, and therefore would not be useful. The fourth approach is to use a mixture of the first and third approaches: you can statically define the argument list but modify some entries at runtime. For example: static Arg arglist[] = { {XtNwidth, (XtArgVal) 400}, {XtNheight, (XtArgVal) NULL}, }; arglist[1].value = (XtArgVal) 300; In this example, 4mXtNumber24m can be used, as in the first approach, for easier code maintenance. 1m2.11. Example Programs0m The best way to understand how to use any programming library is by trying some simple examples. A collection of example programs that introduces each of the widgets in that Athena widget set, as well as many important toolkit pro- gramming concepts, is available in the X11R6 release as dis- tributed by the X Consortium. It can be found in the dis- tribution directory 1mcontrib/examples/mit/Xaw22m, but see your site administrator for the exact location of these files on your system. See the README file from that directory for a guide to the examples. 1m260m 1mAthena Widget Set X11, Release 6.40m 1mChapter 30m 1mSimple Widgets0m Each of these widgets performs a specific user interface function. They are 4msimple24m because they cannot have widget children--they may only be used as leaves of the widget tree. These widgets display information or take user input. 1mCommand 22mA push button that, when selected, may cause a specific action to take place. This widget can display a multi-line string or a bitmap or pixmap image. 1mGrip 22mA rectangle that, when selected, will cause an action to take place. 1mLabel 22mA rectangle that can display a multi-line string or a bitmap or pixmap image. 1mList 22mA list of text strings presented in row column format that may be individually selected. When an element is selected an action may take place. 1mPanner 22mA rectangular area containing a 4mslider24m that may be moved in two dimensions. Notification of movement may be continuous or discrete. 1mRepeater 22mA push button that triggers an action at an increasing rate when selected. This widget can display a multi-line string or a bitmap or pixmap image. 1mScrollbar 22mA rectangular area containing a 4mthumb24m that when slid along one dimension may cause a specific action to take place. The Scrollbar may be ori- ented horizontally or vertically. 1mSimple 22mThe base class for most of the simple widgets. Provides a rectangular area with a settable mouse cursor and special border. 1mStripChart0m A real time data graph that will automatically update and scroll. 1mToggle 22mA push button that contains state information. Toggles may also be used as ``radio buttons'' to 1m270m 1mAthena Widget Set X11, Release 6.40m implement a ``one of many'' or ``zero or one of many'' group of buttons. This widget can display a multi-line string or a bitmap or pixmap image. 1m3.1. Command Widget0m Application header file Class header file Class commandWidgetClass Class Name Command Superclass Label The Command widget is an area, often rectangular, that con- tains text or a graphical image. Command widgets are often referred to as ``push buttons.'' When the pointer is over a Command widget, the widget becomes highlighted by drawing a rectangle around its perimeter. This highlighting indicates that the widget is ready for selection. When mouse button 1 is pressed, the Command widget indicates that it has been selected by reversing its foreground and background colors. When the mouse button is released, the Command widget's 1mnotify 22maction is invoked, calling all functions on its call- back list. If the pointer is moved off of the widget before the pointer button is released, the widget reverts to its normal foreground and background colors, and releasing the pointer button has no effect. This behavior allows the user to cancel an action. 1m3.1.1. Resources0m When creating a Command widget instance, the following resources are retrieved from the argument list or from the resource database: ------------------------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ------------------------------------------------------------------------------------------------- accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitive Boolean D True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap bitmap Bitmap Pixmap None borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 callback Callback XtCallbackList NULL colormap Colormap Colormap Parent's Colormap cornerRoundPercent CornerRoundPercentDimension 25 cursor Cursor Cursor None 1m280m 1mAthena Widget Set X11, Release 6.40m ------------------------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ------------------------------------------------------------------------------------------------- cursorName Cursor String NULL depth Depth int C Parent's Depth destroyCallback Callback XtCallbackList NULL encoding Encoding UnsignedChar XawTextEncoding8bit font Font XFontStruct XtDefaultFont foreground Foreground Pixel XtDefaultForeground height Height Dimension A graphic height + 2 * 1minternalHeight0m highlightThickness Thickness Dimension A 2 (0 if Shaped) insensitiveBorder Insensitive Pixmap GreyPixmap internalHeight Height Dimension 2 internalWidth Width Dimension 4 international International Boolean C False justify Justify Justify XtJustifyCenter (center) label Label String name of widget leftBitmap LeftBitmap Bitmap None mappedWhenManaged MappedWhenManaged Boolean True pointerColor Foreground Pixel XtDefaultForeground pointerColorBackgroundBackground Pixel XtDefaultBackground resize Resize Boolean True screen Screen Screen R Parent's Screen sensitive Sensitive Boolean True shapeStyle ShapeStyle ShapeStyle Rectangle translations Translations TranslationTable See below width Width Dimension A graphic width + 2 * 1minternalWidth0m x Position Position 0 y Position Position 0 ------------------------------------------------------------------------------------------------- accelerators A list of event to action bindings to be exe- cuted by this widget, even though the event occurred in another widget. (See the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for details). ancestorSensitive The sensitivity state of the ancestors of this widget. A widget is insensitive if either it or any of its ancestors is insensi- tive. This resource should not be changed with 1mXtSetValues22m, although it may be queried. background A pixel value which indexes the widget's col- ormap to derive the background color of the widget's window. backgroundPixmap The background pixmap of this widget's win- dow. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap 1m290m 1mAthena Widget Set X11, Release 6.40m specified will be used instead of the back- ground color. bitmap A bitmap to display instead of the 1mlabel22m. The default size of the widget will be just large enough to contain the bitmap and the widget's internal width and height. The resource converter for this resource con- structs bitmaps from the contents of files. (See 1mConverting Bitmaps 22mfor details.) If this bitmap is one bit deep then the 1's will be rendered in the foreground color, and the 0's in the background color. If 1mbitmap 22mhas a depth greater than one, it is copied directly into the window. borderColor A pixel value which indexes the widget's col- ormap to derive the border color of the wid- get's window. borderPixmap The border pixmap of this widget's window. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap speci- fied will be used instead of the border color. borderWidth The width of this widget's window border. 1mcallback 22mA list of routines to be called when the 1mnotify 22maction is invoked. colormap The colormap that this widget will use. 1mcornerRoundPercent0m When a 1mShapeStyle 22mof 1mroundedRectangle 22mis used, this resource controls the radius of the rounded corner. The radius of the rounded corners is specified as a percentage of the length of the shortest side of the widget. cursor The image that will be displayed as the pointer cursor whenever it is in this widget. The use of this resource is deprecated in favor of 1mcursorName22m. cursorName The name of the symbol to use to represent the pointer cursor. This resource will over- ride the 1mcursor 22mresource if both are speci- fied. (See 2.4.1) depth The depth of this widget's window. 1m300m 1mAthena Widget Set X11, Release 6.40m destroyCallback All functions on this list are called when this widget is destroyed. encoding The encoding method used by the value of the 1mlabel 22mresource. The value may be 1mXawTextEn-0m 1mcoding8bit 22mor 1mXawTextEncodingChar2b22m. When 1minternational 22mis set to 1mtrue 22mthis resource is not used. font The text font to use when displaying the 1mlabel22m, when the 1minternational 22mresource is 1mfalse22m. fontSet The text font set to use when displaying the 1mlabel22m, when the 1minternational 22mresource is 1mtrue22m. foreground A pixel value which indexes the widget's col- ormap to derive the foreground color of the widget's window. This color is also used to render all 1's in a 1mbitmap 22mone plane deep. height width The height and width of this widget in pix- els. 1mhighlightThickness0m The thickness of the rectangle that is used to highlight the internal border of this wid- get, alerting the user that it is ready to be selected. The default value is 2 pixels if the 1mshapeStyle 22mis 1mrectangle22m, and 0 Pixels (no highlighting) otherwise. insensitiveBorder This pixmap will be tiled into the widget's border if the widget becomes insensitive. internalHeight internalWidth The minimum amount of space to leave between the graphic and the vertical and horizontal edges of the window. international This is a boolean flag, only settable at wid- get creation time. A value of 1mfalse 22msignals the widget to use pre-R6 internationalization (specifically, the lack thereof), such as using fonts for displaying text, etc. A value of 1mtrue 22mdirects the widget to act in an internationalized manner, such as utilizing font sets for displaying text, etc. 1m310m 1mAthena Widget Set X11, Release 6.40m justify Specifies left, center, or right alignment of graphic within the widget. This resource may be specified with the values 1mXtJustifyLeft22m, 1mXtJustifyCenter22m, or 1mXtJustifyRight22m. A con- verter is registered for this resource that will convert the following strings: 1mleft,0m 1mright, 22mand 1mcenter22m. This resource only has noticeable effect when the width of the wid- get is larger than necessary to display the graphic. Note that when the graphic is a multi-line 1mlabel22m, the longest line will obey this justification while shorter lines will be left-justified with the longest one. label Specifies the text string to be displayed in the widget's window if no bitmap is speci- fied. The default is the name of this wid- get. Regardless of the value of 1mencoding 22mor 1minternational22m, a single newline character (1 byte) will cause a line break. leftBitmap Specifies a bitmap to display to the left of the graphic in the widget's window. mappedWhenManaged If this resource is 1mTrue22m, then the widget's window will automatically be mapped by the Toolkit when it is realized and managed. pointerColor A pixel value which indexes the widget's col- ormap to derive the foreground color of the pointer symbol specified by the 1mcursorName0m resource. pointerColorBackground A pixel value which indexes the widget's colormap to derive the background color of the pointer symbol specified by the 1mcursor-0m 1mName 22mresource. resize Specifies whether the widget should attempt to resize to its preferred dimensions when- ever its resources are modified with 1mXtSet-0m 1mValues22m. This attempt to resize may be denied by the parent of this widget. The parent is always free to resize the widget regardless of the state of this resource. screen The screen on which this widget is displayed. This is not a settable resource. sensitive Whether or not the toolkit should pass user events to this widget. The widget will not 1m320m 1mAthena Widget Set X11, Release 6.40m get input events if either 1mancestorSensitive0m or 1msensitive 22mis 1mFalse22m. 1mshapeStyle 22mNonrectangular widgets may be created using this resource. Nonrectangular widgets are supported only on a server that supports the 1mShape Extension22m. If nonrectangular widgets are specified for a server lacking this extension, the shape is ignored and the wid- gets will be rectangular. The following shapes are currently supported: 1mXmuShapeRect-0m 1mangle22m, 1mXmuShapeOval22m, 1mXmuShapeEllipse22m, and 1mXmuShapeRoundedRectangle22m. A converter is registered for this resource that will con- vert the following strings: 1mrectangle, oval,0m 1mellipse, 22mand 1mroundedRectangle22m. translations The event bindings associated with this wid- get. x y The location of the upper left outside corner of this widget in its parent. 1m3.1.2. Command Actions0m The Command widget supports the following actions: · Switching the button's interior between the foreground and background colors with 1mset22m, 1munset22m, and 1mreset22m. · Processing application callbacks with 1mnotify0m · Switching the internal border between highlighted and unhighlighted states with 1mhighlight 22mand 1munhighlight0m The following are the default translation bindings used by the Command widget: : highlight() : reset() : set() : notify() unset() The full list of actions supported by Command is: 1mhighlight22m(4mcondition24m) Displays the internal highlight border in the color (1mforeground 22mor 1mbackground 22m) that con- trasts with the interior color of the Command widget. The conditions 1mWhenUnset 22mand 1mAlways0m are understood by this action procedure. If 1m330m 1mAthena Widget Set X11, Release 6.40m no argument is passed, 1mWhenUnset 22mis assumed. 1munhighlight22m() Displays the internal highlight border in the color (1mforeground 22mor 1mbackground 22m) that matches the interior color of the Command widget. 1mset22m() Enters the 4mset24m state, in which 1mnotify 22mis pos- sible. This action causes the button to dis- play its interior in the 1mforeground 22mcolor. The label or bitmap is displayed in the 1mback-0m 1mground 22mcolor. 1munset22m() Cancels the 4mset24m state and displays the inte- rior of the button in the 1mbackground 22mcolor. The label or bitmap is displayed in the 1mfore-0m 1mground 22mcolor. 1mreset22m() Cancels any 4mset24m or 4mhighlight24m and displays the interior of the button in the 1mbackground0m color, with the label or bitmap displayed in the 1mforeground 22mcolor. 1mnotify22m() When the button is in the 1mset 22mstate this action calls all functions in the callback list named by the 1mcallback 22mresource. The value of the 4mcall_data24m argument passed to these functions is undefined. A very common alternative to registering callbacks is to augment a Command's translations with an action performing the desired function. This often takes the form of: *Myapp*save.translations: #augment ,: Save() Note When a bitmap of depth greater that one (1) is specified the 4mset24m(), 4munset24m(), and 4mreset24m() actions have no effect, since there are no foreground and background colors used in a multi-plane pixmap. 1m3.2. Grip Widget0m Application header file Class header file Class gripWidgetClass Class Name Grip Superclass Simple 1m340m 1mAthena Widget Set X11, Release 6.40m The Grip widget provides a small rectangular region in which user input events (such as ButtonPress or ButtonRelease) may be handled. The most common use for the Grip widget is as an attachment point for visually repositioning an object, such as the pane border in a Paned widget. 1m3.2.1. Resources0m When creating a Grip widget instance, the following resources are retrieved from the argument list or from the resource database: --------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m --------------------------------------------------------------------------------- accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitiveBoolean D True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 0 callback Callback Callback NULL colormap Colormap Colormap Parent's Colormap cursor Cursor Cursor None cursorName Cursor String NULL depth Depth int C Parent's Depth destroyCallback Callback XtCallbackList NULL foreground Foreground Pixel XtDefaultForeground height Height Dimension 8 insensitiveBorder Insensitive Pixmap GreyPixmap international International Boolean C False mappedWhenManaged MappedWhenManagedBoolean True pointerColor Foreground Pixel XtDefaultForeground pointerColorBackgroundBackground Pixel XtDefaultBackground screen Screen Screen R Parent's Screen sensitive Sensitive Boolean True translations Translations TranslationTable NULL width Width Dimension 8 x Position Position 0 y Position Position 0 --------------------------------------------------------------------------------- accelerators A list of event to action bindings to be exe- cuted by this widget, even though the event occurred in another widget. (See the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for details). ancestorSensitive The sensitivity state of the ancestors of this widget. A widget is insensitive if 1m350m 1mAthena Widget Set X11, Release 6.40m either it or any of its ancestors is insensi- tive. This resource should not be changed with 1mXtSetValues22m, although it may be queried. background A pixel value which indexes the widget's col- ormap to derive the background color of the widget's window. backgroundPixmap The background pixmap of this widget's win- dow. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap specified will be used instead of the back- ground color. borderColor A pixel value which indexes the widget's col- ormap to derive the border color of the wid- get's window. borderPixmap The border pixmap of this widget's window. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap speci- fied will be used instead of the border color. borderWidth The width of this widget's window border. 1mcallback 22mAll routines on this list are called whenever the 1mGripAction 22maction routine is invoked. The 4mcall_data24m contains all information passed to the action routine. A detailed descrip- tion is given below in the 1mGrip Actions 22msec- tion. colormap The colormap that this widget will use. cursor The image that will be displayed as the pointer cursor whenever it is in this widget. The use of this resource is deprecated in favor of 1mcursorName22m. cursorName The name of the symbol to use to represent the pointer cursor. This resource will over- ride the 1mcursor 22mresource if both are speci- fied. (See 2.4.1) depth The depth of this widget's window. destroyCallback All functions on this list are called when this widget is destroyed. 1mforeground 22mA pixel value which indexes the widget's col- ormap to derive the color used to flood fill 1m360m 1mAthena Widget Set X11, Release 6.40m the entire Grip widget. height width The height and width of this widget in pix- els. insensitiveBorder This pixmap will be tiled into the widget's border if the widget becomes insensitive. international This is a boolean flag, only settable at wid- get creation time. While not utilized in this widget, it can and should be checked by any subclasses that have behavior that should vary with locale. mappedWhenManaged If this resource is 1mTrue22m, then the widget's window will automatically be mapped by the Toolkit when it is realized and managed. pointerColor A pixel value which indexes the widget's col- ormap to derive the foreground color of the pointer symbol specified by the 1mcursorName0m resource. pointerColorBackground A pixel value which indexes the widget's colormap to derive the background color of the pointer symbol specified by the 1mcursor-0m 1mName 22mresource. screen The screen on which this widget is displayed. This is not a settable resource. sensitive Whether or not the toolkit should pass user events to this widget. The widget will not get input events if either 1mancestorSensitive0m or 1msensitive 22mis 1mFalse22m. translations The event bindings associated with this wid- get. x y The location of the upper left outside corner of this widget in its parent. 1m3.2.2. Grip Actions0m The Grip widget does not declare any default event transla- tion bindings, but it does declare a single action routine named 1mGripAction22m. The client specifies an arbitrary event translation table, optionally giving parameters to the 1mGri-0m 1mpAction 22mroutine. 1m370m 1mAthena Widget Set X11, Release 6.40m The 1mGripAction 22mroutine executes the callbacks on the 1mcall-0m 1mback 22mlist, passing as 4mcall_data24m a pointer to a 1mXawGripCall-0m 1mData 22mstructure, defined in the Grip widget's application header file. typedef struct _XawGripCallData { XEvent *event; String *params; Cardinal num_params; } XawGripCallDataRec, *XawGripCallData, GripCallDataRec, *GripCallData; /* supported for R4 compatibility */ In this structure, the 4mevent24m is a pointer to the input event that triggered the action. 4mparams24m and 4mnum_params24m give the string parameters specified in the translation table for the particular event binding. The following is an example of a translation table that uses the GripAction: : GripAction(press) : GripAction(move) : GripAction(release) For a complete description of the format of translation tables, see the 4mX24m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInter-0m 4mface24m. 1m3.3. Label Widget0m Application header file Class header file Class labelWidgetClass Class Name Label Superclass Simple A Label widget holds a graphic displayed within a rectangu- lar region of the screen. The graphic may be a text string containing multiple lines of characters in an 8 bit or 16 bit character set (to be displayed with a 4mfont24m), or in a multi-byte encoding (for use with a 4mfontset24m). The graphic may also be a bitmap or pixmap. The Label widget will allow its graphic to be left, right, or center justified. Nor- mally, this widget can be neither selected nor directly 1m380m 1mAthena Widget Set X11, Release 6.40m edited by the user. It is intended for use as an output device only. 1m3.3.1. Resources0m When creating a Label widget instance, the following resources are retrieved from the argument list or from the resource database: ------------------------------------------------------------------------------------------------ 1mName Class Type NotesDefault Value0m ------------------------------------------------------------------------------------------------ accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitiveBoolean D True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap bitmap Bitmap Pixmap None borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 colormap Colormap Colormap Parent's Colormap cursor Cursor Cursor None cursorName Cursor String NULL depth Depth int C Parent's Depth destroyCallback Callback XtCallbackList NULL encoding Encoding UnsignedChar XawTextEncoding8bit font Font XFontStruct XtDefaultFont fontSet FontSet XFontSet XtDefaultFontSet foreground Foreground Pixel XtDefaultForeground height Height Dimension A graphic height + 2 * 1minternalHeight0m insensitiveBorder Insensitive Pixmap GreyPixmap internalHeight Height Dimension 2 internalWidth Width Dimension 4 international International Boolean C False justify Justify Justify XtJustifyCenter (center) label Label String name of widget leftBitmap LeftBitmap Bitmap None mappedWhenManaged MappedWhenManagedBoolean True pointerColor Foreground Pixel XtDefaultForeground pointerColorBackgroundBackground Pixel XtDefaultBackground resize Resize Boolean True screen Screen Screen R Parent's Screen sensitive Sensitive Boolean True translations Translations TranslationTable See above width Width Dimension A graphic width + 2 * 1minternalWidth0m x Position Position 0 y Position Position 0 ------------------------------------------------------------------------------------------------ accelerators A list of event to action bindings to be exe- cuted by this widget, even though the event occurred in another widget. (See the 4mX0m 1m390m 1mAthena Widget Set X11, Release 6.40m 4mToolkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface0m for details). ancestorSensitive The sensitivity state of the ancestors of this widget. A widget is insensitive if either it or any of its ancestors is insensi- tive. This resource should not be changed with 1mXtSetValues22m, although it may be queried. background A pixel value which indexes the widget's col- ormap to derive the background color of the widget's window. backgroundPixmap The background pixmap of this widget's win- dow. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap specified will be used instead of the back- ground color. 1mbitmap 22mA bitmap to display instead of the 1mlabel22m. The default size of the widget will be just large enough to contain the bitmap and the widget's internal width and height. The resource converter for this resource con- structs bitmaps from the contents of files. (See 1mConverting Bitmaps 22mfor details.) If this bitmap is one bit deep then the 1's will be rendered in the foreground color, and the 0's in the background color. If 1mbitmap 22mhas a depth greater than one, it is copied directly into the window. borderColor A pixel value which indexes the widget's col- ormap to derive the border color of the wid- get's window. borderPixmap The border pixmap of this widget's window. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap speci- fied will be used instead of the border color. borderWidth The width of this widget's window border. colormap The colormap that this widget will use. cursor The image that will be displayed as the pointer cursor whenever it is in this widget. The use of this resource is deprecated in favor of 1mcursorName22m. 1m400m 1mAthena Widget Set X11, Release 6.40m cursorName The name of the symbol to use to represent the pointer cursor. This resource will over- ride the 1mcursor 22mresource if both are speci- fied. (See 2.4.1) depth The depth of this widget's window. destroyCallback All functions on this list are called when this widget is destroyed. 1mencoding 22mThe encoding method used by the value of the 1mlabel 22mresource. The value may be 1mXawTextEn-0m 1mcoding8bit 22mor 1mXawTextEncodingChar2b22m. When 1minternational 22mis set to 1mtrue 22mthis resource is not used. 1mfont 22mThe text font to use when displaying the 1mlabel22m, when the 1minternational 22mresource is 1mfalse22m. 1mfontSet 22mThe text font set to use when displaying the 1mlabel22m, when the 1minternational 22mresource is 1mtrue22m. 1mforeground 22mA pixel value which indexes the widget's col- ormap to derive the foreground color of the widget's window. This color is also used to render all 1's in a 1mbitmap 22mone plane deep. height width The height and width of this widget in pix- els. insensitiveBorder This pixmap will be tiled into the widget's border if the widget becomes insensitive. 1minternalHeight0m 1minternalWidth 22mThe minimum amount of space to leave between the graphic and the vertical and horizontal edges of the window. international This is a boolean flag, only settable at wid- get creation time. A value of 1mfalse 22msignals the widget to use pre-R6 internationalization (specifically, the lack thereof), such as using fonts for displaying text, etc. A value of 1mtrue 22mdirects the widget to act in an internationalized manner, such as utilizing font sets for displaying text, etc. 1mjustify 22mSpecifies left, center, or right alignment of graphic within the widget. This resource may 1m410m 1mAthena Widget Set X11, Release 6.40m be specified with the values 1mXtJustifyLeft22m, 1mXtJustifyCenter22m, or 1mXtJustifyRight22m. A con- verter is registered for this resource that will convert the following strings: 1mleft,0m 1mright, 22mand 1mcenter22m. This resource only has noticeable effect when the width of the wid- get is larger than necessary to display the graphic. Note that when the graphic is a multi-line 1mlabel22m, the longest line will obey this justification while shorter lines will be left-justified with the longest one. 1mlabel 22mSpecifies the text string to be displayed in the widget's window if no bitmap is speci- fied. The default is the name of this wid- get. Regardless of the value of 1mencoding 22mor 1minternational22m, a single newline character (1 byte) will cause a line break. 1mleftBitmap 22mSpecifies a bitmap to display to the left of the graphic in the widget's window. mappedWhenManaged If this resource is 1mTrue22m, then the widget's window will automatically be mapped by the Toolkit when it is realized and managed. pointerColor A pixel value which indexes the widget's col- ormap to derive the foreground color of the pointer symbol specified by the 1mcursorName0m resource. pointerColorBackground A pixel value which indexes the widget's colormap to derive the background color of the pointer symbol specified by the 1mcursor-0m 1mName 22mresource. 1mresize 22mSpecifies whether the widget should attempt to resize to its preferred dimensions when- ever its resources are modified with 1mXtSet-0m 1mValues22m. This attempt to resize may be denied by the parent of this widget. The parent is always free to resize the widget regardless of the state of this resource. screen The screen on which this widget is displayed. This is not a settable resource. sensitive Whether or not the toolkit should pass user events to this widget. The widget will not get input events if either 1mancestorSensitive0m or 1msensitive 22mis 1mFalse22m. 1m420m 1mAthena Widget Set X11, Release 6.40m translations The event bindings associated with this wid- get. x y The location of the upper left outside corner of this widget in its parent. 1m3.4. List Widget0m Application header file Class header file Class listWidgetClass Class Name List Superclass Simple The List widget contains a list of strings formatted into rows and columns. When one of the strings is selected, it is highlighted, and the List widget's 1mNotify 22maction is invoked, calling all routines on its callback list. Only one string may be selected at a time. 1m3.4.1. Resources0m When creating a List widget instance, the following resources are retrieved from the argument list or from the resource database: ---------------------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ---------------------------------------------------------------------------------------------- accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitiveBoolean D True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 callback Callback Callback NULL colormap Colormap Colormap Parent's Colormap columnSpacing Spacing Dimension 6 cursor Cursor Cursor XC_left_ptr cursorName Cursor String NULL defaultColumns Columns int 2 depth Depth int C Parent's Depth destroyCallback Callback XtCallbackList NULL font Font FontStruct XtDefaultFont fontSet FontSet XFontSet XtDefaultFontSet 1m430m 1mAthena Widget Set X11, Release 6.40m ---------------------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ---------------------------------------------------------------------------------------------- forceColumns Columns Boolean False foreground Foreground Pixel XtDefaultForeground height Height Dimension A Enough space to contain the list insensitiveBorder Insensitive Pixmap GreyPixmap internalHeight Height Dimension 2 internalWidth Width Dimension 4 international International Boolean C False list List Pointer name of widget longest Longest int A 0 mappedWhenManaged MappedWhenManagedBoolean True numberStrings NumberStrings int A computed for NULL terminated list pasteBuffer Boolean Boolean False pointerColor Foreground Pixel XtDefaultForeground pointerColorBackgroundBackground Pixel XtDefaultBackground rowSpacing Spacing Dimension 2 screen Screen Screen R Parent's Screen sensitive Sensitive Boolean True translations Translations TranslationTable See below verticalList Boolean Boolean False width Width Dimension A Enough space to contain the list x Position Position 0 y Position Position 0 ---------------------------------------------------------------------------------------------- accelerators A list of event to action bindings to be exe- cuted by this widget, even though the event occurred in another widget. (See the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for details). ancestorSensitive The sensitivity state of the ancestors of this widget. A widget is insensitive if either it or any of its ancestors is insensi- tive. This resource should not be changed with 1mXtSetValues22m, although it may be queried. background A pixel value which indexes the widget's col- ormap to derive the background color of the widget's window. backgroundPixmap The background pixmap of this widget's win- dow. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap specified will be used instead of the back- ground color. borderColor A pixel value which indexes the widget's col- ormap to derive the border color of the 1m440m 1mAthena Widget Set X11, Release 6.40m widget's window. borderPixmap The border pixmap of this widget's window. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap speci- fied will be used instead of the border color. borderWidth The width of this widget's window border. 1mcallback 22mAll functions on this list are called when- ever the 1mnotify 22maction is invoked. The 4mcall_data24m argument contains information about the element selected and is described in detail in the 1mList Callbacks 22msection. colormap The colormap that this widget will use. 1mcolumnSpacing0m 1mrowSpacing 22mThe amount of space, in pixels, between each of the rows and columns in the list. cursor The image that will be displayed as the pointer cursor whenever it is in this widget. The use of this resource is deprecated in favor of 1mcursorName22m. cursorName The name of the symbol to use to represent the pointer cursor. This resource will over- ride the 1mcursor 22mresource if both are speci- fied. (See 2.4.1) 1mdefaultColumns 22mThe default number of columns. This value is used when neither the width nor the height of the List widget is specified or when 1mforceColumns 22mis 1mTrue22m. depth The depth of this widget's window. destroyCallback All functions on this list are called when this widget is destroyed. 1mfont 22mThe text font to use when displaying the 1mlist22m, when the 1minternational 22mresource is 1mfalse22m. 1mfontSet 22mThe text font set to use when displaying the 1mlist22m, when the 1minternational 22mresource is 1mtrue22m. 1mforceColumns 22mForces the default number of columns to be used regardless of the List widget's current size. 1m450m 1mAthena Widget Set X11, Release 6.40m 1mforeground 22mA pixel value which indexes the widget's col- ormap to derive the color used to paint the text of the list elements. height width The height and width of this widget in pix- els. insensitiveBorder This pixmap will be tiled into the widget's border if the widget becomes insensitive. internalHeight internalWidth The margin, in pixels, between the edges of the list and the corresponding edge of the List widget's window. 1mlist 22mAn array of text strings displayed in the List widget. If 1mnumberStrings 22mis zero (the default) then the 1mlist 22mmust be NULL termi- nated. If a value is not specified for the 1mlist22m, then 1mnumberStrings 22mis set to 1, and the name of the widget is used as the 1mlist22m, and 1mlongest 22mis set to the length of the name of the widget. The 1mlist 22mis used in place, and must be available to the List widget for the lifetime of this widget, or until it is changed with 1mXtSetValues 22mor 1mXawListChange22m. international This is a boolean flag, only settable at wid- get creation time. A value of 1mfalse 22msignals the widget to use pre-R6 internationalization (specifically, the lack thereof), such as using fonts for displaying text, etc. A value of 1mtrue 22mdirects the widget to act in an internationalized manner, such as utilizing font sets for displaying text, etc. 1mlongest 22mSpecifies the width, in pixels, of the long- est string in the current list. The List widget will compute this value if zero (the default) is specified. If this resource is set by hand, entries longer than this will be clipped to fit. mappedWhenManaged If this resource is 1mTrue22m, then the widget's window will automatically be mapped by the Toolkit when it is realized and managed. 1mnumberStrings 22mThe number of strings in the current list. If a value of zero (the default) is speci- fied, the List widget will compute it. When computing the number of strings the List 1m460m 1mAthena Widget Set X11, Release 6.40m widget assumes that the 1mlist 22mis NULL termi- nated. 1mpasteBuffer 22mIf this resource is set to 1mTrue 22mthen the name of the currently selected list element will be put into 1mCUT_BUFFER_022m. pointerColor A pixel value which indexes the widget's col- ormap to derive the foreground color of the pointer symbol specified by the 1mcursorName0m resource. pointerColorBackground A pixel value which indexes the widget's colormap to derive the background color of the pointer symbol specified by the 1mcursor-0m 1mName 22mresource. screen The screen on which this widget is displayed. This is not a settable resource. sensitive Whether or not the toolkit should pass user events to this widget. The widget will not get input events if either 1mancestorSensitive0m or 1msensitive 22mis 1mFalse22m. translations The event bindings associated with this wid- get. 1mverticalList 22mIf this resource is set to 1mTrue 22mthen the list elements will be presented in column major order. x y The location of the upper left outside corner of this widget in its parent. 1m3.4.2. List Actions0m The List widget supports the following actions: · Highlighting and unhighlighting the list element under the pointer with 1mSet 22mand 1mUnset0m · Processing application callbacks with 1mNotify0m The following is the default translation table used by the List Widget: ,: Set() Notify() 1m470m 1mAthena Widget Set X11, Release 6.40m The full list of actions supported by List widget is: 1mSet22m() 4mSets24m the list element that is currently under the pointer. To inform the user that this element is currently set, it is drawn with foreground and background colors reversed. If this action is called when there is no list element under the cursor, the currently 4mset24m element will be 4munset24m. 1mUnset22m() Cancels the 4mset24m state of the element under the pointer, and redraws it with normal fore- ground and background colors. 1mNotify22m() Calls all callbacks on the List widget's callback list. Information about the cur- rently selected list element is passed in the 4mcall_data24m argument (see 1mList Callbacks0m below). 1m3.4.3. List Callbacks0m All procedures on the List widget's callback list will have a 1mXawListReturnStruct 22mpassed to them as 4mcall_data24m. The structure is defined in the List widget's application header file. typedef struct _XawListReturnStruct { String string; /* string shown in the list. */ int list_index; /* index of the item selected. */ } XawListReturnStruct; Note The 4mlist_index24m item used to be called simply 4mindex24m. Unfortunately, this name collided with a global name defined on some operating systems, and had to be changed. 1m3.4.4. Changing the List0m To change the list that is displayed, use 4mXawListChange24m. void XawListChange(4mw24m, 4mlist24m, 4mnitems24m, 4mlongest24m, 4mresize24m) Widget 4mw24m; String * 4mlist24m; int 4mnitems24m, 4mlongest24m; Boolean 4mresize24m; 1m480m 1mAthena Widget Set X11, Release 6.40m 4mw24m Specifies the List widget. 4mlist24m Specifies the new list for the List widget to dis- play. 4mnitems24m Specifies the number of items in the 4mlist24m. If a value less than 1 is specified, 4mlist24m must be NULL terminated, and the number of items will be calcu- lated by the List widget. 4mlongest24m Specifies the length of the longest item in the 4mlist24m in pixels. If a value less than 1 is speci- fied, the List widget will calculate the value. 4mresize24m Specifies a Boolean value that if 1mTrue 22mindicates that the List widget should try to resize itself after making the change. The constraints of the List widget's parent are always enforced, regard- less of the value specified here. 4mXawListChange24m will 4munset24m all list elements that are cur- rently 1mset 22mbefore the list is actually changed. The 4mlist24m is used in place, and must remain usable for the lifetime of the List widget, or until 4mlist24m has been changed again with this function or with 1mXtSetValues22m. 1m3.4.5. Highlighting an Item0m To highlight an item in the list, use 4mXawListHighlight24m. void XawListHighlight(4mw24m, 4mitem24m) Widget 4mw24m; int 4mitem24m; 4mw24m Specifies the List widget. 4mitem24m Specifies an index into the current list that indicates the item to be highlighted. Only one item can be highlighted at a time. If an item is already highlighted when 4mXawListHighlight24m is called, the highlighted item is unhighlighted before the new item is highlighted. 1m3.4.6. Unhighlighting an Item0m To unhighlight the currently highlighted item in the list, use 4mXawListUnhighlight24m. void XawListUnhighlight(4mw24m) Widget 4mw24m; 1m490m 1mAthena Widget Set X11, Release 6.40m 4mw24m Specifies the List widget. 1m3.4.7. Retrieving the Currently Selected Item0m To retrieve the list element that is currently 4mset24m, use 4mXawListShowCurrent24m. XawListReturnStruct *XawListShowCurrent(4mw24m) Widget 4mw24m; 4mw24m Specifies the List widget. 4mXawListShowCurrent24m returns a pointer to an 4mXawListReturn-0m 4mStruct24m structure, containing the currently highlighted item. If the value of the index member is XAW_LIST_NONE, the string member is undefined, and no item is currently selected. 1m3.4.8. Restrictions0m Many programmers create a ``scrolled list'' by putting a List widget with many entries as a child of a Viewport wid- get. The List continues to create a window as big as its contents, but that big window is only visible where it intersects the parent Viewport's window. (I.e., it is ``clipped.'') While this is a useful technique, there is a serious draw- back. X does not support windows above 32,767 pixels in width or height, but this height limit will be exceeded by a List's window when the List has many entries (i.e., with a 12 point font, about 3000 entries would be too many.) 1m3.5. Panner Widget0m Application header file Class header file Class pannerWidgetClass Class Name Panner Superclass Simple A Panner widget is a rectangle, called the ``canvas,'' on which another rectangle, the ``slider,'' moves in two dimen- sions. It is often used with a Porthole widget to move, or ``scroll,'' a third widget in two dimensions, in which case the slider's size and position gives feedback as to what portion of the third widget is visible. 1m500m 1mAthena Widget Set X11, Release 6.40m The slider may be scrolled around the canvas by pressing, dragging, and releasing Button1; the default translation also enables scrolling via arrow keys and some other keys. While scrolling is in progress, the application receives notification through callback procedures. Notification may be done either continuously whenever the slider moves or discretely whenever the slider has been given a new loca- tion. 1m3.5.1. Resources0m When creating a Panner widget instance, the following resources are retrieved from the argument list or from the resource database: ----------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ----------------------------------------------------------------------------------- accelerators Accelerators AcceleratorTable NULL allowOff AllowOff Boolean False ancestorSensitive AncestorSensitiveBoolean D True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap backgroundStipple BackgroundStippleString NULL borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 canvasHeight CanvasHeight Dimension 0 canvasWidth CanvasWidth Dimension 0 colormap Colormap Colormap Parent's Colormap cursor Cursor Cursor None cursorName Cursor String NULL defaultScale DefaultScale Dimension 8 depth Depth int C Parent's Depth destroyCallback Callback XtCallbackList NULL foreground Foreground Pixel XtDefaultForeground height Height Dimension A depends on orientation internalSpace InternalSpace Dimension 4 international International Boolean C False lineWidth LineWidth Dimension 0 mappedWhenManaged MappedWhenManagedBoolean True pointerColor Foreground Pixel XtDefaultForeground pointerColorBackgroundBackground Pixel XtDefaultBackground reportCallback ReportCallback Callback NULL resize Resize Boolean True rubberBand RubberBand Boolean False screen Screen Screen R Parent's Screen sensitive Sensitive Boolean True shadowColor ShadowColor Pixel XtDefaultForeground shadowThickness ShadowThickness Dimension 2 sliderX SliderX Position 0 sliderY SliderY Position 0 1m510m 1mAthena Widget Set X11, Release 6.40m ----------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ----------------------------------------------------------------------------------- sliderHeight SliderHeight Dimension 0 sliderWidth SliderWidth Dimension 0 translations Translations TranslationTable See below width Width Dimension A depends on orientation x Position Position 0 y Position Position 0 ----------------------------------------------------------------------------------- accelerators A list of event to action bindings to be exe- cuted by this widget, even though the event occurred in another widget. (See the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for details). 1mallowOff 22mWhether to allow the edges of the slider to go off the edges of the canvas. ancestorSensitive The sensitivity state of the ancestors of this widget. A widget is insensitive if either it or any of its ancestors is insensi- tive. This resource should not be changed with 1mXtSetValues22m, although it may be queried. background A pixel value which indexes the widget's col- ormap to derive the background color of the widget's window. backgroundPixmap The background pixmap of this widget's win- dow. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap specified will be used instead of the back- ground color. 1mbackgroundStipple0m The name of a bitmap pattern to be used as the background for the area representing the canvas. borderColor A pixel value which indexes the widget's col- ormap to derive the border color of the wid- get's window. borderPixmap The border pixmap of this widget's window. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap speci- fied will be used instead of the border color. 1m520m 1mAthena Widget Set X11, Release 6.40m borderWidth The width of this widget's window border. 1mcanvasHeight0m 1mcanvasWidth 22mThe size of the canvas. colormap The colormap that this widget will use. cursor The image that will be displayed as the pointer cursor whenever it is in this widget. The use of this resource is deprecated in favor of 1mcursorName22m. cursorName The name of the symbol to use to represent the pointer cursor. This resource will over- ride the 1mcursor 22mresource if both are speci- fied. (See 2.4.1) 1mdefaultScale 22mThe percentage size that the Panner widget should have relative to the size of the can- vas. depth The depth of this widget's window. destroyCallback All functions on this list are called when this widget is destroyed. 1mforeground 22mA pixel value which indexes the widget's col- ormap to derive the color used to draw the slider. height width The height and width of this widget in pix- els. 1minternalSpace 22mThe width of internal border in pixels between a slider representing the full size of the canvas and the edge of the Panner wid- get. international This is a boolean flag, only settable at wid- get creation time. While not utilized in this widget, it can and should be checked by any subclasses that have behavior that should vary with locale. 1mlineWidth 22mThe width of the lines in the rubberbanding rectangle when rubberbanding is in effect instead of continuous scrolling. The default is 0. mappedWhenManaged If this resource is 1mTrue22m, then the widget's window will automatically be mapped by the 1m530m 1mAthena Widget Set X11, Release 6.40m Toolkit when it is realized and managed. pointerColor A pixel value which indexes the widget's col- ormap to derive the foreground color of the pointer symbol specified by the 1mcursorName0m resource. pointerColorBackground A pixel value which indexes the widget's colormap to derive the background color of the pointer symbol specified by the 1mcursor-0m 1mName 22mresource. 1mreportCallback 22mAll functions on this callback list are called when the 1mnotify 22maction is invoked. See the 1mPanner Actions 22msection for details. 1mresize 22mWhether or not to resize the panner whenever the canvas size is changed so that the 1mdefaultScale 22mis maintained. 1mrubberBand 22mWhether or not scrolling should be discrete (only moving a rubberbanded rectangle until the scrolling is done) or continuous (moving the slider itself). This controls whether or not the 1mmove 22maction procedure also invokes the 1mnotify 22maction procedure. screen The screen on which this widget is displayed. This is not a settable resource. sensitive Whether or not the toolkit should pass user events to this widget. The widget will not get input events if either 1mancestorSensitive0m or 1msensitive 22mis 1mFalse22m. 1mshadowColor 22mThe color of the shadow underneath the slider. 1mshadowThickness0m The width of the shadow underneath the slider. 1msliderX0m 1msliderY 22mThe location of the slider in the coordinates of the canvas. 1msliderHeight0m 1msliderWidth 22mThe size of the slider. translations The event bindings associated with this wid- get. 1m540m 1mAthena Widget Set X11, Release 6.40m x y The location of the upper left outside corner of this widget in its parent. 1m3.5.2. Panner Actions0m The actions supported by the Panner widget are: 1mstart22m() This action begins movement of the slider. 1mstop22m() This action ends movement of the slider. 1mabort22m() This action ends movement of the slider and restores it to the position it held when the 1mstart 22maction was invoked. 1mmove22m() This action moves the outline of the slider (if the 1mrubberBand 22mresource is True) or the slider itself (by invoking the 1mnotify 22maction procedure). 1mpage22m(4mxamount24m,4myamount24m) This action moves the slider by the specified amounts. The format for the amounts is a signed or unsigned floating-point number (e.g., +1.0 or -.5) followed by either 1mp0m indicating pages (slider sizes), or 1mc 22mindi- cating canvas sizes. Thus, 4mpage(+0,+.5p)0m represents vertical movement down one-half the height of the slider and 4mpage(0,0)24m repre- sents moving to the upper left corner of the canvas. 1mnotify22m() This action informs the application of the slider's current position by invoking the 1mreportCallback 22mfunctions registered by the application. 1mset22m(4mwhat24m,4mvalue24m) This action changes the behavior of the Pan- ner. The 4mwhat24m argument must currently be the string 1mrubberband 22mand controls the value of the 1mrubberBand 22mresource. The 4mvalue24m argument may have one of the values 1mon22m, 1moff22m, or 1mtog-0m 1mgle22m. The default bindings for Panner are: : start() :move() : notify() stop() : abort() 1m550m 1mAthena Widget Set X11, Release 6.40m KP_Enter:set(rubberband,toggle) space: page(+1p,+1p) Delete:page(-1p,-1p) BackSpace:page(-1p,-1p) Left: page(-.5p,+0) Right: page(+.5p,+0) Up: page(+0,-.5p) Down: page(+0,+.5p) Home: page(0,0) 1m3.5.3. Panner Callbacks0m The functions registered on the 1mreportCallback 22mlist are invoked by the 1mnotify 22maction as follows: void ReportProc(4mpanner24m, 4mclient_data24m, 4mreport24m) Widget 4mpanner24m; XtPointer 4mclient_data24m; XtPointer 4mreport24m; /* (XawPannerReport *) */ 4mpanner24m Specifies the Panner widget. 4mclient_data0m Specifies the client data. 4mreport24m Specifies a pointer to an 1mXawPannerReport 22mstruc- ture containing the location and size of the slider and the size of the canvas. 1m3.6. Repeater Widget0m Application header file Class header file Class repeaterWidgetClass Class Name Repeater Superclass Command The Repeater widget is a subclass of the Command widget; see the Command documentation for details. The difference is that the Repeater can call its registered callbacks repeat- edly, at an increasing rate. The default translation does so for the duration the user holds down pointer button 1 while the pointer is on the Repeater. 1m3.6.1. Resources0m When creating a Repeater widget instance, the following resources are retrieved from the argument list or from the resource database: 1m560m 1mAthena Widget Set X11, Release 6.40m ------------------------------------------------------------------------------------------------- 1mName Class Type NotesDefault Value0m ------------------------------------------------------------------------------------------------- accelerators Accelerators AcceleratorTable NULL ancestorSensitive AncestorSensitive Boolean D True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap bitmap Bitmap Pixmap None borderColor BorderColor Pixel XtDefaultForeground borderPixmap Pixmap Pixmap XtUnspecifiedPixmap borderWidth BorderWidth Dimension 1 callback Callback XtCallbackList NULL colormap Colormap Colormap Parent's Colormap cornerRoundPercent CornerRoundPercentDimension 25 cursor Cursor Cursor None cursorName Cursor String NULL decay Decay Int 5 depth Depth int C Parent's Depth destroyCallback Callback XtCallbackList NULL encoding Encoding UnsignedChar XawTextEncoding8bit flash Boolean Boolean False font Font XFontStruct XtDefaultFont fontSet FontSet XFontSet XtDefaultFontSet foreground Foreground Pixel XtDefaultForeground height Height Dimension A graphic height + 2 * 1minternalHeight0m highlightThickness Thickness Dimension A 2 (0 if Shaped) initialDelay Delay Int 200 insensitiveBorder Insensitive Pixmap GreyPixmap internalHeight Height Dimension 2 internalWidth Width Dimension 4 international International Boolean C False justify Justify Justify XtJustifyCenter (center) label Label String name of widget leftBitmap LeftBitmap Bitmap None mappedWhenManaged MappedWhenManaged Boolean True minimumDelay MinimumDelay Int 10 pointerColor Foreground Pixel XtDefaultForeground pointerColorBackgroundBackground Pixel XtDefaultBackground repeatDelay Delay Int 50 resize Resize Boolean True screen Screen Pointer R Parent's Screen sensitive Sensitive Boolean True shapeStyle ShapeStyle ShapeStyle Rectangle startCallback StartCallback Callback NULL stopCallback StopCallback Callback NULL translations Translations TranslationTable See below width Width Dimension A graphic width + 2 * 1minternalWidth0m x Position Position 0 y Position Position 0 ------------------------------------------------------------------------------------------------- 1m570m 1mAthena Widget Set X11, Release 6.40m accelerators A list of event to action bindings to be exe- cuted by this widget, even though the event occurred in another widget. (See the 4mX24m 4mTool-0m 4mkit24m 4mIntrinsics24m 4m--24m 4mC24m 4mLanguage24m 4mInterface24m for details). ancestorSensitive The sensitivity state of the ancestors of this widget. A widget is insensitive if either it or any of its ancestors is insensi- tive. This resource should not be changed with 1mXtSetValues22m, although it may be queried. background A pixel value which indexes the widget's col- ormap to derive the background color of the widget's window. backgroundPixmap The background pixmap of this widget's win- dow. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap specified will be used instead of the back- ground color. bitmap A bitmap to display instead of the 1mlabel22m. The default size of the widget will be just large enough to contain the bitmap and the widget's internal width and height. The resource converter for this resource con- structs bitmaps from the contents of files. (See 1mConverting Bitmaps 22mfor details.) If this bitmap is one bit deep then the 1's will be rendered in the foreground color, and the 0's in the background color. If 1mbitmap 22mhas a depth greater than one, it is copied directly into the window. borderColor A pixel value which indexes the widget's col- ormap to derive the border color of the wid- get's window. borderPixmap The border pixmap of this widget's window. If this resource is set to anything other than 1mXtUnspecifiedPixmap22m, the pixmap speci- fied will be used instead of the border color. borderWidth The width of this widget's window border. callback A list of routines to be called when the 1mnotify 22maction is invoked. colormap The colormap that this widget will use. 1m580m 1mAthena Widget Set X11, Release 6.40m cornerRoundPercent When a 1mShapeStyle 22mof 1mroundedRectangle 22mis used, this resource controls the radius of the rounded corner. The radius of the rounded corners is specified as a percentage of the length of the shortest side of the widget. cursor The image that will be displayed as the pointer cursor whenever it is in this widget. The use of this resource is deprecated in favor of 1mcursorName22m. cursorName The name of the symbol to use to represent the pointer cursor. This resource will over- ride the 1mcursor 22mresource if both are speci- fied. (See 2.4.1) 1mdecay 22mThe number of milliseconds that should be subtracted from each succeeding interval while the Repeater button is being held down until the interval has reached 1mminimumDelay0m milliseconds. depth The depth of this widget's window. destroyCallback All functions on this list are called when this widget is destroyed. encoding The encoding method used by the value of the 1mlabel 22mresource. The value may be 1mXawTextEn-0m 1mcoding8bit 22mor 1mXawTextEncodingChar2b22m. When 1minternational 22mis set to 1mtrue 22mthis resource is not used. 1mflash 22mWhether or not to flash the Repeater button whenever the timer goes off. font The text font to use when displaying the 1mlabel22m, when the 1minternational 22mresource is 1mfalse22m. fontSet The text font set to use when displaying the 1mlabel22m, when the 1minternational 22mresource is 1mtrue22m. foreground A pixel value which indexes the widget's col- ormap to derive the foreground color of the widget's window. This color is also used to render all 1's in a 1mbitmap 22mone plane deep. height 1m590m 1mAthena Widget Set X11, Release 6.40m width The height and width of this widget in pix- els. highlightThickness The thickness of the rectangle that is used to highlight the internal border of this wid- get, alerting the user that it is ready to be selected. The default value is 2 pixels if the 1mshapeStyle 22mis 1mrectangle22m, and 0 Pixels (no highlighting) otherwise. 1minitialDelay 22mThe number of milliseconds between the begin- ning of the Repeater button being held down and the first invocation of the 1mcallback0m function. insensitiveBorder This pixmap will be tiled into the widget's border if the widget becomes insensitive. internalHeight internalWidth The minimum amount of space to leave between the graphic and the vertical and horizontal edges of the window. international This is a boolean flag, only settable at wid- get creation time. A value of 1mfalse 22msignals the widget to use pre-R6 internationalization (specifically, the lack thereof), such as using fonts for displaying text, etc. A value of 1mtrue 22mdirects the widget to act in an internationalized manner, such as utilizing font sets for displaying text, etc. justify Specifies left, center, or right alignment of graphic within the widget. This resource may be specified with the values 1mXtJustifyLeft22m, 1mXtJustifyCenter22m, or 1mXtJustifyRight22m. A con- verter is registered for this resource that will convert the following strings: 1mleft,0m 1mright, 22mand 1mcenter22m. This resource only has noticeable effect when the width of the wid- get is larger than necessary to display the graphic. Note that when the graphic is a multi-line 1mlabel22m, the longest line will obey this justification while shorter lines will be left-justified with the longest one. label Specifies the text string to be displayed in the widget's window if no bitmap is speci- fied. The default is the name of this wid- get. Regardless of the value of 1mencoding 22mor 1minternational22m, a single newline character (1 1m600m 1mAthena Widget Set X11, Release 6.40m byte) will cause a line break. leftBitmap Specifies a bitmap to display to the left of the graphic in the widget's window. mappedWhenManaged If this resource is 1mTrue22m, then the widget's window will automatically be mapped by the Toolkit when it is realized and managed. 1mminimumDelay 22mThe minimum time between callbacks in mil- liseconds. pointerColor A pixel value which indexes the widget's col- ormap to derive the foreground color of the pointer symbol specified by the 1mcursorName0m resource. pointerColorBackground A pixel value which indexes the widget's colormap to derive the background color of the pointer symbol specified by the 1mcursor-0m 1mName 22mresource. 1mrepeatDelay 22mThe number of milliseconds between each call- back after the first (minus an increasing number of 1mdecay22ms). resize Specifies whether the widget should attempt to resize to its preferred dimensions when- ever its resources are modified with 1mXtSet-0m 1mValues22m. This attempt to resize may be denied by the parent of this widget. The parent is always free to resize the widget regardless of the state of this resource. screen The screen on which this widget is displayed. This is not a settable resource. sensitive Whether or not the toolkit should pass user events to this widget. The widget will not get input events if either 1mancestorSensitive0m or 1msensitiv