home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s300 / 1.ddi / CHAP7 / DISPLAY.H < prev    next >
Encoding:
C/C++ Source or Header  |  1987-06-26  |  1.5 KB  |  56 lines

  1. /* Data structure definition for the control display functions
  2.  
  3. copyright (c) 1897, D.M. Auslander
  4.  
  5. Created 26-June-87
  6.  
  7. Updates:
  8.  
  9. FIle: display.h
  10.  
  11. This file contains the definition of the data structure defining 
  12. a process control type of screen display.
  13.  
  14. When defining display units in a user program, all that is needed is 
  15. to define the storage space for each and call the set-up program.
  16. The storage is allocated with one of the following declarations:
  17.  
  18. DISPLAY temp_dsp;
  19.  
  20. or to define a group of displays with,
  21.  
  22. DISPLAY dsp[10];
  23.  
  24. or to use the memory allocator,
  25.  
  26. #define NDSP 10
  27. DISPLAY *pr_dsp;
  28. char *malloc();
  29. ...
  30. pr_dsp = (DISPLAY *)malloc(NDSP * sizeof(DISPLAY));
  31.  
  32. Then, the function dsp_set() is called to put data into the structure.
  33. */
  34.  
  35. struct display
  36.     {
  37.     float (*fv1)(),(*fv2)();    /* Functions called to get
  38.                 data */
  39.     float x,y;        /* Position of the bottom of 
  40.                 the vertical bar */
  41.     float vbot,vtop;    /* Variable values at the top and bottom of the
  42.                 line */
  43.     float val1,val2;    /* Stored data values */
  44.     float lngth;        /* Line length (in cm) */
  45.     int lcolor;        /* Data display color */
  46.     char *label;        /* Label for this display */
  47.     char *fmt;        /* String with format to convert data */
  48.     char *dblnk;        /* String of blanks to erase old data */
  49.     float l1old,l2old;    /* Saved values of the graphic locations */
  50.     int v1line,v1data,v2bar,v2data;
  51.                 /* Flags indicating whether associated
  52.                 information should be displayed */
  53.     };
  54.  
  55. typedef struct display DISPLAY;
  56.