PLplot  5.10.0
disptab.h
Go to the documentation of this file.
00001 // Defines the data structure which holds the driver functions.
00002 //
00003 
00004 #ifndef __DISPATCH_H__
00005 #define __DISPATCH_H__
00006 
00007 #include "plConfig.h"
00008 
00009 struct PLStream_struct;
00010 
00011 enum
00012 {
00013     plDevType_FileOriented = 0,
00014     plDevType_Interactive  = 1,
00015     plDevType_Null         = -1
00016 };
00017 
00018 //--------------------------------------------------------------------------
00019 // Define structure containing pointers to device dependent functions.
00020 //
00021 // pl_MenuStr   Pointer to string that is printed in device menu.
00022 //
00023 // pl_DevName   A short device "name" for device selection by name.
00024 //
00025 // pl_type      0 for file-oriented device, 1 for interactive
00026 //              (the null driver uses -1 here)
00027 //
00028 // pl_seq       The sequence number for ordering the presentation list of the
00029 //              available drivers.  This is an ordering only, not an absolute
00030 //              position in the list.
00031 //
00032 // pl_init      Initialize device.  This routine may also prompt the user
00033 //              for certain device parameters or open a graphics file
00034 //              (see note).  Called only once to set things up.  Certain
00035 //              options such as familying and resolution (dots/mm) should
00036 //              be set up before calling this routine (note: some drivers
00037 //              ignore these).
00038 //
00039 // pl_line      Draws a line between two points.
00040 //
00041 // pl_polyline  Draws a polyline (no broken segments).
00042 //
00043 // pl_eop       Finishes out current page (see note).
00044 //
00045 // pl_bop       Set up for plotting on a new page. May also open a new
00046 //              a new graphics file (see note).
00047 //
00048 // pl_tidy      Tidy up. May close graphics file (see note).
00049 //
00050 // pl_state     Handle change in PLStream state
00051 //              (color, pen width, fill attribute, etc).
00052 //
00053 // pl_esc       Escape function for driver-specific commands.
00054 //
00055 //
00056 // Notes:
00057 //
00058 // Most devices allow multi-page plots to be stored in a single graphics
00059 // file, in which case the graphics file should be opened in the pl_init()
00060 // routine, closed in pl_tidy(), and page advances done by calling pl_eop
00061 // and pl_bop() in sequence. If multi-page plots need to be stored in
00062 // different files then pl_bop() should open the file and pl_eop() should
00063 // close it.  Do NOT open files in both pl_init() and pl_bop() or close
00064 // files in both pl_eop() and pl_tidy().
00065 //--------------------------------------------------------------------------
00066 
00067 typedef void ( *plD_init_fp )( struct PLStream_struct * );
00068 typedef void ( *plD_line_fp )( struct PLStream_struct *, short, short, short, short );
00069 typedef void ( *plD_polyline_fp )( struct PLStream_struct *, short *, short *, PLINT );
00070 typedef void ( *plD_eop_fp )( struct PLStream_struct * );
00071 typedef void ( *plD_bop_fp )( struct PLStream_struct * );
00072 typedef void ( *plD_tidy_fp )( struct PLStream_struct * );
00073 typedef void ( *plD_state_fp )( struct PLStream_struct *, PLINT );
00074 typedef void ( *plD_esc_fp )( struct PLStream_struct *, PLINT, void * );
00075 
00076 typedef struct
00077 {
00078     char            *pl_MenuStr;
00079     char            *pl_DevName;
00080     int             pl_type;
00081     int             pl_seq;
00082     plD_init_fp     pl_init;
00083     plD_line_fp     pl_line;
00084     plD_polyline_fp pl_polyline;
00085     plD_eop_fp      pl_eop;
00086     plD_bop_fp      pl_bop;
00087     plD_tidy_fp     pl_tidy;
00088     plD_state_fp    pl_state;
00089     plD_esc_fp      pl_esc;
00090 } PLDispatchTable;
00091 
00092 #endif // __DISPATCH_H__
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines