1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 
9 #include <dxconfig.h>
10 #include "../base/defines.h"
11 
12 
13 
14 
15 #include "DXStrings.h"
16 #include "OpenFileDialog.h"
17 #include "Application.h"
18 #include <Xm/Text.h>
19 #include <Xm/SelectioB.h>
20 
21 
22 boolean OpenFileDialog::ClassInitialized = FALSE;
23 
24 String OpenFileDialog::DefaultResources[] =
25 {
26         "*dirMask:         *.mb",
27         "*textColumns:     30",
28         "*dialogTitle:     Open a Module Builder file...",
29         NULL
30 };
31 
OpenFileDialog(MBMainWindow * mbmw)32 OpenFileDialog::OpenFileDialog(MBMainWindow *mbmw ) :
33                        FileDialog("openFileDialog", mbmw->getRootWidget())
34 {
35     //
36     // Install the default resources for THIS class (not the derived classes)
37     //
38     if (NOT OpenFileDialog::ClassInitialized)
39     {
40 	ASSERT(theApplication);
41         OpenFileDialog::ClassInitialized = TRUE;
42 	this->installDefaultResources(theApplication->getRootWidget());
43     }
44     this->mbmw = mbmw;
45     this->hasCommentButton = False;
46 }
47 
48 //
49 // Install the default resources for this class.
50 //
installDefaultResources(Widget baseWidget)51 void OpenFileDialog::installDefaultResources(Widget baseWidget)
52 {
53     this->setDefaultResources(baseWidget, OpenFileDialog::DefaultResources);
54     this->FileDialog::installDefaultResources(baseWidget);
55 }
56 
okFileWork(const char * string)57 void OpenFileDialog::okFileWork(const char *string)
58 {
59     this->mbmw->openMB((char *)string);
60 }
61 
62