[BACK]Return to ifplot.h CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / plot

Annotation of OpenXM_contrib2/asir2000/plot/ifplot.h, Revision 1.2

1.2     ! noro        1: /*
        !             2:  * Copyright (c) 1994-2000 FUJITSU LABORATORIES LIMITED
        !             3:  * All rights reserved.
        !             4:  *
        !             5:  * FUJITSU LABORATORIES LIMITED ("FLL") hereby grants you a limited,
        !             6:  * non-exclusive and royalty-free license to use, copy, modify and
        !             7:  * redistribute, solely for non-commercial and non-profit purposes, the
        !             8:  * computer program, "Risa/Asir" ("SOFTWARE"), subject to the terms and
        !             9:  * conditions of this Agreement. For the avoidance of doubt, you acquire
        !            10:  * only a limited right to use the SOFTWARE hereunder, and FLL or any
        !            11:  * third party developer retains all rights, including but not limited to
        !            12:  * copyrights, in and to the SOFTWARE.
        !            13:  *
        !            14:  * (1) FLL does not grant you a license in any way for commercial
        !            15:  * purposes. You may use the SOFTWARE only for non-commercial and
        !            16:  * non-profit purposes only, such as academic, research and internal
        !            17:  * business use.
        !            18:  * (2) The SOFTWARE is protected by the Copyright Law of Japan and
        !            19:  * international copyright treaties. If you make copies of the SOFTWARE,
        !            20:  * with or without modification, as permitted hereunder, you shall affix
        !            21:  * to all such copies of the SOFTWARE the above copyright notice.
        !            22:  * (3) An explicit reference to this SOFTWARE and its copyright owner
        !            23:  * shall be made on your publication or presentation in any form of the
        !            24:  * results obtained by use of the SOFTWARE.
        !            25:  * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
        !            26:  * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification
        !            27:  * for such modification or the source code of the modified part of the
        !            28:  * SOFTWARE.
        !            29:  *
        !            30:  * THE SOFTWARE IS PROVIDED AS IS WITHOUT ANY WARRANTY OF ANY KIND. FLL
        !            31:  * MAKES ABSOLUTELY NO WARRANTIES, EXPRESSED, IMPLIED OR STATUTORY, AND
        !            32:  * EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS
        !            33:  * FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT OF THIRD PARTIES'
        !            34:  * RIGHTS. NO FLL DEALER, AGENT, EMPLOYEES IS AUTHORIZED TO MAKE ANY
        !            35:  * MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS WARRANTY.
        !            36:  * UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT,
        !            37:  * OR OTHERWISE, SHALL FLL BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
        !            38:  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
        !            39:  * DAMAGES OF ANY CHARACTER, INCLUDING, WITHOUT LIMITATION, DAMAGES
        !            40:  * ARISING OUT OF OR RELATING TO THE SOFTWARE OR THIS AGREEMENT, DAMAGES
        !            41:  * FOR LOSS OF GOODWILL, WORK STOPPAGE, OR LOSS OF DATA, OR FOR ANY
        !            42:  * DAMAGES, EVEN IF FLL SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF
        !            43:  * SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. EVEN IF A PART
        !            44:  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
        !            45:  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
        !            46:  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
        !            47:  *
        !            48:  * $OpenXM: OpenXM_contrib2/asir2000/plot/ifplot.h,v 1.1.1.1 1999/12/03 07:39:13 noro Exp $
        !            49: */
