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 _SetVectorAttrDialog_h
16 #define _SetVectorAttrDialog_h
17 
18 
19 #include "SetScalarAttrDialog.h"
20 
21 
22 //
23 // Class name definition:
24 //
25 #define ClassSetVectorAttrDialog	"SetVectorAttrDialog"
26 
27 //
28 // XtCallbackProc (*CB), XtEventHandler (*EH) and XtActionProc (*AP)
29 // DialogCallback (*DCB), XtInputCallbackProc (*ICP), XtWorkProc (*WP)
30 // functions for this and derived classes
31 //
32 extern "C" void SetVectorAttrDialog_ComponentOptionCB(Widget, XtPointer, XtPointer);
33 extern "C" void SetVectorAttrDialog_StepperCB(Widget, XtPointer, XtPointer);
34 
35 
36 //
37 // SetVectorAttrDialog class definition:
38 //
39 class SetVectorAttrDialog : public SetScalarAttrDialog
40 {
41   private:
42     //
43     // Private member data:
44     //
45     friend void SetVectorAttrDialog_StepperCB(Widget  widget,
46 			XtPointer clientData,
47 			XtPointer callData);
48     friend void SetVectorAttrDialog_ComponentOptionCB(Widget  widget,
49 			XtPointer clientData,
50 			XtPointer callData);
51 
52     static boolean ClassInitialized;
53 
54     Widget createComponentPulldown(Widget parent, const char *name);
55 
56   protected:
57     //
58     // Protected member data:
59     //
60     static String DefaultResources[];
61 
62     Widget	allComponents;
63     Widget	selectedComponent;
64     Widget 	componentOptions;
65     Widget 	componentStepper;
66 
67     //
68     // Build the interactive set attributes widgets that sit in the dialog.
69     //
70     virtual void createAttributesPart(Widget parentDialog);
71 
72     //
73     // Get the current component number.
74     //
75     virtual int getCurrentComponentNumber();
76 
77     //
78     // Get whether or not the which component option is set.
79     // Return TRUE if set to 'All Components'
80     //
81     boolean isAllAttributesMode();
82 
83     //
84     // Install the default resources for this class and then call the
85     // same super class method to get the default resources from the
86     // super classes.
87     //
88     virtual void installDefaultResources(Widget baseWidget);
89 
90   public:
91     //
92     // Constructor:
93     //
94     SetVectorAttrDialog(Widget parent, const char *title, ScalarInstance *si);
95 
96 
97     //
98     // Destructor:
99     //
100     ~SetVectorAttrDialog();
101 
102     //
103     // Returns a pointer to the class name.
104     //
getClassName()105     const char* getClassName()
106     {
107 	return ClassSetVectorAttrDialog;
108     }
109 };
110 
111 
112 #endif // _SetVectorAttrDialog_h
113