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 #ifndef _ColormapAddCtlDialog_h
15 #define _ColormapAddCtlDialog_h
16 
17 
18 #include "Dialog.h"
19 
20 //
21 // Class name definition:
22 //
23 #define ClassColormapAddCtlDialog	"ColormapAddCtlDialog"
24 
25 //
26 // XtCallbackProc (*CB), XtEventHandler (*EH) and XtActionProc (*AP)
27 // DialogCallback (*DCB), XtInputCallbackProc (*ICP), XtWorkProc (*WP)
28 // functions for this and derived classes
29 //
30 extern "C" void ColormapAddCtlDialog_LevelRangeCB(Widget, XtPointer, XtPointer);
31 extern "C" void ColormapAddCtlDialog_ValueRangeCB(Widget, XtPointer, XtPointer);
32 extern "C" void ColormapAddCtlDialog_AddCB(Widget, XtPointer, XtPointer);
33 
34 class ColormapEditor;
35 
36 //
37 // ColormapAddCtlDialog class definition:
38 //
39 
40 class ColormapAddCtlDialog : public Dialog
41 {
42   private:
43     //
44     // Private member data:
45     //
46     static Boolean ClassInitialized;
47 
48   protected:
49     //
50     // Protected member data:
51     //
52     static String  DefaultResources[];
53     friend void ColormapAddCtlDialog_AddCB(Widget, XtPointer , XtPointer);
54     friend void ColormapAddCtlDialog_ValueRangeCB(Widget, XtPointer , XtPointer);
55     friend void ColormapAddCtlDialog_LevelRangeCB(Widget, XtPointer , XtPointer);
56 
57     ColormapEditor* editor;
58 
59     Widget valuestepper;
60     Widget valuelabel;
61     Widget levelstepper;
62     Widget levellabel;
63     Widget addbtn;
64 
65     Widget createDialog(Widget);
66 
67     //
68     // Install the default resources for this class and then call the
69     // same super class method to get the default resources from the
70     // super classes.
71     //
72     virtual void installDefaultResources(Widget baseWidget);
73 
74   public:
75 
76     //
77     // Constructor:
78     //
79     ColormapAddCtlDialog(Widget parent,ColormapEditor* editor);
80 
81     //
82     // Destructor:
83     //
84     ~ColormapAddCtlDialog();
85 
86     void        setStepper();
87     void        setFieldLabel(int);
88 
89     //
90     // Returns a pointer to the class name.
91     //
getClassName()92     const char* getClassName()
93     {
94 	return ClassColormapAddCtlDialog;
95     }
96 };
97 
98 
99 #endif // _ColormapAddCtlDialog_h
100