|
Next: Program Listing Of Up: Example Programs Previous: xbutton
Program Listing of Athena Version Of xbutton
/* xbutton.c - a very simple X Toolkit application, Jeff Pitchers, LUT 1993 */
/* Athena Toolkit version */
/* Include the necessary Athena Toolkit header files */
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Xaw/Command.h>
main(argc, argv)
int argc; char **argv;
{
XtAppContext ac;
Widget top, button;
int Stop();
top = XtVaAppInitialize(&ac, "XButton", NULL, 0, &argc, argv, NULL, NULL);
button = XtVaCreateManagedWidget("quit", commandWidgetClass, top, NULL);
XtAddCallback(button, XtNcallback, Stop, NULL);
XtRealizeWidget(top);
XtAppMainLoop(ac);
}
/* Callback routine when button is clicked */
/* ARGSUSED */
Stop(w, a, b)
Widget w; XtPointer a, b;
{
exit(0);
}
JR Pitchers Wed May 3 16:45:04 BST 1995 |
|||||||||||||||||
|
With any suggestions or questions please feel free to contact us | ||||||||||||||||||