/*----------------------------------------------------------------------*/ /* INCLUDE: Snip.h */ /* */ /* MM/YY/DD NAME.......... MODIFICATION................................ */ /* */ /*----------------------------------------------------------------------*/ /* Copyright (C) 1987 by John A. Hodgson, Santa Monica, California. */ /* All rights reserved. */ /* */ /* This code contains valuable trade secrets belonging to John A. */ /* Hodgson. It should be considered highly confidential and should */ /* be stored in a secure place to avoid unauthorized scrutiny. */ /* This material shall not be distributed or shown to ANYONE without */ /* the express WRITTEN permission of John A. Hodgson and in that */ /* event shall only be shown or distributed to persons named in */ /* such written permission. */ /* */ /* This notice shall not be altered or removed under any */ /* circumstances. */ /*----------------------------------------------------------------------*/ /* Structure for each display window */ struct Disp { struct Window *Window; /* Ptr to the Window. */ FLOAT high; /* Maximum data value in Window. */ FLOAT low; /* Minimum data value in Window. */ FLOAT range; /* Range of data values in Window. */ FLOAT xscale; /* Scaling factor data multiplied by */ /* to fit it to the dimensions of the */ /* Window's inner window x axis. */ FLOAT yscale; /* Scaling factor data multiplied by to*/ /* to fit it to the dimensions of the */ /* Window's inner window y axis. */ LONG firstx; /* Maximum number of points in the */ /* window's largest channel. */ LONG nx; /* # of data values displayed in Window*/ SHORT fn; /* Function Window type, see Record */ /* Type constants below. */ BOOL BoxDrawn; /* A switch to indicate a drawbox */ /* is in progress between Wait */ /* messages. */ /* TRUE: A DrawBox operation is in */ /* progress. The switch is cancelled */ /* if the message following the */ /* drawbox is anything other than a */ /* SELECTDOWN in the box. */ SHORT BoxX1; /* Upper left x coor. of above box. */ SHORT BoxY1; /* Upper left y coor. of above box. */ SHORT BoxX2; /* Lower right x coor. of above box. */ SHORT BoxY2; /* Lower right y coor. of above box. */ SHORT Chan; /* Element number of Dat array struct. */ /* discribing 1st. channel of data */ /* displayed in Window. Structure(s) */ /* discrib. additional channels of data*/ /* follow contiguously in Dat array. */ LONG DrawAreaX1; /* Upper left x coor. of inner window. */ LONG DrawAreaY1; /* Upper left y coor. of inner window. */ LONG DrawAreaX2; /* Lower right x coor. of inner window.*/ LONG DrawAreaY2; /* Lower right y coor. of inner window.*/ SHORT AvNo; /* Number of data values in average. */ SHORT ScXDat; /* Element number of Dat array struct. */ /* scatter plot x axis data. */ SHORT ScYDat; /* Element number of Dat array struct. */ /* scatter plot y axis data. */ FLOAT ScXhigh; /* Highest value on x axis of data. */ FLOAT ScXlow; /* Highest value on x axis of data. */ LONG ScXfirstx; /* data[#] of start of x axis data */ /* displayed in scatter plot Window. */ LONG ScYfirstx; /* data[#] of start of y axis data */ /* displayed in scatter plot Window. */ char title[30]; /* Window title. */ APTR UserData; /* General purpose user data. */ }; /*TOP*/ /* Structure for describing each channel of data */ struct Dat { LONG Points; /* Channel's number of data values. */ SHORT Type; /* Record type, see Record Type const. below. */ FLOAT high; /* Channel's maximum data value. */ FLOAT low; /* Channel's minimum data value. */ FLOAT range; /* Channel's range of data values. */ FLOAT Yscale; /* Scaling factor to size the channel's data to */ /* the dimensions of the inner window. */ LONG YOffset; /* Window 0 ONLY: An offset from the top of the */ /* added to the y axis for each channel of data. */ FLOAT *Ptr; /* Ptr to a channel of data. */ }; struct DMsg { /* message for intertask communication */ struct Message Msg; /* standard message structure */ struct Disp **Disp; /* pointer to window parameters. */ struct Dat **Dat; /* pointer to data parameters. */ SHORT WN, /* Window number (& Disp struct) selected */ PrevWN, /* previous window (& Disp) selected */ ChNo, /* previous (or Window 0) channel selected */ Chans, /* Total no of channels containing data */ DChans, /* Number of channels in data display */ RChans; /* Number of channels in Results section */ LONG Mark; /* Array location of last cursor position */ FLOAT base; /* Value in location Mark */ SHORT LastWin; /* Last window opened */ }; /* Record types for Disp[W]->fn & Dat[W]->Type */ #define RAW_DATA 0 #define AVERAGE 1 #define SCATTER 2 #define JOINT_PROB 3 #define MATH_DATA 4 /* EOF Snip.h */