1 #if !defined(__N_CGN_H_)
8 extern XClientMessageEvent* YClientEvent;
16 #define ClearVCurve 0x2000
17 #define DataVCurve 0x2001
18 #define CheckOutV 0x2002
19 #define CheckInV 0x2003
20 #define CheckOutVOk 0x2004
21 #define CheckInVOk 0x2005
23 #define EndOutV 0x2007
24 #define ClientInput 0x2008
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
37 #define AfterChangeW_DATA 0x100
38 #define AfterRedrawTrace 0x200
39 #define AfterHiTrace 0x400
40 #define Afterpicture 0x800
41 #define AfterPicture 0x800
59 #define MUT_FIL 0x0080
60 #define PAL_FIL 0x0100
61 #define RED_FIL 0x0200
63 #define SELECT_FILE 0x01
64 #define SELECT_ALT 0x02
66 #define foreve while(1)
69 #define VEL_READ_ 0x20
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)
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
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
100 #define SCALE_NEW 0x1000
104 #define max(a,b) (((a) > (b)) ? (a) : (b))
105 #define min(a,b) (((a) < (b)) ? (a) : (b))
117 short x1 ,y1, x2, y2;
123 short fcode,anno_adr;
124 short currentNM,deltaI;
144 #define N_XPOINT 2000
145 #define N_YPOINT 2000
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
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
258 long tbc, tec, tba, tea, dt;
262 long ysp, ydp, yop, ext, fmgl;
269 long original_number;
270 long source_x_coordinate;
271 long cdp_x_coordinate;
272 long group_x_coordinate;
275 long tbc, tec, tba, tea, dt;
279 long source_y_coordinate;
280 long cdp_y_coordinate;
281 long group_y_coordinate;
290 typedef int (*EventFunction)();
291 typedef int (*ModifyBuf)();
292 typedef int (*ModifyTrace)();
293 typedef int (*SetSizeData)();
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);
314 #define DEF_SIZE 0x01
327 short alt[N_COLOR], num[N_COLOR];
328 int foreground, background, hi_color;
332 short color1_,color2_;
339 #define SZ_DATA_F 0x02
340 #define SZ_DATA_L 0x04
341 #define PIXEL_TRACE 0x08
342 #define MAX_SPACE 0x10
344 #define SZ_DATA_OK (SZ_DATA_F | SZ_DATA_L | F_COEF)
357 float xmin, x_incr, v_incr;
358 short k_block, n_block;
359 int gmin,gmax,gst[100];
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
396 char plane,cube,c3,c4;
397 short XTpix,YTpix,XYpix;
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;
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);
417 SetW_DATADraw(
int id,
YDraw* yd,CallB MainCB,CallB ScHCB,CallB ScVCB);
419 typedef int (*W_DATA_CB)();
420 typedef int (*DATA_TOXY)();
421 extern int SetValuesBefor_();
422 extern int SetValuesAfter_();
433 short file_handle,head;
434 int bytes,First_head;
436 char sds5Format,sds5Tab;
442 short NotNeedSave,s_handle;
446 #define PICTURE_OK 0x02
447 #define SHIFT_PICTURE 0x04
454 #define VW_DATA_OK (WIND_OK|PICTURE_OK)
491 char DefSize,DefColor,DefWinSize;
503 short file_handle,head;
504 int bytes,First_head;
506 char sds5Format,sds5Tab;
512 short NotNeedSave,s_handle;
514 char wn_set,r_win,a_win,inp_win;
516 short wx1, wy1, wx2, wy2;
519 short id,ResizeExposeFlag;
523 SetSizeData SizeDataF;
524 SetSizeData SizeData;
547 float xmin, x_incr, v_incr;
549 short k_block, n_block;
556 short alt[N_COLOR], num[N_COLOR];
557 int foreground, background, hi_color;
561 short color1_,color2_;
562 int gmin,gmax,gst[100];
625 unsigned char SGR_anno,SEC_anno,CUBE_anno,SPEED_anno;
653 TV_RUL* r_pass(
char* namepas,
char *namefile);
654 int w_pass(
char* namepas,
char* namefile,
TV_RUL* tvr);
664 extern int VelBoundary();
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,
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);
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);
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);
726 extern int ContrCB();
727 extern int AmplifyCB();
728 extern int ScaleCB();
729 extern int PlWinCB();
735 extern int SetColorsCB();
736 extern int ListHeadCB();
737 extern int GreedCB();
738 extern int DefaultCB();
740 extern int HardCopyCB();
742 extern int MainMnstrCB();
744 extern int PlotModeCB();
745 extern int ChangeFileCB();
749 extern int SgrmsCB();
753 extern int MainDrawCB();
754 extern int MainDrawScCB();
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) ;
768 void clearDATApicture() ;
777 extern W_DATA Wdata[N_STRUCT];
779 extern short line_x[],line_y[];
780 extern int l_x[],l_y[];
781 extern char* ReadBuf;
782 #ifdef __N_GETFILE_H_
786 extern int* ColorIndex;
788 extern char* CallPath;
804 void SetCurrentStruct();
815 int GetNextAnnoSgr();
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);
846 W_DATA* GetCurrentStruct();
852 int GetAbsInd_line_x();
853 double GetAbs_line_x();
854 int GetAbsInd_line_y();
855 double GetAbs_line_y();
860 int XGDrawDCursors();
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);
870 double XIndToData(
W_DATA* wd,
double i);
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);
897 extern double TinyData;
902 extern char* DefName;
903 #define RDMTAB FsGetTab
904 #define WRMTAB FsPutTab
905 #define RDPAS FsGetPas
906 #define WRPAS FsPutPas
Definition: ymprog.h:1019