home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 344b.lha / plplot_v2.6 / include / dispatch.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-01-27  |  2.8 KB  |  54 lines

  1. /* Declare structure containing pointers to device dependent functions. */
  2.  
  3. /* pl_MenuStr : Pointer to string that is printed in device menu. */
  4. /* pl_setup   : Use this routine to set orientation, x and y  resolution
  5.  *              (dots/mm)  and x and y page widths. Some device drivers
  6.  *              may  choose to ignore any or all of these. A call to
  7.  *              this routine is optional! If a particular driver requires
  8.  *              any of these parameters and they are not set by a call to
  9.  *              pl_setup() then they should be prompted for in pl_init().
  10.  *              The user may call this routine only once and it is called
  11.  *              before plstar() or plbeg(). */
  12. /* pl_file    : Set graphics storage file name. This routine is also
  13.  *              optional. If a device requires a file for storage, the
  14.  *              file name should be prompted for if this routine is not
  15.  *              used. This routine may be called before plstar(), plbeg(),
  16.  *              plenv(), or pladv(). This routine does NOT open the file. */
  17. /* pl_init    : Initialize device.  This routine may also prompt the user
  18.  *              for certain device parameters or open a graphics file (see
  19.  *               note). Called only once to set things up. */
  20. /* pl_line    : Draws a line between two points. */
  21. /* pl_clear   : Clears screen or ejects page or closes file (see note). */
  22. /* pl_page    : Set up for plotting on a new page. May also open a new
  23.  *              a new graphics file (see note). */
  24. /* pl_tidy    : Tidy up. May close graphics file (see note). */
  25. /* pl_color   : Change pen color. */
  26. /* pl_text    : Switch device to text mode. */
  27. /* pl_graph   : Switch device to graphics mode. */
  28. /* pl_width   : Set graphics pen width. */
  29.  
  30. /* NOTE: Some devices allow multi-page plots to be stored in a single *
  31.  *       graphics file, in which case the graphics file should be opened *
  32.  *       in the pl_init() routine and closed in pl_tidy(). If multi-page *
  33.  *       plots need to be stored in different files then pl_page() should *
  34.  *       open the file and pl_clear() should close it. Do NOT open files *
  35.  *       in both pl_init() and pl_page() or close files in both pl_clear() *
  36.  *       and pl_tidy() */
  37.  
  38. struct dispatch_table {
  39.    char *pl_MenuStr;
  40.    void (*pl_setup) PLARGS((PLFLT xdpi, PLFLT ydpi, PLINT xwid, PLINT ywid));
  41.    void (*pl_select) PLARGS((PLINT orient, char *filename));
  42.    void (*pl_init) PLARGS((void));
  43.    void (*pl_line) PLARGS((PLINT x1, PLINT y1, PLINT x2, PLINT y2));
  44.    void (*pl_clear) PLARGS((void));
  45.    void (*pl_page) PLARGS((void));
  46.    void (*pl_tidy) PLARGS((void));
  47.    void (*pl_color) PLARGS((PLINT color));
  48.    void (*pl_text) PLARGS((void));
  49.    void (*pl_graph) PLARGS((void));
  50.    void (*pl_width) PLARGS((PLINT width));
  51. };
  52.  
  53. typedef struct dispatch_table  DISPATCH_TABLE;
  54.