Free Programming E-Books
Free download ebooks on computer and programming | |||
Oreilly Free ebook : Volume 6A & 6B: Motif Reference Manual, 2nd EditionPrefaceThis book describes how to write applications using the Motif toolkit from the Open Software Foundation (OSF). The Motif toolkit is based on the X Toolkit Intrinsics (Xt), which is the standard mechanism on which many of the toolkits written for the X Window System are based. Xt provides a library of user-interface objects called widgets and gadgets, which provide a convenient interface for creating and manipulating X windows, colormaps, events, and other cosmetic attributes of the display. In short, widgets can be thought of as building blocks that the programmer uses to construct a complete application. However, the widgets that Xt provides are generic in nature and impose no user-interface policy whatsoever. That is the job of a user-interface toolkit such as Motif. Motif provides a complete set of widgets designed to implement the application look and feel specified in the Motif Style Guide and the Motif Application Environment Specification. The book provides a complete programmer's guide to the Motif toolkit. While the OSF/Motif toolkit is based on Xt, the focus of the book is on Motif itself, not on the Intrinsics.Detailed information about Xt is provided by Volume 4, and references are made to that volume throughout the course of this book. You are not required to have Volume 4 in order to use this book effectively, as the books are not companion volumes, but complementary ones. However, truly robust applications require a depth of knowledge about Xt and Xlib, the layer on which Xt itself is based, that is not addressed in this book alone. We never leave you completely in the dark about Xt or Xlib functions that we use or reference, but you won't learn everything there is to know about them through this particular volume. Download free ebook : Oreilly--Volume_6A_&_6B:_Motif_Reference_Manual_2nd_Edition.pdf
Previous Free Ebook Previous part of free ebook Next Free Ebook Next part of free ebook This book covers Motif 2.1, which is the latest major release of the Motif toolkit. Motif 2.1 is based on Release 6 of the Xlib and Xt specifications (X11R6). This release of Motif provides many new features, as well as a number of enhancements to existing functionality. All of the changes in Motif 2.1 are summarized in Chapter 3, which provides references to other sections that describe the changes in more detail.
The PlotThere are several plots and subplots in this book and the stories told are intertwined. Our primary goal is to help you learn about the Motif environment from both the programmer's and the user's perspectives. However, we are talking to you as a programmer, not as a user.We treat the user as a third party who is not with us now. In order to create an application for the user, you sometimes have to assume her role, so at times we may ask you to play such a role to help you think about things from the user's perspective rather than the programmer's.Each chapter begins by discussing the goals that Motif is trying to achieve using a particular widget or gadget. For example, before we describe how to create a FileSelectionDialog, we introduce the object visually and conceptually, discuss its features and drawbacks, and put you in the role of the user. Once you understand what the user is working with, you should have a better perspective on the task of presenting it to her. The next subplot is that of application design. Many design concepts transcend the graphical user interface (GUI) and are common to all programs that interact with users. You could even interpret this book as a programmer's guide that happens to use Motif as an example. As you read the material, you should stop and think about how you might approach a particular interface method if you were using another toolkit instead of Motif. A wild concept, perhaps, but this approach is the key to better application design and to toolkit independence. If Motif changes in a later release, or if you decide to port your application to another toolkit or even another windowing system, the more generalized your code is, the easier it will be to bring it into a new realm successfully. The last story we are telling is that of general programming technique. By providing you with examples of good programming habits, styles, and usages, we hope to propagate a programming methodology that has proven to be successful over the years. These techniques have been applied to applications that have been ported to multiple architectures and operating systems. As an added bonus, we have thrown in a number of interesting programming tricks. No, these are not hacks, but conveniences that are particular to C, to UNIX, or even to the X Window System. We don't focus on these things, but they are made available to you in passing, so you should have no problem identifying them when they come up. This book is intended to be used as a programmer's manual, not a reference manual. Volume 6B, contains reference material for all of the Motif library functions and widget classes. We have tried to identify those features of the toolkit that are most important for general discussion, so we do not discuss every aspect of the Motif toolkit in the body of this book. Any major software development effort, especially in its early stages, has bugs that prevent certain features from being used and the Motif toolkit is no exception. There are some bugs in the Motif toolkit that have not yet been worked out, but this does not imply that the toolkit is poorly written or riddled with errors. Throughout the book, we try to alert you to any potential problems you may encounter due to bugs. In some cases, there are things that work in Motif, but they are poorly designed, and we don't recommend that you use them. Again, we provide an explanation of what's going on and sometimes describe an alternative solution. There are also some features, resources, and functions available in the toolkit that are not supported by OSF. OSF reserves the right to change anything not publicly documented, so rather than discuss undocumented features, we simply ignore them. We should also point out that this book is not intended to solve all your problems or answer all your questions concerning Motif or its toolkit. It is not going to spoon feed you by giving you step-by-step instructions on how to achieve a particular task. You are encouraged, and even expected, to experiment on your own with the example applications or, better yet, with your own programs. We want to provide you with discussion and examples that provoke you into asking questions like, "What would happen if I changed this program to do this?" It would be unrealistic to believe that we could address every problem that might come up. Rather than approaching situations using overly specific examples, we discuss them in a generalized way that should be applicable to many different scenarios | |||