from RAZ: ruler dialog box
[nvi.git] / motif_l / m_prompt.c
blob964798c759931cceefa75b6b7348bdf71b96ebf9
1 /*-
2 * Copyright (c) 1996
3 * Rob Zimmermann. All rights reserved.
4 * Copyright (c) 1996
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
8 */
10 #include "config.h"
12 #ifndef lint
13 static const char sccsid[] = "$Id: m_prompt.c,v 8.4 1996/12/11 20:58:24 bostic Exp $ (Berkeley) $Date: 1996/12/11 20:58:24 $";
14 #endif /* not lint */
16 #include <X11/X.h>
17 #include <X11/Intrinsic.h>
18 #include <Xm/MessageB.h>
20 #include "m_motif.h"
21 #include "m_extern.h"
24 void vi_fatal_message( parent, str )
25 Widget parent;
26 String str;
28 Widget db = XmCreateErrorDialog( parent, "Fatal", NULL, 0 );
29 XmString msg = XmStringCreateSimple( str );
31 XtVaSetValues( XtParent(db),
32 XmNtitle, "Fatal",
35 XtVaSetValues( db,
36 XmNmessageString, msg,
39 XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
41 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
42 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
44 __vi_modal_dialog( db );
46 exit(0);
50 void vi_info_message( parent, str )
51 Widget parent;
52 String str;
54 static Widget db = NULL;
55 XmString msg = XmStringCreateSimple( str );
57 if ( db == NULL )
58 db = XmCreateInformationDialog( parent, "Information", NULL, 0 );
60 XtVaSetValues( XtParent(db),
61 XmNtitle, "Information",
64 XtVaSetValues( db,
65 XmNmessageString, msg,
68 XtAddCallback( XtParent(db), XmNpopdownCallback, __vi_cancel_cb, 0 );
70 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_CANCEL_BUTTON ) );
71 XtUnmanageChild( XmMessageBoxGetChild( db, XmDIALOG_HELP_BUTTON ) );
73 __vi_modal_dialog( db );