X ToolKit Intr Prog Man X11 Rel4&5 Vol 4M (2nd edition)

X ToolKit Intr Prog Man X11 Rel4&5 Vol 4M (2nd edition)

By: Adrian Nye (author), Tim O'Reilly (author)

Up to 2 WeeksUsually despatched within 2 weeks


Volume 4 is a complete guide to programming with the X Toolkit Intrinsics, the library of C language routines that facilitates the design of user interfaces with reusable components called widgets. It provides concepts and examples that show how to use the various X Toolkit routines. The first few chapters are devoted to using widgets; the remainder of the book covers the more complex task of writing new widgets. Uses the Motif 1.2 widget set in examples and covers X11 Release 5. Volume 4 includes: Introduction to the X Window System. Building applications with widgets. Constructing a bitmap editor with widgets. An overview of each widget in the widget set. Basic widget methods. Events, translations, and accelerators. Event handlers, timeouts, and work procedures. Resource management and type conversion. Selections and window manager interaction. Geometry management. Menus, gadgets, and cascaded pop-ups. Miscellaneous techniques. Comparison of Athena, OSF/Motif, and AT&T OPEN LOOK widgets. Master index to volumes 4 and 5. This book is designed to be used with Volume 5, X Toolkit Intrinsics Reference Manual, which provides reference pages for each of the Xt functions, the widget classes defined by Xt, and the Athena widget set.

About Author

Adrian Nye is the author or editor of several volumes in the X Window System Series from O'Reilly & Associates. He specializes in X programming, and is O'Reilly's representative to the X Consortium. Adrian is also editor of The X Resource, a quarterly practical journal for X programmers. Adrian has worked as a programmer writing educational software in C, and as a mechanical engineer designing offshore oil spill cleanup equipment. He has long-term interests in the environment and the impact of people and technology. He graduated from the Massachusetts Institute of Technology in 1984 with a B.S. in Mechanical Engineering. Tim O'Reilly is founder and president of O'Reilly & Associates, publisher of the X Window System series and the popular Nutshell Handbooks(R) on UNIX. Tim has had a hand in writing or editing many of the books published by O'Reilly & Associates. He is also the author of a book about science- fiction writer Frank Herbert. Tim's long-term vision for the company is to create a vehicle where creative people can support themselves by exploring interesting ideas. Technical book publishing is just the first step. Tim graduated cum laude from Harvard in 1975 with a B.A. in Classics.


