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