1 /* Hello, Emacs, this is -*-C-*-
2 * $Id: mac.trm,v 1.9 2006/07/21 02:35:47 sfeam Exp $
6 /* GNUPLOT -- mac.trm */
8 /* Macintosh graphics terminal */
11 * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
13 * Permission to use, copy, and distribute this software and its
14 * documentation for any purpose with or without fee is hereby granted,
15 * provided that the above copyright notice appear in all copies and
16 * that both that copyright notice and this permission notice appear
17 * in supporting documentation.
19 * Permission to modify the software is granted, but not the right to
20 * distribute the complete modified source code. Modifications are to
21 * be distributed as patches to the released version. Permission to
22 * distribute binaries produced by compiling modified sources is granted,
24 * 1. distribute the corresponding source modifications from the
25 * released version in the form of a patch file along with the binaries,
26 * 2. add special version identification to distinguish your version
27 * in addition to the base release version number,
28 * 3. provide your name and address as the primary contact for the
29 * support of your modified version, and
30 * 4. retain our contact information in regard to use of the base
32 * Permission to distribute the released version of the source code along
33 * with corresponding source modifications in the form of a patch file is
34 * granted with same provisions 2 through 4 for binary distributions.
36 * This software is provided "as is" without express or implied warranty
37 * to the extent permitted by applicable law.
48 /******************************************************************************
50 * struct TERMENTRY { *
52 * char *description; *
53 * unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic; *
55 * void (*options) __PROTO((void)); *
56 * void (*init) __PROTO((void)); *
57 * void (*reset) __PROTO((void)); *
58 * void (*text) __PROTO((void)); *
59 * int (*scale) __PROTO((double, double)); *
60 * void (*graphics) __PROTO((void)); *
61 * void (*move) __PROTO((unsigned int, unsigned int)); *
62 * void (*vector) __PROTO((unsigned int, unsigned int)); *
63 * void (*linetype) __PROTO((int)); *
64 * void (*put_text) __PROTO((unsigned int, unsigned int,const char*)); *
65 * -- the following are optional. set term ensures they are not NULL *
66 * int (*text_angle) __PROTO((int)); *
67 * int (*justify_text) __PROTO((enum JUSTIFY)); *
68 * void (*point) __PROTO((unsigned int, unsigned int,int)); *
69 * void (*arrow) __PROTO((unsigned int, unsigned int, unsigned int, unsigned int,int)); *
70 * int (*set_font) __PROTO((const char *font)); *
71 * void (*pointsize) __PROTO((double)); *
73 * void (*suspend) __PROTO((void)); -- called after one plot of multiplot *
74 * void (*resume) __PROTO((void)); -- called before plots of multiplot *
75 * void (*fillbox) __PROTO((int style, unsigned int x1, unsigned int y1, unsigned)) -- clear in multiplot mode *
76 * void (*linewidth) __PROTO((double linewidth)); *
79 ******************************************************************************/
88 * #define MAC_XOFFSET (497-MAC_XMAX)
90 * #define MAC_XLAST (MAC_XMAX - 1)
91 * #define MAC_YLAST (MAC_YMAX - 1)
94 #define MAC_VCHAR 12 /* monaco 9 point plain style */
99 void MAC_init __PROTO((void));
100 void MAC_graphics __PROTO((void));
101 void MAC_text __PROTO((void));
102 void MAC_linetype __PROTO((int linetype));
103 void MAC_move __PROTO((unsigned int x,unsigned int y));
104 void MAC_vector __PROTO((unsigned int x,unsigned int y));
105 void MAC_put_text __PROTO((unsigned int x,unsigned int y,const char *str));
106 int MAC_text_angle __PROTO((int angle));
107 int MAC_justify_text __PROTO((enum JUSTIFY just));
108 void MAC_reset __PROTO((void));
109 void MAC_options __PROTO((void));
110 void MAC_suspend __PROTO((void));
111 void MAC_resume __PROTO((void));
112 int MAC_setfont __PROTO((char *font));
113 #endif /* TERM_PROTO */
115 #ifndef TERM_PROTO_ONLY
117 #endif /* TERM_BODY */
121 TERM_TABLE_START(mac_driver)
122 "macintosh", "Macintosh Graphic Window",
123 MAC_XMAX, MAC_YMAX, MAC_VCHAR+1, MAC_HCHAR,
124 MAC_VTIC, MAC_HTIC, MAC_options,MAC_init, MAC_reset,
125 MAC_text, null_scale, MAC_graphics, MAC_move, MAC_vector,
126 MAC_linetype, MAC_put_text, MAC_text_angle,
127 MAC_justify_text, do_point, do_arrow,
128 MAC_setfont, NULL, TERM_CAN_MULTIPLOT+TERM_BINARY,
129 MAC_suspend, MAC_resume
130 TERM_TABLE_END(mac_driver)
133 #define LAST_TERM mac_driver
135 #endif /* TERM_TABLE */
136 #endif /* TERM_PROTO_ONLY */
141 "?set terminal macintosh",
142 "?set term macintosh",
143 "?terminal macintosh",
146 " Several options may be set in the 'macintosh' driver.",
149 " set terminal macintosh {singlewin | multiwin} {vertical | novertical}",
150 " {size <width>, <height> | default}",
152 " 'singlewin' limits the output to a single window and is useful for animations.",
153 " 'multiwin' allows multiple windows.",
154 " 'vertical' is only valid under the gx option. With this option, rotated text",
155 " be drawn vertically. novertical turns this option off.",
156 " size <width>, <height> overrides the graph size set in the preferences",
157 " dialog until it is cleared with either 'set term mac size default'",
158 " or 'set term mac default'.",
160 " 'set term mac size default' sets the window size settings to those set in",
161 " the preferences dialog.",
163 " 'set term mac default' sets all options to their default values.",
164 " Default values: nogx, multiwin, novertical.",
166 " If you generate graphs under the multiwin option and then switch to singlewin,",
167 " the next plot command will cause one more window to be created. This new",
168 " window will be reused as long as singlewin is in effect. If you switch back",
169 " to multiwin, generate some graphs, and then switch to singlewin again, the",
170 " orginal 'singlewin' window will be resused if it is still open. Otherwise",
171 " a new 'singlewin' window will be created. The 'singlewin' window is not numbered."
173 #endif /* TERM_HELP */