Preface Summary of Contents Assumptions Related Documents How to Use This Manual Font Conventions Used in This Manual Request for Comments Bulk Sales Information Obtaining the X Window System Software Obtaining Motif Obtaining the Example Programs FTP FTPMAIL BITFTP UUCP Compiling the Example Programs Acknowledgments Chapter 1 Introduction to the X Window System 1.1 The Server and Client 1.2 The Software Hierarchy 1.3 Event-driven Programming 1.4 The Window Manager 1.5 Extensions to X Chapter 2 Introduction to the X Toolkit and Motif 2.1 Programming with Widgets 2.1.1 About Widget Sets 2.1.2 Widget Classes and Instances 2.1.3 Widget Configurability with Resources 2.1.4 Widget Independence 2.1.5 Widget-Application Interaction 2.1.6 Xt and Object-oriented Programming (OOP) The Object Methods Messages Encapsulation 2.2 Structure of Motif Applications 2.3 A Simple X Toolkit Application 2.3.1 The Code 2.3.2 Compiling the Application 2.3.3 The App-defaults File 2.3.4 To Hardcode or Not to Hardcode 2.4 Connecting Widgets to Application Code 2.4.1 Callbacks 2.5 More About Resources 2.5.1 Setting and Getting Resources from the Application Setting Resources with the Varargs Interfaces Setting Resources with the ArgList Interfaces Getting a Resource Value 2.5.2 Core Resources 2.5.3 Other Inherited Resources 2.6 Advice on X Programming 2.7 Debugging Xt Applications Chapter 3 More Techniques for Using Widgets 3.1 Using Composite Widgets 3.1.1 Setting Resources for an Instance Hierarchy 3.1.2 Geometry Management in Practice 3.2 Using Constraint Widgets 3.3 The Standard Motif Instance Hierarchy 3.3.1 Motif Widget Creation Routines 3.3.2 Building a Main Window 3.4 Using Popups 3.4.1 Creating a Basic Menu 3.4.2 Creating a Basic Dialog Box 3.4.3 Popup Window Hierarchy 3.5 More About Callbacks 3.5.1 Passing Data to Callback Functions The client data Argument The call data Argument 3.5.2 Callback Lists 3.6 Application Resources 3.6.1 The Application Data Structure 3.6.2 The Resource List 3.6.3 Getting the Resources 3.7 Command-line Options 3.7.1 Standard Command-line Options 3.7.2 Defining Your Own Command-line Options 3.8 Preventing User Customization of Widget Resources 3.8.1 Using the Varargs Interfaces 3.8.2 Using the Argument List Interfaces Another Way to Set Arguments Merging Argument Lists 3.9 More About Application Contexts Chapter 4 An Example Application 4.1 xbitmap1: Bitmap Editor Using a BitmapEdit Widget 4.1.1 XBitmap1 App-defaults File 4.2 xbitmap2: Adding Graphics to Display the Bitmap 4.2.1 Exposure Strategy 4.2.2 Graphics from the Application 4.2.3 Writing a Bitmap File 4.3 xbitmap3: Another Way to Create a Custom Window 4.3.1 Actions The Actions Table Format of an Action Function 4.3.2 Translations The Translation Table Hardcoding Translations Action Parameters 4.3.3 Adding Actions to Existing Widgets 4.4 xbitmap4: A Bitmap Editor Without a BitmapEdit Widget Chapter 5 More About Motif 5.1 The Remaining Motif Widgets and Gadgets 5.1.1 Geometry Managing Widgets 5.1.2 Dialog Widgets 5.2 Widget Creation Functions 5.3 Compound Strings 5.3.1 Simple Compound Strings 5.3.2 Strings with Multiple Fonts 5.3.3 Manipulating Compound Strings 5.3.4 Converting Compound Strings to Text 5.3.5 Rendering Compound Strings 5.4 Pixmap and Image Caching Functions 5.5 Dynamic Resource Defaulting 5.6 Resolution Independence 5.7 Keyboard Traversal and Focus 5.8 Motif Virtual Keyboard Bindings 5.9 Drag and Drop 5.9.1 Drag Protocol 5.9.2 Drop Protocol 5.9.3 Operations 5.9.4 Application Programming Interface 5.9.5 Summary: Drag and Drop in Applications 5.10 Tear-off Menus 5.11 The Motif User Interface Language Chapter 6 Inside a Widget 6.1 Widget Source File Organization 6.2 The Private Header File-BitmapEdiP.h 6.2.1 Parts and Records 6.2.2 Class Part and Class Record 6.2.3 Instance Part and Instance Record 6.3 The Widget Implementation File-BitmapEdit.c 6.3.1 Obligatory Include Files 6.3.2 Defining the Resource List 6.3.3 The Translation Table and Actions Table 6.3.4 Declaring Methods 6.3.5 Initializing the Class Record The Core Class Part Initializing the Core Methods 6.3.6 Description of Core Methods 6.3.7 Packaging the Class Record for Application Use 6.3.8 A Sample Method 6.4 The Public Header File-BitmapEdit.h 6.5 The Process of Widget Writing 6.6 Summary of Conventions Chapter 7 Basic Widget Methods 7.1 The X Graphics Model Inside Widgets 7.2 The initialize Method 7.2.1 Creating GCs 7.3 The expose Method 7.4 The set values Method 7.5 The resize Method 7.6 The query geometry Method 7.7 The destroy Method 7.8 Actions in the Widget Framework Chapter 8 Events, Translations, and Accelerators 8.1 Translation Table Syntax 8.1.1 The Directive 8.1.2 Selecting the Events to Translate 8.1.3 Details in Keyboard Events 8.1.4 Details in Other Event Types 8.1.5 Modifiers Physical Keys Used as Modifiers Default Interpretation of the Modifier List Prohibiting a Modifier Requiring an Exact Match Paying Attention to the Case of Keysyms 8.1.6 Event Sequences Special Considerations Involving Motion Events Modifiers and Event Sequences Using Modifiers to Specify Button Event Sequences Key Event Sequences 8.1.7 Interactions Between Translations Translations in Multiple Resource Files Order of Translations Event Sequences Sharing Initial Events Event Sequences Sharing Noninitial Events 8.2 Accelerators and Mnemonics 8.2.1 Xt Accelerators 8.2.2 Event Propagation 8.2.3 Installing Accelerators in Multiple Widgets 8.2.4 Defining the Accelerator Table in the Code 8.2.5 Motif Accelerators and Mnemonics Mnemonics 8.2.6 The display accelerators Method Chapter 9 More Input Techniques 9.1 Event Handlers 9.1.1 Adding Event Handlers 9.1.2 Adding Nonmaskable Event Handlers 9.1.3 Removing Event Handlers 9.1.4 Adding Raw Event Handlers 9.2 Writing Routines That Use Specific Event Data 9.2.1 Event Types and Structure Names 9.3 File, Pipe, and Socket Input 9.3.1 Getting File Input 9.3.2 Getting Pipe Input 9.4 Timeouts 9.5 Visibility Interest 9.6 Work Procedures 9.7 Low-level Management of the Event Queue 9.7.1 XtPending and XtPeekEvent 9.7.2 Event Filters 9.7.3 Input Sensitivity Chapter 10 Resource Management and Type Conversion 10.1 Review of Resource Fundamentals 10.2 How Xt's Resource Manager Works 10.2.1 Basic Syntax of Resource Specifications 10.2.2 Wildcarding Resource Component Names 10.2.3 Merging of Resource Files 10.2.4 Syntax of Environment Variables 10.2.5 Including Files in a Resource File 10.2.6 The Language String 10.2.7 Screen-specific Resource Strings and Databases 10.2.8 Fallback Resources 10.2.9 Resource Matching Algorithm 10.2.10 Resource Precedence Rules 10.2.11 Customized Resource Files 10.2.12 The XtNbaseTranslations Resource 10.3 Type Conversion 10.3.1 Conversions from XmRString 10.3.2 Other Built-in Type Conversions 10.3.3 Special Resource Defaults That Do Not Use Conversion 10.3.4 Registering Type Converters Passing Arguments to a Type Converter 10.3.5 Explicitly Invoking a Converter 10.3.6 Writing a Type Converter Defining the Default Value 10.4 Subparts and Subresources 10.4.1 The Hook Methods 10.4.2 Managing Subresources Chapter 11 Interclient Communications 11.1 Window Manager Interactions 11.1.1 Shell Subclasses 11.1.2 Setting Shell Resources 11.1.3 Screen Space 11.1.4 Input Model 11.1.5 Colormaps 11.1.6 Icons 11.1.7 Window Manager Decorations 11.1.8 Interacting With the Motif Window Manager WM PROTOCOLS MOTIF WM MESSAGES MOTIF WM HINTS 11.2 Selections: Widget-to-Widget Communication 11.2.1 How Atomic Selection Works 11.2.2 Highlighting the Selected Data (Owner) 11.2.3 Making the Selection with XtOwnSelection (Owner) 11.2.4 Requesting the Selection (Requestor) Possible Target Type Atoms The Paste Action from BitmapEdit 11.2.5 Converting the Selection (Owner) 11.2.6 Finally Pasting the Selection (Requestor) 11.2.7 If the Selection is Lost (Owner) 11.2.8 When the Selection Transfer is Complete (Owner) 11.2.9 ICCCM Compliance Xmu Atom Caching Converting the Standard Selections 11.2.10 How Incremental Selection Works 11.2.11 Miscellaneous Selection Routines 11.3 Motif Cut and Paste Functions and the Clipboard Chapter 12 Geometry Management 12.1 How Composite Management Works 12.1.1 Initial Geometry Negotiation 12.1.2 User Resizes the Application 12.1.3 Widget Desires a Size Change 12.1.4 Application Resizes a Widget 12.2 Writing a Composite Widget 12.2.1 Basic Core Methods in Composite Widgets 12.2.2 Laying Out Child Widgets 12.2.3 The change managed Method 12.2.4 The geometry manager Method 12.2.5 XtQueryGeometry and the query geometry Method 12.2.6 XtMakeGeometryRequest and the geometry manager Method 12.2.7 The set values almost Method 12.2.8 The insert child and delete child Methods 12.3 How Constraint Management Works 12.4 Writing a Constraint Widget 12.4.1 The Core Resource List 12.4.2 The Constraint Resource List 12.4.3 Class Structure Initialization 12.4.4 The Constraint initialize Method 12.4.5 The class part init Method 12.4.6 The geometry manager Method 12.4.7 The resize Method 12.4.8 The Core and Constraint set values Methods 12.4.9 The change managed Method 12.4.10 The query geometry Method 12.4.11 Delaying Geometry Recalculation 12.5 Compound Widgets 12.6 Stacking Order Chapter 13 Menus, Gadgets, and Cascaded Popups 13.1 Menu Styles and Implementation 13.2 Using Motif Menus 13.2.1 Popup Menus 13.2.2 Cascaded Menus 13.3 Basic Xt Popup Support 13.3.1 A Spring-loaded Menu: Pointer Grabbing 13.3.2 A Pulldown Menu 13.3.3 Cascaded Menus 13.3.4 Using the R4 SimpleMenu Widget 13.3.5 Delayed Popup Creation 13.4 About Dialog Boxes 13.5 Gadgets 13.5.1 Inside a Gadget 13.5.2 Private Header File 13.5.3 The Gadget Source File 13.5.4 The Public Header File 13.5.5 The Gadget Parent Chapter 14 Miscellaneous Toolkit Programming Techniques 14.1 Errors and Warnings 14.2 Objects 14.3 Macros For Getting Information 14.4 The accept focus Method and the Keyboard Focus 14.5 Keyboard Interpretation 14.6 Memory Allocation 14.7 Action Hooks and Calling Actions Directly 14.8 Xt Grabbing Functions 14.9 File Finding and Internationalization 14.10 Application Contexts 14.10.1 Multiple Application Contexts 14.10.2 Rewriting XtAppMainLoop for Multiple Application Contexts 14.10.3 Functions Used with Multiple Application Contexts 14.11 Multiple Top-level Shells 14.12 Connecting to Multiple Servers 14.13 Class Extension Structures 14.14 Using Editres in Xt Programming 14.14.1 A Tour of editres 14.14.2 editres as a Programmer's Tool 14.14.3 Adding editres Support to an Xt Application 14.14.4 Using editres to Understand the Structure of an Application 14.14.5 Using editres to Test or Debug a Widget Testing a Widget's set values Procedures Testing a Widget's geometry manager 14.15 Internationalization in the X Toolkit 14.15.1 String Encoding and Locale Dependencies in Xt 14.15.2 Establishing Locale in an Xt Application 14.15.3 XFontSet Resources 14.15.4 Other Xt Changes for Internationalization 14.15.5 Internationalization in Motif 1.2 14.15.6 Text Output 14.15.7 Text Input 14.15.8 Compound Text Conversion 14.15.9 XmGetLocalized() 14.15.10 Summary Appendix A Athena, OPEN LOOK, and Motif A.1 The AT&T OPEN LOOK Widgets A.1.1 Application Controls A.1.1.1 Command Buttons A.1.1.2 Exclusive and Nonexclusive Settings A.1.1.3 Analog Controls A.1.2 Composite Widgets A.1.2.1 Menus and Control Areas A.1.2.2 General Purpose Composite Widgets A.1.2.3 Scrollbars and Scrollable Windows A.1.3 Popups .1.4 Text Widgets A.1.5 Drawing Areas A2 The OSF/Motif Widgets A.2.1 Application Controls A.2.1.1 Command Buttons A.2.1.2 Analog Controls A.2.2 Composite Widgets A.2.2.1 Menus and Control Areas A.2.2.2 General Purpose Composite Widgets A.2.2.3 Scrollable Windows A.2.3 Popups A.2.4 Text Widgets A.2.5 Drawing Areas Appendix B Specifying Fonts and Colors B.1 Color Specification B.1.1 Color Names B.1.2 Hexadecimal Color Specification B.1.2.1 The RGB Color Model B.1.2.2 How Many Colors are Available? B2 Font Specification B.2.1 Font Naming Conventions B.2.2 Font Name Wildcarding B.2.3 Font Name Aliasing B.2.4 Making the Server Aware of Aliases B.2.5 The fonts.dir Files B.3 Font Service B4 Scalable Fonts B.4.1 Finding Scalable Fonts B.4.2 Finding Derived Instances of Scalable Fonts B.4.3 Using Scalable Fonts B5 Window Geometry Appendix C Naming Conventions Appendix D Release Notes D.1 R4 to R5 D.2 Motif 1.1 to 1.2 D.2.1 Widget Changes D.2.2 New Display and Screen Objects D.2.3 Default Colors D.2.4 Insensitive Visuals D.2.5 Baseline Alignment D.2.6 Geometry Management D.2.7 Traversal D.2.8 Representation Type Convenience Functions D.2.9 caddr t Changed to XtPointer D.2.10 Mwm D.2.11 UIL and Mrm Appendix E The xbitmap Application E.1 The BitmapEdit Widget E.2 The BitmapEdiP.h Private Header File E.3 The BitmapEdit.h Public Header File E.4 xbitmap5 Appendix F Sources of Additional Information F.1 Getting the X Software F.1.1 Bug Fixes F.1.1.1 Notes F.1.1.2 Fairness F.2 Netnews F.3 Training, Consulting, and Support F.4 The X Consortium F.5 Finding Out for Yourself Glossary Master Index Figures 1-1 An X application, and an application on a traditional text terminal 1-2 A three-button mouse directing the pointer to select a menu item 1-3 Screen layout of a typical user's X Window System 1-4 Applications can run on any system across the network 1-5 The software architecture of Xt Intrinsics-based applications 2-1 A widget-based application (simulated) 2-2 A Motif widget-based application (simulated) 2-3 Two ways to think about a class 2-4 Class hierarchy of the Motif widget set 2-5 Several Athena Label widgets configured using resources 2-6 Widgets operate independently of the application 2-7 XtSetValues lets the application set how a widget will operate itself 2-8 Application registers a function with Xt during startup phase 2-9 Xt calls the function during the event-loop phase in response to an occurrence 2-10 xhello: appearance on screen 2-11 The appearance of xgoodbye when the pointer is in the window 2-12 xgoodbye run with new resource settings 3-1 xrowcolumn: appearance on the screen 3-2 Two configurations of xrowcolumn 3-3 Incorrect results upon resize of ScrollBar widgets inside a RowColumn widget 3-4 The xmh application and its instance hierarchy 3-5 Effect of the Form XmATTACH WIDGET constraint resource 3-6 xmainwindow: an application with standard Motif screen layout 3-7 xmainwindow with the File pulldown menu displayed 3-8 xmainwindow with the Help dialog box displayed 3-9 The widget instance and X window hierarchies are different only for popups 4-1 xbitmap1: how it looks on the screen 4-2 xbitmap2: true-scale normal and reverse bitmaps added 4-3 Application draws into Pixmap and copies it to widget window 4-4 Two-stage mapping with translation table and action table 5-1 A Command widget 5-2 A FileSelectionDialog widget 5-3 A SelectionDialog widget 5-4 A TextField widget 5-5 A menu containing buttons separated by Separator widgets 5-6 ToggleButton widgets used in a RadioBox and a CheckBox 5-7 A Scale widget 5-8 A List widget containing selectable strings 5-9 Dialog boxes with the five standard symbols 5-10 xcomstring.c: how it looks on the screen 6-1 The class hierarchy of the BitmapEdit widget (with other classes shown dotted) 6-2 Order of code in widget .c file 7-1 compress exposure: 2 rectangles if XtExposeNoCompress; bounding box and region if XtExposeCompressSeries or XtExposeCompressMultiple 8-1 xbox1: two Command widgets in a Box 8-2 Key event propagation in xbox 9-1 xtetris in play 10-1 Typical resource setting search path on UNIX-based systems 10-2 The quit widget in a sample widget hierarchy 10-3 Steps in matching resource entries for one resource of widget being created 11-1 The process of selection transfer 12-1 Role of border width in widget geometry 12-2 Initial geometry negotiation, assuming sufficient shell space 12-3 Initial geometry negotiation, if resizing is necessary 12-4 A widget requesting a size change 12-5 A ScrollBox widget at two different sizes 12-6 Geometry negotiation by the set values almost method 13-1 Athena Command widgets in an Athena Box widget, and the same commands as a SimpleMenu 13-2 xmenu1: application with spring-loaded popup menu 13-3 xmenu2: a pulldown menu 13-4 xmenu5: cascaded spring-loaded menus 13-5 xmenu7: a menu using the Athena SimpleMenu widget 13-6 Class hierarchy derivation of Core 14-1 editres immediately after startup 14-2 editres with widget tree displayed 14-3 editres display window IDs of widget tree 14-4 Flashing widget in application by selecting it in editres 14-5 Resource box for the selected Label widget 14-6 Generalizing the widgets affected by the resource specification A-1 An OPEN LOOK application A-2 Class inheritance hierarchy of the AT&T OPEN LOOK widgets A-3 An OPEN LOOK ControlArea with OblongButton and ButtonStack widgets A-4 OPEN LOOK RectButtons controlled by Exclusives and Nonexclusives widgets A-5 An OPEN LOOK CheckBox widget A-6 An OPEN LOOK Slider widget A-7 An OPEN LOOK Scrollbar A-8 An OPEN LOOK ScrollingList widget A-9 An OPEN LOOK Notice A-10 An OPEN LOOK PopupWindow A-11 An OPEN LOOK Help window A-12 Look of a Motif application A-13 Class inheritance hierarchy of the Motif widget set A-14 Motif DrawnButton and PushButton widgets A-15 A Motif RowColumn widget configured as a MenuBar A-16 A Motif RowColumn widget configured with four RadioBoxes A-17 A Motif RowColumn widget configured as a drop-down window A-18 A Motif Form widget and children A-19 A Motif ScrollBar A-20 A Motif SelectionBox B-1 Multiple planes used to index a colormap B-2 A font name B-3 A typical font server configuration Examples 2-2 XHello: the app-defaults file 2-3 xgoodbye.c: complete code 2-4 XGoodbye: the app-defaults file 2-5 Using XtVaSetValues to set a widget resource 2-6 Using XtSetValues to set a widget resource 2-7 Code fragment to set multiple resources of a widget 2-8 Code fragment to get a widget resource using XtVaGetValues 2-9 Code fragment to get a widget resource using XtGetValues 2-10 Alternate resource settings for xgoodbye 3-1 xrowcolumn.c: complete code 3-2 XRowColumn: app-defaults file 3-3 xform: constraint resource settings added 3-4 xmainwindow.c: code for implementing standard Motif screen layout 3-5 Adding a File menu to an existing menubar 3-6 xmainwindow: creating a Help button and Help dialog box 3-7 XMainWindow: setting help text in the app-defaults file 3-8 Passing a single value to a callback function 3-9 Passing a pointer to a structure to a callback function 3-10 ANSI non-conformant callback function definition 3-11 The XmPushButtonCallbackStruct structure 3-12 Initializing a callback list 3-13 xbitmap: getting application resources 3-14 The resource list for xbitmap4 3-15 Calling XtGetApplicationResources and checking values 3-16 xbitmap: specifying command-line options 3-17 The R4 varargs interface to creating a widget 3-18 An argument list 3-19 Using an argument list in widget creation 3-20 Setting the argument list with XtSetArg 3-21 Incorrectly setting the argument list with XtSetArg 4-1 xbitmap1: complete code 4-2 XBitmap1: app-defaults file 4-3 xbitmap2: implementing small pixmaps with DrawingArea widgets 4-4 xbitmap2: creating pixmaps and GCs 4-5 xbitmap2: the CellToggled routine 4-6 xbitmap2: the RedrawSmallPicture routine 4-7 xbitmap2: writing a bitmap file 4-8 xbitmap3.c: adding a feature to a Primitive widget 4-9 An XtActionProc with widget and event arguments 4-10 A simple translation table 4-11 A complex translation table 4-12 XBitmap3: specifying translations in the app-defaults file 4-13 Code fragment: specifying translations in the program 4-14 A translation table with action parameters 4-15 xbitmap4: implementing the bitmap editor from the application 5-1 xcomstring.c: code to use multiple fonts in a compound string 5-2 xcomstring: app-defaults file 5-3 The .c file for a simple UIL application 5-4 The .uil file for a simple UIL application 6-1 BitmapEdiP.h: the class part and class record 6-2 BitmapEdiP.h: the instance part and instance record 6-3 BitmapEdiP.h: declaring the external class record 6-4 BitmapEdit.c: include files 6-5 BitmapEdit's resource list 6-6 Setting the resource list into the class structure 6-7 The default translation table and the actions table 6-8 Translations in the Core class record 6-9 BitmapEdit.c: function type declarations 6-10 BitmapEdit.c: initialization of Core class record 6-11 BitmapEdit.c: declaring the class record pointer 6-12 BitmapEdit.c: inheriting a self-contained method 6-13 Inheriting by invoking the superclass method from a widget method 6-14 BitmapEdit.h: complete public header file 7-1 The initialize method 7-2 Creating GCs from the initialize method 7-3 The expose method 7-4 The set values method 7-5 BitmapEdit: the resize method 7-6 The XtWidgetGeometry structure 7-7 BitmapEdit: the query geometry method 7-8 The destroy method 7-9 BitmapEdit: action routines 8-1 Installing accelerators in an application 8-2 Specifying the XtNaccelerators resource from the app-defaults file 8-3 Conflicting translations and accelerators 8-4 Installing accelerators from both command widgets 8-5 Accelerators resource settings for two widgets 9-1 Using an event hander to pop up a popup menu 9-2 Registering an event handler, and the handler function itself 9-3 Adding a nonmaskable event handler 9-4 Casting the event structure by declaring action routine arguments 9-5 Handling multiple event types in an action routine 9-6 Getting file input with XtAppAddInput 9-7 Reading stdin from an Xt application 9-8 xtetris: registering a timeout and the timeout function 9-9 xtetris: calling XtRemoveTimeOut 9-10 Registering an Xt work procedure 9-11 A work procedure to create a popup widget 9-12 Skeleton of a custom main loop 10-1 Three resources defined by the Motif Primitive widget 10-2 The resource file 10-3 An app-defaults file for the Spanish language 10-4 A user defaults file for color and monochrome screens 10-5 Setting fallback resources in XtAppInitialize 10-6 A sample merged resource database 10-7 Sample resource database with eliminated entries and components 10-8 Resource database after final elimination of entries and components 10-9 Resource database finalists in original form 10-10 A resource definition converting an integer to a pixmap 10-11 A resource definition using XmRImmediate 10-12 A resource definition using XmRCallProc 10-13 An example of an XtResourceDefaultProc 10-14 Registering a type converter 10-15 Adding a converter with arguments 10-16 Manually invoking a type converter 10-17 A simple type converter 10-18 Testing for a special-case default value 10-19 Simplified get values hook method of the AsciiSrc subpart of the Text widget 11-1 Setting the XmNinput resource of a Shell widget 11-2 Creating an icon pixmap, and setting XmNiconPixmap 11-3 BitmapEdit: actions that highlight selection 11-4 BitmapEdit: getting the atom for a widget-specific target type 11-5 BitmapEdit: action to paste a selection 11-6 BitmapEdit: converting the selection value 11-7 BitmapEdit: pasting selection in requestor callback function 11-8 BitmapEdit: the lose ownership proc 11-9 BitmapEdit: initializing Xmu's atom caching mechanism in the initialize method 11-10 BitmapEdit: converting standard targets in the convert proc 12-1 ScrollBox: the set values method 12-2 ScrollBox: the resize method 12-3 ScrollBox: the query geometry method 12-4 ScrollBox: private routine to lay out child widgets 12-5 A basic change managed method 12-6 A simple geometry manager method 12-7 Form: the Core resource list 12-8 Form: constraint resource list 12-9 Form: constraint data structure 12-10 Form: class structure initialization 12-11 Form: the Constraint initialize method 12-12 Form: the class part init method 12-13 Form: the geometry manager method 12-14 Form: private functions: RefigureLocations and the layout method 12-15 Form: the LayoutChild private function 12-16 Form: the resize method 12-17 Form: the change managed method 12-18 Form: the query geometry method 12-19 Form: the public function for delaying calls to change managed 13-1 Creating, placing, and popping up a popup menu 13-2 Adding a cascading submenu 13-3 xmenu1: complete code 13-4 XMenu1: the app-defaults file 13-5 xmenu2: code to place pulldown menu 13-6 XMenu2: translation portion of the app-defaults file 13-7 xmenu5: actions that place, pop up, and pop down main menus and sub-menus 13-8 XMenu5: translation portion of app-defaults file 13-9 xmenu7: using the SimpleMenu widget and its children 13-10 XMenu7: app-defaults file 13-11 Sme gadget: class part and complete class structure declaration 13-12 Sme gadget: instance part and complete instance structure declaration 13-13 SimpleMenu: expose method calling gadget children's expose method 13-14 SimpleMenu: resize method 13-15 SimpleMenu: the Notify action routine 13-16 SimpleMenu.c: Setting accepts objects in the Composite extension structure 14-1 How to invoke XtAppErrorMsg (from AsciiSrc.c) 14-2 Common fields in a class extension record 14-3 Adding editres support in an application 14-4 Establishing the locale in an Xt application B-1 Sample fonts.alias file B-2 a portion of the fonts.dir file in /usr/lib/X11/fonts/100dpi B-3 Listing scalable fonts B-4 Finding derived instances of scalable fonts B-5 Font name patterns that don't match scaled fonts B-6 Determining if a font is scalable B-7 Loading a derived instance of a scalable font E-1 BitmapEdit: complete widget code E-2 BitmapEdiP.h: complete private header file E-3 BitmapEdit.h: complete public header file E-4 xbitmap5: complete application code Tables 2-1 Functions that Set Resources: ArgList and varargs Counterparts 2-2 Core Resources 2-3 Label Resources 3-1 Motif Resource Type Strings 3-2 Standard Command-line Parameters 3-3 XrmOptionKind: Command-line Option Style Constants 5-1 XmCreate Functions 5-2 Built-in Motif Pixmaps 6-1 Resource List Constant Conventions 6-2 Inheritance Style of Various Methods 6-3 Summary of Xt Structure Name Conventions 7-1 XtWidgetGeometry request mode Symbols 7-2 XtWidgetGeometry stack mode Symbols 8-1 Event Type Abbreviations in Translation Tables 8-2 Notify Mode Values for Enter, Leave, and Focus Events 8-3 Atom Details for Various Events 8-4 Event Structure Fields Used As Translation Table Hints 8-5 Modifiers Used in Translation Tables 8-6 Modifier Symbols 9-1 Event Masks and Event Types 9-2 Event Types and Event Structures 9-3 Other Input Source Masks 10-1 Resource Type Strings 10-2 Built-in Type Converters from XmRString 10-3 Other Built-in Converters 10-4 Xmu Converters 11-1 Shell Resources 11-2 Target Types Suggested in ICCCM 12-1 Return Codes of geometry manager Method 14-1 Xt Error and Warning Message Utilities 14-2 Xt Routines That Use Default and Explicit Application Contexts 14-3 editres accelerators A-1 Comparison of Athena, OPEN LOOK, and Motif Widgets B-1 Geometry Specification: x and y Offsets D-1 Motif 1.1 Obsolete Functions and Replacements D-2 Obsolete Motif 1.1 Resources D-3 Obsolete Enumerated Values

Product Details

  • ISBN13: 9781565920132
  • ID: 9781565920132
  • ISBN10: 1565920139
  • edition: 2nd edition

Delivery Information

  • Saver Delivery: Yes
  • 1st Class Delivery: Yes
  • Courier Delivery: Yes
  • Store Delivery: Yes

Prices are for internet purchases only. Prices and availability in WHSmith Stores may vary significantly