[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Programmer's Guide



Including Header Files

All Motif applications must include the file <Xm/Xm.h>. This file contains definitions that all applications need. It also includes the Xt header files <X11/Intrinsic.h> and <X11/StringDefs.h>.

Each Motif widget also has an #include file. An application must include the header files for all widgets it creates. In addition, some groups of Motif routines have their own header files. For example, an application that uses any of the Motif clipboard routines must include the file <Xm/CutPaste.h>. Required #include files for each Motif widget and routine are documented in the Motif Programmer's Reference.

Following is an example of including header files for an application that uses only a Text widget:

#include <Xm/Xm.h>
#include <Xm/Text.h>

Instead of using a large number of header files for particular widgets and routines, an application can include <Xm/XmAll.h>. This file incorporates all documented Motif header files.


[ Previous | Next | Contents | Glossary | Home | Search ]