home *** CD-ROM | disk | FTP | other *** search
/ Delphi 5 for Professionals / DELPHI5.iso / AddOns / Components / RealTime Graphics ActiveX / DATA.3 / Examples / CPP / Qcwin.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-11  |  56.1 KB  |  1,343 lines

  1. /*************************************************************************/
  2. /*                                                                       */
  3. /*     Copyright (c) QUINN-CURTIS, Inc., 1992 - 1996                     */
  4. /*                                                                       */
  5. /*************************************************************************/
  6. /**                                                                      */
  7. /**   Filename :   qcwin.h                                               */
  8. /**   Author   :   MS                                                    */
  9. /**   Revision :   2.52                                                  */
  10. /**   Date     :   March  11, 1996                                       */
  11. /**                                                                      */
  12. /**   Product  :   Charting Tools for Windows                            */
  13. /**                                                                      */
  14. /**   Description: QC Windows Charting Tools Definitions and             */
  15. /**                Function Prototypes                                   */
  16. /**                                                                      */
  17. /**   Revisions:   1.3. Definitions added for Real-Time Tools            */
  18. /**                1.5 7/13/94 - Support of Real-Time Tools              */
  19. /**                2.0 12/28/94 - 32-bit support                         */
  20. /**                                                                      */
  21. /*************************************************************************/
  22.  
  23. #ifndef  _QCWINH
  24. #define  _QCWINH        1
  25.  
  26. #ifdef RTFL                /* first define RTFL if you need realtype=float */
  27. #define realtype float                 /* can be double or float */
  28. #else
  29. #define realtype double                /* can be double or float */
  30. #endif
  31.  
  32. #ifdef __cplusplus
  33. extern  "C" {
  34.  
  35. #define QC_MEMBER   1   /* This definition enables using class member functions
  36.                            for page and graph building. If you use C++ but
  37.                            want this functions to be static, as in C,
  38.                            delete this line !!! */
  39. #endif
  40. /**********************************************************************/
  41. #ifdef __BORLANDC__
  42. #pragma warn -par
  43.     #ifdef __WIN32__
  44.         #ifndef WIN32
  45.             #define WIN32 __WIN32__
  46.         #endif
  47.     #endif
  48. #else               // Microsoft
  49. #define M_PI        3.14159265358979323846
  50. #define M_2PI       6.28318530718 
  51. #ifdef WIN32
  52. #define _export
  53. #endif
  54. #endif              // end Microsoft
  55.  
  56. /****************************************************************************/
  57. // Windows versions
  58. #define WV_31     0
  59. #define WV_32S    1
  60. #define WV_NT     2
  61. #define WV_95     3
  62. /****************************************************************************/
  63.  
  64. typedef  long    HGRAPH;              /* graph handle  */
  65. typedef  HANDLE   HCONT;               /* control object handle */
  66.  
  67. #ifndef  WIN32
  68. typedef  HANDLE   HGOBJ;               /* graphical object handle  */
  69. typedef  HANDLE   HDATA;               /* data set handle */
  70. typedef  HGOBJ    FAR  *PHGOBJ;        /* pointer to object handle */
  71. typedef  realtype huge *HPREAL;        /* huge pointer to realtype */
  72. typedef  float    huge *HPFLOAT;       /* huge pointer to float */
  73. typedef  float    far  *LPFLOAT;       /* far pointer to float  */
  74. typedef  realtype far  *LPREAL;        /* pointer to realtype   */
  75. typedef  short    huge *HPSHORT;
  76. typedef  short    far  *LPSHORT;
  77. typedef  int      far  *LPINT; 
  78. typedef  int      huge *HPINT; 
  79. typedef  short    near *PSHORT;
  80. typedef  POINT    huge *HPPOINT;       /* far pointer to realtype */
  81. typedef  char     huge *HPSTR;
  82. #else
  83. typedef  unsigned short HGOBJ;         /* graphical object handle  */
  84. typedef  UINT     HDATA;               /* data set handle */
  85. typedef  HGOBJ    *PHGOBJ;             /* pointer to object handle */
  86. typedef  realtype *HPREAL;             /* pointer to realtype */
  87. typedef  float    *HPFLOAT;            /* pointer to float */
  88. typedef  float    *LPFLOAT;            /* pointer to float */
  89. typedef  realtype *LPREAL;             /* pointer to realtype     */
  90. typedef  short    *HPSHORT;
  91. typedef  short    *LPSHORT;
  92. typedef  int      *LPINT; 
  93. typedef  int      *HPINT; 
  94. typedef  short    *PSHORT; 
  95. typedef  POINT    *HPPOINT;       /* far pointer to realtype */
  96. typedef  char     *HPSTR;
  97. #define  _fmemcpy  memcpy
  98.  
  99. #ifndef hmemcpy
  100. #define  hmemcpy   memcpy
  101. #endif
  102.  
  103. #define     _fmalloc  malloc
  104. #define  _fmemset  memset
  105. #define  _fstrcpy  strcpy
  106. #define  _fstrncpy strncpy
  107. #define  _ffree       free
  108.  
  109. #endif        // WIN32
  110.  
  111. #define  MAX_PAGES     60
  112. #define  MAX_DATASETS  1800
  113. #define  INIT_NUM_OBJS  20             /* initial number of objects per graph */
  114. #define  MAXPATHLEN    164
  115. #define  MAX_GRAPHS    16              /* max number of graphs per page */
  116.  
  117. /* ways of creating page window */
  118.  
  119. #define  PAGE_CLIENT   0               /* fill parent window client area */
  120. #define  PAGE_FULL     1               /* fill the whole screen          */
  121. #define  PAGE_EXACT    2               /* use passed coordinates         */
  122.  
  123. /* Page Window scaling types - fixed, proportionate, and isotropic */
  124. #define  MM_FIXED     MM_ISOTROPIC
  125. #define  MM_PROPORT   MM_ANISOTROPIC
  126. #define  MM_ISOTR     9  
  127. #define  MM_PROPORT_FT 10           // proportionate with fixed text size
  128. #define  MM_ISOTR_FT 11             // isotropic with fixed text size
  129.  
  130. /* coordinate types */
  131.  
  132. #define CO_LOG  0
  133. #define CO_PHYS 1
  134. #define CO_NORM 2
  135. #define CO_DEV  3
  136.  
  137. /* Point search constants */
  138.  
  139. #define FNP_X    0   // nearest x
  140. #define FNP_Y    1   // nearest y
  141. #define FNP_DIST 2   // shortest distance
  142.  
  143. /* printing styles */
  144.  
  145. #define PRT_FULL    0       /* Pages and graphs are printed so that paper
  146.                              is used maximally. Text is printed 
  147.                              proportionately to other objects */
  148. #define PRT_PROP    1       /* Pages are printed so that paper
  149.                              is used maximally. Graphs are printed
  150.                              proportionately to page size.
  151.                              Text is printed proportionately to other objects */
  152.  
  153. #define PRT_EXACT   2   /* physical size, font size in points are preserved */
  154.  
  155. /**************************************************************************/
  156. /* Graphical objects */
  157. /**************************************************************************/
  158.  
  159. #define    GO_PLOT   1              /* can be line, bars, scat, etc */
  160. #define    GO_GROUP  2              /* can be stacked lines, bars   */
  161. #define    GO_LEGEND 3
  162. #define    GO_LINE   4              /* Straight line */
  163. #define    GO_ARROW  5              /* Straight line with arrow */
  164.  
  165. #define    GO_LAST1  9
  166.             
  167. #define    GO_AX     10
  168. #define    GO_LABELS 11  
  169. #define    GO_TEXT   12
  170. #define    GO_ARC    13
  171.          
  172. #define    GO_LAST2  19
  173.  
  174. /*************************************************************/
  175.  
  176. #define    GO_PIECHART 20
  177. #define    GO_METAFILE 21
  178. #define    GO_ELLIPSE 22            
  179. #define    GO_BITMAP  23
  180. #define    GO_POLYGON 24
  181. #define    GO_RECT    25
  182. #define    GO_PIE     26
  183. #define    GO_DATACURSOR 27
  184. #define    GO_PLOTSCALE 49      // dummy object for save/restore
  185. #define    GOS_MAX     50   // max value of statical graphical object
  186. #define    GO_USER    1000
  187.             
  188. /* Line types - subtype field */
  189.  
  190. #define    LT_LINE      3
  191. #define    LT_LINEMARK  4
  192. #define    LT_SCAT      5 
  193. #define    LT_VBAR      6
  194. #define    LT_HBAR      7
  195. #define    LT_3DVBAR    8
  196. #define    LT_3DHBAR    9
  197. #define    LT_LAST      LT_3DHBAR
  198.  
  199. /* types of group plots */
  200.  
  201. #define GT_GROUPBARS    0
  202. #define GT_DEEPBARS     1
  203. #define GT_STACKEDBARS  2
  204. #define GT_FLOATBARS    3
  205. #define GT_STACKEDLINES 5
  206. #define GT_HILOCLOSE    6
  207. #define GT_ERRORBARS    7
  208.  
  209. /* data cursor types */
  210.  
  211. #define DC_VLINE    0   // vertical line
  212. #define DC_HLINE    1   // horizontal line
  213. #define DC_CROSS    2   // crosshair             
  214. #define DC_BOX      3   // square
  215.  
  216. /**************************************************************************/
  217. /* Dynamic Graphical objects */
  218. /**************************************************************************/
  219.  
  220. #define    GO_DYN   100         /* First dynamic object */
  221.  
  222. #define GOD_ALARMLINES GO_DYN      /* alarm lines */
  223. #define GOD_ALARMMARKS GO_DYN + 1  /* alarm marks (for bar graphs) */
  224. #define GOD_DYNGRID    GO_DYN + 2  /* grid lines  */
  225. #define GOD_SCROLL     GO_DYN + 3  /* scroll, sweep, scrolling bars, etc. */
  226. #define GOD_XYPLOT     GO_DYN + 4  /* dynamic xy plot      */
  227. #define GOD_LABELS     GO_DYN + 5  /* dynamic labels       */
  228. #define GOD_BARS       GO_DYN + 6  /* dynamic bars         */
  229. #define GOD_TEXT       GO_DYN + 7  /* dynamic text */
  230. #define GOD_MESSAGE    GO_DYN + 8  /* message text */
  231. #define GOD_ANNUNC     GO_DYN + 9  /* annunciator panel - compound object */
  232. #define GOD_METER      GO_DYN + 10 /* meter */
  233. #define GOD_CHCONTROL  GO_DYN + 11 /* child control */
  234. #define GOD_LEGEND     GO_DYN + 12 // used only for save/restore
  235.  
  236. #define GOD_SUBT_SCLINE 1         // scrolling line subtype 
  237. #define GOD_SUBT_SCBAR  2         // scrolling bar  subtype 
  238. #define GOD_SUBT_SWLINE 3         // sweep line subtype 
  239. #define GOD_SUBT_LOGIC  4         // logic line subtype 
  240.  
  241. /////////////////////NEW OBJECT
  242. #define GOD_SUBT_SCLINEVAR 5      // variable scrolling lines 
  243.  
  244. #define GOD_SUBT_BAR    5         // bar graph subtype 
  245. #define GOD_SUBT_ALMTEXT 6        // alarm text subtype 
  246. #define GOD_SUBT_STACKED 7        // stacked line subtype 
  247. #define GOD_SUBT_TIME   10        // time subtype (for axes and labels)
  248. #define GOD_SUBT_DYNLEG 11        // dynamic legend subtype
  249.  
  250. #define ARROW_START 1
  251. #define ARROW_END   2
  252. #define ARROW_BOTH  3
  253.  
  254. #define MAX_ALMNAME 12
  255. #define NALMLINES 5
  256.  
  257. /* data reduction types */
  258.  
  259. #define DC_SKIP    0
  260. #define DC_AVERAGE 1
  261. #define DC_MAX     2
  262. #define DC_MIN     3
  263.  
  264. /* bitmap display modes */
  265.  
  266. #define BM_ORIG     0       
  267. #define BM_STRETCH  1
  268.  
  269. /* COLOR CODES */
  270.  
  271. #define    C_RGB           -2      // for RGB colors
  272. #define    C_TRANSPARENT   -1 
  273. #define    C_BLACK          0
  274. #define    C_BLUE           1
  275. #define    C_GREEN          2
  276. #define    C_CYAN           3
  277. #define    C_RED            4
  278. #define    C_MAGENTA        5
  279. #define    C_BROWN          6
  280. #define    C_LIGHTGRAY      7
  281. #define    C_GRAY           8    
  282. #define    C_LIGHTBLUE      9  
  283. #define    C_LIGHTGREEN    10 
  284. #define    C_LIGHTCYAN     11 
  285. #define    C_LIGHTRED      12 
  286. #define    C_LIGHTMAGENTA  13 
  287. #define    C_YELLOW        14 
  288. #define    C_WHITE         15
  289.  
  290. #define    C_PALEBLUE      16
  291. #define    C_PALEGREEN     17
  292. #define    C_MEDGRAY       18
  293. #define    C_OFFWHITE      19
  294.  
  295. #define    NUMCOLS         20
  296.  
  297. /**************************************************************************/
  298. /* Axis scaling types  */
  299.  
  300. #define    ST_LINEAR    0
  301. #define    ST_LOG       1
  302.  
  303. /**************************************************************************/
  304. /* Grid types  */
  305.  
  306. #define    GRID_MAJOR   0
  307. #define    GRID_MINOR   1
  308. #define    GRID_ALL     2
  309.  
  310. /**************************************************************************/
  311. /* Tick mark, bar, etc. position definitions: */
  312.  
  313. #define  POS_BELOW     0
  314. #define  POS_INSIDE    POS_BELOW  
  315. #define  POS_LEFT      1
  316. #define  POS_RIGHT     2
  317. #define  POS_MIDDLE    3
  318. #define  POS_ABOVE     4
  319. #define  POS_OUTSIDE  POS_ABOVE  
  320. #define  POS_INVISIBLE 5
  321.  
  322. #define  POS_BELOW_PLOT 6
  323. #define  POS_ABOVE_PLOT 7
  324. #define  POS_LEFT_PLOT  8
  325. #define  POS_RIGHT_PLOT 9
  326.  
  327. #define  TEXT_NORMAL    0
  328. #define  TEXT_VERTLEFT  900
  329. #define  TEXT_VERTRIGHT 2700
  330.  
  331. #define  TEXT_BOLD       1           /* can be ORed with each other */
  332. #define  TEXT_ITAL       2
  333. #define  TEXT_UNDERLINE  4
  334.  
  335. /***********************************************************************/
  336. /* last label indicators: */
  337. /***********************************************************************/
  338.  
  339. #define  LL_ON   0
  340. #define  LL_OFF  1
  341. #define  LL_TEXT 2
  342.  
  343. #define  LABELLEN   42        /* maximal length of string label */
  344. #define  LG_MAXLEN  LABELLEN  // maximal legend length
  345. #define  MAX_MESLEN LABELLEN  // 42
  346. #define  MAX_MESNUM 8         // number of messages
  347.  
  348. /***********************************************************************/
  349. /* Pie Chart Constants */
  350. /***********************************************************************/
  351.  
  352. #define PIE_NUM_NONE     0
  353. #define PIE_NUM_PERC     1
  354. #define PIE_NUM_VAL      2
  355. #define PIE_NUM_BOTH     3
  356.  
  357. #define PIE_IN           0
  358. #define PIE_OUT          1
  359.  
  360. #define PIE_2D          10
  361. #define PIE_3D          11
  362.  
  363. /***********************************************************************/
  364. /* Numbers formats:                                                    */
  365.  
  366. #define    NF_DECIMAL     0
  367. #define    NF_SCIENTIFIC  1
  368. #define    NF_ENG         2 
  369. #define    NF_EXP         3 
  370. #define    NF_TIMEF       4
  371. #define    NF_G           5 
  372.  
  373. #define  TM_HMS       1    // time format, hh:mm:ss. Prec ignored
  374. #define  TM_HM        2    // time format, hh:mm
  375. #define  TM_MS        4 
  376.  
  377. /************************************************************************/
  378. /* Intercept flags for auto axes.  */
  379.  
  380. #define    INTF_ZERO   0       /* use 0 for intercepts              */
  381. #define    INTF_MIN    1       /* minimal values for both axes      */
  382. #define    INTF_MAX    2       /* maximal values for both axes      */
  383. #define    INTF_MINMAX 3       /* min Y intercept for axis X, max for Y */
  384. #define    INTF_MAXMIN 4       /* max for X, min for Y                  */
  385.  
  386. /************************************************************************/
  387. /* Symbols (markers) types:                                             */
  388.  
  389. #define    MK_NONE        0
  390. #define    MK_X           1
  391. #define    MK_UPTRIANGLE   2
  392. #define    MK_DOWNTRIANGLE 3 
  393. #define    MK_BOX         4
  394. #define    MK_PLUS        5
  395. #define    MK_ASTERISK    6
  396. #define    MK_DIAMOND     7
  397. #define    MK_CIRCLE      8
  398. #define    MK_DOT         9
  399.  
  400. /*********************************************************************/
  401. /* Marker and bar styles */
  402.  
  403. #define    MKS_FILLED     0 
  404. #define    MKS_EMPTY      1
  405. #define    MKS_CDOT       2
  406.  
  407. #define    BAR_FULL    MKS_FILLED       
  408. #define    BAR_HOLLOW  MKS_EMPTY      
  409. #define    BAR_BORDER  MKS_CDOT       
  410.  
  411. /************************************************************************/
  412. /* Autoscaling parameters: */
  413.  
  414. #define    AS_ROUNDCLOSE  1
  415. #define    AS_ROUNDFAR    2
  416.  
  417. /**********************************************************************/
  418. /* DSP constants (windows types)                                      */
  419. /**********************************************************************/
  420.  
  421. #define DSPWIN_RECTANG 0
  422. #define DSPWIN_PARZEN  1
  423. #define DSPWIN_HANNING 2
  424. #define DSPWIN_WELCH   3
  425. #define DSPWIN_HAMMING 4
  426. #define DSPWIN_EXACTB  5
  427.  
  428. /***************************************************************************/
  429. /* orientation constants */
  430.  
  431. #define OR_VERT   0
  432. #define OR_HORZ   1
  433.  
  434. /***************************************************************************/
  435. // raised rectangle constants
  436.  
  437. #define RC_FLAT     0      // regular
  438. #define RC_HIGH     1       
  439. #define RC_DEEP     2
  440. #define RC_LOW      3
  441. #define RC_SHALLOW  4
  442. #define RC_3DBORDER 5
  443.  
  444.  
  445. /***************************************************************************/
  446. // Metafile types 
  447.  
  448. #define MF_WIN     0    // Old Windows metafile
  449. #define MF_PL      1    // Placeable Aldus metafile
  450. #define MF_ENH     2    // New enhanced Windows metafile
  451.   
  452. /***************************************************************************/
  453. /* placeable metafile header */
  454. #pragma pack(1)
  455. typedef struct
  456. {
  457.         DWORD   key;
  458.         WORD    hmf;
  459.         short   left;
  460.         short   top;
  461.         short   right;
  462.         short   bottom;
  463.         WORD    inch;
  464.         DWORD   reserved;
  465.         WORD    checksum;
  466. } EXT_MFHEADER;
  467.  
  468. /*************************************************************************/
  469. typedef struct                   /* Metafile object */
  470. {
  471.     HGLOBAL      hMem;       /* memory handle for the OBJ_META descriptor */
  472.     HMETAFILE    hmf;
  473.     EXT_MFHEADER ExtHeader;
  474.     BOOL         bEnh;       /* TRUE if new enhanced metafile */    
  475. }
  476. OBJ_META;
  477. #pragma pack()
  478. /**************************************************************************/
  479. typedef struct  
  480. {
  481.    LOGPEN  lp;               /* Windows pen descriptor  */
  482.    short   nWidth;           /* line width in pixels    */
  483.    long   nColor;           /* pure color code         */
  484.    HWND    hwnd;             /* handle of the graph window */
  485. }  LINEDESC;
  486.  
  487.  
  488.  
  489. typedef OBJ_META far *POBJ_META;
  490.  
  491. /***************************************************************************/
  492. /* Page descriptor  (page can have multiple graphs) */
  493.  
  494. typedef struct
  495. {
  496.     HGRAPH  hPage;             // handle
  497.     HWND    hwnd;              // chart page window handle
  498.     void    (CALLBACK *lpfnPage) (LPVOID); // function initializing graphs
  499.     HWND    hwParent;          // parent window handle
  500.     int     cxVExt;            // Viewport extents
  501.     int     cyVExt;      
  502.     int     cxWExt;            // Window extents
  503.     int     cyWExt;      
  504.     DWORD   rgbBkColor;        // Chart page window background color
  505.     short   nMapMode;          // ISOTROPIC or ANISOTROPIC
  506.     short   nNumGraphs;        // Number of graphs on the page
  507.     short   nGraphCount; 
  508.     short   nSavMapMode;
  509.  
  510.     BOOL    fInitGraph;        // Initialization flag
  511.     BOOL    fLoaded;
  512.     BOOL    fDynamic;          // Set to TRUE if something is dynamic
  513.     HGRAPH  hSelGraph;         // handle to selected graph
  514.     HGRAPH  hPrevSelGraph;     // handle to previously selected graph
  515.     BOOL    fDispSel;          // flag indicating selectors are displayed 
  516.     BOOL    fPrevDispSel;      // previous state of the flag
  517.     BOOL    fHigh;             // flag indicating selected graph is highlighted
  518.     BOOL    reserved1;         // 
  519.     BOOL    fBlow;             // flag indicating selected graph is blown up
  520.     BOOL    fMeta;             // if not 0, output is to a metafile
  521.  
  522.     float   fSelxOrg;          // Save area for selected graph window extents
  523.     float   fSelyOrg;          // and origin relative to page
  524.     float   fSelxExt;         
  525.     float   fSelyExt;
  526.  
  527.     float   rXOrigCoef;        // compression/expansion coefficients  
  528.     float   rYOrigCoef;        // relative to original size 
  529.     int     cxVExtOrig;        // Original Viewport extents
  530.     int     cyVExtOrig;      
  531.  
  532.     WORD    nLTickSize;           // Large Tick Size in pixels
  533.     WORD    nSTickSize;           // Small Tick Size in pixels
  534.  
  535.     char    szFileName[MAXPATHLEN]; // Save file or metafile name
  536.     char    szName[13];        // ASCII internal name of the page
  537.     char    cMapIsotr;         // Isotropic resizable mapping mode flag 
  538.     WORD    bFixedText;        // if != 0, text size does not change when graph is resized  
  539.     long    wUserWord1;        // user can do anything with this field
  540.     long    wUserWord2;        // user can do anything with this field
  541.     LPVOID  lpTopDesc;         // pointer to TopDesc 
  542.  
  543.     HGLOBAL hGrMem [MAX_GRAPHS]; // array of memory handles to graphs
  544.     HWND    hwndButton [MAX_GRAPHS];   // handles to selector buttons
  545.     DWORD   dwSignature;
  546.     int     nPosStyle;
  547. } PAGE_DEF;
  548.  
  549. typedef PAGE_DEF far *PPAGE_DEF;
  550.  
  551. /**************************************************************************/
  552. typedef struct                     // common header
  553. {
  554.    short   nType;                  // object type
  555.    short   nSubType;               // object subtype 
  556.    HGOBJ   (_cdecl FAR *lpfnObj) (LPVOID, HDC); // function drawing the object
  557.    RECT    rcBoundary;             // object limits in device coordinates
  558.    HGOBJ   hObj1;                   // handles of associated objects (axes) 
  559.    HGOBJ   hObj2;
  560.    LINEDESC ld;
  561.    char    reserved [10];
  562.    BYTE    fInverse;
  563.    BYTE    fShow;                  // if = 0, hide object 
  564. }
  565. OBJ_HEAD;  
  566. typedef OBJ_HEAD FAR *POBJ_HEAD;
  567.  
  568. /**************************************************************************/
  569. typedef struct
  570. {
  571.        //  storage for current graph parameters
  572.     LINEDESC ld;
  573.     short    nXScaleType;       // ST_LINEAR or ST_LOG
  574.     short    nYScaleType;
  575.     realtype rxInt;             // intercepts
  576.     realtype ryInt;
  577.  
  578.     realtype rxMin;             // scaling values
  579.     realtype rxMax;
  580.     realtype ryMin;
  581.     realtype ryMax;
  582.  
  583.     realtype rxLMin;            // scaling values (logarithmic)
  584.     realtype rxLMax;
  585.     realtype ryLMin;
  586.     realtype ryLMax;
  587.  
  588. }  CUR_PAR;
  589.  
  590. /**************************************************************************/
  591. /* Graph descriptor */
  592.  
  593. typedef struct
  594. {
  595.    HGRAPH  hGraph;            // handle
  596.    HWND    hwnd;              // graph window handle
  597.    void    (CALLBACK *lpfnGraph) (LPVOID, HDC); // function drawing the graph
  598.    POBJ_HEAD pCurrentObjDesc;  // pointer to currently processed object desc.
  599.    COLORREF rgbWinBkColor;     // Chart window background color
  600.    COLORREF rgbPlotBkColor;    // Plotting area background color
  601.    BOOL    fFirstTime;
  602.    BOOL    fInit;
  603.    LINEDESC bd;               // border line descriptor 
  604.    BOOL    fBorder;           // border flag
  605.    HDC     hdcPrint;          // if not 0, output is to a printer  
  606.    HDC     hdcMeta;           // if not 0, output is to a metafile
  607.    int     nDynamic;          // Set to > 0 if something is dynamic
  608.    RECT    rPlotCoord;        // logical coordinates of plotting area
  609.    PPAGE_DEF pPageDesc;       // Page descriptor pointer
  610.    int     xWOrg;             // Window extents and origin in logical coords
  611.    int     yWOrg;
  612.    int     cxWExt;         
  613.    int     cyWExt;
  614.  
  615.    int     xVOrg;             // Window extents and origin in device coords
  616.    int     yVOrg;
  617.    int     cxVExt;         
  618.    int     cyVExt;
  619.  
  620.    float   fxOrg;             // Window extents and origin relative to page
  621.    float   fyOrg;
  622.    float   fxExt;         
  623.    float   fyExt;
  624.    float   fxExtOrig;         
  625.    float   fyExtOrig;
  626.  
  627.    float   rpX1;              // Plotting area coordinates relative
  628.    float   rpY1;              // to graph window
  629.    float   rpX2;         
  630.    float   rpY2;
  631.  
  632.    CUR_PAR cp;               // current parameters
  633.  
  634.    short   nMapMode;          //
  635.    int     cxLogPixel;        // width  of 1 pixel in logical units
  636.    int     cyLogPixel;        // height of 1 pixel in logical units
  637.    short   nObjCounter;
  638.    HGOBJ   hSelObj;           // selected object handle
  639.    HGOBJ   hAxisX;
  640.    HGOBJ   hAxisY;
  641.    HDC     hdc;               // own hdc (real time only)
  642.    short   nNumObjs;          // number of objects in the graph
  643.    char    cIgnorePlot;
  644.    char    cRaised;           // 0 - flat, 1 - raised, 2 - low  
  645.    LPVOID  pGCO;              // pointer to Graph Class Object (MFC only)
  646.    DWORD   dwSignature;
  647.    char    reserved;
  648.    char    cRepaint;          // if != 0 repaint graph background  
  649.    WORD    wUserWord1;        // user can do anything with this field
  650.    WORD    wUserWord2;        // user can do anything with this field
  651.    HGLOBAL hObjDup;          // memory handle for an object copy, for editing
  652.    HGLOBAL hObjArr;
  653.    HGLOBAL FAR *pObjArr;          // pointer to array of object memory handles
  654.  
  655. } GRAPH_DEF;
  656.  
  657. typedef GRAPH_DEF far *PGRAPH_DEF;
  658.  
  659. /**************************************************************************/
  660. /* Dynamic data definitions ***********************************************/
  661. /**************************************************************************/
  662. #define DYN_MAXVAL 32      // maximal number of dynamic elements per object
  663. #define DYNTITLELEN 42          // DATA SET TITLE length
  664. #define DYNUNITSLEN 11          // length of eng. units string
  665. #define MAX_DYNSETS 200         // max. number of dynamic data sets
  666. #define MAX_ALMESLEN  32
  667. #define TAGLEN        16        // channel tag length
  668. #define MAX_ALM 7   // max. number of alarm types
  669.  
  670. /* Every dynamic object can have up to DYN_MAXVAL individual elements */
  671.  
  672. /**************************************************************************/
  673.  
  674. typedef struct                       // dynamic element descriptor
  675. {
  676.     float rAlVal;                // alarm value
  677.     char  szAlarmName [MAX_ALMESLEN]; // alarm name
  678. }
  679. ALARM_DEF;
  680.  
  681. /**************************************************************************/
  682. typedef struct                  // dynamic data set descriptor
  683. {
  684.     char    cNumChannels;            // from 1 up to 32
  685.     char    cUseCounter;
  686.     char    szTitle [DYNTITLELEN]; // unique title of the data set  2
  687.     LPVOID  lpDDEDesc;             // pointer to DDE descriptor, or NULL 44
  688.                   
  689.     float   rNewVal [DYN_MAXVAL]; // values                             48
  690.     float   rPrevVal[DYN_MAXVAL];
  691.     HGLOBAL hRealData;            // memory handle for historical data array
  692.     HPFLOAT hpRealData;           // huge pointer to historical data array  
  693.     UINT    wRealTo;              // index to the next value
  694.     BOOL    bHistFull;            // TRUE after data array is first filled  
  695.     int     nHistSize;            // number of samples in history buffer (real values)
  696.     char    szUnits [DYNUNITSLEN]; // engineering units
  697.     char    cAlmMask;
  698.     int     nXY;                   // set to 1 if data used by XY plot 
  699.  
  700.     ALARM_DEF almHigh;             // alarm descriptors
  701.     ALARM_DEF almLow;
  702.     ALARM_DEF almHH;
  703.     ALARM_DEF almLL;
  704.     ALARM_DEF almRate;             // rate of change value, per second
  705.     ALARM_DEF almDev;              // deviation (setp - meas)
  706.     ALARM_DEF almFail;             // fail (DDE) 
  707.     realtype  rSetp;
  708.     realtype  rHyst;               // high and low alarm hysteresis
  709.     realtype  rDevHyst;            // deviation alarm hysteresis
  710.     char szNormName [MAX_ALMNAME]; // normal state name
  711.  
  712.     BOOL      bCheckAlarms;        // if TRUE, check alarms
  713.     char      szTag[DYN_MAXVAL][TAGLEN]; // channel tags
  714.     char      cPrevAlmOut[DYN_MAXVAL];  // previous alarm output for every channel
  715.     char      cAlmOut[DYN_MAXVAL];      // alarm output for every channel
  716.     UINT      wBinNewVal;               // binary channels
  717.     UINT      wBinPrevVal;                
  718. }
  719. DYNDATA_DEF;  
  720. typedef DYNDATA_DEF far *PDYNDATA;
  721. /***************************************************************************/
  722. /* Function prototypes *************************************************/
  723. /***********************************************************************/
  724. /*************************************************************************
  725.  * COLOR FUNCTIONS
  726.  *************************************************************************/
  727.  
  728. COLORREF WINAPI _export WGGetRGBColor (UINT wColor);
  729. UINT     WINAPI _export WGGetPureColor (COLORREF rgbColor);
  730. COLORREF WINAPI _export WGCreateShadeColor(COLORREF rgbColor);
  731.  
  732. /************************************************************************/
  733. /* Graphics Setup                                                       */
  734. /************************************************************************/
  735. BOOL WINAPI _export WGSetPlotArea (PGRAPH_DEF pGrDesc, HDC hdc,
  736.     realtype  rX1, realtype  rY1, realtype  rX2, realtype rY2, int nColor);
  737.  
  738. void WINAPI _export WGSetAxesScale (PGRAPH_DEF pGrDesc,
  739.     int nXScaleType, int nYScaleType);
  740. void  WINAPI _export WGScalePlotArea (PGRAPH_DEF pGrDesc, realtype xmin,
  741.     realtype ymin, realtype xmax, realtype ymax);
  742. void  WINAPI _export WGSetXYIntercepts (PGRAPH_DEF pGrDesc,
  743.     realtype rxInt, realtype ryInt);
  744. void WINAPI _export WGSetLineStyle (PGRAPH_DEF pGrDesc, HDC hdc, 
  745.     int nStyle, int nWidth, int nColor);
  746. void WINAPI _export WGSetDataFormat (PGRAPH_DEF pGrDesc, HGOBJ  hObj, int width,
  747.     int prec);
  748. void WINAPI _export WGSetTextParams (int nColor, int nFamily,
  749.     int nSize, int nStyle);
  750. BOOL WINAPI _export WGSetTextByName (int nColor, LPCSTR szFontName,
  751.     int nSize, int nStyle);
  752. void WINAPI _export WGRaiseGraph (PGRAPH_DEF pGrDesc, int nRaiseFlag);
  753.  
  754. /*************************************************************************
  755.  * DRAWING FUNCTIONS
  756.  *************************************************************************/
  757. HGOBJ WINAPI _export WGDrawXAxis (PGRAPH_DEF pGrDesc, HDC hdc,
  758.     realtype rTickSpace, int nSmallTicks, int nTickPos);
  759. HGOBJ WINAPI _export WGDrawYAxis (PGRAPH_DEF pGrDesc, HDC hdc,
  760.     realtype rTickSpace, int nSmallTicks, int nTickPos);
  761. void WINAPI _export WGDrawGrid (PGRAPH_DEF pGrDesc, HGOBJ hAxis, int nGridType);
  762. HGOBJ WINAPI _export WGGroupBargraph (PGRAPH_DEF pGrDesc, HDC hdc,
  763.     HDATA hDataSet, realtype rWidth, int nJustify, int nBarType, int nGraphType,
  764.     COLORREF FAR *lpRgbBarColor, LPINT lpHatchStyle, LPINT lpBorderColor);
  765. HGOBJ WINAPI _export WGFloatingBars (PGRAPH_DEF pGrDesc, HDC hdc,
  766.     HDATA hDataSet, realtype rWidth, int nJustify, int nBarType,      
  767.     COLORREF rgbBarColor, int nHatchStyle, int nBorderColor);
  768.  
  769. BOOL WINAPI _export WGAutoAxes (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  770.     int nRoundType, int nInterceptFlag, PHGOBJ lphAxX, PHGOBJ lphAxY,
  771.     PHGOBJ lphLabX, PHGOBJ lphLabY);
  772. BOOL WINAPI _export WGRoundAxis (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  773.     LPREAL lprMin, LPREAL lprMax, LPREAL lprTickSpace, BOOL bUpdate);
  774. // New
  775. void WINAPI _export RoundAxis (int nRoundType, int nLen, LPREAL amin,
  776.     LPREAL amax, LPREAL rTickSpace, int nAxDir);
  777. BOOL WINAPI _export WGRoundAxis2 (PGRAPH_DEF pGrDesc, int nAxOrient,
  778.     int nAxScale, 
  779.     LPREAL lprMin, LPREAL lprMax, LPREAL lprTickSpace, int nRoundMode);
  780. //    
  781. HGOBJ WINAPI _export WGLinePlot (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  782.     BOOL bFill, BOOL bSpline);
  783.  
  784. HGOBJ WINAPI _export WGScatterPlot (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  785.     int nMarkerShape, int nMarkerColor, int nMarkerSize,
  786.     int nMarkerStyle, BOOL bDrop);
  787.  
  788. HGOBJ WINAPI _export WGLineMarkerPlot (PGRAPH_DEF pGrDesc, HDC hdc,
  789.     HDATA hDataSet, int nMarkerShape, int nMarkerColor,
  790.     int nMarkerSize, int nMarkerStyle);
  791.  
  792. HGOBJ WINAPI _export WGBargraph (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  793.     realtype rWidth, int nJustify, int nBarType, COLORREF rgbBarColor,
  794.     int nHatchStyle, int nBorderColor);
  795.  
  796. HGOBJ WINAPI _export WGStackedLines (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  797.   BOOL bFill, LPINT lpLineStyle, LPINT lpLineWidth, LPINT lpLineColor);
  798.  
  799. HGOBJ WINAPI _export WGHighLowClose (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  800.     int nMarkerShape, int nMarkerColor, int nMarkerSize,
  801.     int nMarkerStyle);
  802.  
  803. HGOBJ WINAPI _export WGErrorBars (PGRAPH_DEF pGrDesc, HDC hdc, HDATA hDataSet,
  804.     int nWidth);
  805. HGOBJ WINAPI _export WGLabelAxis(PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  806.    int nLabelPos, UINT nFormat, int nPrec, int nLast, LPSTR lpTextLast);
  807.  
  808. HGOBJ WINAPI _export WGLabelAxisStrings(PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  809.     int nLabelPos, int nFirstTick, HGLOBAL hStr);
  810. HGOBJ WINAPI _export WGLabelAxisStringsPtr(PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  811.     int nLabelPos, int nFirstTick, LPSTR lpStr);
  812. HGOBJ WINAPI _export WGLabelAxisStringsNew(PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  813.     int nLabelPos, int nFirstTick, LPSTR lpStr);
  814.  
  815. HGOBJ WINAPI _export WGLabelAxisMonth (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  816.     int nLabelPos, int nFirstTick, int nFirstMonth, BOOL bShort);
  817. HGOBJ WINAPI _export WGLabelAxisDayWk (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  818.     int nLabelPos, int nFirstTick, int nFirstDay, BOOL bShort);
  819. HGOBJ WINAPI _export WGTextNorm (PGRAPH_DEF pGrDesc, HDC hdc, LPSTR lpString,
  820.               realtype rX, realtype  rY, UINT wAlign, int nOrientation);
  821.  
  822. HGOBJ WINAPI _export WGText (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  823.     HGOBJ hAxisY, LPSTR lpString, realtype rX, realtype rY, UINT wAlign,
  824.     int nOrientation);
  825.  
  826. HGOBJ WINAPI _export WGTitleGraph(PGRAPH_DEF pGrDesc, HDC hdc, LPSTR lpTitle);
  827. HGOBJ WINAPI _export WGTitleAxis(PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxis,
  828.     int nTitlePos, LPSTR lpTitle);
  829.  
  830. void WINAPI _export WGLabelPie(PGRAPH_DEF pGrDesc, HGOBJ hPie, HGLOBAL hLabels);
  831. void WINAPI _export WGLabelPiePtr (PGRAPH_DEF pGrDesc, HGOBJ hPie,
  832.     LPSTR pLabels);
  833. HGOBJ WINAPI _export WGPieChart (PGRAPH_DEF pGrDesc, HDC hdc, HGLOBAL hData,
  834.     int nNumPoints, int nPieStyle, int nNumType, int nNumPos,
  835.     realtype rDiam, realtype rXCenter, realtype rYCenter,
  836.     COLORREF FAR *lpRgbPieColor,
  837.     LPINT lpBorderColor, LPINT lpHatchStyle, LPREAL lprExplodeRel);
  838.  
  839. HGOBJ WINAPI _export WGAutoLegend (PGRAPH_DEF pGrDesc, HDC hdc,
  840.         realtype rX, realtype rY, int nBorderColor, int nBorderWidth, 
  841.         int nTextColor, int nBackColor, int nLayout, HGLOBAL hStr);
  842.  
  843. HGOBJ WINAPI _export WGAutoLegendGroup (PGRAPH_DEF pGrDesc, HDC hdc,
  844.     realtype  rX, realtype  rY, int nBorderColor, int nBorderWidth,
  845.     int nTextColor, int nBackColor, int nLayout, HGLOBAL hStr,
  846.     HGOBJ hObj);
  847.  
  848. HGOBJ  WINAPI _export WGLegend (PGRAPH_DEF pGrDesc, HDC hdc,
  849.         realtype  rX1, realtype rY1, realtype  rX2, realtype rY2,
  850.         int nBorderColor, int nBorderWidth, 
  851.         int nTextColor, int nBackColor, int nLayout, HGLOBAL hStr);
  852.  
  853. HGOBJ  WINAPI _export WGLegendPtr (PGRAPH_DEF pGrDesc, HDC hdc,
  854.         realtype  rX1, realtype rY1, realtype  rX2, realtype rY2,
  855.         int nBorderColor, int nBorderWidth, 
  856.         int nTextColor, int nBackColor, int nLayout, LPSTR lpStr);
  857.  
  858. HGOBJ  WINAPI _export WGLegendGroup (PGRAPH_DEF pGrDesc, HDC hdc,
  859.         realtype  rX1, realtype rY1, realtype  rX2, realtype rY2,
  860.         int nBorderColor, int nBorderWidth, int nTextColor, 
  861.         int nBackColor, int nLayout, HGLOBAL hStr, HGOBJ hObj);
  862.  
  863. HGOBJ  WINAPI _export WGLegendGroupPtr (PGRAPH_DEF pGrDesc, HDC hdc,
  864.         realtype  rX1, realtype rY1, realtype  rX2, realtype rY2,
  865.         int nBorderColor, int nBorderWidth, int nTextColor, 
  866.         int nBackColor, int nLayout, LPSTR lpStr, HGOBJ hObj);
  867.  
  868. HGOBJ WINAPI _export WGLineNorm (PGRAPH_DEF pGrDesc, HDC hdc, realtype rX1,
  869.     realtype rY1, realtype rX2, realtype rY2);
  870.  
  871. HGOBJ WINAPI _export WGArrowNorm (PGRAPH_DEF pGrDesc, HDC hdc, realtype rX1,
  872.     realtype rY1, realtype rX2, realtype rY2, int nWidth, int nLength,
  873.     BOOL bStart, BOOL bEnd, BOOL bFill);
  874.  
  875. HGOBJ WINAPI _export WGRectangleNorm (PGRAPH_DEF pGrDesc, HDC hdc, realtype rX1,
  876.     realtype rY1, realtype rX2, realtype rY2, int nBorderColor, 
  877.     int nBorderWidth, BOOL  bFill, COLORREF rgbBackColor);
  878.  
  879. HGOBJ WINAPI _export WGRectangleNormEx (PGRAPH_DEF pGrDesc, HDC hdc, realtype rX1,
  880.     realtype rY1, realtype rX2, realtype rY2, int nBorderColor, 
  881.     int nBorderWidth, BOOL bFill, COLORREF rgbBackColor, int n3D);
  882.  
  883. HGOBJ WINAPI _export WGEllipseNorm (PGRAPH_DEF pGrDesc, HDC hdc,
  884.    realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  885.    int nBorderColor, int nBorderWidth, BOOL  bFill, COLORREF rgbBackColor);
  886.  
  887. HGOBJ WINAPI _export WGArcNorm (PGRAPH_DEF pGrDesc, HDC hdc,
  888.     realtype rX1, realtype rY1, realtype rX2, realtype rY2, realtype rX3,
  889.     realtype rY3, realtype rX4, realtype rY4);
  890.  
  891. HGOBJ WINAPI _export WGPieNorm (PGRAPH_DEF pGrDesc, HDC hdc, realtype rX1,
  892.     realtype rY1, realtype rX2, realtype rY2, realtype rX3, realtype rY3, realtype rX4,
  893.     realtype rY4, int nBorderColor, int nBorderWidth, BOOL bFill,
  894.     COLORREF rgbBackColor);
  895.  
  896. HGOBJ WINAPI _export WGLine (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  897.     HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2, realtype rY2);
  898.  
  899. HGOBJ WINAPI _export WGArrow (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX, HGOBJ hAxisY,
  900.     realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  901.     int nWidth, int nLength, BOOL bStart, BOOL bEnd, BOOL bFill);
  902.  
  903. HGOBJ WINAPI _export WGRectangle (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  904.     HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  905.     int nBorderColor, int nBorderWidth, BOOL bFill,
  906.     COLORREF rgbBackColor);
  907.  
  908. HGOBJ WINAPI _export WGEllipse (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  909.     HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  910.     int nBorderColor, int nBorderWidth, BOOL bFill, COLORREF rgbBackColor);
  911.  
  912. HGOBJ WINAPI _export WGArc (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  913.     HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  914.     realtype rX3, realtype rY3, realtype rX4, realtype rY4);
  915.  
  916. HGOBJ WINAPI _export WGPie (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  917.     HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  918.     realtype rX3, realtype rY3, realtype rX4, realtype rY4,
  919.     int nBorderColor, int nBorderWidth, BOOL bFill,
  920.     COLORREF rgbBackColor);
  921.  
  922. HGOBJ WINAPI _export WGBitmapNorm (PGRAPH_DEF pGrDesc, HDC hdc, realtype rX1,
  923.     realtype rY1, realtype rX2, realtype rY2, int nMode, LPCSTR lpName);
  924.  
  925. HGOBJ WINAPI _export WGBitmap (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  926.     HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2, realtype rY2,
  927.     int nMode, LPCSTR lpName);
  928.  
  929. HGOBJ WINAPI _export WGPolygon (PGRAPH_DEF pGrDesc, HDC hdc, HGOBJ hAxisX,
  930.    HGOBJ hAxisY, LPREAL lprX, LPREAL lprY, int nNumPoints,
  931.    int nBorderColor, int nBorderWidth, BOOL bFill, COLORREF rgbBackColor);
  932.  
  933. HGOBJ WINAPI _export WGPolygonNorm (PGRAPH_DEF pGrDesc, HDC hdc,
  934.     LPREAL lprX, LPREAL lprY, int nNumPoints, int nBorderColor,
  935.     int nBorderWidth, BOOL  bFill, COLORREF  rgbBackColor);
  936.  
  937. HGOBJ WINAPI _export WGSetDataCursor (PGRAPH_DEF pGrDesc, HDC hdc, 
  938.     int nType, HGOBJ hAxisX, HGOBJ hAxisY, 
  939.     int nSize, int nLineWidth, int nLineStyle, int nColor);
  940.  
  941. void WINAPI _export WGMoveDataCursor (PGRAPH_DEF pGrDesc, HGOBJ hCursor,
  942.      realtype rX, realtype rY, BOOL bVisible);
  943.  
  944. /*************************************************************************
  945.  * DATA SETS FUNCTIONS
  946.  *************************************************************************/
  947.  
  948. void WINAPI _export WGFreeDataSet (HDATA hDataSet, BOOL bFreeData);
  949. HDATA WINAPI _export WGLoadASCIIDataSet (LPSTR lpFileName,
  950.     LPSTR lpDataName);
  951. BOOL WINAPI _export WGSaveASCIIDataSet (HDATA hDataSet, LPSTR lpFileName,
  952.      LPSTR lpFormat);
  953.  
  954. HDATA WINAPI _export WGDefineDataSet (LPSTR lpDataName, HGLOBAL  hX,
  955.     HGLOBAL hY, LONG lNumPoints);
  956. HDATA WINAPI _export WGDefineDataSetPtr (LPSTR lpDataName, HPREAL hpX,
  957.     HPREAL hpY, LONG lNumPoints);
  958.  
  959. HDATA WINAPI _export WGDefineGroupDataSet (LPSTR lpDataName,
  960.     HGLOBAL  hIndep, HGLOBAL hDep, LONG lNumPoints,
  961.     int nGroupSize);
  962. HDATA WINAPI _export WGDefineGroupDataSetPtr (LPSTR lpDataName,
  963.     HPREAL hpX, HPREAL hpY, LONG lNumPoints, int nGroupSize);
  964.  
  965. BOOL WINAPI _export WGSortDataX (HDATA hDataSet, BOOL bDirection);
  966. BOOL WINAPI _export WGSortDataY (HDATA hDataSet, BOOL bDirection);
  967. BOOL WINAPI _export WGGetMinMaxX (HDATA hDataSet, LPREAL lpXMin,
  968.     LPREAL lpXMax);
  969. BOOL WINAPI _export WGGetMinMaxY (HDATA hDataSet, LPREAL lpYMin,
  970.     LPREAL lpYMax);
  971.  
  972. HDATA WINAPI _export WGCompressData (HDATA hOrigData, UINT wType,
  973.     UINT wSkip, LONG lFirst, LONG lLast, LPSTR lpNewSetName);
  974. HDATA WINAPI _export WGPasteDataSet (LPSTR lpDataName);
  975. BOOL WINAPI _export WGGetDataSetArrays (HDATA hDataSet,
  976.     HGLOBAL FAR *lphX, HGLOBAL FAR *lphY, LONG FAR *lpNumPoints,
  977.     LPINT lpGroupSize);
  978. BOOL WINAPI _export WGGetDataSetArraysPtr (HDATA hDataSet,
  979.     HPREAL * hpX, HPREAL *hpY, LONG *lpNumPoints,  LPINT lpGroupSize);
  980. HDATA WINAPI _export WGGetDataSet (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  981.  
  982. void WINAPI _export WGReconnectDataSet (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  983.     HDATA hDataSet);
  984. BOOL WINAPI _export WGGetNearestPoint (PGRAPH_DEF pGrDesc, realtype rX, 
  985.     realtype rY, int nMode, LPREAL lpX, LPREAL lpY, 
  986.     HDATA FAR *lphData, UINT FAR *lpNum);
  987. BOOL WINAPI _export WGMarkDataPoint (HDATA hDataSet, UINT n, BOOL bSkip);
  988. BOOL WINAPI _export WGIsDataPointGood (HDATA hDataSet, UINT n);
  989.  
  990. /*************************************************************************
  991.  * Graph and Page Functions
  992.  *************************************************************************/
  993. BOOL WINAPI _export WGPrintGraph (PGRAPH_DEF pGrDesc);
  994. BOOL WINAPI _export WGPrintPage  (PPAGE_DEF pPageDesc);
  995. BOOL WINAPI _export WGPrintPageDC (PPAGE_DEF pPageDesc, HDC hdc, realtype rX1, 
  996.     realtype rY1, realtype rX2, realtype rY2);
  997. BOOL WINAPI _export WGPrintPageEx (PPAGE_DEF pPageDesc, realtype rX1, 
  998.     realtype rY1, realtype rX2, realtype rY2);
  999.  
  1000. BOOL WINAPI _export WGCopyGraph  (PGRAPH_DEF pGrDesc);
  1001. BOOL WINAPI _export WGCopyPage   (PPAGE_DEF pPageDesc);
  1002. void WINAPI _export WGClosePage  (PPAGE_DEF pPageDesc);
  1003. BOOL  WINAPI _export WGSavePage (PPAGE_DEF pPageDesc, LPSTR lpFileName);
  1004. PPAGE_DEF WINAPI WGRestorePage (LPSTR lpFileName, HWND hwParent, LPSTR lpMenu);
  1005.  
  1006. BOOL       WINAPI _export WGSaveGraph (PGRAPH_DEF pGrDesc, LPSTR lpFileName);
  1007. PGRAPH_DEF WINAPI _export WGRestoreGraph (PPAGE_DEF pPgDesc, LPSTR lpFileName);
  1008.  
  1009. PGRAPH_DEF WINAPI WGCreateGraph (PPAGE_DEF pPageDesc,
  1010.     void FAR *lpfnGraph, realtype rX1, realtype rY1, realtype rX2,
  1011.     realtype rY2, int nColor, int nBorderColor, int  nBorderWidth);
  1012.  
  1013. PPAGE_DEF WINAPI WGCreatePage (LPCSTR lpName, HWND hwParent,
  1014.   HINSTANCE hInst, LPSTR lpTitle, void FAR *lpfnPage, LPCSTR lpMenu,
  1015.   int nColor, int nMapMode, DWORD dwWinStyle,int nPosStyle,
  1016.   int x, int y, int cx,int cy);
  1017. PPAGE_DEF WINAPI WGCreateInvisiblePage (LPCSTR lpName, 
  1018.     HINSTANCE hInst, void FAR *lpfnPage, int nColor);
  1019.  
  1020. PPAGE_DEF WINAPI _export WGGetPageDesc (HWND hwnd);
  1021. PGRAPH_DEF WINAPI _export WGGetGraphDesc (HWND hwnd);
  1022.  
  1023. void WINAPI _export WGDeleteGraph  (PGRAPH_DEF pGrDesc);
  1024. BOOL WINAPI _export WGIsDescValid  (LPVOID lpDesc);
  1025. BOOL WINAPI _export WGIsGraphDescValid (PGRAPH_DEF pGrDesc);
  1026. BOOL WINAPI _export WGIsPageDescValid (PPAGE_DEF pPgDesc);
  1027.  
  1028. void WINAPI _export WGUpdatePage (PPAGE_DEF pPageDesc);
  1029.  
  1030. /*************************************************************************
  1031.  * METAFILE FUNCTIONS
  1032.  *************************************************************************/
  1033.  
  1034. BOOL WINAPI _export WGSavePageMeta (PPAGE_DEF pPageDesc, 
  1035.     int nMFType, LPSTR lpFileName);
  1036. POBJ_META WINAPI _export WGGetMetafile (LPCSTR lpFileName);
  1037. void WINAPI _export WGDeleteMetafile (POBJ_META pMetaDesc);
  1038. BOOL WINAPI _export WGPlayMetafile (HWND hwnd, POBJ_META pMetaDesc,
  1039.     int x1, int y1, int x2, int y2);
  1040. BOOL WINAPI _export WGPlayMetafileDC (HWND hwnd, HDC hdc, POBJ_META  pMetaDesc,
  1041.     int x1, int y1, int x2, int y2);
  1042. HGOBJ WINAPI _export WGMetafileNorm (PGRAPH_DEF pGrDesc, HDC hdc,
  1043.     realtype rX1, realtype rY1, realtype rX2, realtype rY2, LPCSTR lpName);
  1044. HGOBJ WINAPI _export WGMetafile (PGRAPH_DEF pGrDesc, HDC hdc,
  1045.     HGOBJ hAxisX, HGOBJ hAxisY, realtype rX1, realtype rY1, realtype rX2,
  1046.     realtype rY2, LPCSTR lpName);
  1047. POBJ_META WINAPI _export WGConvertPageToMeta (PPAGE_DEF pPageDesc);
  1048. void WINAPI _export QCMakeMetaFile (HDC hdcMeta, PPAGE_DEF pPageDesc, LPRECT rcBounds, int nMFType);
  1049.  
  1050. /*************************************************************************
  1051.  * FFT FUNCTIONS
  1052.  *************************************************************************/
  1053.  
  1054. void WINAPI _export WGDSPWindow (HPREAL hpRealData, HPREAL hpImData,
  1055.     LONG lNumdat, int nWindowType);
  1056.  
  1057. BOOL WINAPI _export WGComplexFFT (HPREAL hpRealData, HPREAL hpImData, LONG n,
  1058.     BOOL bInverse);
  1059. BOOL WINAPI _export WGRealFFT (HPREAL hpX, HPREAL hpSinc, LONG n, BOOL bInverse);
  1060. BOOL WINAPI _export WGPowerSpectrum (HPREAL hpRealData, HPREAL hpImData,
  1061.     LONG lNumdat, realtype rInterval);
  1062. void WINAPI _export WGFFTMagnitude(HPREAL hpCos, HPREAL hpSin,
  1063.     LONG lNumdat, LONG i, HPREAL pMag);
  1064. void WINAPI _export WGFFTPhase (HPREAL hpCos, HPREAL hpSin, LONG i,
  1065.     HPREAL pPhase);
  1066. void WINAPI _export WGFFTFrequency (LONG lNumdat, realtype rSampleFreq,
  1067.     LONG i, HPREAL pFreq);
  1068.  
  1069. /*************************************************************************
  1070.  * GUI FUNCTIONS
  1071.  *************************************************************************/
  1072.  
  1073. /*---- Graph/Page ------*/
  1074.  
  1075. HWND WINAPI _export WGGetPageWindow (PPAGE_DEF pPagedesc);
  1076. void WINAPI _export WGToggleSelectors (PPAGE_DEF pPageDesc, BOOL bOn);
  1077. void WINAPI _export WGToggleHigh (PPAGE_DEF pPageDesc, BOOL bOn);
  1078. void WINAPI _export WGChangeGraphPos (PGRAPH_DEF pGrDesc, realtype  rX1,
  1079.     realtype  rY1, realtype rX2, realtype rY2);
  1080. void WINAPI _export WGGetGraphPos (PGRAPH_DEF pGrDesc, LPREAL lprX1,
  1081.     LPREAL lprY1, LPREAL lprX2,  LPREAL lpfY2);
  1082. void WINAPI _export WGRedrawGraph (PGRAPH_DEF pGrDesc, BOOL bRecalc);
  1083. HWND WINAPI _export WGGetGraphWindow (PGRAPH_DEF pGrDesc);
  1084. void WINAPI _export WGChangeGraphBackgnd (PGRAPH_DEF pGrDesc, COLORREF rgbColor);
  1085. COLORREF WINAPI _export WGGetGraphBackgnd (PGRAPH_DEF pGrDesc);
  1086. void WINAPI _export WGSelectGraph (PGRAPH_DEF pGrDesc);
  1087. PGRAPH_DEF  WINAPI _export WGGetSelectedGraph (PPAGE_DEF pPageDesc);
  1088. void WINAPI _export WGSetGraphBorder (PGRAPH_DEF pGrDesc, BOOL bOn,
  1089.     int nColor, int nWidth);
  1090. void WINAPI _export WGBlowupGraph (PGRAPH_DEF pGrDesc, BOOL bDir);
  1091. BOOL WINAPI _export WGEditGraphDlg (PPAGE_DEF pPageDesc);
  1092.  
  1093. /*---- Plotting Area ----*/
  1094. void WINAPI _export WGGetPlotPos (PGRAPH_DEF pGrDesc, LPREAL lprX1,     
  1095.                       LPREAL lprY1, LPREAL lprX2, LPREAL lprY2);
  1096. void WINAPI _export WGChangePlotPos (PGRAPH_DEF pGrDesc, realtype  rX1,
  1097.     realtype  rY1, realtype  rX2, realtype  rY2);
  1098.  
  1099. void WINAPI _export WGChangePlotBackgnd (PGRAPH_DEF pGrDesc,
  1100.     COLORREF rgbColor);
  1101. COLORREF WINAPI _export WGGetPlotBackgnd (PGRAPH_DEF pGrDesc);
  1102.  
  1103. BOOL WINAPI _export WGStartZoom (HWND hwndGraph, HGOBJ hAxisX, 
  1104.     HGOBJ hAxisY, UINT uMouseMessage, BOOL bUpdate);
  1105. BOOL WINAPI _export WGGetZoom (LPREAL lprLeft, LPREAL lprTop, 
  1106.     LPREAL lprRight, LPREAL lprBottom);
  1107.  
  1108. /*---- Object -----*/
  1109. HGOBJ WINAPI _export WGGetSelObject (PGRAPH_DEF pGrDesc,
  1110.     UINT FAR *lpSelPoint, LPINT lpSelGroup);
  1111.  
  1112. void   WINAPI _export WGSelObject (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1113. void   WINAPI _export WGRedrawObject (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1114.     BOOL bRecalc);
  1115. BOOL WINAPI _export WGGetObjectCoord (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1116.     LPREAL lpX1, LPREAL lpY1, LPREAL lpX2, LPREAL lpY2);
  1117. BOOL WINAPI _export WGGetObjectPos (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1118.     LPREAL lpX1, LPREAL lpY1, LPREAL lpX2, LPREAL lpY2);
  1119. BOOL WINAPI _export WGGetObjectCoordNorm (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1120.     LPREAL lprX1, LPREAL lprY1, LPREAL lprX2, LPREAL lprY2);
  1121. BOOL WINAPI _export WGGetObjectPosNorm (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1122.     LPREAL lprX1, LPREAL lprY1, LPREAL lprX2, LPREAL lprY2);
  1123. BOOL WINAPI _export WGChangeObjectCoord (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1124.     realtype rX1, realtype rY1, realtype rX2, realtype rY2, BOOL bRedraw);
  1125.  
  1126. BOOL WINAPI _export WGChangeObjectCoordNorm (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1127.     realtype rX1, realtype rY1, realtype rX2, realtype rY2, BOOL bRedraw);
  1128.  
  1129. HGOBJ WINAPI _export WGDuplicateObject (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1130. void WINAPI _export WGObjUpdate (PGRAPH_DEF pGrDesc, HGOBJ hObj, HGOBJ hObjDup);
  1131. void WINAPI _export WGDeleteObject (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1132.  
  1133. int  WINAPI _export WGGetObjectType (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1134. BOOL   WINAPI _export WGChangeLineColor  (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1135.     int nNewColor, int n);
  1136. BOOL   WINAPI _export WGChangeLineColorRGB  (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1137.     COLORREF rgbNewColor, int n);
  1138.  
  1139. int WINAPI _export WGGetObjSize (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1140. int CALLBACK _export WGGetObjTypeSize (int nObjType);
  1141. int WINAPI _export WGGetLineColor (PGRAPH_DEF pGrDesc, HGOBJ hObj, int n);
  1142. COLORREF WINAPI _export WGGetLineColorRGB (PGRAPH_DEF pGrDesc, HGOBJ hObj, int n);
  1143. COLORREF WINAPI _export WGGetAreaColor (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1144.     int n);
  1145. BOOL WINAPI _export WGChangeAreaColor (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1146.     COLORREF rgbColor, int n);
  1147. BOOL WINAPI _export WGChangeLineWidth (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1148.     int nNewWidth, int n);
  1149. int WINAPI _export WGGetLineWidth (PGRAPH_DEF pGrDesc, HGOBJ hObj, int n);
  1150. BOOL WINAPI _export WGChangeLineStyle (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1151.     int nNewStyle, int n);
  1152. int WINAPI _export WGGetLineStyle (PGRAPH_DEF pGrDesc, HGOBJ hObj, int n);
  1153.  
  1154. BOOL WINAPI _export WGToggleSpline (PGRAPH_DEF pGrDesc, HGOBJ hObj, BOOL bOn);
  1155. BOOL WINAPI _export WGGetFillFlag (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1156. BOOL WINAPI _export WGGetSplineFlag (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1157. BOOL WINAPI _export WGChangeObjFill (PGRAPH_DEF pGrDesc, HGOBJ hObj, BOOL bOn);
  1158. BOOL WINAPI _export WGChangeMarkerColor (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1159.     int nColor);
  1160. int WINAPI _export WGGetMarkerColor (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1161. BOOL WINAPI _export WGChangeMarkerType (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1162.     int nMarkerShape, int nMarkerSize, int nMarkerStyle);
  1163. BOOL WINAPI _export WGGetMarkerType (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1164.     LPINT lpMarkerShape, LPINT lpMarkerStyle, LPINT lpMarkerSize);
  1165. void WINAPI _export WGShowObject (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1166.     BOOL bShow);
  1167.      
  1168. /*---- Axes ------*/
  1169. BOOL WINAPI _export WGChangeAxisRange (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1170.     realtype rMin, realtype rMax, BOOL bUpdate);
  1171. BOOL WINAPI _export WGChangeAxisIntercept (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1172.     realtype rInt, BOOL bUpdate);
  1173. BOOL WINAPI _export WGChangeAxisScale (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1174.     int nScaleType, BOOL bUpdate);
  1175. void WINAPI _export WGSetTickSize (PPAGE_DEF pPgDesc, int nMajorSize,
  1176.     int nMinorSize);
  1177. BOOL PASCAL _export WGChangeAxisTicks (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1178.     realtype rTickSpace, int nSmallTicks, int nTickPos);
  1179. BOOL WINAPI _export WGChangeGrid (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1180.     int nGridType, int nNewStyle, int nNewWidth, int nNewColor);
  1181. BOOL WINAPI _export WGGetAxisTicks (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1182.     LPREAL  lpTickSpace, LPINT  lpSmallTicks, LPINT lpTickPos);
  1183. BOOL WINAPI _export WGGetAxisRange (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1184.     LPREAL lprMin, LPREAL lprMax, LPREAL lprInt);
  1185. int WINAPI _export WGGetAxisScale (PGRAPH_DEF pGrDesc, HGOBJ hAx);
  1186. int WINAPI _export WGGetAxisDir (PGRAPH_DEF pGrDesc, HGOBJ hAx);
  1187. BOOL WINAPI _export WGToggleGrid (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1188.     int nGridType, BOOL bOn);
  1189. BOOL WINAPI _export WGGetGrid (PGRAPH_DEF pGrDesc, HGOBJ hAx,
  1190.     BOOL FAR *lpbGridMajor, BOOL FAR *lpbGridMinor,  
  1191.     LINEDESC FAR * FAR *ldGridMajor, LINEDESC FAR * FAR *ldGridMinor);
  1192. void WINAPI _export WGToggleGridsOrder (BOOL bGridsBelow);
  1193.  
  1194. /*---- Bars ----*/
  1195.  
  1196. BOOL WINAPI _export WGGetBarWidth (PGRAPH_DEF pGrDesc, 
  1197.     HGOBJ hObj, LPREAL lprWidth);
  1198. BOOL  WINAPI _export WGChangeBarWidth (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1199.     realtype rWidth);
  1200. BOOL  WINAPI _export WGChangeHatchStyle (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1201.     int nHatchStyle, int n);
  1202. int WINAPI _export WGGetHatchStyle (PGRAPH_DEF pGrDesc, HGOBJ hObj, int n);
  1203. BOOL  WINAPI _export WGChangeBarJust (PGRAPH_DEF pGrDesc, HGOBJ hObj, int nPos);
  1204. int WINAPI _export WGGetBarJust (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1205.  
  1206.  
  1207. int WINAPI _export WGGetPlotType (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1208. BOOL  WINAPI _export WGChangePlotType (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1209.     int nNewType);
  1210.  
  1211. /*---text----*/
  1212. BOOL  WINAPI _export WGChangeTextColor (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1213.     int nColor);
  1214. int WINAPI _export WGGetTextColor (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1215. BOOL WINAPI _export WGChangeFont (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1216.    LPCSTR lpFaceName, int nSize, int nOrientation, int nWeight,
  1217.    BOOL bItalic, BOOL bUnderline);
  1218.  
  1219. LPSTR WINAPI _export WGGetFontName (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1220. int WINAPI _export WGGetFontSize (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1221. int WINAPI _export WGGetFontWeight (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1222. BOOL  WINAPI _export WGGetFontItal (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1223. BOOL  WINAPI _export WGGetFontUnder (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1224. int WINAPI _export WGGetFontOrient (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1225. LPSTR WINAPI _export WGGetString (PGRAPH_DEF pGrDesc, HGOBJ hObj, int n);
  1226. BOOL  WINAPI _export WGChangeString (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1227.        LPCSTR lpNewString, int n);
  1228. void WINAPI _export WGGetTextSizeNorm (PGRAPH_DEF pGrDesc, 
  1229.     HDC hdc, int nDir, LPCSTR lpString, int nNumChar, 
  1230.     LPREAL lprWidth, LPREAL lprHeight);
  1231.  
  1232. /*----arrows----*/
  1233. BOOL WINAPI _export WGChangeArrow (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1234.     int nLength, int nWidth);
  1235. BOOL WINAPI _export WGChangeArrowFill (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1236.     BOOL bFill);
  1237. BOOL WINAPI _export WGChangeArrowPos (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1238.     int nPos);
  1239. int WINAPI _export WGGetArrowWidth (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1240. int WINAPI _export WGGetArrowLength (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1241. BOOL  WINAPI _export WGGetArrowFill (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1242. int WINAPI _export WGGetArrowPos (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1243.  
  1244. /*-----Labels------*/
  1245. int WINAPI _export WGGetLastLabelFlag (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1246. LPSTR WINAPI _export WGGetLastLabelText (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1247. int WINAPI _export WGGetLabelsPos (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1248. BOOL  WINAPI _export WGChangeLabelsPos (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1249.     int nNewPos);
  1250. UINT  WINAPI _export WGGetLabelsFormat (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1251. BOOL  WINAPI _export WGChangeLabelsFormat (PGRAPH_DEF pGrDesc,
  1252.     HGOBJ hObj, UINT nFormat);
  1253. UINT  WINAPI _export WGGetLabelsPrec (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1254. BOOL  WINAPI _export WGChangeLabelsPrec (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1255.     UINT nPrec);
  1256. BOOL  WINAPI _export WGChangeLastLabel (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1257.     int nLast, LPSTR lpNewText);
  1258.  
  1259. /*----Pie Chart----*/
  1260. BOOL WINAPI _export WGGetPieExpl (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1261.     int n, LPREAL lpExpl);
  1262.  
  1263. BOOL  WINAPI _export WGChangePieExpl (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1264.          realtype rExplode, int n);
  1265. BOOL  WINAPI _export WGChangePieTextPos (PGRAPH_DEF pGrDesc, HGOBJ hObj,
  1266.     int nPos);
  1267. BOOL WINAPI _export WGChangePieValue (PGRAPH_DEF pGrDesc, HGOBJ hObj, 
  1268.     realtype rNewVal, int n);
  1269. BOOL WINAPI _export WGGetPieValue (PGRAPH_DEF pGrDesc, HGOBJ hObj, 
  1270.     LPREAL lprVal, int n);
  1271.  
  1272. int WINAPI _export WGGetPieTextPos (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1273.  
  1274. LINEDESC FAR * WINAPI _export WGGetLineDesc (PGRAPH_DEF pGrDesc,
  1275.     HGOBJ hObj, int n);
  1276.  
  1277. /*---- Mouse ----*/
  1278. BOOL WINAPI _export WGGetMousePos (PGRAPH_DEF pGrDesc, HGOBJ hAxisX,
  1279.     HGOBJ hAxisY, LPREAL lprX, LPREAL lprY);
  1280. void WINAPI _export WGGetMousePosNorm (PGRAPH_DEF pGrDesc,
  1281.     LPREAL lprX, LPREAL lprY);
  1282. void WINAPI _export WGShowMouseCoord (HWND hwnd, int Type,
  1283.     BOOL bStartStop);
  1284. void WINAPI WGGraphMouseEvent (HWND hwnd, UINT message,
  1285.     POINT ptMouse);
  1286.  
  1287. /*************************************************************************
  1288.  * MISCELLANEOUS FUNCTIONS
  1289.  *************************************************************************/
  1290. HGLOBAL WINAPI _export WGCopyMem (HGLOBAL hMem);
  1291. void WINAPI _export WGSetOKCursor (HWND hDlg);
  1292.  
  1293. BOOL WINAPI _export WGPrinterSetup (HWND hwnd);
  1294. void WINAPI _export WGSetPrintOptions (BOOL bGraphBk, BOOL bPlotBk,
  1295.  BOOL bBorder, BOOL bKeepAspect, int nPrintStyle, realtype rX, realtype rY);
  1296. BOOL WINAPI _export WGPrintOptionsDlg (void);
  1297. void _cdecl FAR WGOKMsgBox (PSTR pCaption, PSTR pFormat, ...);
  1298. void WINAPI _export WGEnableErrorMessages (BOOL bFlag);
  1299. int WINAPI _export WGGetLastError (void);
  1300.  
  1301. BOOL WINAPI _export WGMenuCheck (PPAGE_DEF  pPageDesc, int item, int pos);
  1302. void WINAPI WGStart(void);
  1303. void WINAPI WGCleanup (BOOL bFreeData);
  1304. void WINAPI WGEditObject (HWND hwnd);
  1305. void WINAPI WGGraphKeyEvent (HWND hwnd, UINT message, WPARAM nVKey, LPARAM dwKeyData);
  1306.  
  1307. int   WINAPI _export DefEditObject (PGRAPH_DEF pGrDesc);
  1308. HGOBJ WINAPI _export ObjFind (HWND hwnd);
  1309. void WINAPI _export WGShowData (PGRAPH_DEF pGrDesc, HGOBJ hObj);
  1310. int WINAPI _export WGGetVersion (LPINT lpSec);
  1311. LPSTR WINAPI _export WGGetDate (void);
  1312.  
  1313. //NEW
  1314. BOOL WINAPI _export WGStartXCursor (HWND hwndGraph, HGOBJ hAxisX, 
  1315.     HGOBJ hAxisY, UINT uMouseMessage, int mode, BOOL bUpdate);
  1316. BOOL WINAPI _export WGGetXCursor (LPREAL lprLeft, LPREAL lprTop, 
  1317.     LPREAL lprRight, LPREAL lprBottom);
  1318. //
  1319. /************************************************************************/
  1320.  
  1321. LRESULT CALLBACK WGUserPageProc (HWND hwnd, UINT message,
  1322.     WPARAM wParam, LPARAM lParam);
  1323.  
  1324. /****************************************************************************/
  1325.  
  1326. #ifdef __cplusplus
  1327. }
  1328. class QCBasePage
  1329. {
  1330. public:
  1331.     virtual void BuildPage (PPAGE_DEF) = 0; // pure virtual function initializing page
  1332. };
  1333.  
  1334. class QCBaseGraph
  1335. {
  1336. public:
  1337.     virtual void BuildGraph (PGRAPH_DEF, HDC) = 0; // pure virtual function initializing graphs
  1338. };
  1339. #endif
  1340. /**************************************************************************/
  1341. #endif
  1342.  
  1343.