UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cgn.h
1 #if !defined(__N_CGN_H_)
2 #define __N_CGN_H_
3 #include <xg_def.h>
4 #include <tables.h>
5 #include <Ymath.h>
6 #include <axis.h>
7 
8 extern XClientMessageEvent* YClientEvent;
9 typedef union {
10  float f[5];
11  int i[5];
12  short s[10];
13  char c[20];
14  } FISC;
15 
16 #define ClearVCurve 0x2000
17 #define DataVCurve 0x2001
18 #define CheckOutV 0x2002
19 #define CheckInV 0x2003
20 #define CheckOutVOk 0x2004
21 #define CheckInVOk 0x2005
22 #define EndInV 0x2006
23 #define EndOutV 0x2007
24 #define ClientInput 0x2008
25 
26 #define BeforSetNewDrawingFile 0
27 #define BeforSetTypeData 1
28 #define BeforSetFL_DATA 2
29 #define BeforSetVS_DATA 3
30 #define BeforSetPL_DATA 4
31 #define BeforSetWN_DATA 5
32 #define BeforSetSZ_DATA_F 6
33 #define BeforSetSZ_DATA_L 7
34 #define BeforSetVW_DATA 8
35 #define Beforpicture 9
36 
37 #define AfterChangeW_DATA 0x100
38 #define AfterRedrawTrace 0x200
39 #define AfterHiTrace 0x400
40 #define Afterpicture 0x800
41 #define AfterPicture 0x800
42 
43 
44 #define MainType 1
45 #define SizeType 2
46 #define PalType 3
47 #define AltType 4
48 
49 #ifndef SHORT_DATA
50 #define SHORT_DATA 1 /* needs for define 'irl' value */
51 #define LONG_DATA 2
52 #define INT_DATA 2
53 #define REAL_DATA 3
54 #define FLOAT_DATA 3
55 #define DOUBLE_DATA 4
56 #define CHAR_DATA 5
57 #endif
58 
59 #define MUT_FIL 0x0080
60 #define PAL_FIL 0x0100
61 #define RED_FIL 0x0200
62 
63 #define SELECT_FILE 0x01
64 #define SELECT_ALT 0x02
65 
66 #define foreve while(1)
67 
68 #define NRM_ 0x01 /* data is norm */
69 #define VEL_READ_ 0x20 /* data is norm */
70 
71 #define PXL_ 0x02 /* n pixel on trass*/
72 #define MUT_ 0x04 /* set mute */
73 #define PICT_ 0x01 /* new picture */
74 #define SHFT_ 0x08 /* shift picture */
75 #define OLD_ 0x10 /* prev data */
76 
77 #define VIEW_1 0x0001
78 #define VIEW_2 0x0002
79 #define VIEW_3 0x0004
80 #define VIEW_4 0x0008
81 #define VIEW_5 0x0020
82 #define VIEW_34 (VIEW_3|VIEW_4)
83 #define VIEW_12 (VIEW_1|VIEW_2)
84 #define VIEW_13 (VIEW_1|VIEW_3)
85 #define VIEW_15 (VIEW_1|VIEW_5)
86 #define VIEW_H 0x0010
87 #define VIEW_2H 0x0012
88 #define VIEW_1H 0x0011
89 #define VIEW_12H 0x0013
90 #define VIEW_5H 0x0030
91 #define VIEW_15H 0x0031
92 
93 
94 #define SCALE_VALUES 0x02
95 #define SCALE_COLORS 0x04
96 #define GRAPH_COLORS 0x08
97 #define GRAPH_COLORS 0x08
98 #define SCALE_COEF 0x10
99 #define PAL_OK 0x0e
100 #define SCALE_NEW 0x1000
101 
102 
103 #ifndef MINMAX
104 #define max(a,b) (((a) > (b)) ? (a) : (b))
105 #define min(a,b) (((a) < (b)) ? (a) : (b))
106 #define MINMAX
107 #endif
108 
109 typedef struct
110  {
111  int flag;
112  int color;
113  short x, y;
114  } CrossCursor;
115 typedef struct
116  {
117  short x1 ,y1, x2, y2;
118  } LINE_INDEX;
119 
120 #define BACK 0x01
121 #define NEXT_X 0x02
122 typedef struct {
123  short fcode,anno_adr;
124  short currentNM,deltaI;
125  int currentI,XCrd;
126  } SGR_INF;
127 
128 typedef struct {
129  int ix;
130  int XCrd;
131  int Xc,XcS;
132  } SGR_DATA;
133 
134 typedef struct {
135  int n;
136  short nm, flag;
137  int XCrd;
138  SGR_DATA d[4];
139  } SGR_HEAD;
140 
141 extern SGR_INF SgrInf;
142 
143 #define N_STRUCT 4
144 #define N_XPOINT 2000
145 #define N_YPOINT 2000
146 #define N_COLOR 48
147 #define O_KEY 0
148 
149 /*ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo*/
150 typedef struct {
151  short cod_form; /* 1 */
152  short first_select; /* 2 */
153  long number_spectr; /* 3 - 4 */
154  short MaxTr; /* 5 */
155  short ogt; /* 6 */
156  short num_ogt; /* 7 */
157  short exceed; /* 8 */
158  short Xcoor; /* 9 */
159  short Ycoor; /* 10 */
160  short f_time; /* 11 */
161  short l_time; /* 12 */
162  short tr[15]; /* 13-27 */
163  } VSCS3;
164 
165 typedef struct {
166  int scs5[30];
167  char spec[4] ; /* 1 */
168  char typ_spec[4]; /* 2 */
169  long flag; /* 3 */
170  long num_analiz; /* 4 */
171  long num_gt; /* 5 */
172  long Xcoor; /* 6 */
173  long max_s; /* 7 */
174  long init_t; /* 8 */
175  long len_win; /* 9 */
176  long dt; /* 10 */
177  long num_win; /* 11 */
178  long init_v; /* 12 */
179  long delta_v; /* 13 */
180  long delta_a; /* 14 */
181  long num_v; /* 15 */
182  } VSCS4;
183 typedef struct {
184  int scs5[30];
185  char spec[4] ; /* 1 */
186  char typ_spec[4]; /* 2 */
187  long nn; /* 3 */
188  long val1; /* 4 */
189  long valN; /* 5 */
190  long step; /* 6 */
191  long NElem; /* 7 */
192  long init_t; /* 8 */
193  long last_t; /* 9 */
194  long dt; /* 10 */
195  long LMax; /* 11 */
196  long num_win; /* 12 */
197  long nTV; /* 13 */
198  long mode; /* 14 */
199  long num_v; /* 15 */
200  } VALV;
201 typedef struct {
202  short number,nn; /* 1 */
203  } VLMAP_H;
204 
205 typedef struct {
206  long number1; /* first cdp */ /* 1 */
207  long n_y; /* 2 */
208  long n_x; /* 3 */
209  long step; /* 0 1 */ /* 4 */
210  long number2; /* last cdp */ /* 5 */
211  long mode; /* 1 for me */ /* 6 */
212  long t1; /* 7 */
213  long dt; /* 8 */
214  long unnone1; /* 9 */
215  long unnone2; /* 10 */
216  } VLMAP;
217 
218 
219 typedef union {
220  VSCS3 v3;
221  VSCS4 v4;
222  VALV vv;
223  } VSCS;
224 
225 typedef struct {
226  float k;
227  float omega;
228  } KOmega;
229 typedef struct {
230  int numberFK;
231  float BGR;
232  int n;
233  float coef;
234  KOmega fk[1];
235  } FTDATA;
236 
237 #define RECORD_NUMBER 0
238 #define TRACE_NUMBER 1
239 #define ORIGINAL_NUMBER 4
240 #define X_COORDINATE 105
241 #define SOURCE_X_COORDINATE 5
242 #define CDP_X_COORDINATE 6
243 #define GROUP_X_COORDINATE 7
244 #define OFFSET 8
245 #define Y_COORDINATE 119
246 #define SOURCE_Y_COORDINATE 19
247 #define CDP_Y_COORDINATE 20
248 #define GROUP_Y_COORDINATE 21
249 #define PROGRAM_NUMBER 29
250 #define ANNO_V 17
251 
252 typedef struct {
253  long nmgl, ntr; /* 1 - 2 */
254  long size, act, nsp; /* 3 - 5 */
255  long xsp, xdp, xop; /* 6 - 8 */
256  long l; /* 9 */
257  char ftr[2],code[2]; /* 10 ( 2 ) */
258  long tbc, tec, tba, tea, dt; /* 11 - 15 */
259  long lkey; /* 16 */
260  char mod[4]; /* 17 */
261  long ver, lext; /* 18 - 19 */
262  long ysp, ydp, yop, ext, fmgl; /* 20 - 24 */
263  } SMG;
264 
265 typedef struct {
266  long record_number; /* 1 */
267  long trace_number; /* 2 */
268  long size, act; /* 3 - 4 */
269  long original_number; /* 5 */
270  long source_x_coordinate; /* 6 */
271  long cdp_x_coordinate; /* 7 */
272  long group_x_coordinate; /* 8 */
273  long offset; /* 9 */
274  long form; /* 10 */
275  long tbc, tec, tba, tea, dt; /* 11 - 15 */
276  long lkey; /* 16 */
277  long verr; /* 17 */
278  long ver, lext; /* 18 - 19 */
279  long source_y_coordinate; /* 20 */
280  long cdp_y_coordinate; /* 21 */
281  long group_y_coordinate; /* 22 */
282  long ext, fmgl; /* 23 - 24 */
283  long Gr_x,Gr_y; /* 25 - 26 */
284  char TestName[8]; /* 27 - 28 */
285  long TestValue; /* 29 */
286  long ProgramNumber; /* 30 */
287  } SMG5;
288 struct _W_DATA;
289 #ifdef _NO_PROTO_
290 typedef int (*EventFunction)();
291 typedef int (*ModifyBuf)();
292 typedef int (*ModifyTrace)();
293 typedef int (*SetSizeData)();
294 #else
295 typedef int (*EventFunction)(YDraw* yd, int key,int eType);
296 typedef int (*ModifyBuf)(struct _W_DATA* wd, char* buf,int tr,int n);
297 typedef int (*ModifyTrace)(struct _W_DATA* wd, char* buf,int tr,int i1,int i2,int n);
298 typedef int (*SetSizeData)(struct _W_DATA* wd);
299 #endif
300 /*-------------------------------------------------------------------------*/
301 typedef struct _DATA_S
302  {
303  short type,handle;
304  void* data;
305  EventFunction EF; /* old EF */
306  struct _DATA_S* ds; /* old DATA_S */
307  struct _W_DATA* wd; /* current W_DATA */
308  YDraw* yd; /* current YDraw */
309  } DATA_S;
310 typedef struct {
311  int x,y;
312  } XY;
313 
314 #define DEF_SIZE 0x01
315 #define DEF_WIN 0x02
316 #define DEF_PAL 0x04
317 
318 typedef struct {
319  int set;
320  short width,height;
321  int sz_set;
322  int x1, y1, x2, y2;
323  short pix_trs, skip;
324  short gap, n_gap;
325  short pl_set, mc;
326  char NamePal[20];
327  short alt[N_COLOR], num[N_COLOR];
328  int foreground, background, hi_color;
329  float coef;
330  short zmin, zmax;
331  short color1,color2;
332  short color1_,color2_;
333  short scy;
334  short c_view;
335  float t1,t2,v1,v2;
336  } DEF_DATA;
337 
338 typedef struct {
339 #define SZ_DATA_F 0x02
340 #define SZ_DATA_L 0x04
341 #define PIXEL_TRACE 0x08
342 #define MAX_SPACE 0x10
343 #define F_COEF 0x20
344 #define SZ_DATA_OK (SZ_DATA_F | SZ_DATA_L | F_COEF)
345  int set;
346  int x1, y1, x2, y2;
347  short pix_trs, skip;
348  short gap, n_gap; /* pixel/traces, skip traces,gaps */
349  } SZ_DATA;
350 
351 
352 typedef struct {
353  short fv_set,Fgst;
354  int max_ix, max_iy; /* extreme indexes */
355  float ymin, y_incr; /* parameters y-scale */
356  short norm, nx;
357  float xmin, x_incr, v_incr; /* parameters x-scale */
358  short k_block, n_block; /* velan numbers of blocks */
359  int gmin,gmax,gst[100];
360  char test, anno; /* testing, type of annotation */
361  } FV_DATA;
362 
363 #define CodSGRMS_ 1
364 #define CodSECTS_ 2
365 #define CodVELAN_ 3
366 #define CodTAU_F_ 4
367 #define CodFRQ_K_ 5
368 #define CodSPEED_ 6
369 #define CodDELTA_ 7
370 #define CodVLMAP_ 8
371 #define CodDEPTH_ 9
372 #define TVELX_ 10
373 #define CodPT0_ 11
374 #define CodFT_ 12
375 
376 #define SGRMS_ 0x01 /* needs for define 'type' value */
377 #define SECTS_ 0x02
378 #define SPEED_ 0x04
379 #define VELAN_ 0x08
380 #define TAU_F_ 0x10
381 #define FRQ_K_ 0x20
382 #define DELTA_ 0x40
383 #define VLMAP_ 0x80
384 #define DEPTH_ 0x100
385 #define SEC_ (SECTS_|DEPTH_)
386 #define VEL_ (VELAN_|TAU_F_|FRQ_K_|DELTA_)
387 #define SGR_ (SGRMS_|SECTS_|SPEED_|DEPTH_)
388 #define SGR_V (SGR_ |VLMAP_)
389 #define ALL_TYPES 0x3ff
390 
391 #define XT_PLANE 1
392 #define YT_PLANE 2
393 #define XY_PLANE 3
394 
395 typedef struct {
396  char plane,cube,c3,c4;
397  short XTpix,YTpix,XYpix;
398  int Xcoor,Ycoor;
399  short annoX,annoY;
400  int XTy, XTx1,XTt1,XTx2,XTt2;
401  int YTx, YTy1,YTt1,YTy2,YTt2;
402  int XYt, XYx1,XYy1,XYx2,XYy2;
403  int max_ix, max_iy, max_it;
404  int max_ind;
405  float xmin,x_incr;
406  float ymin,y_incr;
407  float tmin,t_incr;
408  int* greed;
409  } CUBE_DATA;
410 
411 #ifndef _NO_PROTO_
412 typedef int (*W_DATA_CB)(int key,struct _W_DATA* wd);
413 typedef int (*DATA_TOXY)(struct _W_DATA* wd,double xy);
414 extern int SetValuesBefor_(int key,struct _W_DATA* wd);
415 extern int SetValuesAfter_(int key,struct _W_DATA* wd);
416 extern struct _W_DATA*
417  SetW_DATADraw(int id,YDraw* yd,CallB MainCB,CallB ScHCB,CallB ScVCB);
418 #else
419 typedef int (*W_DATA_CB)();
420 typedef int (*DATA_TOXY)();
421 extern int SetValuesBefor_();
422 extern int SetValuesAfter_();
423 extern struct _W_DATA*
424  SetW_DATADraw();
425 #endif
426 
427 typedef struct
428  {
429  short type,mode;
430  char file_name[80]; /* file parameters */
431  long file_len; /* file parameters */
432  FS_Loc* fsl;
433  short file_handle,head; /* file parameters */
434  int bytes,First_head;
435  char extrm, irl; /* data INT, REAL, LONG */
436  char sds5Format,sds5Tab;
437  short sgrmode,fcode; /* fcode */
438  CUBE_DATA cd;
439  void* buf; /* file data */
440  short* grd; /* graph data */
441  int sizegrd,NotRead;
442  short NotNeedSave,s_handle;
443  } FL_DATA;
444 
445 #define WIND_OK 0x01
446 #define PICTURE_OK 0x02
447 #define SHIFT_PICTURE 0x04
448 #define AX_X_ 0x01 /* draw x-axis */
449 #define AX_Y_ 0x02 /* draw y-axis */
450 #define ScrollX 0x10 /* draw x-ScrollBar */
451 #define ScrollY 0x20 /* draw y-ScrollBar */
452 #define _Xaxis 0x04
453 #define _Yaxis 0x08
454 #define VW_DATA_OK (WIND_OK|PICTURE_OK)
455 
456 typedef struct
457  {
458  char set, axis;
459  char c_view, o_view;
460  short scy; /* scale of amlitude */
461  } VW_DATA; /* View Data */
462 
463 typedef struct
464  {
465  /* TauFCB(), KinCB(), VelCB(), */
466 /* 0 */ CallB JobCB; /* WaveCB() */
467 /* 1 */ CallB ClickCB;
468 /* 2 */ CallB PlotModeCB;
469 /* 3 */ CallB ZoomCB;
470 
471 /* 4 */ CallB ContrCB; /*------- Control Block -------*/
472 /* 5 */ CallB AmplifyCB;
473 /* 6 */ CallB ScaleCB;
474 /* 7 */ CallB PlWinCB; /* SGRHCB(), VelHCB(), WavHCB(), */
475  /* CubHCB(), FKHCB(); */
476 /* 8 */ CallB SetColorsCB;
477 /* 9 */ CallB ListHeadCB;
478 /* a */ CallB GreedCB;
479 /* b */ CallB InfoCB;
480 /* c */ CallB DefaultCB;
481 /* d */ CallB HardCopyCB; /*--- End Control Block -------*/
482 
483 /* e */ CallB MainMnstrCB;
484  YType* MainMnstr;
485  YType* StatMnstr;
486  YType* WorkMnstr;
487  YType* ClickMnstr;
488  int WorkPlace;
489  int DataTypes; /* for ChangeFileCB();
490  VELAN_|TAU_F_|FRQ_K_|DELTA_|SGRMS_|SECTS_|SPEED_|DEPTH_ */
491  char DefSize,DefColor,DefWinSize;
492  } J_DATA;
493 #define WN_SIZE 1
494 #define HI_BUF 2
495 
496 #define XY_Plane 1 /* For XY SECTS_ */
497 typedef struct _W_DATA
498  {
499  short type,mode; /* FL_DATA fl; */
500  char file_name[80]; /* file parameters */
501  long file_len; /* file parameters */
502  FS_Loc* fsl;
503  short file_handle,head; /* file parameters */
504  int bytes,First_head;
505  char extrm, irl; /* data INT, REAL, LONG */
506  char sds5Format,sds5Tab;
507  short sgrmode,fcode; /* fcode */
508  CUBE_DATA cd;
509  void* buf; /* file data */
510  short* grd; /* graph data */
511  int sizegrd,NotRead;
512  short NotNeedSave,s_handle;
513 
514  char wn_set,r_win,a_win,inp_win; /* WN_DATA wn; */
515  Axis_DATA a;
516  short wx1, wy1, wx2, wy2;
517  short gx_, gy_;
518  YDraw* yd;
519  short id,ResizeExposeFlag;
520  EventFunction EF;
521  ModifyBuf MB;
522  ModifyTrace MT;
523  SetSizeData SizeDataF; /* SetSZ_DATA_F */
524  SetSizeData SizeData;
525  DATA_S* ds;
526  X_Box ZXBox;
527 
528  int sz_set; /* SZ_DATA sz; */
529  int x1, y1, x2, y2;
530  short pix_trs, skip; /* pixel/traces, skip traces */
531  short gap, n_gap; /* gaps */
532  short ix, iy; /* max index of l_x or line_x */
533  float XiCoef,YiCoef; /* index Coef */
534  float XcCoef,YcCoef; /* coordinate Coef */
535  int XAbsInd,YAbsInd;
536  int XMaxInd,YMaxInd;
537  int x_hi,hi;
538 
539  char vw_set, axis; /* VW_DATA vw; */
540  char c_view, o_view; /* View types: current/new,old */
541  short scy,redraw; /* scale of amlitude */
542 
543  short fv_set,Fgst; /* FV_DATA fv; */
544  int max_ix, max_iy; /* extreme indexes */
545  int min_x, max_x; /* for data cub */
546  float ymin, y_incr; /* parameters y-scale */
547  float xmin, x_incr, v_incr; /* parameters x-scale */
548  short norm, nx;
549  short k_block, n_block; /* velan numbers of blocks */
550  short test, anno; /* test, type of annotation */
551  int deltaT; /* for DELTA */
552  char* XcoorName;
553 
554  short pl_set, mc; /* PL_DATA pl; */
555  char NamePal[20];
556  short alt[N_COLOR], num[N_COLOR];
557  int foreground, background, hi_color;
558  float coef;
559  short zmin, zmax;
560  short color1,color2;
561  short color1_,color2_;
562  int gmin,gmax,gst[100];
563  YCursor cursor;
564  DATA_TOXY DataToX;
565  DATA_TOXY DataToY;
566  void* add_DATA;
567  J_DATA j;
568  } W_DATA;
569 
570 typedef struct {
571  char type,p2;
572  char Load_1;
573  W_DATA* wd;
574  W_DATA* wd_vel;
575  int x0,x;
576  float t0,dt,t;
577  float v0,dv,v;
578  float v_max,v_amp;
579  short Nv,Nt,n12,Nx;
580  short Delta,Delta2;
581  float ff1,ff2,f12;
582  float t1,t2,t12,St;
583  float* smooth;
584  float* f1;
585  float* f2;
586  short* buf;
587  } SGR_AN;
588 
589 typedef struct
590  {
591  int t1,nt; /* */
592  int x1,nx;
593  } BOX_AN;
594 /*
595 #define SHORT_DATA 1 /* needs for define 'irl' value
596 #define LONG_DATA 2
597 #define REAL_DATA 3
598 */
599 typedef struct
600  {
601  BOX_AN b1,b2;
602  short handle,irl;
603  int head,length;
604  float dt;
605  float fh; /* min = 5 max = 0.5/dt(sec) */
606  double ret;
607  } DECREMENT_AN;
608 
609 typedef struct
610  {
611  int set;
612  int n_wind;
613  int wind;
614 /* Default data */
615  int pix_trs, skip; /* pixel/traces, skip traces */
616  int sgr_view;
617  int vel_view;
618  int pxm_view;
619  char NamePalSGR[20];
620  char NamePalSEC[20];
621  char NamePalVEL[20];
622  int color1,color2;
623  int color1_,color2_;
624  int hi_color;
625  unsigned char SGR_anno,SEC_anno,CUBE_anno,SPEED_anno;
626  YDraw* yd[N_STRUCT];
627  } M_DATA;
628 
629 typedef struct {
630  short t,v;
631  } TV;
632 typedef struct {
633  float t,v;
634  } fTV;
635 
636 typedef struct {
637  int XTV;
638  int QTV;
639  int YTV;
640  } TV_H;
641 
642 #define N_TV 48
643 typedef struct {
644  int XTV;
645  int QTV;
646  int YTV;
647  TV tv[N_TV];
648  } TV_RUL;
649 #ifdef _NO_PROTO_
650 TV_RUL* r_pass();
651 int w_pass();
652 #else
653 TV_RUL* r_pass(char* namepas,char *namefile);
654 int w_pass(char* namepas,char* namefile,TV_RUL* tvr);
655 #endif
656 typedef struct {
657  float* X;
658  float* Y;
659  short* Z;
660  short nn,kk;
661  int flag;
662  } DATA_P;
663 
664 extern int VelBoundary();
665 typedef struct {
666  EventFunction EF;
667  YDraw* yd;
668  W_DATA* wd;
669  int (*Boundary)();
670  int fg,bg,fg_,bg_;
671  short fcode,handle;
672  short ax1,ax2,ay1,ay2;
673  short gx1,gx2,gy1,gy2;
674  short x1, x2, y1, y2;
675  short x,y,xo,yo,linF,i;
676  char FistColor,InitVel,SaveInPixmap,
677  Refresh;
678  } VEL_DATA;
679 
680 /*==========================================================================*/
681 #ifndef _NO_PROTO_
682 int RefreshW_Data (W_DATA* wd);
683 int create_image (W_DATA* wd);
684 int SetNewSize(W_DATA* wd,int x1,int y1,int x2,int y2,int flag);
685 int ShiftPictureV(W_DATA* wd,int value);
686 int ShiftPictureH(W_DATA* wd,int value);
687 int init_data(W_DATA* wd);
688 int SetWindowSize(W_DATA* wd);
689 extern int ContrCB(int); /*------- Control Block -------*/
690 extern int AmplifyCB(int);
691 extern int ScaleCB(int);
692 extern int PlWinCB(int);
693 extern int VelHCB(int);
694 extern int CubHCB(int);
695 extern int FKHCB(int);
696 extern int SGRHCB(int);
697 extern int WavHCB(int);
698 extern int SetColorsCB(int);
699 extern int ListHeadCB(int);
700 extern int GreedCB(int);
701 extern int DefaultCB(int);
702 extern int InfoCB(int);
703 extern int HardCopyCB(int);
704  /*--- End Control Block -------*/
705 extern int MainMnstrCB(int);
706 extern int ZoomCB(int);
707 extern int PlotModeCB(int);
708 extern int ChangeFileCB(int);
709 extern int TauFCB(int);
710 extern int KinCB(int);
711 extern int SKinCB(int);
712 extern int SgrmsCB(int);
713 extern int VelCB(int);
714 extern int SVelCB(int);
715 extern int WaveCB(int);
716 extern int MainDrawCB(int);
717 extern int MainDrawScCB(int);
718 #else
719 int RefreshW_Data();
720 int create_image();
721 int SetNewSize();
722 int ShiftPictureV();
723 int ShiftPictureH();
724 int init_data();
725 int SetWindowSize();
726 extern int ContrCB(); /*------- Control Block -------*/
727 extern int AmplifyCB();
728 extern int ScaleCB();
729 extern int PlWinCB();
730 extern int VelHCB();
731 extern int CubHCB();
732 extern int FKHCB();
733 extern int SGRHCB();
734 extern int WavHCB();
735 extern int SetColorsCB();
736 extern int ListHeadCB();
737 extern int GreedCB();
738 extern int DefaultCB();
739 extern int InfoCB();
740 extern int HardCopyCB();
741  /*--- End Control Block -------*/
742 extern int MainMnstrCB();
743 extern int ZoomCB();
744 extern int PlotModeCB();
745 extern int ChangeFileCB();
746 extern int TauFCB();
747 extern int KinCB();
748 extern int SKinCB();
749 extern int SgrmsCB();
750 extern int SVelCB();
751 extern int VelCB();
752 extern int WaveCB();
753 extern int MainDrawCB();
754 extern int MainDrawScCB();
755 #endif
756 
757 /***************** DATA defined in xg_graph.c *****************************/
758 /*---------------- Defined in xg_graph.c ----------------------------*/
759 #ifndef _NO_PROTO_
760 int topo(W_DATA* pl,short* z_buf,int m_x,int n_x,
761  short* line_y,short* line_x,int vw,int d_x,int d_y);
762 int DrawSGR12(W_DATA* wd,int* l_x,int* l_y,short *line_x,short *line_y,
763  int y1,int x1,int x2,int y2);
764 void clearDATApicture(W_DATA* wd) ;
765 #else
766 int topo();
767 int DrawSGR12();
768 void clearDATApicture() ;
769 #endif
770 
771 
772 /***************** DATA defined in xg_main.c *********************/
773 extern VSCS vel;
774 extern SMG5 sgr;
775 extern VLMAP VM;
776 extern M_DATA md;
777 extern W_DATA Wdata[N_STRUCT];
778 extern LINE_INDEX LIndex1;
779 extern short line_x[],line_y[];
780 extern int l_x[],l_y[];
781 extern char* ReadBuf;
782 #ifdef __N_GETFILE_H_
783 extern GET_FILE_STRUCT Change_F;
784 #endif
785 extern int MaxColor;
786 extern int* ColorIndex;
787 
788 extern char* CallPath;
789 /*------------------------ defined in xg_file.c ----------------------------*/
790 int SetWildcard();
791 int IfWildcard();
792 int OpenFile();
793 void CloseFile();
794 int ConvNtoBytes();
795 int GetIrl();
796 int ReadTrass();
797 int ReadBlock();
798 int WriteBlock();
799 int ReadHeadSGR();
800 
801 /*------------------------ defined in xg_main.c ----------------------------*/
802 int SetSZ_DATA_F();
803 int SetSZ_DATA_L();
804 void SetCurrentStruct();
805 int SetTypeData();
806 int BadFormat();
807 int set_altitude();
808 int SetW_Data();
809 
810 /*-------------------------------------------------------------------------*/
811 #ifdef _NO_PROTO_
812 char* GetNameAnno();
813 int GetAnnoSgr();
814 int GetAnnoType();
815 int GetNextAnnoSgr();
816 int GetLRAnnoSgr();
817 void axis_X();
818 double DataAxisX();
819 void axisX();
820 void axisY();
821 int SetSZ_DATA_L();
822 #else
823 char* GetNameAnno(W_DATA* wd,int adr);
824 int GetAnnoSgr(W_DATA* wd,int tr,int nm);
825 int GetAnnoType(W_DATA* wd,int ix1,int anno,int* eq);
826 int GetNextAnnoSgr(W_DATA* wd,int tr,int nm,int flag);
827 int GetLRAnnoSgr(W_DATA* wd,int *tr,int nm,int flag);
828 void axis_X(W_DATA* wd,int ix1,int ix2,int anno);
829 double DataAxisX(W_DATA* wd,double f);
830 void axisX(W_DATA* wd,double xmin,double xmax,char *ct);
831 void axisY(W_DATA* wd,double ymin,double ymax,char *ct);
832 int SetSZ_DATA_L(W_DATA* wd);
833 #endif
834 
835 /*---------------------- Defined in xg_line.c ------------------------------*/
836 
837 #ifdef _NO_PROTO_
838 int CheckValueI();
839 int XDataToInd();
840 int YDataToInd();
841 double XIndToData();
842 double YIndToData();
843 int GetHeadSize();
844 int SetFL_DATA();
845 int XToInd();
846 W_DATA* GetCurrentStruct();
847 int CheckSaveFile();
848 int XToFileInd();
849 int YToFileInd();
850 int FileIndToX();
851 int FileIndToY();
852 int GetAbsInd_line_x();
853 double GetAbs_line_x();
854 int GetAbsInd_line_y();
855 double GetAbs_line_y();
856 int DataToX();
857 int DataToY();
858 double XToData();
859 double YToData();
860 int XGDrawDCursors();
861 int DrawXGCursor();
862 W_DATA* TypeToW_DATA();
863 float GetVelLineV();
864 double TVOToTime();
865 
866 #else
867 int CheckValueI(int value,int mi,int ma);
868 int XDataToInd(W_DATA* wd,double x);
869 int YDataToInd(W_DATA* wd,double y); /* t -> index */
870 double XIndToData(W_DATA* wd,double i); /* index -> t */
871 double YIndToData(W_DATA* wd,double i);
872 int GetHeadSize(W_DATA* wd);
873 int SetFL_DATA(W_DATA* wd);
874 int XToInd(W_DATA* wd,int x);
875 W_DATA* GetCurrentStruct();
876 int CheckSaveFile(W_DATA* wd,int type,int *n1,int *n2);
877 int XToFileInd(W_DATA* wd,int x);
878 int YToFileInd(W_DATA* wd,int y);
879 int FileIndToX(W_DATA* wd,double fi);
880 int FileIndToY(W_DATA* wd,double fi);
881 int GetAbsInd_line_x(W_DATA* wd,double i);
882 double GetAbs_line_x(W_DATA* wd,double i);
883 int GetAbsInd_line_y(W_DATA* wd,double i);
884 double GetAbs_line_y(W_DATA* wd,double i);
885 int DataToX(W_DATA* wd,double dx);
886 int DataToY(W_DATA* wd,double dy);
887 double XToData(W_DATA* wd,int x);
888 double YToData(W_DATA* wd,int y);
889 int XGDrawDCursors(W_DATA* wd, double x,double y);
890 int DrawXGCursor(YDraw *yd,YCursor* cur,int x,int y,int flag);
891 W_DATA* TypeToW_DATA(int type);
892 float GetVelLineV(DATA_P* d,int defV,double tv);
893 double TVOToTime(double t,double v,double o);
894 
895 #endif
896 
897 extern double TinyData;
898 
899 
900 
901 #include <xg_mes.h>
902 extern char* DefName;
903 #define RDMTAB FsGetTab
904 #define WRMTAB FsPutTab
905 #define RDPAS FsGetPas
906 #define WRPAS FsPutPas
907 
908 #endif
909 
Definition: cgn.h:265
Definition: cgn.h:128
Definition: cgn.h:427
Definition: cgn.h:252
Definition: cgn.h:183
Definition: cgn.h:301
Definition: cgn.h:165
Definition: cgn.h:589
Definition: getfile.h:50
Definition: ymprog.h:1019
Definition: cgn.h:9
Definition: cgn.h:122
Definition: cgn.h:225
Definition: cgn.h:352
Definition: cgn.h:229
Definition: cgn.h:632
Definition: cgn.h:318
Definition: cgn.h:134
Definition: cgn.h:150
Definition: cgn.h:463
Definition: ygraph.h:86
Definition: cgn.h:115
Definition: cgn.h:201
Definition: cgn.h:395
Definition: cgn.h:643
Definition: cgn.h:656
Definition: cgn.h:205
Definition: cgn.h:609
Definition: axis.h:16
Definition: ygraph.h:100
Definition: cgn.h:629
Definition: ymprog.h:649
Definition: cgn.h:665
Definition: cgn.h:338
Definition: cgn.h:599
Definition: cgn.h:310
Definition: cgn.h:456
Definition: cgn.h:109
Definition: cgn.h:570
Definition: cgn.h:219
Definition: cgn.h:636
Definition: cgn.h:497