[BACK]Return to mac.trm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot / term

Annotation of OpenXM_contrib/gnuplot/term/mac.trm, Revision 1.1.1.2

1.1       maekawa     1: /*
1.1.1.2 ! maekawa     2:  * $Id: mac.trm,v 1.1.2.1 1999/10/19 19:51:03 lhecking Exp $
1.1       maekawa     3:  *
                      4:  */
                      5:
                      6: /* GNUPLOT -- mac.trm */
                      7:
                      8: /* Macintosh graphics terminal */
                      9:
                     10: /*[
                     11:  * Copyright 1986 - 1993, 1998   Thomas Williams, Colin Kelley
                     12:  *
                     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.
                     18:  *
                     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,
                     23:  * provided you
                     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
                     31:  *    software.
                     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.
                     35:  *
                     36:  * This software is provided "as is" without express or implied warranty
                     37:  * to the extent permitted by applicable law.
                     38: ]*/
                     39:
                     40: #ifndef GOT_DRIVER_H
                     41: #include "driver.h"
                     42: #endif
                     43:
                     44: #ifdef TERM_REGISTER
                     45: register_term(mac)
                     46: #endif
                     47:
                     48: /******************************************************************************
                     49: *                                                                             *
                     50: * struct TERMENTRY {                                                          *
                     51: *     char *name;                                                             *
                     52: *     char *description;                                                      *
                     53: *     unsigned int xmax,ymax,v_char,h_char,v_tic,h_tic;                       *
                     54: *                                                                             *
                     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,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((char *font));                                  *
                     71: *     void (*pointsize) __PROTO((double));                                    *
                     72: *     int flags;                                                              *
                     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));                          *
                     77: * };                                                                          *
                     78: *                                                                             *
                     79: ******************************************************************************/
                     80:
                     81:
                     82:
                     83: #ifdef TERM_PROTO
                     84:
                     85: #define MAC_XMAX 494
                     86: #define MAC_YMAX 274
                     87: /*
                     88:  * #define MAC_XOFFSET (497-MAC_XMAX)
                     89:  *
                     90:  * //#define MAC_XLAST (MAC_XMAX - 1)
                     91:  * //#define MAC_YLAST (MAC_YMAX - 1)
                     92:  */
                     93:
                     94: #define MAC_VCHAR 12    /* monaco 9 point plain style */
                     95: #define MAC_HCHAR 6
                     96: #define MAC_VTIC 3
                     97: #define MAC_HTIC 3
                     98:
                     99: void MAC_init __PROTO(());
                    100: void MAC_graphics __PROTO(());
                    101: void MAC_text __PROTO(());
                    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,char *str));
                    106: int  MAC_text_angle __PROTO((int angle));
                    107: int  MAC_justify_text __PROTO((enum JUSTIFY just));
                    108: void MAC_reset __PROTO(());
                    109: void MAC_options __PROTO(());
                    110: void MAC_suspend __PROTO(());
                    111: void MAC_resume __PROTO(());
                    112: int  MAC_setfont __PROTO((char *font));
                    113: #endif
                    114:
                    115: #ifdef TERM_HELP
                    116: START_HELP(mac)
                    117: "1 macintosh",
                    118: "?set terminal macintosh",
                    119: "?set term macintosh",
                    120: "?terminal macintosh",
                    121: "?term macintosh",
                    122: "?macintosh",
                    123: " Several options may be set in the 'macintosh' driver.",
                    124: "",
                    125: " Syntax:",
1.1.1.2 ! maekawa   126: "      set terminal macintosh {singlewin | multiwin} {vertical | novertical}",
        !           127: "                             {size <width>, <height> | default}",
1.1       maekawa   128: "",
                    129: " 'singlewin' limits the output to a single window and is useful for animations.",
                    130: " 'multiwin' allows multiple windows.",
                    131: " 'vertical' is only valid under the gx option. With this option, rotated text",
                    132: "     be drawn vertically. novertical turns this option off.",
                    133: "  size <width>, <height> overrides the graph size set in the preferences",
                    134: "     dialog until it is cleared with either 'set term mac size default'",
                    135: "     or 'set term mac default'.",
                    136: "",
                    137: "  'set term mac size default' sets the window size settings to those set in",
                    138: "     the preferences dialog.",
                    139: "",
                    140: "  'set term mac default' sets all options to their default values.",
                    141: "     Default values: nogx, multiwin, novertical.",
                    142: "",
                    143: "  If you generate graphs under the multiwin option and then switch to singlewin,",
                    144: "  the next plot command will cause one more window to be created. This new",
                    145: "  window will be reused as long as singlewin is in effect. If you switch back",
                    146: "  to multiwin, generate some graphs, and then switch to singlewin again, the",
                    147: "  orginal 'singlewin' window will be resused if it is still open. Otherwise",
                    148: "  a new 'singlewin' window will be created. The 'singlewin' window is not numbered.",
                    149: #endif
                    150:
                    151:
                    152: #ifndef TERM_PROTO_ONLY
                    153: #ifdef TERM_BODY
                    154: #endif
                    155: #ifdef TERM_TABLE
                    156:
                    157: TERM_TABLE_START(mac_driver)
                    158:     "macintosh", "Macintosh Graphic Window",
                    159:     MAC_XMAX, MAC_YMAX, MAC_VCHAR+1, MAC_HCHAR,
                    160:     MAC_VTIC, MAC_HTIC, MAC_options,MAC_init, MAC_reset,
                    161:     MAC_text, null_scale, MAC_graphics, MAC_move, MAC_vector,
                    162:     MAC_linetype, MAC_put_text, MAC_text_angle,
                    163:     MAC_justify_text, do_point, do_arrow,
                    164:     MAC_setfont, NULL, TERM_CAN_MULTIPLOT+TERM_BINARY,
                    165:     MAC_suspend, MAC_resume}
                    166: #undef LAST_TERM
                    167: #define LAST_TERM mac_driver
                    168: #endif
                    169: #endif /* TERM_PROTO_ONLY */
                    170:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>