28 Additional Example Programs
This appendix provides some additional example programs that illustrate techniques not discussed in the body of the
book.
This appendix contains a number of programs that provide more realistic examples of how the Motif toolkit is used.
Most of the examples are also intended to encourage further investigation into other X−related topics, such as the use
of app−defaults files, fallback resources, and command−line option parsing. Our discussion of the examples is fairly
limited; see the comments in the code for explanations of various implementation details.
28.1 A Postcard Interface for Mail
The first example provides a GUI wrapper for a mail program. The user−interface model is that of a postcard. The
program does not provide any facilities for reading mail messages; it simply allows the user to compose and send one
message at a time. Before compiling the program shown in the source code check the definition of MAIL_CMD. If you
don't have zmail on your system, set the value to the name of the mail agent you normally use.
XtSetLanguageProc() is only available in X11R5; there is no corresponding function in X11R4.
XmStringCreateLocalized() is only available in Motif 1.2; XmStringCreateSimple() is the
corresponding function in Motif 1.1. XmFONTLIST_DEFAULT_TAG replaces XmSTRING_DEFAULT_CHARSET in
Motif 1.2.
/* Written by Dan Heller. Copyright 1991, 1993, Z−Code Software Corp.
* This program is freely distributable without licensing fees and
* is provided without ...