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 #ifndef _IBMMainWindow_h
16 #define _IBMMainWindow_h
17 
18 
19 #include <Xm/Xm.h>
20 #include "MainWindow.h"
21 
22 
23 //
24 // Class name definition:
25 //
26 #define ClassIBMMainWindow	"IBMMainWindow"
27 
28 //
29 // XtCallbackProc (*CB), XtEventHandler (*EH) and XtActionProc (*AP)
30 // DialogCallback (*DCB) functions for this and derived classes
31 //
32 extern "C" void IBMMainWindow_HelpCB(Widget, XtPointer, XtPointer);
33 
34 class Command;
35 class CommandInterface;
36 class WizardDialog;
37 
38 #if 0
39 //
40 // Customized help callback reason:
41 //
42 #define DxCR_HELP	9001
43 #endif
44 
45 
46 //
47 // IBMMainWindow class definition:
48 //
49 class IBMMainWindow : public MainWindow
50 {
51   private:
52     //
53     // XmNhelpCallback callback routine for this class:
54     //
55     static boolean ClassInitialized;
56 
57     Command	     	*helpOnContextCmd;
58     Command		*helpOnWindowCmd;
59     Command		*helpAboutAppCmd;
60     Command		*helpTechSupportCmd;
61     CommandInterface 	*onContextOption;
62     CommandInterface 	*onHelpOption;
63     CommandInterface 	*onManualOption;
64     CommandInterface 	*onWindowOption;
65     CommandInterface 	*aboutAppOption;
66     CommandInterface 	*techSupportOption;
67 
68 #if 0
69     friend void IBMMainWindow_HelpCB(Widget    widget,
70 			     XtPointer clientData,
71 			     XtPointer callData);
72 #endif
73 
74   protected:
75     //
76     // These resources are expected to be loaded by the derived classes.
77     //
78     static String DefaultResources[];
79 
80     //
81     // Protected member data:
82     //
83     Widget 		helpMenu;
84     Widget 		helpMenuPulldown;
85 
86 
87     //
88     // Create the help pulldown and add the standard menu options.
89     //
90     virtual void createBaseHelpMenu(Widget parent,
91 				boolean add_standard_options = TRUE,
92 				boolean addAboutApp = FALSE);
93     //
94     // Constructor for the subclasses:
95     //
96     IBMMainWindow(const char* name, boolean hasMenuBar = TRUE);
97 
98     //
99     // Install the default resources for this class and then call the
100     // same super class method to get the default resources from the
101     // super classes.
102     //
103     virtual void installDefaultResources(Widget baseWidget);
104 
105     WizardDialog* wizardDialog;
106     virtual void postWizard();
107 
108   public:
109 
110     //
111     // Destructor:
112     //
113     ~IBMMainWindow();
114 
115 
116     //
117     // Call the super-class method and then install the help callback on
118     // the main window.
119     //
120     virtual void initialize();
121 
122     //
123     // ...also posts the wizard if necesary
124     //
125     virtual void manage();
126 
127     //
128     // Returns a pointer to the class name.
129     //
getClassName()130     const char* getClassName()
131     {
132 	return ClassIBMMainWindow;
133     }
134 };
135 
136 
137 #endif // _IBMMainWindow_h
138