home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / disks / disk373.lzh / Multiplot / source / mplot_src / src.zoo / physio.h < prev    next >
C/C++ Source or Header  |  1990-08-02  |  50KB  |  1,192 lines

  1. #include <graphics/display.h>
  2. #include <libraries/dosextens.h>
  3. #include <libraries/diskfont.h>
  4. #include <exec/exec.h>
  5. #include <intuition/intuitionbase.h>
  6. #include <graphics/regions.h>
  7. #include <devices/keymap.h>
  8. #include <stdio.h>
  9. #include <dos.h>
  10. #include <workbench/startup.h>
  11. #include <graphics/gfxmacros.h>
  12. #include <graphics/gfxbase.h>
  13. #include <math.h>
  14.  
  15. #include "struct.h"
  16. #include "plot.h"
  17.  
  18. extern int MAXVERT;
  19. extern int MAXHORIZ;
  20. extern int XMAXP;
  21. extern int XMINP;
  22. extern int YMAXP;
  23. extern int YMINP;
  24. extern int TMARGIN;
  25. extern int BMARGIN;
  26. extern int CALC_XMIN;
  27.  
  28. extern struct PlotRegion *FullReg;
  29. extern USHORT chip WaitSprite[];
  30.  
  31.  
  32. struct Window *OpenWindow();
  33. struct InputEvent *Intuition();
  34. struct Screen *OpenScreen();
  35. int WrtPlt();
  36.  
  37. struct RastPort *rp;
  38. struct ViewPort *vp;
  39. struct Window *window;
  40. struct IntuiMessage *msg;
  41. struct Screen *screen;
  42.  
  43. struct NewScreen newscreen = {
  44.         0,0,                    /* start pos.*/
  45.         MaxHORIZ,MaxVERT,4,     /* width height depth (4 bit planes) */
  46.         2,1,                    /* detail pen, block pen */
  47.         HIRES | LACE,           /* viewing mode (640x400 interlaced) */
  48.         CUSTOMSCREEN,           /* screen type */
  49.         NULL,                   /* font */
  50.         "MultiPlot XLNc                      © AG Baxter & T Mooney 1987 - 1990            ",
  51.         NULL                    /* gadget pointer */
  52.         };
  53.  
  54. struct NewWindow newwindow = {
  55.         0,0,                                    /* Starting corner */
  56.         MaxHORIZ,MaxVERT,                       /* Width, height */
  57.         1,14,                                   /* detail, block pens */
  58.         RAWKEY | MENUPICK | MOUSEMOVE | MOUSEBUTTONS,    /* IDCMP flags */
  59.         BACKDROP | ACTIVATE | BORDERLESS | NOCAREREFRESH | REPORTMOUSE,
  60.         NULL,                                   /* Pointer to first gadget */
  61.         NULL,                                   /* Pointer to checkmark */
  62.         NULL,                                   /* title */
  63.         NULL,                                   /* screen pointer */
  64.         NULL,                                   /* bitmap pointer */
  65.         0,0,0,0,                                /* sizing limits */
  66.         CUSTOMSCREEN                            /* type of screen */
  67.         };
  68.  
  69. char Def_file[150];
  70. extern char StartDir[150];
  71. struct IntuiText LogFitText = {
  72.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  73.         0,0,    /* XY origin relative to container TopLeft */
  74.         NULL,   /* font pointer or NULL for default */
  75.         "Exponential Fit",   /* pointer to text */
  76.         NULL    /* next IntuiText structure */
  77. };
  78.  
  79. struct MenuItem LogFit = {
  80.         NULL,     /* next MenuItem structure */
  81.         0,30,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  82.         140,10,  /* hit box width and height */
  83.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  84.         0,      /* each bit mutually-excludes a same-level Item */
  85.         (APTR)&LogFitText,  /* Item render  (IntuiText or Image or NULL) */
  86.         NULL,   /* Select render */
  87.         NULL,   /* alternate command-key */
  88.         NULL,   /* SubItem list */
  89.         MENUNULL        /* filled in by Intuition for drag selections */
  90. };
  91. #define MI_LOGFIT 3
  92.  
  93.  
  94.  
  95. struct IntuiText LineFitText = {
  96.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  97.         0,0,    /* XY origin relative to container TopLeft */
  98.         NULL,   /* font pointer or NULL for default */
  99.         "Linear Fit",   /* pointer to text */
  100.         NULL    /* next IntuiText structure */
  101. };
  102.  
  103. struct MenuItem LineFit = {
  104.         &LogFit,     /* next MenuItem structure */
  105.         0,20,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  106.         140,10,  /* hit box width and height */
  107.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  108.         0,      /* each bit mutually-excludes a same-level Item */
  109.         (APTR)&LineFitText,  /* Item render  (IntuiText or Image or NULL) */
  110.         NULL,   /* Select render */
  111.         NULL,   /* alternate command-key */
  112.         NULL,   /* SubItem list */
  113.         MENUNULL        /* filled in by Intuition for drag selections */
  114. };
  115. #define MI_LINEFIT 2
  116.  
  117.  
  118. struct IntuiText SmoothText = {
  119.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  120.         0,0,    /* XY origin relative to container TopLeft */
  121.         NULL,   /* font pointer or NULL for default */
  122.         "Smooth Data Set...",   /* pointer to text */
  123.         NULL    /* next IntuiText structure */
  124. };
  125.  
  126. struct MenuItem Smooth = {
  127.         &LineFit,     /* next MenuItem structure */
  128.         0,10,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  129.         140,10,  /* hit box width and height */
  130.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  131.         0,      /* each bit mutually-excludes a same-level Item */
  132.         (APTR)&SmoothText,  /* Item render  (IntuiText or Image or NULL) */
  133.         NULL,   /* Select render */
  134.         NULL,   /* alternate command-key */
  135.         NULL,   /* SubItem list */
  136.         MENUNULL        /* filled in by Intuition for drag selections */
  137. };
  138. #define MI_SMOOTH 1
  139.  
  140. struct IntuiText SortText = {
  141.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  142.         0,0,    /* XY origin relative to container TopLeft */
  143.         NULL,   /* font pointer or NULL for default */
  144.         "Sort Data Set",   /* pointer to text */
  145.         NULL    /* next IntuiText structure */
  146. };
  147.  
  148. struct MenuItem Sort = {
  149.         &Smooth,     /* next MenuItem structure */
  150.         0,0,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  151.         140,10,  /* hit box width and height */
  152.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  153.         0,      /* each bit mutually-excludes a same-level Item */
  154.         (APTR)&SortText,  /* Item render  (IntuiText or Image or NULL) */
  155.         NULL,   /* Select render */
  156.         NULL,   /* alternate command-key */
  157.         NULL,   /* SubItem list */
  158.         MENUNULL        /* filled in by Intuition for drag selections */
  159. };
  160. #define MI_SORT 0
  161.  
  162. struct Menu Functions = {
  163.         NULL,   /* next Menu structure */
  164.         320,0,  /* XY origin of Menu hit box relative to screen TopLeft */
  165.         95,0,   /* Menu hit box width and height */
  166.         MENUENABLED,    /* Menu flags */
  167.         "Functions",      /* text of Menu name */
  168.         &Sort      /* MenuItem linked list pointer */
  169. };
  170. #define M_FUNCTIONS 4
  171.  
  172. struct IntuiText MTextST = {
  173.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  174.         0,0,    /* XY origin relative to container TopLeft */
  175.         NULL,   /* font pointer or NULL for default */
  176.         "Screen Title",     /* pointer to text */
  177.         NULL    /* next IntuiText structure */
  178. };
  179.  
  180. struct MenuItem ScreenTitle = {
  181.         NULL,   /* next MenuItem structure */
  182.         0,60,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  183.         140,10,  /* hit box width and height */
  184.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  185.         0,      /* each bit mutually-excludes a same-level Item */
  186.         (APTR)&MTextST,  /* Item render  (IntuiText or Image or NULL) */
  187.         NULL,   /* Select render */
  188.         'U',    /* alternate command-key */
  189.         NULL,   /* SubItem list */
  190.         MENUNULL        /* filled in by Intuition for drag selections */
  191. };
  192. #define MI_SCREENTITLE 6
  193.  
  194.  
  195. struct IntuiText MText1b = {
  196.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  197.         0,0,   /* XY origin relative to container TopLeft */
  198.         NULL,   /* font pointer or NULL for default */
  199.         "Save",     /* pointer to text */
  200.         NULL    /* next IntuiText structure */
  201. };
  202.  
  203. struct MenuItem SaveColours = {
  204.         NULL,      /* next SubItem structure */
  205.         77,16,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  206.         92,10,   /* hit box width and height */
  207.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  208.         0,      /* each bit mutually-excludes a same-level Item */
  209.         (APTR)&MText1b,  /* Item render  (IntuiText or Image or NULL) */
  210.         NULL,   /* Select render */
  211.         NULL,   /* alternate command-key */
  212.         NULL,   /* no SubItem list for SubItems */
  213.         MENUNULL        /* filled in by Intuition for drag selections */
  214. };
  215. #define SI_SAVECOL 1
  216.  
  217. struct IntuiText MText1a = {
  218.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  219.         0,0,    /* XY origin relative to container TopLeft */
  220.         NULL,   /* font pointer or NULL for default */
  221.         "Alter...",     /* pointer to text */
  222.         NULL    /* next IntuiText structure */
  223. };
  224.  
  225.  
  226. struct MenuItem AlterColours = {
  227.         &SaveColours,   /* next MenuItem structure */
  228.         77,6,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  229.         92,10,   /* hit box width and height */
  230.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  231.         0,      /* each bit mutually-excludes a same-level Item */
  232.         (APTR)&MText1a,  /* Item render  (IntuiText or Image or NULL) */
  233.         NULL,   /* Select render */
  234.         NULL,   /* alternate command-key */
  235.         NULL,   /* no SubItem list for SubItems */
  236.         MENUNULL        /* filled in by Intuition for drag selections */
  237. };
  238. #define SI_ALTERCOL 0
  239.  
  240. struct IntuiText MText1 = {
  241.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  242.         0,0,    /* XY origin relative to container TopLeft */
  243.         NULL,   /* font pointer or NULL for default */
  244.         "Palette »",     /* pointer to text */
  245.         NULL    /* next IntuiText structure */
  246. };
  247.  
  248. struct MenuItem Palette = {
  249.         &ScreenTitle,   /* next MenuItem structure */
  250.         0,50,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  251.         140,10,  /* hit box width and height */
  252.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  253.         0,      /* each bit mutually-excludes a same-level Item */
  254.         (APTR)&MText1,  /* Item render  (IntuiText or Image or NULL) */
  255.         NULL,   /* Select render */
  256.         NULL,    /* alternate command-key */
  257.         &AlterColours,   /* SubItem list */
  258.         MENUNULL        /* filled in by Intuition for drag selections */
  259. };
  260. #define MI_PALETTE 5
  261.  
  262. struct IntuiText ErrorBarsText = {
  263.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  264.         0,0,    /* XY origin relative to container TopLeft */
  265.         NULL,   /* font pointer or NULL for default */
  266.         "Error Bars",     /* pointer to text */
  267.         NULL    /* next IntuiText structure */
  268. };
  269.  
  270. struct MenuItem ErrorBars = {
  271.         &Palette,     /* next MenuItem structure */
  272.         0,40,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  273.         140,10,  /* hit box width and height */
  274.         ITEMTEXT+COMMSEQ+HIGHCOMP,  /* Item flags */
  275.         0,      /* each bit mutually-excludes a same-level Item */
  276.         (APTR)&ErrorBarsText,  /* Item render  (IntuiText or Image or NULL) */
  277.         NULL,   /* Select render */
  278.         'E',    /* alternate command-key */
  279.         NULL,   /* SubItem list */
  280.         MENUNULL        /* filled in by Intuition for drag selections */
  281. };
  282. #define MI_ERRBARS 4
  283.  
  284. struct IntuiText RMarginText = {
  285.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  286.         0,0,    /* XY origin relative to container TopLeft */
  287.         NULL,   /* font pointer or NULL for default */
  288.         "Right Margin",     /* pointer to text */
  289.         NULL    /* next IntuiText structure */
  290. };
  291.  
  292. struct MenuItem RMargin = {
  293.         &ErrorBars,     /* next MenuItem structure */
  294.         0,30,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  295.         140,10,  /* hit box width and height */
  296.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  297.         0,      /* each bit mutually-excludes a same-level Item */
  298.         (APTR)&RMarginText,  /* Item render  (IntuiText or Image or NULL) */
  299.         NULL,   /* Select render */
  300.         'M',    /* alternate command-key */
  301.         NULL,   /* SubItem list */
  302.         MENUNULL        /* filled in by Intuition for drag selections */
  303. };
  304. #define MI_RMARGIN 3
  305.  
  306. struct IntuiText MText2c = {
  307.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  308.         0,0,    /* XY origin relative to container TopLeft */
  309.         NULL,   /* font pointer or NULL for default */
  310.         "   None",     /* pointer to text */
  311.         NULL    /* next IntuiText structure */
  312. };
  313.  
  314. struct MenuItem NoAxes = {
  315.         NULL,   /* next MenuItem structure */
  316.         77,26,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  317.         120,10,   /* hit box width and height */
  318.         CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  319.         0xFFFC,      /* each bit mutually-excludes a same-level Item */
  320.         (APTR)&MText2c,  /* Item render  (IntuiText or Image or NULL) */
  321.         NULL,   /* Select render */
  322.         NULL,   /* alternate command-key */
  323.         NULL,   /* no SubItem list for SubItems */
  324.         MENUNULL        /* filled in by Intuition for drag selections */
  325. };
  326. #define SI_NOAXES 2
  327.  
  328. struct IntuiText MText2b = {
  329.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  330.         0,0,    /* XY origin relative to container TopLeft */
  331.         NULL,   /* font pointer or NULL for default */
  332.         "   Box",     /* pointer to text */
  333.         NULL    /* next IntuiText structure */
  334. };
  335.  
  336. struct MenuItem BoxAxes = {
  337.         &NoAxes,   /* next MenuItem structure */
  338.         77,16,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  339.         120,10,   /* hit box width and height */
  340.         CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  341.         0xFFFD,      /* each bit mutually-excludes a same-level Item */
  342.         (APTR)&MText2b,  /* Item render  (IntuiText or Image or NULL) */
  343.         NULL,   /* Select render */
  344.         'B',   /* alternate command-key */
  345.         NULL,   /* no SubItem list for SubItems */
  346.         MENUNULL        /* filled in by Intuition for drag selections */
  347. };
  348. #define SI_BOXAXES 1
  349.  
  350. struct IntuiText MText2a = {
  351.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  352.         0,0,    /* XY origin relative to container TopLeft */
  353.         NULL,   /* font pointer or NULL for default */
  354.         "   X and Y",     /* pointer to text */
  355.         NULL    /* next IntuiText structure */
  356. };
  357.  
  358. struct MenuItem StemNleaf = {
  359.         &BoxAxes,   /* next MenuItem structure */
  360.         77,6,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  361.         120,10,   /* hit box width and height */
  362.         CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  363.         0xFFFE,      /* each bit mutually-excludes a same-level Item */
  364.         (APTR)&MText2a,  /* Item render  (IntuiText or Image or NULL) */
  365.         NULL,   /* Select render */
  366.         'Y',   /* alternate command-key */
  367.         NULL,   /* no SubItem list for SubItems */
  368.         MENUNULL        /* filled in by Intuition for drag selections */
  369. };
  370. #define SI_STEMNLEAF 0
  371.  
  372. struct IntuiText MText2 = {
  373.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  374.         0,0,    /* XY origin relative to container TopLeft */
  375.         NULL,   /* font pointer or NULL for default */
  376.         "Axes »", /* pointer to text */
  377.         NULL    /* next IntuiText structure */
  378. };
  379.  
  380. struct MenuItem Axes = {
  381.         &RMargin,     /* next MenuItem structure */
  382.         0,20,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  383.         140,10,  /* hit box width and height */
  384.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  385.         0,      /* each bit mutually-excludes a same-level Item */
  386.         (APTR)&MText2,  /* Item render  (IntuiText or Image or NULL) */
  387.         NULL,   /* Select render */
  388.         NULL,    /* alternate command-key */
  389.         &StemNleaf,   /* SubItem list */
  390.         MENUNULL        /* filled in by Intuition for drag selections */
  391. };
  392. #define MI_AXES 2
  393.  
  394. struct IntuiText MText3c = {
  395.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  396.         0,0,    /* XY origin relative to container TopLeft */
  397.         NULL,   /* font pointer or NULL for default */
  398.         "   None",     /* pointer to text */
  399.         NULL    /* next IntuiText structure */
  400. };
  401.  
  402. struct MenuItem None = {
  403.         NULL,   /* next MenuItem structure */
  404.         77,26,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  405.         110,10,   /* hit box width and height */
  406.         CHECKIT+ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  407.         0xFFFC,      /* each bit mutually-excludes a same-level Item */
  408.         (APTR)&MText3c,  /* Item render  (IntuiText or Image or NULL) */
  409.         NULL,   /* Select render */
  410.         NULL,   /* alternate command-key */
  411.         NULL,   /* no SubItem list for SubItems */
  412.         MENUNULL        /* filled in by Intuition for drag selections */
  413. };
  414. #define SI_NONE 2
  415.  
  416. struct IntuiText MText3b = {
  417.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  418.         0,0,    /* XY origin relative to container TopLeft */
  419.         NULL,   /* font pointer or NULL for default */
  420.         "   Tics",     /* pointer to text */
  421.         NULL    /* next IntuiText structure */
  422. };
  423.  
  424. struct MenuItem Tics = {
  425.         &None,   /* next MenuItem structure */
  426.         77,16,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  427.         110,10,   /* hit box width and height */
  428.         CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  429.         0xFFFD,      /* each bit mutually-excludes a same-level Item */
  430.         (APTR)&MText3b,  /* Item render  (IntuiText or Image or NULL) */
  431.         NULL,   /* Select render */
  432.         'T',   /* alternate command-key */
  433.         NULL,   /* no SubItem list for SubItems */
  434.         MENUNULL        /* filled in by Intuition for drag selections */
  435. };
  436. #define SI_TICS 1
  437.  
  438. struct IntuiText MText3a = {
  439.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  440.         0,0,    /* XY origin relative to container TopLeft */
  441.         NULL,   /* font pointer or NULL for default */
  442.         "   Grid",     /* pointer to text */
  443.         NULL    /* next IntuiText structure */
  444. };
  445.  
  446. struct MenuItem  Grid_si= {
  447.         &Tics,   /* next MenuItem structure */
  448.         77,6,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  449.         110,10,   /* hit box width and height */
  450.         CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  451.         0xFFFE,      /* each bit mutually-excludes a same-level Item */
  452.         (APTR)&MText3a,  /* Item render  (IntuiText or Image or NULL) */
  453.         NULL,   /* Select render */
  454.         'G',   /* alternate command-key */
  455.         NULL,   /* no SubItem list for SubItems */
  456.         MENUNULL        /* filled in by Intuition for drag selections */
  457. };
  458. #define SI_GRID 0
  459.  
  460.  
  461. struct IntuiText MText3 = {
  462.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  463.         0,0,    /* XY origin relative to container TopLeft */
  464.         NULL,   /* font pointer or NULL for default */
  465.         "Grid »", /* pointer to text */
  466.         NULL    /* next IntuiText structure */
  467. };
  468.  
  469. struct MenuItem Grid = {
  470.         &Axes,     /* next MenuItem structure */
  471.         0,10,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  472.         140,10,  /* hit box width and height */
  473.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  474.         0,      /* each bit mutually-excludes a same-level Item */
  475.         (APTR)&MText3,  /* Item render  (IntuiText or Image or NULL) */
  476.         NULL,   /* Select render */
  477.         NULL,    /* alternate command-key */
  478.         &Grid_si,   /* SubItem list */
  479.         MENUNULL        /* filled in by Intuition for drag selections */
  480. };
  481. #define MI_GRID 1
  482.  
  483. struct IntuiText MText4 = {
  484.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  485.         0,0,    /* XY origin relative to container TopLeft */
  486.         NULL,   /* font pointer or NULL for default */
  487.         "Cross Hair",   /* pointer to text */
  488.         NULL    /* next IntuiText structure */
  489. };
  490.  
  491. struct MenuItem Crosshair = {
  492.         &Grid,     /* next MenuItem structure */
  493.         0,0,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  494.         140,10,  /* hit box width and height */
  495.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  496.         0,      /* each bit mutually-excludes a same-level Item */
  497.         (APTR)&MText4,  /* Item render  (IntuiText or Image or NULL) */
  498.         NULL,   /* Select render */
  499.         'L',   /* alternate command-key */
  500.         NULL,   /* SubItem list */
  501.         MENUNULL        /* filled in by Intuition for drag selections */
  502. };
  503. #define MI_CROSSHAIR 0
  504.  
  505. struct Menu Options = {
  506.         &Functions,   /* next Menu structure */
  507.         240,0,  /* XY origin of Menu hit box relative to screen TopLeft */
  508.         80,0,   /* Menu hit box width and height */
  509.         MENUENABLED,    /* Menu flags */
  510.         "Options",      /* text of Menu name */
  511.         &Crosshair      /* MenuItem linked list pointer */
  512. };
  513. #define M_OPTIONS 3
  514.  
  515.  
  516.  
  517. struct IntuiText MText7 = {
  518.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  519.         0,0,   /* XY origin relative to container TopLeft */
  520.         NULL,   /* font pointer or NULL for default */
  521.         "Both Locks Off",    /* pointer to text */
  522.         NULL    /* next IntuiText structure */
  523. };
  524.  
  525. struct MenuItem LocksOff = {
  526.         NULL,   /* next SubItem structure */
  527.         77,36,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  528.         120,10,   /* hit box width and height */
  529.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  530.         0,      /* each bit mutually-excludes a same-level Item */
  531.         (APTR)&MText7,  /* Item render  (IntuiText or Image or NULL) */
  532.         NULL,   /* Select render */
  533.         NULL,   /* alternate command-key */
  534.         NULL,   /* no SubItem list for SubItems */
  535.         MENUNULL        /* filled in by Intuition for drag selections */
  536. };
  537. #define SI_LOCKSOFF 3
  538.  
  539.  
  540. struct IntuiText MText7a = {
  541.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  542.         0,0,   /* XY origin relative to container TopLeft */
  543.         NULL,   /* font pointer or NULL for default */
  544.         "Both Locks On",    /* pointer to text */
  545.         NULL    /* next IntuiText structure */
  546. };
  547.  
  548. struct MenuItem LocksOn = {
  549.         &LocksOff,   /* next SubItem structure */
  550.         77,26,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  551.         120,10,   /* hit box width and height */
  552.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  553.         0,      /* each bit mutually-excludes a same-level Item */
  554.         (APTR)&MText7a,  /* Item render  (IntuiText or Image or NULL) */
  555.         NULL,   /* Select render */
  556.         NULL,   /* alternate command-key */
  557.         NULL,   /* no SubItem list for SubItems */
  558.         MENUNULL        /* filled in by Intuition for drag selections */
  559. };
  560. #define SI_LOCKSON 2
  561.  
  562. UBYTE YText[]="   Y Region";
  563.  
  564. struct IntuiText MText8 = {
  565.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  566.         0,0,   /* XY origin relative to container TopLeft */
  567.         NULL,   /* font pointer or NULL for default */
  568.         YText,     /* pointer to text */
  569.         NULL    /* next IntuiText structure */
  570. };
  571.  
  572. struct MenuItem Yregion = {
  573.         &LocksOn,      /* next SubItem structure */
  574.         77,16,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  575.         120,10,   /* hit box width and height */
  576.         ITEMTEXT+CHECKIT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  577.         0,      /* each bit mutually-excludes a same-level Item */
  578.         (APTR)&MText8,  /* Item render  (IntuiText or Image or NULL) */
  579.         NULL,   /* Select render */
  580.         NULL,   /* alternate command-key */
  581.         NULL,   /* no SubItem list for SubItems */
  582.         MENUNULL        /* filled in by Intuition for drag selections */
  583. };
  584. #define SI_YREGION 1
  585.  
  586. UBYTE XText[]="   X Region";
  587.  
  588. struct IntuiText MText9 = {
  589.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  590.         0,0,   /* XY origin relative to container TopLeft */
  591.         NULL,   /* font pointer or NULL for default */
  592.         XText,     /* pointer to text */
  593.         NULL    /* next IntuiText structure */
  594. };
  595.  
  596. struct MenuItem Xregion = {
  597.         &Yregion,      /* next SubItem structure */
  598.         77,6,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  599.         120,10,   /* hit box width and height */
  600.         ITEMTEXT+CHECKIT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  601.         0,      /* each bit mutually-excludes a same-level Item */
  602.         (APTR)&MText9,  /* Item render  (IntuiText or Image or NULL) */
  603.         NULL,   /* Select render */
  604.         NULL,   /* alternate command-key */
  605.         NULL,   /* no SubItem list for SubItems */
  606.         MENUNULL        /* filled in by Intuition for drag selections */
  607. };
  608. #define SI_XREGION 0
  609.  
  610. struct IntuiText MText10 = {
  611.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  612.         0,0,    /* XY origin relative to container TopLeft */
  613.         NULL,   /* font pointer or NULL for default */
  614.         "Locks »",        /* pointer to text */
  615.         NULL    /* next IntuiText structure */
  616. };
  617.  
  618. struct MenuItem Locks = {
  619.         NULL,   /* next MenuItem structure */
  620.         0,40,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  621.         170,10,  /* hit box width and height */
  622.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  623.         0,      /* each bit mutually-excludes a same-level Item */
  624.         (APTR)&MText10, /* Item render  (IntuiText or Image or NULL) */
  625.         NULL,   /* Select render */
  626.         NULL,   /* alternate command-key */
  627.         &Xregion,      /* SubItem list */
  628.         MENUNULL        /* filled in by Intuition for drag selections */
  629. };
  630. #define MI_LOCKS 4
  631.  
  632. struct IntuiText MText5 = {
  633.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  634.         0,0,    /* XY origin relative to container TopLeft */
  635.         NULL,   /* font pointer or NULL for default */
  636.         "ReDefine Plot...",   /* pointer to text */
  637.         NULL    /* next IntuiText structure */
  638. };
  639.  
  640. struct MenuItem Gethowto = {
  641.         &Locks,     /* next MenuItem structure */
  642.         0,30,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  643.         170,10,  /* hit box width and height */
  644.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  645.         0,      /* each bit mutually-excludes a same-level Item */
  646.         (APTR)&MText5,  /* Item render  (IntuiText or Image or NULL) */
  647.         NULL,   /* Select render */
  648.         'D',    /* alternate command-key */
  649.         NULL,   /* SubItem list */
  650.         MENUNULL        /* filled in by Intuition for drag selections */
  651. };
  652. #define MI_GETHOWTO 3
  653.  
  654. struct IntuiText MText6 = {
  655.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  656.         0,0,    /* XY origin relative to container TopLeft */
  657.         NULL,   /* font pointer or NULL for default */
  658.         "Redraw",       /* pointer to text */
  659.         NULL    /* next IntuiText structure */
  660. };
  661.  
  662. struct MenuItem Redraw = {
  663.         &Gethowto,     /* next MenuItem structure */
  664.         0,20,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  665.         170,10,  /* hit box width and height */
  666.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  667.         0,      /* each bit mutually-excludes a same-level Item */
  668.         (APTR)&MText6,  /* Item render  (IntuiText or Image or NULL) */
  669.         NULL,   /* Select render */
  670.         'R',    /* alternate command-key */
  671.         NULL,   /* SubItem list */
  672.         MENUNULL        /* filled in by Intuition for drag selections */
  673. };
  674. #define MI_REDRAW 2
  675.  
  676.  
  677. struct IntuiText MText11 = {
  678.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  679.         0,0,    /* XY origin relative to container TopLeft */
  680.         NULL,   /* font pointer or NULL for default */
  681.         "Full Plot",    /* pointer to text */
  682.         NULL    /* next IntuiText structure */
  683. };
  684.  
  685. struct MenuItem Fullplot = {
  686.         &Redraw,    /* next MenuItem structure */
  687.         0,10,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  688.         170,10,  /* hit box width and height */
  689.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  690.         0,      /* each bit mutually-excludes a same-level Item */
  691.         (APTR)&MText11, /* Item render  (IntuiText or Image or NULL) */
  692.         NULL,   /* Select render */
  693.         'F',    /* alternate command-key */
  694.         NULL,   /* SubItem list */
  695.         MENUNULL        /* filled in by Intuition for drag selections */
  696. };
  697.  
  698. #define MI_FULLPLOT 1
  699.  
  700. struct IntuiText MText12b = {
  701.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  702.         0,0,    /* XY origin relative to container TopLeft */
  703.         NULL,   /* font pointer or NULL for default */
  704.         "   Slide",        /* pointer to text */
  705.         NULL    /* next IntuiText structure */
  706. };
  707.  
  708.  
  709. struct MenuItem Slide = {
  710.         NULL,   /* next MenuItem structure */
  711.         77,26,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  712.         120,10,   /* hit box width and height */
  713.         CHECKIT+COMMSEQ+ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  714.         0xFFFC,      /* each bit mutually-excludes a same-level Item */
  715.         (APTR)&MText12b,  /* Item render  (IntuiText or Image or NULL) */
  716.         NULL,   /* Select render */
  717.         '^',   /* alternate command-key */
  718.         NULL,   /* no SubItem list for SubItems */
  719.         MENUNULL        /* filled in by Intuition for drag selections */
  720. };
  721. #define SI_SLIDE 2
  722.  
  723. struct IntuiText MText12a = {
  724.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  725.         0,0,    /* XY origin relative to container TopLeft */
  726.         NULL,   /* font pointer or NULL for default */
  727.         "   Zoom",     /* pointer to text */
  728.         NULL    /* next IntuiText structure */
  729. };
  730.  
  731. struct MenuItem Zoom = {
  732.         &Slide,   /* next MenuItem structure */
  733.         77,16,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  734.         120,10,   /* hit box width and height */
  735.         CHECKIT+COMMSEQ+ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  736.         0xFFFD,      /* each bit mutually-excludes a same-level Item */
  737.         (APTR)&MText12a,  /* Item render  (IntuiText or Image or NULL) */
  738.         NULL,   /* Select render */
  739.         '#',   /* alternate command-key */
  740.         NULL,   /* no SubItem list for SubItems */
  741.         MENUNULL        /* filled in by Intuition for drag selections */
  742. };
  743. #define SI_ZOOM 1
  744.  
  745. struct IntuiText MText12 = {
  746.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  747.         0,0,    /* XY origin relative to container TopLeft */
  748.         NULL,   /* font pointer or NULL for default */
  749.         "   Select",     /* pointer to text */
  750.         NULL    /* next IntuiText structure */
  751. };
  752.  
  753. struct MenuItem Select = {
  754.         &Zoom,   /* next MenuItem structure */
  755.         77,6,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  756.         120,10,   /* hit box width and height */
  757.         CHECKIT+COMMSEQ+ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  758.         0xFFFE,      /* each bit mutually-excludes a same-level Item */
  759.         (APTR)&MText12,  /* Item render  (IntuiText or Image or NULL) */
  760.         NULL,   /* Select render */
  761.         '!',   /* alternate command-key */
  762.         NULL,   /* no SubItem list for SubItems */
  763.         MENUNULL        /* filled in by Intuition for drag selections */
  764. };
  765. #define SI_SELECT 0
  766.  
  767. struct IntuiText MText13 = {
  768.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  769.         0,0,    /* XY origin relative to container TopLeft */
  770.         NULL,   /* font pointer or NULL for default */
  771.         "Mouse Action »", /* pointer to text */
  772.         NULL    /* next IntuiText structure */
  773. };
  774.  
  775. struct MenuItem MAction = {
  776.         &Fullplot,     /* next MenuItem structure */
  777.         0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  778.         170,10,  /* hit box width and height */
  779.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  780.         0,      /* each bit mutually-excludes a same-level Item */
  781.         (APTR)&MText13, /* Item render  (IntuiText or Image or NULL) */
  782.         NULL,   /* Select render */
  783.         NULL,   /* alternate command-key */
  784.         &Select,   /* SubItem list */
  785.         MENUNULL        /* filled in by Intuition for drag selections */
  786. };
  787. #define MI_MACTION 0
  788.  
  789. struct Menu Actions = {
  790.         &Options, /* next Menu structure */
  791.         160,0,   /* XY origin of Menu hit box relative to screen TopLeft */
  792.         80,0,   /* Menu hit box width and height */
  793.         MENUENABLED,    /* Menu flags */
  794.         "Actions", /* text of Menu name */
  795.         &MAction      /* MenuItem linked list pointer */
  796. };
  797. #define M_ACTIONS 2
  798. struct IntuiText AddTextText = {
  799.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  800.         0,0,    /* XY origin relative to container TopLeft */
  801.         NULL,   /* font pointer or NULL for default */
  802.         "Add Text...",   /* pointer to text */
  803.         NULL    /* next IntuiText structure */
  804. };
  805.  
  806. struct MenuItem AddText = {
  807.         NULL,     /* next MenuItem structure */
  808.         0,50,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  809.         140,10,  /* hit box width and height */
  810.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  811.         0,      /* each bit mutually-excludes a same-level Item */
  812.         (APTR)&AddTextText,  /* Item render  (IntuiText or Image or NULL) */
  813.         NULL,   /* Select render */
  814.         'A',   /* alternate command-key */
  815.         NULL,   /* SubItem list */
  816.         MENUNULL        /* filled in by Intuition for drag selections */
  817. };
  818. #define MI_ADDTEXT 5
  819.  
  820. struct IntuiText DeleteText= {
  821.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  822.         0,0,    /* XY origin relative to container TopLeft */
  823.         NULL,   /* font pointer or NULL for default */
  824.         "Delete",  /* pointer to text */
  825.         NULL    /* next IntuiText structure */
  826. };
  827.  
  828. struct MenuItem Delete = {
  829.         &AddText,    /* next MenuItem structure */
  830.         0,40,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  831.         140,10,   /* hit box width and height */
  832.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  833.         0,      /* each bit mutually-excludes a same-level Item */
  834.         (APTR)&DeleteText, /* Item render  (IntuiText or Image or NULL) */
  835.         NULL,   /* Select render */
  836.         NULL,    /* alternate command-key */
  837.         NULL,   /* SubItem list */
  838.         MENUNULL        /* filled in by Intuition for drag selections */
  839. };
  840. #define MI_DELETE 4
  841.  
  842. struct IntuiText PasteText= {
  843.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  844.         0,0,    /* XY origin relative to container TopLeft */
  845.         NULL,   /* font pointer or NULL for default */
  846.         "Paste",  /* pointer to text */
  847.         NULL    /* next IntuiText structure */
  848. };
  849.  
  850. struct MenuItem Paste = {
  851.         &Delete,    /* next MenuItem structure */
  852.         0,30,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  853.         140,10,   /* hit box width and height */
  854.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  855.         0,      /* each bit mutually-excludes a same-level Item */
  856.         (APTR)&PasteText, /* Item render  (IntuiText or Image or NULL) */
  857.         NULL,   /* Select render */
  858.         'V',    /* alternate command-key */
  859.         NULL,   /* SubItem list */
  860.         MENUNULL        /* filled in by Intuition for drag selections */
  861. };
  862. #define MI_PASTE 3
  863.  
  864. struct IntuiText CopyText= {
  865.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  866.         0,0,    /* XY origin relative to container TopLeft */
  867.         NULL,   /* font pointer or NULL for default */
  868.         "Copy",  /* pointer to text */
  869.         NULL    /* next IntuiText structure */
  870. };
  871.  
  872. struct MenuItem Copy = {
  873.         &Paste,    /* next MenuItem structure */
  874.         0,20,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  875.         140,10,   /* hit box width and height */
  876.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  877.         0,      /* each bit mutually-excludes a same-level Item */
  878.         (APTR)&CopyText, /* Item render  (IntuiText or Image or NULL) */
  879.         NULL,   /* Select render */
  880.         'C',    /* alternate command-key */
  881.         NULL,   /* SubItem list */
  882.         MENUNULL        /* filled in by Intuition for drag selections */
  883. };
  884. #define MI_COPY 2
  885.  
  886. struct IntuiText CutText= {
  887.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  888.         0,0,    /* XY origin relative to container TopLeft */
  889.         NULL,   /* font pointer or NULL for default */
  890.         "Cut",  /* pointer to text */
  891.         NULL    /* next IntuiText structure */
  892. };
  893.  
  894. struct MenuItem Cut = {
  895.         &Copy,    /* next MenuItem structure */
  896.         0,10,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  897.         140,10,   /* hit box width and height */
  898.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  899.         0,      /* each bit mutually-excludes a same-level Item */
  900.         (APTR)&CutText, /* Item render  (IntuiText or Image or NULL) */
  901.         NULL,   /* Select render */
  902.         'X',    /* alternate command-key */
  903.         NULL,   /* SubItem list */
  904.         MENUNULL        /* filled in by Intuition for drag selections */
  905. };
  906. #define MI_CUT 1
  907.  
  908. struct IntuiText UndelText= {
  909.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  910.         0,0,    /* XY origin relative to container TopLeft */
  911.         NULL,   /* font pointer or NULL for default */
  912.         "UnDelete",  /* pointer to text */
  913.         NULL    /* next IntuiText structure */
  914. };
  915.  
  916. struct MenuItem UnDelete = {
  917.         &Cut,    /* next MenuItem structure */
  918.         0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  919.         140,10,   /* hit box width and height */
  920.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  921.         0,      /* each bit mutually-excludes a same-level Item */
  922.         (APTR)&UndelText, /* Item render  (IntuiText or Image or NULL) */
  923.         NULL,   /* Select render */
  924.         'Z',    /* alternate command-key */
  925.         NULL,   /* SubItem list */
  926.         MENUNULL        /* filled in by Intuition for drag selections */
  927. };
  928. #define MI_UNDEL 0
  929.  
  930. struct Menu Edit = {
  931.         &Actions, /* next Menu structure */
  932.         80,0,    /* XY origin of Menu hit box relative to screen TopLeft */
  933.         80,0,   /* Menu hit box width and height */
  934.         MENUENABLED,    /* Menu flags */
  935.         "Edit",      /* text of Menu name */
  936.         &UnDelete     /* MenuItem linked list pointer */
  937. };
  938. #define M_EDIT 1
  939.  
  940. struct IntuiText MText14 = {
  941.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  942.         0,0,    /* XY origin relative to container TopLeft */
  943.         NULL,   /* font pointer or NULL for default */
  944.         "Quit", /* pointer to text */
  945.         NULL    /* next IntuiText structure */
  946. };
  947.  
  948. struct MenuItem Quit = {
  949.         NULL,   /* next MenuItem structure */
  950.         0,40,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  951.         120,10,   /* hit box width and height */
  952.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  953.         0,      /* each bit mutually-excludes a same-level Item */
  954.         (APTR)&MText14, /* Item render  (IntuiText or Image or NULL) */
  955.         NULL,   /* Select render */
  956.         'Q',    /* alternate command-key */
  957.         NULL,   /* SubItem list */
  958.         MENUNULL        /* filled in by Intuition for drag selections */
  959. };
  960. #define MI_QUIT 4
  961.  
  962. struct IntuiText MText15 = {
  963.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  964.         0,0,    /* XY origin relative to container TopLeft */
  965.         NULL,   /* font pointer or NULL for default */
  966.         "Print",        /* pointer to text */
  967.         NULL    /* next IntuiText structure */
  968. };
  969.  
  970. struct MenuItem Print = {
  971.         &Quit,    /* next MenuItem structure */
  972.         0,30,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  973.         120,10,   /* hit box width and height */
  974.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  975.         0,      /* each bit mutually-excludes a same-level Item */
  976.         (APTR)&MText15, /* Item render  (IntuiText or Image or NULL) */
  977.         NULL,   /* Select render */
  978.         'P',    /* alternate command-key */
  979.         NULL,   /* SubItem list */
  980.         MENUNULL        /* filled in by Intuition for drag selections */
  981. };
  982. #define MI_PRINT 3
  983.  
  984. struct IntuiText SaveDataText = {
  985.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  986.         0,0,    /* XY origin relative to container TopLeft */
  987.         NULL,   /* font pointer or NULL for default */
  988.         "Data...",     /* pointer to text */
  989.         NULL    /* next IntuiText structure */
  990. };
  991.  
  992. struct MenuItem SaveData = {
  993.         NULL,   /* next SubItem structure */
  994.         65,56,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  995.         130,10,  /* hit box width and height */
  996.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  997.         0,      /* each bit mutually-excludes a same-level Item */
  998.         (APTR)&SaveDataText, /* Item render  (IntuiText or Image or NULL) */
  999.         NULL,   /* Select render */
  1000.         'W',    /* alternate command-key */
  1001.         NULL,   /* no SubItem list for SubItems */
  1002.         MENUNULL        /* filled in by Intuition for drag selections */
  1003. };
  1004. #define SI_SAVEDAT 5
  1005.  
  1006. struct IntuiText MText16 = {
  1007.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1008.         0,0,    /* XY origin relative to container TopLeft */
  1009.         NULL,   /* font pointer or NULL for default */
  1010.         "IntroCAD...",     /* pointer to text */
  1011.         NULL    /* next IntuiText structure */
  1012. };
  1013.  
  1014. struct MenuItem Introcad = {
  1015.         &SaveData,   /* next SubItem structure */
  1016.         65,46,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1017.         130,10,  /* hit box width and height */
  1018.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1019.         0,      /* each bit mutually-excludes a same-level Item */
  1020.         (APTR)&MText16, /* Item render  (IntuiText or Image or NULL) */
  1021.         NULL,   /* Select render */
  1022.         'N',    /* alternate command-key */
  1023.         NULL,   /* no SubItem list for SubItems */
  1024.         MENUNULL        /* filled in by Intuition for drag selections */
  1025. };
  1026. #define SI_ICAD 4
  1027.  
  1028. struct IntuiText MText17 = {
  1029.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1030.         0,0,    /* XY origin relative to container TopLeft */
  1031.         NULL,   /* font pointer or NULL for default */
  1032.         "mCAD...", /* pointer to text */
  1033.         NULL    /* next IntuiText structure */
  1034. };
  1035.  
  1036. struct MenuItem Mcad = {
  1037.         &Introcad,      /* next SubItem structure */
  1038.         65,36,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1039.         130,10,  /* hit box width and height */
  1040.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1041.         0,      /* each bit mutually-excludes a same-level Item */
  1042.         (APTR)&MText17, /* Item render  (IntuiText or Image or NULL) */
  1043.         NULL,   /* Select render */
  1044.         NULL,    /* alternate command-key */
  1045.         NULL,   /* no SubItem list for SubItems */
  1046.         MENUNULL        /* filled in by Intuition for drag selections */
  1047. };
  1048. #define SI_MCAD 3
  1049.  
  1050. struct IntuiText MText18 = {
  1051.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1052.         0,0,    /* XY origin relative to container TopLeft */
  1053.         NULL,   /* font pointer or NULL for default */
  1054.         "Draw...", /* pointer to text */
  1055.         NULL    /* next IntuiText structure */
  1056. };
  1057.  
  1058. struct MenuItem Plot = {
  1059.         &Mcad,      /* next SubItem structure */
  1060.         65,26,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1061.         130,10,  /* hit box width and height */
  1062.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1063.         0,      /* each bit mutually-excludes a same-level Item */
  1064.         (APTR)&MText18, /* Item render  (IntuiText or Image or NULL) */
  1065.         NULL,   /* Select render */
  1066.         'K',    /* alternate command-key */
  1067.         NULL,   /* no SubItem list for SubItems */
  1068.         MENUNULL        /* filled in by Intuition for drag selections */
  1069. };
  1070. #define SI_DRAW 2
  1071.  
  1072. struct IntuiText MText19 = {
  1073.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1074.         0,0,    /* XY origin relative to container TopLeft */
  1075.         NULL,   /* font pointer or NULL for default */
  1076.         "HPGL...", /* pointer to text */
  1077.         NULL    /* next IntuiText structure */
  1078. };
  1079.  
  1080. struct MenuItem Hplg = {
  1081.         &Plot,      /* next SubItem structure */
  1082.         65,16,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1083.         130,10,  /* hit box width and height */
  1084.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1085.         0,      /* each bit mutually-excludes a same-level Item */
  1086.         (APTR)&MText19, /* Item render  (IntuiText or Image or NULL) */
  1087.         NULL,   /* Select render */
  1088.         'H',    /* alternate command-key */
  1089.         NULL,   /* no SubItem list for SubItems */
  1090.         MENUNULL        /* filled in by Intuition for drag selections */
  1091. };
  1092. #define SI_HPGL 1
  1093.  
  1094. struct IntuiText MText20 = {
  1095.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1096.         0,0,    /* XY origin relative to container TopLeft */
  1097.         NULL,   /* font pointer or NULL for default */
  1098.         "ILBM...",  /* pointer to text */
  1099.         NULL    /* next IntuiText structure */
  1100. };
  1101.  
  1102. struct MenuItem Iff = {
  1103.         &Hplg,      /* next SubItem structure */
  1104.         65,6,  /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1105.         130,10,  /* hit box width and height */
  1106.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1107.         0,      /* each bit mutually-excludes a same-level Item */
  1108.         (APTR)&MText20, /* Item render  (IntuiText or Image or NULL) */
  1109.         NULL,   /* Select render */
  1110.         'I',    /* alternate command-key */
  1111.         NULL,   /* no SubItem list for SubItems */
  1112.         MENUNULL        /* filled in by Intuition for drag selections */
  1113. };
  1114. #define SI_IFF 0
  1115.  
  1116. struct IntuiText MText21 = {
  1117.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1118.         0,0,    /* XY origin relative to container TopLeft */
  1119.         NULL,   /* font pointer or NULL for default */
  1120.         "Save as »", /* pointer to text */
  1121.         NULL    /* next IntuiText structure */
  1122. };
  1123.  
  1124. struct MenuItem Saveas = {
  1125.         &Print,    /* next MenuItem structure */
  1126.         0,20,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1127.         120,10,   /* hit box width and height */
  1128.         ITEMTEXT+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1129.         0,      /* each bit mutually-excludes a same-level Item */
  1130.         (APTR)&MText21, /* Item render  (IntuiText or Image or NULL) */
  1131.         NULL,   /* Select render */
  1132.         NULL,   /* alternate command-key */
  1133.         &Iff,      /* SubItem list */
  1134.         MENUNULL        /* filled in by Intuition for drag selections */
  1135. };
  1136. #define MI_SAVEAS 2
  1137.  
  1138. struct IntuiText SaveText = {
  1139.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1140.         0,0,    /* XY origin relative to container TopLeft */
  1141.         NULL,   /* font pointer or NULL for default */
  1142.         "Save", /* pointer to text */
  1143.         NULL    /* next IntuiText structure */
  1144. };
  1145.  
  1146. struct MenuItem Save = {
  1147.         &Saveas,    /* next MenuItem structure */
  1148.         0,10,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1149.         120,10,   /* hit box width and height */
  1150.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1151.         0,      /* each bit mutually-excludes a same-level Item */
  1152.         (APTR)&SaveText, /* Item render  (IntuiText or Image or NULL) */
  1153.         NULL,   /* Select render */
  1154.         'S',   /* alternate command-key */
  1155.         NULL,      /* SubItem list */
  1156.         MENUNULL        /* filled in by Intuition for drag selections */
  1157. };
  1158. #define MI_SAVE 1
  1159.  
  1160. struct IntuiText OpenText= {
  1161.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  1162.         0,0,    /* XY origin relative to container TopLeft */
  1163.         NULL,   /* font pointer or NULL for default */
  1164.         "Open...",  /* pointer to text */
  1165.         NULL    /* next IntuiText structure */
  1166. };
  1167.  
  1168. struct MenuItem OpenFile = {
  1169.         &Save,    /* next MenuItem structure */
  1170.         0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  1171.         120,10,   /* hit box width and height */
  1172.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  1173.         0,      /* each bit mutually-excludes a same-level Item */
  1174.         (APTR)&OpenText, /* Item render  (IntuiText or Image or NULL) */
  1175.         NULL,   /* Select render */
  1176.         'O',    /* alternate command-key */
  1177.         NULL,   /* SubItem list */
  1178.         MENUNULL        /* filled in by Intuition for drag selections */
  1179. };
  1180. #define MI_OPEN 0
  1181.  
  1182. struct Menu Project = {
  1183.         &Edit, /* next Menu structure */
  1184.         0,0,    /* XY origin of Menu hit box relative to screen TopLeft */
  1185.         80,0,   /* Menu hit box width and height */
  1186.         MENUENABLED,    /* Menu flags */
  1187.         "Project",      /* text of Menu name */
  1188.         &OpenFile     /* MenuItem linked list pointer */
  1189. };
  1190. #define M_PROJECT 0
  1191.  
  1192.