Programming with MotifTMAbout this Book This book is a detailed introduction to programming with the OSF /MotifI'M graphical user interface. It is an introduction in that it does not require the reader to have experience programming in the X Window environment. It is detailed in that it teaches you how to use the interface components provided by Motif in a complex application. Although it contains a great deal of reference material, it is not meant as an authoritative reference - that is the job of the OSF/Motif Programmer's Reference, which uses over 900 pages in the process. Instead, this book provides its reference material in a practical, "how to" manner and allows the reader to use the Programmer's Reference effectively. The target reader is an experienced C programmer and user of the X Window System under the UNIX operating system. 'the reader should be familiar with the tools provided by UNIX for the compilation and testing of programs; while this book does examine the process by which a Motif program is compiled, it does not explain that process. It also assumes that the reader is familiar with "x" terms such as 'pointer' and 'display'. |
Contents
2 | |
11 | |
How Many Resource Files Could One Program Use? | 21 |
Writing A Motif Program | 27 |
Header Files | 34 |
Hello World | 42 |
The XmString Data Type | 48 |
Managers | 57 |
Menus | 261 |
The Menu Bar | 267 |
XmMenuShell and a Menu Panes Instance Tree | 276 |
Mnemonics | 282 |
Cascading PullDown Example | 288 |
Option Menus | 294 |
Menu Summary | 300 |
XmDialogShell | 307 |
XmBulletinBoard | 65 |
XmRoucolumn | 80 |
XmPanedWindou | 87 |
XmForm Examples | 100 |
Buttons | 107 |
2XmArrounButton | 115 |
XmToggleButton Examples | 122 |
Keyboard Input | 165 |
AmText | 172 |
AmText Callbacks | 179 |
XmText Convenience Functions | 185 |
Entry Fields | 192 |
Creating a Scrolled Text Widget | 198 |
Scrollbars | 205 |
Creating and Initializing a Scrolled Window | 211 |
XmScrollBar Callbacks | 219 |
XmScale Resources | 225 |
11 | 233 |
Building and Using a Dialog | 313 |
Message Boxes | 325 |
Using Xlib With Motif | 387 |
The Graphics Context | 393 |
AmDraupingArea | 401 |
Resources Revisited | 427 |
Resource Converters | 436 |
Writing a Converter | 444 |
Quarks | 452 |
The Conversion Cache | 459 |
Interclient Communication | 467 |
Appendix | 486 |
Appendix | 534 |
Appendix | 563 |
Appendix | 615 |
Glossary | 631 |
655 | |
Other editions - View all
Common terms and phrases
application shell appshell argc argv atom back XtCall back BOOlean XmRBOOlean Call Call_data callback callback function child Class Data Type Class Pointer client_data clipboard color colormap contains TRUE Data Type Rep default value dialog dialog box Display display event handler event was sent focus font Function prototype header file height ICCCM identified input int XmRInt invoked label String Label_1 Mask menu bar menu pane mnemonic Name Class Data Notify NULL parameter pixels Pixmap pointer button position printf prototyped in Listing pushbutton resize resource file resource specifies retrieved root window row-column scrollbar selection sent the event Short XmRShOrt strcmp text editor text widget translations Type definition Type Rep Type typedef struct unsigned char unsigned long Void widget class width window manager Window Window Xlib Xmapping XmBulletinBoard XmCCall back XtCall XmClipboard XmCreate XmLabel XmList XmManager XmRowColumn XmString XmText Xt Initialize XtCall back List XtSet