1.1       noro       50: #if defined(THINK_C)
                     51: #include        <QuickDraw.h>
                     52: #include        <Windows.h>
                     53: #include        <Events.h>
                     54: #include        <OSUtils.h>
                     55: #include        <ToolUtils.h>
                     56: #include        <Fonts.h>
                     57: /* #include        <Strings.h> */
                     58: #else
                     59: #include <sys/types.h>
                     60: #include <X11/Xlib.h>
                     61: #include <X11/Xutil.h>
                     62: #include <X11/Xatom.h>
                     63: #include <X11/Intrinsic.h>
                     64: #include <X11/StringDefs.h>
                     65: #include <X11/Shell.h>
                     66: #include <X11/Xaw/Form.h>
                     67: #include <X11/Xaw/Command.h>
                     68: #include <X11/Xaw/Label.h>
                     69: #include <X11/Xaw/Simple.h>
                     70: #include <X11/Xaw/Dialog.h>
                     71: #include <X11/Xaw/Box.h>
                     72: #ifndef OLDX11
                     73: #include <X11/Xaw/Toggle.h>
                     74: #include <X11/Xaw/Scrollbar.h>
                     75: #else
                     76: #include <X11/Xaw/Scroll.h>
                     77: #define toggleWidgetClass commandWidgetClass
                     78: #define XtPointer pointer
                     79: #define XawDialogAddButton XtDialogAddButton
                     80: #define XawScrollbarSetThumb XtScrollBarSetThumb
                     81: #endif
                     82: #endif
                     83:
                     84: #define C_IFPLOT C_PRIV
                     85: #define C_BMPLOT C_PRIV+1
                     86: #define C_CLEAR C_PRIV+2
                     87: #define C_PMFLUSH C_PRIV+3
                     88: #define C_CONPLOT C_PRIV+4
                     89: #define C_PLOTOVER C_PRIV+5
                     90: #define C_PLOT C_PRIV+6
                     91: #define C_APLOT C_PRIV+7
                     92: #define C_DRAWCIRCLE C_PRIV+8
                     93:
                     94: #define MAXCANVAS 16
                     95: #define MAXGC 16
                     96: #if defined(THINK_C)
                     97: #define DEFAULTWIDTH 200
                     98: #define DEFAULTHEIGHT 200
                     99: #else
                    100: #define DEFAULTWIDTH 400
                    101: #define DEFAULTHEIGHT 400
                    102: #endif
                    103:
                    104: #define MODE_IFPLOT 0
                    105: #define MODE_CONPLOT 1
                    106: #define MODE_PLOT 2
                    107:
                    108: #define DIR_X 0
                    109: #define DIR_Y 1
                    110: #define DIR_Z 2
                    111:
                    112: #if defined(THINK_C)
                    113: #define COPYBITS
                    114:
                    115: #define POINT Point
                    116: #define XC(a) ((a).h)
                    117: #define YC(a) ((a).v)
                    118: #define DRAWPOINT(d,p,g,x,y) MoveTo(x,y); Line(0,0)
                    119: #define DRAWLINE(d,p,g,x,y,u,v) MoveTo(x,y); LineTo(u,v)
                    120: #define DRAWSTRING(d,p,g,x,y,s,l) MoveTo(x,y); DrawText(s,0,l)
                    121: #define TEXTWIDTH(f,s,l) TextWidth(s,0,l)
                    122: #define DISPLAY int
                    123: #define WINDOW WindowPtr
                    124: #define CURSOR CursHandle
                    125: #ifndef COPYBITS
                    126: #define DRAWABLE PicHandle
                    127: #else
                    128: #define DRAWABLE BitMap
                    129: #endif
                    130: #else
                    131: #define POINT XPoint
                    132: #define XC(a) ((a).x)
                    133: #define YC(a) ((a).y)
                    134: #define DRAWPOINT(d,p,g,x,y) (count_and_flush(),XDrawPoint(d,p,g,x,y))
                    135: #define DRAWLINE(d,p,g,x,y,u,v) XDrawLine(d,p,g,x,y,u,v)
                    136: #define DRAWSTRING(d,p,g,x,y,s,l) XDrawString(d,p,g,x,y,s,l)
                    137: #define TEXTWIDTH(f,s,l) XTextWidth(f,s,l)
                    138: #define DISPLAY Display
                    139: #define WINDOW Window
                    140: #define CURSOR Cursor
                    141: #define DRAWABLE Drawable
                    142: #endif
                    143:
                    144: struct pa {
                    145:        int length;
                    146:        POINT *pos;
                    147: };
                    148:
                    149: struct canvas {
                    150:        int index;
                    151: #if defined(THINK_C)
                    152:        Rect rect;
                    153:        WindowRecord record;
                    154:        WindowPtr window;
                    155: #ifndef COPYBITS
                    156:        PicHandle pix;
                    157: #else
                    158:        BitMap pix,wbits;
                    159:        RgnHandle rgnsav;
                    160: #endif
                    161: #else
                    162:        Widget shell,xcoord,ycoord,xdone,ydone,level,wideb,preciseb,noaxisb;
                    163:        Window window;
                    164:        Pixmap pix;
                    165: #endif
                    166:        char *wname;
                    167:        char mode;
                    168:        char wide;
                    169:        char precise;
                    170:        char noaxis;
                    171:        V vx,vy;
                    172:        P formula;
                    173:        int width,height;
                    174:        double xmin,xmax;
                    175:        double ymin,ymax;
                    176:        double zmin,zmax;
                    177:        int nzstep;
                    178:        Q qxmin,qxmax;
                    179:        Q qymin,qymax;
                    180:        struct pa *pa;
                    181: };
                    182:
                    183: extern struct canvas *canvas[];
                    184: extern struct canvas *current_can;
                    185:
                    186: #ifdef INET
                    187: extern VL CO;
                    188: extern int stream;
                    189: #endif
                    190:
                    191: extern DISPLAY *display;
                    192: extern CURSOR normalcur,runningcur,errorcur;
                    193:
                    194: #if !defined(THINK_C)
                    195: extern Window rootwin;
                    196: extern GC drawGC,dashGC,hlGC,scaleGC,clearGC,xorGC,colorGC;
                    197: extern XFontStruct *sffs;
                    198: #endif

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