home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
m
/
master12.zip
/
mastering
/
Newapp
/
ExitDialog.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-08-19
|
1KB
|
47 lines
/* ExitDialog.c -- This file contains CreateExitDialog(), a convenienc
function for creating newapp's Exit dialog. */
#include "Global.h"
#include "Dialog.h"
/******************************************************************************
C r e a t e E x i t D i a l o g
******************************************************************************/
Widget CreateExitDialog(parent)
Widget parent;
{
Widget dialog;
XmString title, message;
/* Create the XmStrings needed for creating the dialog. */
title = XmStringCreateSimple ("New Application - Exit");
message = XmStringCreateSimple ("Exit New Application?");
/* Create the dialog widget. */
ac = 0;
XtSetArg(al[ac], XmNdialogTitle, title); ac++;
XtSetArg(al[ac], XmNmessageString, message); ac++;
XtSetArg(al[ac], XmNtransient, True); ac++;
XtSetArg(al[ac], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); ac++;
XtSetArg(al[ac], XmNnoResize, True); ac++;
dialog = XmCreateQuestionDialog (parent, "exitDialog", al, ac);
/* Remove the Help button (since there is no help available). */
XtUnmanageChild (XmMessageBoxGetChild(dialog, XmDIALOG_HELP_BUTTON));
/* Add the callback for the OK button. */
XtAddCallback (dialog, XmNokCallback, DialogCB, DIALOG_Exit_OK);
/* Free the memory used to create the original XmStrings. */
XmStringFree (title);
XmStringFree (message);
/* Return the widget ID of the dialog. */
return (dialog);
}