PLplot
5.9.9
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
disptab.h
Go to the documentation of this file.
1
// $Id: disptab.h 12085 2011-12-01 23:38:31Z andrewross $
2
//
3
// Defines the data structure which holds the driver functions.
4
//
5
6
#ifndef __DISPATCH_H__
7
#define __DISPATCH_H__
8
9
#include "
plConfig.h
"
10
11
struct
PLStream_struct;
12
13
enum
14
{
15
plDevType_FileOriented
= 0,
16
plDevType_Interactive
= 1,
17
plDevType_Null
= -1
18
};
19
20
//--------------------------------------------------------------------------
21
// Define structure containing pointers to device dependent functions.
22
//
23
// pl_MenuStr Pointer to string that is printed in device menu.
24
//
25
// pl_DevName A short device "name" for device selection by name.
26
//
27
// pl_type 0 for file-oriented device, 1 for interactive
28
// (the null driver uses -1 here)
29
//
30
// pl_seq The sequence number for ordering the presentation list of the
31
// available drivers. This is an ordering only, not an absolute
32
// position in the list.
33
//
34
// pl_init Initialize device. This routine may also prompt the user
35
// for certain device parameters or open a graphics file
36
// (see note). Called only once to set things up. Certain
37
// options such as familying and resolution (dots/mm) should
38
// be set up before calling this routine (note: some drivers
39
// ignore these).
40
//
41
// pl_line Draws a line between two points.
42
//
43
// pl_polyline Draws a polyline (no broken segments).
44
//
45
// pl_eop Finishes out current page (see note).
46
//
47
// pl_bop Set up for plotting on a new page. May also open a new
48
// a new graphics file (see note).
49
//
50
// pl_tidy Tidy up. May close graphics file (see note).
51
//
52
// pl_state Handle change in PLStream state
53
// (color, pen width, fill attribute, etc).
54
//
55
// pl_esc Escape function for driver-specific commands.
56
//
57
//
58
// Notes:
59
//
60
// Most devices allow multi-page plots to be stored in a single graphics
61
// file, in which case the graphics file should be opened in the pl_init()
62
// routine, closed in pl_tidy(), and page advances done by calling pl_eop
63
// and pl_bop() in sequence. If multi-page plots need to be stored in
64
// different files then pl_bop() should open the file and pl_eop() should
65
// close it. Do NOT open files in both pl_init() and pl_bop() or close
66
// files in both pl_eop() and pl_tidy().
67
//--------------------------------------------------------------------------
68
69
typedef
void
( *
plD_init_fp
)(
struct
PLStream_struct * );
70
typedef
void
( *
plD_line_fp
)(
struct
PLStream_struct *, short, short, short, short );
71
typedef
void
( *
plD_polyline_fp
)(
struct
PLStream_struct *,
short
*,
short
*,
PLINT
);
72
typedef
void
( *
plD_eop_fp
)(
struct
PLStream_struct * );
73
typedef
void
( *
plD_bop_fp
)(
struct
PLStream_struct * );
74
typedef
void
( *
plD_tidy_fp
)(
struct
PLStream_struct * );
75
typedef
void
( *
plD_state_fp
)(
struct
PLStream_struct *,
PLINT
);
76
typedef
void
( *
plD_esc_fp
)(
struct
PLStream_struct *,
PLINT
,
void
* );
77
78
typedef
struct
79
{
80
const
char
*
pl_MenuStr
;
81
const
char
*
pl_DevName
;
82
int
pl_type
;
83
int
pl_seq
;
84
plD_init_fp
pl_init
;
85
plD_line_fp
pl_line
;
86
plD_polyline_fp
pl_polyline
;
87
plD_eop_fp
pl_eop
;
88
plD_bop_fp
pl_bop
;
89
plD_tidy_fp
pl_tidy
;
90
plD_state_fp
pl_state
;
91
plD_esc_fp
pl_esc
;
92
}
PLDispatchTable
;
93
94
#endif // __DISPATCH_H__
include
disptab.h
Generated on Sat Sep 14 2013 05:04:12 for PLplot by
1.8.4