Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtmail / MotifApp / QuestionDialogManager.C
1 /* $XConsortium: QuestionDialogManager.C /main/4 1996/04/21 19:40:33 drk $ */
2 /*
3  *+SNOTICE
4  *
5  *      RESTRICTED CONFIDENTIAL INFORMATION:
6  *      
7  *      The information in this document is subject to special
8  *      restrictions in a confidential disclosure agreement bertween
9  *      HP, IBM, Sun, USL, SCO and Univel.  Do not distribute this
10  *      document outside HP, IBM, Sun, USL, SCO, or Univel wihtout
11  *      Sun's specific written approval.  This documment and all copies
12  *      and derivative works thereof must be returned or destroyed at
13  *      Sun's request.
14  *
15  *      Copyright 1993 Sun Microsystems, Inc.  All rights reserved.
16  *
17  *+ENOTICE
18  */
19
20 ///////////////////////////////////////////////////////////////////////////////
21 //////////////////////////////////////////////////////////////////////////////
22 //         This example code is from the book:
23 //
24 //           Object-Oriented Programming with C++ and OSF/Motif
25 //         by
26 //           Douglas Young
27 //           Prentice Hall, 1992
28 //           ISBN 0-13-630252-1 
29 //
30 //         Copyright 1991 by Prentice Hall
31 //         All Rights Reserved
32 //
33 //  Permission to use, copy, modify, and distribute this software for 
34 //  any purpose except publication and without fee is hereby granted, provided 
35 //  that the above copyright notice appear in all copies of the software.
36 ///////////////////////////////////////////////////////////////////////////////
37 //////////////////////////////////////////////////////////////////////////////
38
39
40 ///////////////////////////////////////////////////////////
41 // QuestionDialogManager.C: 
42 //////////////////////////////////////////////////////////
43 #include "QuestionDialogManager.h"
44 #include <Xm/Xm.h>
45 #include <Xm/MessageB.h>
46
47 #ifdef DEAD_WOOD
48 // Define an instance to be available throughout the framework.
49
50 QuestionDialogManager *theQuestionDialogManager = 
51     new QuestionDialogManager ( "QuestionDialog", "QuestionDialog" );
52 #endif /* DEAD_WOOD */
53
54 QuestionDialogManager::QuestionDialogManager ( char   *name ) : 
55                                  DialogManager ( name )
56 {
57     // Empty
58 }
59
60 Widget QuestionDialogManager::createDialog ( Widget parent )
61 {
62     Widget dialog = XmCreateQuestionDialog ( parent, _name, NULL, 0);
63     
64     XtVaSetValues ( dialog,
65                    XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL,
66                    NULL );
67     
68     return dialog;
69 }