home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
n
/
newmarch.zip
/
ARROW_QU.C
next >
Wrap
C/C++ Source or Header
|
1992-09-08
|
2KB
|
60 lines
/* Author: $Author: jan $
* File: $Source: /usr/usrs/jan/desktop/X_Book.boo/programs/RCS/arrow_quit.c,v $
* Date: $Date: 1992/09/09 00:09:46 $
* Revision: $Revision: 1.1 $
*/
#include "copyright.h"
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include <Xm/ArrowB.h>
char Class_name[] = "Arrow";
void quitX (w, client_d, call_d)
Widget w;
caddr_t client_d, call_d;
{
printf ("arrow was pushed\n");
exit (0);
}
main (argc, argv)
int argc;
char **argv;
{
Widget toplevel, arrow_widget;
Arg wargs[2]; /* wargs not really used here */
/* Initialize the intrinsics with
a toplevel widget */
toplevel = XtInitialize (NULL, /* application
name */
Class_name, /* class name */
NULL, /* options */
0, /* number of
options */
&argc, argv);
/* Create an arrow widget with the
toplevel as manager;
*/
arrow_widget = XmCreateArrowButton (
toplevel, /* parent */
"an_arrow", /* name */
wargs, /* resource
arguments */
0); /* number
of args */
XtManageChild (arrow_widget);
XtAddCallback (arrow_widget, XmNarmCallback,
quitX, NULL);
/* display all of the widgets */
XtRealizeWidget (toplevel);
/* enter the main processing loop */
XtMainLoop ();
}