1 /*********************************************************************** 2 Widgetklasse: XwHistspectrWidgetClass 3 4 $Revision: 2.1 $ 5 6 $Log: WhistspectrP.h,v $ 7 Revision 2.1 2003/12/27 13:41:22 keidel 8 Whistspectr added 9 10 11 12 13 14 Copyright 2003, WizAnt Software 15 J�rgen Keidel 16 Bergstrasse 15 17 D 85080 Gaimersheim 18 Tel: D 08406 379 19 E-mail: wizant.keidel@freenet.de 20 21 22 Permission to use, copy, modify, and to distribute this software 23 and its documentation for any purpose is hereby granted without 24 fee, provided that the above copyright notice appear in all 25 copies and that both that copyright notice and this permission 26 notice appear in supporting documentation. There is no 27 representations about the suitability of this software for 28 any purpose. this software is provided "as is" without express 29 or implied warranty. 30 31 Date: Tue Dec 9 08:07:30 CET 2003 32 33 34 35 ***********************************************************************/ 36 37 #ifndef _histspectr_h 38 #define _histspectr_h 39 40 41 #include <Xm/PrimitiveP.h> 42 #include <Xm/DrawingAP.h> 43 #include <Whistspectr.h> 44 45 #ifdef __cplusplus 46 extern "C" { 47 #endif 48 /*Histspectr class structure */ 49 50 #define minsize 64 51 typedef struct _XwHistspectrClassPart 52 { 53 XtPointer extension; /* Pointer to extension record */ 54 } XwHistspectrClassPart; 55 56 57 /* Full class record declaration for wHistspectr class */ 58 59 typedef struct _XwHistspectrClassRec { 60 CoreClassPart core_class; 61 XmPrimitiveClassPart primitive_class; 62 XwHistspectrClassPart histspectr_class; 63 } XwHistspectrClassRec, *XwHistspectrWidgeteClass; 64 65 66 externalref XwHistspectrClassRec xwHistspectrClassRec; 67 68 /* wHistspectr instance record */ 69 70 #ifndef _ScScale_ 71 typedef struct { 72 double at; 73 double bt; /* scaling timeaxis */ 74 double ax; 75 double bx; /* scaling abscissa */ 76 double ay; 77 double by; /* scaling ordinate */ 78 }ScScale; 79 #define _ScScale_ 80 #endif 81 82 83 84 85 typedef struct _XwHistspectrPart 86 { 87 /* public part */ 88 Pixel background; /* color */ 89 Pixel anncolor; /* color of annotation*/ 90 Pixel fillcolor; /* colour as pixel */ 91 Pixel linecolor; /* shadecolour as pixel */ 92 int Angle; /* Angle of history axis (90 to 0 degrees */ 93 float *vis; /* scaling info of visible part array min/max as x y*/ 94 float *gr; /* grid base and delta x/t/y*/ 95 int tndecimals; /* number of decimals for annotation */ 96 long int tnthgridanno; /* annotation every nth gridline abscissa*/ 97 int yndecimals; /* number of decimals for annotation */ 98 long int ynthgridanno; /* annotation every nth gridline ordinate*/ 99 int xndecimals; /* number of decimals for annotation */ 100 long int xnthgridanno; /* annotation every nth gridline abscissa*/ 101 float marker; 102 short int anflag; /* flag where annotation , 0 NO , 1 y left, time right */ 103 short int lines; /* curve as lines or points */ 104 short int autoscale; /* fgs for autoscaling */ 105 short int dofixtext; /* allow setting of fixed text */ 106 XmFontList font_list; /* fontlist for annotation */ 107 XFontStruct *font_struct; 108 XtCallbackList expose_callback; 109 XtCallbackList resize_callback; 110 111 /* private part */ 112 Dimension oldx; /* last abscissa position in pixels */ 113 Dimension oldy; /* last ordinate position in pixels */ 114 float foldx; 115 float foldy; 116 float lasttim; 117 Dimension Xpos; /* bar position in visible window */ 118 char *fixtext; /* if no zero && not empty draw fix text */ 119 XPoint *curve; /* internal storage for curve */ 120 int curvepoint; /* allocate storage for curve */ 121 Dimension width; 122 Dimension height; /* own visible dimensions, used for resize */ 123 Dimension xv; 124 Dimension yv; /* own visible dimensions if outside bar area 125 start */ 126 Dimension annsiz; /* size of annotation pixmap */ 127 Dimension pixwidth; 128 Dimension pixheight; /* dimensions of pixmap */ 129 double angle; /* angle of time-axis in radians */ 130 float prevgrid; /* actual last grid start */ 131 int lastanncnt; 132 GC gc; /* graphic context */ 133 GC anngc; /* graphic context annotation */ 134 Pixmap pix; /* pixmap for histspectr */ 135 Pixmap panno; /* pixmap for histspectr annotation */ 136 ScScale sc; /* Scaling to pixels */ 137 int mark; 138 int exposed; 139 double Xoffset; 140 double Yoffset; 141 }XwHistspectrPart; 142 143 /* Full instance record declaration */ 144 145 typedef struct _XwHistspectrRec { 146 CorePart core; 147 XmPrimitivePart primitive; 148 XwHistspectrPart histspectr; 149 } XwHistspectrRec, *XwHistspectrWidget; 150 151 #ifdef __cplusplus 152 } /* Close scope of 'extern "C"' declaration which encloses file. */ 153 #endif 154 155 #endif /* _XwHistspectrP_h */ 156 /* DON'T ADD ANYTHING AFTER THIS #endif */ 157