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 _XmColorMapEditor_h 15 #define _XmColorMapEditor_h 16 17 #include "XmDX.h" 18 19 #if defined(__cplusplus) || defined(c_plusplus) 20 extern "C" { 21 #endif 22 23 24 extern WidgetClass xmColorMapEditorWidgetClass; 25 26 typedef struct _XmColorMapEditorClassRec * XmColorMapEditorWidgetClass; 27 typedef struct _XmColorMapEditorRec * XmColorMapEditorWidget; 28 29 typedef struct { 30 double min_value; 31 double max_value; 32 int reason; 33 int hue_selected; 34 int sat_selected; 35 int val_selected; 36 int op_selected; 37 int num_points; 38 int num_hue_points; 39 int num_sat_points; 40 int num_val_points; 41 int num_op_points; 42 double *data; 43 double *op_data; 44 double *hue_values; 45 double *sat_values; 46 double *val_values; 47 double *op_values; 48 int selected_area; 49 } XmColorMapEditorCallbackStruct; 50 51 typedef struct { 52 int field; 53 int count; 54 double *level; 55 double *value; 56 } ControlPointStruct; 57 58 59 /* Declare types for convenience routine to create the widget */ 60 extern 61 Widget XmCreateColorMapEditor (Widget parent, String name, 62 ArgList args, Cardinal num_args); 63 64 extern 65 void CMEStep(Widget w, int nsteps, Boolean use_selected); 66 67 extern 68 void CMESquareWave(Widget w, int nsteps, Boolean start_on_left, 69 Boolean use_selected); 70 71 extern 72 void CMESawToothWave(Widget w, int nsteps, Boolean start_on_left, 73 Boolean use_selected); 74 75 76 extern 77 void CMEAddControlPoint(Widget w, double level, double value, Boolean above); 78 79 extern 80 void XmColorMapEditorLoad(Widget cmew, double min, double max, 81 int nhues, double *hues, 82 int nsats, double *sats, 83 int nvals, double *vals, 84 int nopat, double *opat); 85 86 extern 87 void XmColorMapEditorLoadHistogram(Widget w, int *bins, int num_bins); 88 89 extern 90 Boolean XmColorMapEditorHasHistogram(Widget w); 91 92 93 extern 94 void XmColorMapReset(Widget w); 95 96 97 extern 98 void XmColorMapSelectAllCP(Widget w); 99 100 101 extern 102 void XmColorMapEditorDeleteCP(Widget w); 103 104 105 extern 106 Boolean XmColorMapEditorSave(Widget w, char *filename); 107 108 109 extern 110 Boolean XmColorMapEditorRead(Widget w, char *filename); 111 112 #ifdef SPLINE 113 114 extern 115 void XmColorMapSpline(Widget w); 116 117 118 extern 119 void XmColorMapSplinePoints(Widget w); 120 #endif 121 122 extern 123 Boolean XmColorMapUndoable(Widget w); 124 extern 125 void XmColorMapUndo(Widget w); 126 127 extern 128 Boolean XmColorMapPastable(); 129 130 extern 131 void XmColorMapPaste(Widget w); 132 133 extern 134 void XmColorMapCopy(Widget w); 135 136 extern 137 void XmColormapSetHSVSensitive(Widget w, Boolean b); 138 extern 139 void XmColormapSetOpacitySensitive(Widget w, Boolean b); 140 141 #define HUE 0 142 #define SATURATION 1 143 #define VALUE 2 144 #define OPACITY 3 145 146 #define CME_GRID 0 147 #define CME_HISTOGRAM 1 148 #define CME_LOGHISTOGRAM 2 149 150 #define XmPRINT_SELECTED 0 151 #define XmPRINT_ALL 1 152 #define XmPRINT_NONE 2 153 154 #if defined(__cplusplus) || defined(c_plusplus) 155 } 156 #endif 157 158 #endif 159