home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d2xx / d231 / plot.lha / Plot / Source / plot.h < prev    next >
C/C++ Source or Header  |  1989-07-23  |  58KB  |  1,608 lines

  1.  
  2. /*********************************************************************/
  3. /*                                                                   */
  4. /*   Header file for Plot  Copyright AG Baxter 1988                  */
  5. /*                                                                   */
  6. /*********************************************************************/
  7.  
  8. #include "exec/types.h"
  9. #include "graphics/display.h"
  10. #include "libraries/dos.h"
  11. #include "libraries/dosextens.h"
  12. #include "libraries/diskfont.h"
  13. #include "stdio.h"
  14. #include "exec/exec.h"
  15. #include "intuition/intuitionbase.h"
  16. #include "graphics/gfxbase.h"
  17. #include "graphics/regions.h"
  18. #include "graphics/text.h"
  19. #include "graphics/gels.h"
  20. #include "devices/keymap.h"
  21.  
  22.  
  23. #define INTUITION_REV 29
  24. #define QUIT (0)
  25. #define GO (1)
  26. USHORT QuitFlag = GO;
  27. USHORT x=1, y=2, e=0;
  28. #define PLOT2D (0)
  29. #define PLOT3D (1)
  30. USHORT PlotType = PLOT2D;
  31. #define ON (1)
  32. #define OFF (0)
  33. USHORT NET = ON;
  34. USHORT AXES = ON;
  35. USHORT TWOSIDES =ON;
  36. #define INTRO (0)
  37. #define AEGIS (1)
  38. #define MCAD (2)
  39. USHORT Form = INTRO;
  40.  
  41.  
  42. #define DRAW
  43. struct IntuitionBase *IntuitionBase;
  44. struct DiskfontBase  *DiskfontBase;
  45. struct GfxBase       *GfxBase;
  46. struct DosBase       *DosBase;
  47. struct Screen        *p_Screen;          /* pointer to screen */
  48. struct Window        *p_Window;
  49. struct Window        *p_EdWindow;
  50. struct RastPort      *r;         /* pointer to BGround RastPort */
  51. struct RastPort      *p;
  52.  
  53. UBYTE UNDOBUFFER[100];
  54.  
  55. USHORT chip WaitSprite[] ={
  56. 0x0000,0x0000,
  57.  
  58. 0x0FE0,
  59. 0x0FE0,
  60. 0x3FF0,
  61. 0x3FF0,
  62. 0x7FF8,
  63. 0x7FF8,
  64. 0x7FFC,
  65. 0x71FC,
  66. 0xFFFC,
  67. 0xE7FC,
  68. 0xFFFE,
  69. 0xEFFE,
  70. 0xFFFE,
  71. 0xEFFE,
  72. 0xFFFE,
  73. 0xEFFE,
  74. 0xFFFE,
  75. 0xEFFE,
  76. 0x7FFC,
  77. 0x7FFC,
  78. 0x7FFC,
  79. 0x7FFC,
  80. 0x3FF8,
  81. 0x3FF8,
  82. 0x3FF0,
  83. 0x3FF0,
  84. 0x1FE0,
  85. 0x1FE0,
  86. 0x0FC0,
  87. 0x0FC0,
  88. 0x0780,
  89. 0x0780,
  90. 0x0000,
  91. 0x01E0,
  92. 0x0380,
  93. 0x0398,
  94. 0x0000,
  95. 0x0008,
  96. 0x0000,
  97. 0x0008,
  98. 0x0000,
  99. 0x0018,
  100. 0x0000,
  101. 0x0010,
  102. 0x0000,
  103. 0x0010,
  104. 0x0000,
  105. 0x0030,
  106. 0x0000,
  107. 0x0020,
  108. 0x0000,
  109. 0x0020,
  110. 0x0000,
  111. 0x0020,
  112. 0x0000,
  113. 0x0020,
  114. 0x0000,
  115. 0x0030,
  116. 0x0000,
  117. 0x0018,
  118. 0x0000,
  119. 0x0008,
  120. 0x0000,
  121. 0x0004,
  122. 0x0000,
  123. 0x0002,
  124. 0x0000,
  125. 0x0002,
  126. 0x0000,
  127. 0x0002,
  128. 0x0000,
  129. 0x0004,
  130. 0x0000,
  131. 0x0004,
  132. 0x0000,
  133. 0x0006,
  134.  
  135. 0x0000,0x0000
  136. };
  137.  
  138. struct TextAttr gfont = {
  139.         "ruby.font",
  140.         12,
  141.         0,
  142.         1
  143. };
  144.  
  145.  
  146. struct IntuiText MText1 = {
  147.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  148.         19,0,   /* XY origin relative to container TopLeft */
  149.         NULL,   /* font pointer or NULL for default */
  150.         "mCAD", /* pointer to text */
  151.         NULL    /* next IntuiText structure */
  152. };
  153.  
  154. struct MenuItem MenuItem3 = {
  155.         NULL,   /* next MenuItem structure */
  156.         0,18,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  157.         123,8,  /* hit box width and height */
  158.         CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  159.         0xFFFB,      /* each bit mutually-excludes a same-level Item */
  160.         (APTR)&MText1,  /* Item render  (IntuiText or Image or NULL) */
  161.         NULL,   /* Select render */
  162.         'm',    /* alternate command-key */
  163.         NULL,   /* SubItem list */
  164.         MENUNULL        /* filled in by Intuition for drag selections */
  165. };
  166.  
  167. struct IntuiText MText2 = {
  168.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  169.         19,0,   /* XY origin relative to container TopLeft */
  170.         NULL,   /* font pointer or NULL for default */
  171.         "IntroCAD",     /* pointer to text */
  172.         NULL    /* next IntuiText structure */
  173. };
  174.  
  175. struct MenuItem MenuItem2 = {
  176.         &MenuItem3,     /* next MenuItem structure */
  177.         0,9,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  178.         123,8,  /* hit box width and height */
  179.         CHECKED+CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  180.         0xFFFD,      /* each bit mutually-excludes a same-level Item */
  181.         (APTR)&MText2,  /* Item render  (IntuiText or Image or NULL) */
  182.         NULL,   /* Select render */
  183.         'i',    /* alternate command-key */
  184.         NULL,   /* SubItem list */
  185.         MENUNULL        /* filled in by Intuition for drag selections */
  186. };
  187.  
  188. struct IntuiText MText3 = {
  189.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  190.         19,0,   /* XY origin relative to container TopLeft */
  191.         NULL,   /* font pointer or NULL for default */
  192.         "Draw", /* pointer to text */
  193.         NULL    /* next IntuiText structure */
  194. };
  195.  
  196. struct MenuItem MenuItem1 = {
  197.         &MenuItem2,     /* next MenuItem structure */
  198.         0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  199.         123,8,  /* hit box width and height */
  200.         CHECKIT+ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  201.         0xFFFE,      /* each bit mutually-excludes a same-level Item */
  202.         (APTR)&MText3,  /* Item render  (IntuiText or Image or NULL) */
  203.         NULL,   /* Select render */
  204.         'd',    /* alternate command-key */
  205.         NULL,   /* SubItem list */
  206.         MENUNULL        /* filled in by Intuition for drag selections */
  207. };
  208.  
  209. struct Menu Menu3 = {
  210.         NULL,   /* next Menu structure */
  211.         137,0,  /* XY origin of Menu hit box relative to screen TopLeft */
  212.         66,0,   /* Menu hit box width and height */
  213.         MENUENABLED,    /* Menu flags */
  214.         "Format",       /* text of Menu name */
  215.         &MenuItem1      /* MenuItem linked list pointer */
  216. };
  217.  
  218. struct IntuiText MText4 = {
  219.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  220.         0,0,    /* XY origin relative to container TopLeft */
  221.         NULL,   /* font pointer or NULL for default */
  222.         "Edit", /* pointer to text */
  223.         NULL    /* next IntuiText structure */
  224. };
  225.  
  226. struct MenuItem MenuItem5 = {
  227.         NULL,   /* next MenuItem structure */
  228.         0,9,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  229.         144,8,  /* hit box width and height */
  230.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  231.         0,      /* each bit mutually-excludes a same-level Item */
  232.         (APTR)&MText4,  /* Item render  (IntuiText or Image or NULL) */
  233.         NULL,   /* Select render */
  234.         'e',    /* alternate command-key */
  235.         NULL,   /* SubItem list */
  236.         MENUNULL        /* filled in by Intuition for drag selections */
  237. };
  238.  
  239. struct IntuiText MText5 = {
  240.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  241.         0,0,    /* XY origin relative to container TopLeft */
  242.         NULL,   /* font pointer or NULL for default */
  243.         "Define Editor",        /* pointer to text */
  244.         NULL    /* next IntuiText structure */
  245. };
  246.  
  247. struct MenuItem MenuItem4 = {
  248.         &MenuItem5,     /* next MenuItem structure */
  249.         0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  250.         144,8,  /* hit box width and height */
  251.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  252.         0,      /* each bit mutually-excludes a same-level Item */
  253.         (APTR)&MText5,  /* Item render  (IntuiText or Image or NULL) */
  254.         NULL,   /* Select render */
  255.         'c',    /* alternate command-key */
  256.         NULL,   /* SubItem list */
  257.         MENUNULL        /* filled in by Intuition for drag selections */
  258. };
  259.  
  260. struct Menu Menu2 = {
  261.         &Menu3, /* next Menu structure */
  262.         82,0,   /* XY origin of Menu hit box relative to screen TopLeft */
  263.         48,0,   /* Menu hit box width and height */
  264.         MENUENABLED,    /* Menu flags */
  265.         "Edit", /* text of Menu name */
  266.         &MenuItem4      /* MenuItem linked list pointer */
  267. };
  268.  
  269. struct IntuiText MText6 = {
  270.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  271.         0,0,    /* XY origin relative to container TopLeft */
  272.         NULL,   /* font pointer or NULL for default */
  273.         "Quit", /* pointer to text */
  274.         NULL    /* next IntuiText structure */
  275. };
  276.  
  277. struct MenuItem MenuItem9 = {
  278.         NULL,   /* next MenuItem structure */
  279.         0,36,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  280.         144,8,  /* hit box width and height */
  281.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  282.         0,      /* each bit mutually-excludes a same-level Item */
  283.         (APTR)&MText6,  /* Item render  (IntuiText or Image or NULL) */
  284.         NULL,   /* Select render */
  285.         'q',    /* alternate command-key */
  286.         NULL,   /* SubItem list */
  287.         MENUNULL        /* filled in by Intuition for drag selections */
  288. };
  289.  
  290. struct IntuiText MText7 = {
  291.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  292.         0,0,    /* XY origin relative to container TopLeft */
  293.         NULL,   /* font pointer or NULL for default */
  294.         "About",        /* pointer to text */
  295.         NULL    /* next IntuiText structure */
  296. };
  297.  
  298. struct MenuItem MenuItem8 = {
  299.         &MenuItem9,     /* next MenuItem structure */
  300.         0,27,   /* XY of Item hitbox relative to TopLeft of parent hitbox */
  301.         144,8,  /* hit box width and height */
  302.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  303.         0,      /* each bit mutually-excludes a same-level Item */
  304.         (APTR)&MText7,  /* Item render  (IntuiText or Image or NULL) */
  305.         NULL,   /* Select render */
  306.         'a',    /* alternate command-key */
  307.         NULL,   /* SubItem list */
  308.         MENUNULL        /* filled in by Intuition for drag selections */
  309. };
  310.  
  311. struct IntuiText MText8 = {
  312.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  313.         0,0,    /* XY origin relative to container TopLeft */
  314.         NULL,   /* font pointer or NULL for default */
  315.         "Save Defaults",        /* pointer to text */
  316.         NULL    /* next IntuiText structure */
  317. };
  318.  
  319. struct MenuItem MenuItem7 = {
  320.         &MenuItem8,     /* next MenuItem structure */
  321.         0,18,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  322.         144,8,  /* hit box width and height */
  323.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  324.         0,      /* each bit mutually-excludes a same-level Item */
  325.         (APTR)&MText8,  /* Item render  (IntuiText or Image or NULL) */
  326.         NULL,   /* Select render */
  327.         's',    /* alternate command-key */
  328.         NULL,   /* SubItem list */
  329.         MENUNULL        /* filled in by Intuition for drag selections */
  330. };
  331. struct IntuiText MText8a = {
  332.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  333.         0,0,    /* XY origin relative to container TopLeft */
  334.         NULL,   /* font pointer or NULL for default */
  335.         "Load Defaults",        /* pointer to text */
  336.         NULL    /* next IntuiText structure */
  337. };
  338.  
  339. struct MenuItem MenuItem7a = {
  340.         &MenuItem7,     /* next MenuItem structure */
  341.         0,9,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  342.         144,8,  /* hit box width and height */
  343.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  344.         0,      /* each bit mutually-excludes a same-level Item */
  345.         (APTR)&MText8a,  /* Item render  (IntuiText or Image or NULL) */
  346.         NULL,   /* Select render */
  347.         'f',    /* alternate command-key */
  348.         NULL,   /* SubItem list */
  349.         MENUNULL        /* filled in by Intuition for drag selections */
  350. };
  351.  
  352. struct IntuiText MText9 = {
  353.         3,1,COMPLEMENT, /* front and back text pens, drawmode and fill byte */
  354.         0,0,    /* XY origin relative to container TopLeft */
  355.         NULL,   /* font pointer or NULL for default */
  356.         "Load", /* pointer to text */
  357.         NULL    /* next IntuiText structure */
  358. };
  359.  
  360. struct MenuItem MenuItem6 = {
  361.         &MenuItem7a,     /* next MenuItem structure */
  362.         0,0,    /* XY of Item hitbox relative to TopLeft of parent hitbox */
  363.         144,8,  /* hit box width and height */
  364.         ITEMTEXT+COMMSEQ+ITEMENABLED+HIGHCOMP,  /* Item flags */
  365.         0,      /* each bit mutually-excludes a same-level Item */
  366.         (APTR)&MText9,  /* Item render  (IntuiText or Image or NULL) */
  367.         NULL,   /* Select render */
  368.         'l',    /* alternate command-key */
  369.         NULL,   /* SubItem list */
  370.         MENUNULL        /* filled in by Intuition for drag selections */
  371. };
  372.  
  373. struct Menu Menu1 = {
  374.         &Menu2, /* next Menu structure */
  375.         0,0,    /* XY origin of Menu hit box relative to screen TopLeft */
  376.         75,0,   /* Menu hit box width and height */
  377.         MENUENABLED,    /* Menu flags */
  378.         "Project",      /* text of Menu name */
  379.         &MenuItem6      /* MenuItem linked list pointer */
  380. };
  381.  
  382.  
  383. SHORT BorderVectors10b[] = {
  384.         0,0,
  385.         19,0,
  386.         19,10,
  387.         0,10,
  388.         0,0
  389. };
  390. struct Border Border10b = {
  391.         -2,-1,  /* XY origin relative to container TopLeft */
  392.         3,0,JAM1,       /* front pen, back pen and drawmode */
  393.         5,      /* number of XY vectors */
  394.         BorderVectors10b,        /* pointer to XY vectors */
  395.         NULL    /* next border in list */
  396. };
  397.  
  398. struct Gadget Switch6 = {
  399.         NULL,       /* next gadget */
  400.         476,130,        /* origin XY of hit box relative to window TopLeft */
  401.         16,9,   /* hit box width and height */
  402.         NULL,    /* gadget flags */
  403.         GADGIMMEDIATE,  /* activation flags */
  404.         BOOLGADGET,     /* gadget type flags */
  405.         (APTR)&Border10b,        /* gadget border or image to be rendered */
  406.         NULL,   /* alternate imagery for selection */
  407.         NULL,   /* first IntuiText structure */
  408.         NULL,   /* gadget mutual-exclude long word */
  409.         NULL,   /* SpecialInfo structure */
  410.         NULL,   /* user-definable data */
  411.         NULL    /* pointer to user-definable data */
  412. };
  413.  
  414. SHORT BorderVectors11b[] = {
  415.         0,0,
  416.         19,0,
  417.         19,10,
  418.         0,10,
  419.         0,0
  420. };
  421. struct Border Border11b = {
  422.         -2,-1,  /* XY origin relative to container TopLeft */
  423.         3,0,JAM1,       /* front pen, back pen and drawmode */
  424.         5,      /* number of XY vectors */
  425.         BorderVectors11b,        /* pointer to XY vectors */
  426.         NULL    /* next border in list */
  427. };
  428.  
  429. struct Gadget Switch5 = {
  430.         &Switch6,       /* next gadget */
  431.         476,110,        /* origin XY of hit box relative to window TopLeft */
  432.         16,9,   /* hit box width and height */
  433.         NULL,   /* gadget flags */
  434.         GADGIMMEDIATE,  /* activation flags */
  435.         BOOLGADGET,     /* gadget type flags */
  436.         (APTR)&Border11b,        /* gadget border or image to be rendered */
  437.         NULL,   /* alternate imagery for selection */
  438.         NULL,   /* first IntuiText structure */
  439.         NULL,   /* gadget mutual-exclude long word */
  440.         NULL,   /* SpecialInfo structure */
  441.         NULL,   /* user-definable data */
  442.         NULL    /* pointer to user-definable data */
  443. };
  444.  
  445. SHORT BorderVectors12b[] = {
  446.         0,0,
  447.         19,0,
  448.         19,10,
  449.         0,10,
  450.         0,0
  451. };
  452. struct Border Border12b = {
  453.         -2,-1,  /* XY origin relative to container TopLeft */
  454.         3,0,JAM1,       /* front pen, back pen and drawmode */
  455.         5,      /* number of XY vectors */
  456.         BorderVectors12b,        /* pointer to XY vectors */
  457.         NULL    /* next border in list */
  458. };
  459.  
  460. struct Gadget Switch4 = {
  461.         &Switch5,       /* next gadget */
  462.         476,90,        /* origin XY of hit box relative to window TopLeft */
  463.         16,9,   /* hit box width and height */
  464.         NULL,   /* gadget flags */
  465.         GADGIMMEDIATE,  /* activation flags */
  466.         BOOLGADGET,     /* gadget type flags */
  467.         (APTR)&Border12b,        /* gadget border or image to be rendered */
  468.         NULL,   /* alternate imagery for selection */
  469.         NULL,   /* first IntuiText structure */
  470.         NULL,   /* gadget mutual-exclude long word */
  471.         NULL,   /* SpecialInfo structure */
  472.         NULL,   /* user-definable data */
  473.         NULL    /* pointer to user-definable data */
  474. };
  475.  
  476.  
  477. SHORT BorderVectors14b[] = {
  478.         0,0,
  479.         19,0,
  480.         19,10,
  481.         0,10,
  482.         0,0
  483. };
  484. struct Border Border14b = {
  485.         -2,-1,  /* XY origin relative to container TopLeft */
  486.         3,0,JAM1,       /* front pen, back pen and drawmode */
  487.         5,      /* number of XY vectors */
  488.         BorderVectors14b,        /* pointer to XY vectors */
  489.         NULL    /* next border in list */
  490. };
  491.  
  492. struct Gadget Switch3 = {
  493.         &Switch4,       /* next gadget */
  494.         436,130,        /* origin XY of hit box relative to window TopLeft */
  495.         16,9,   /* hit box width and height */
  496.         NULL,    /* gadget flags */
  497.         GADGIMMEDIATE,  /* activation flags */
  498.         BOOLGADGET,     /* gadget type flags */
  499.         (APTR)&Border14b,        /* gadget border or image to be rendered */
  500.         NULL,   /* alternate imagery for selection */
  501.         NULL,   /* first IntuiText structure */
  502.         NULL,   /* gadget mutual-exclude long word */
  503.         NULL,   /* SpecialInfo structure */
  504.         NULL,   /* user-definable data */
  505.         NULL    /* pointer to user-definable data */
  506. };
  507.  
  508. SHORT BorderVectors15b[] = {
  509.         0,0,
  510.         19,0,
  511.         19,10,
  512.         0,10,
  513.         0,0
  514. };
  515. struct Border Border15b = {
  516.         -2,-1,  /* XY origin relative to container TopLeft */
  517.         3,0,JAM1,       /* front pen, back pen and drawmode */
  518.         5,      /* number of XY vectors */
  519.         BorderVectors15b,        /* pointer to XY vectors */
  520.         NULL    /* next border in list */
  521. };
  522.  
  523. struct Gadget Switch2 = {
  524.         &Switch3,       /* next gadget */
  525.         436,110,        /* origin XY of hit box relative to window TopLeft */
  526.         16,9,   /* hit box width and height */
  527.         NULL,   /* gadget flags */
  528.         GADGIMMEDIATE,  /* activation flags */
  529.         BOOLGADGET,     /* gadget type flags */
  530.         (APTR)&Border15b,        /* gadget border or image to be rendered */
  531.         NULL,   /* alternate imagery for selection */
  532.         NULL,   /* first IntuiText structure */
  533.         NULL,   /* gadget mutual-exclude long word */
  534.         NULL,   /* SpecialInfo structure */
  535.         NULL,   /* user-definable data */
  536.         NULL    /* pointer to user-definable data */
  537. };
  538.  
  539. SHORT BorderVectors16b[] = {
  540.         0,0,
  541.         19,0,
  542.         19,10,
  543.         0,10,
  544.         0,0
  545. };
  546. struct Border Border16b = {
  547.         -2,-1,  /* XY origin relative to container TopLeft */
  548.         3,0,JAM1,       /* front pen, back pen and drawmode */
  549.         5,      /* number of XY vectors */
  550.         BorderVectors16b,        /* pointer to XY vectors */
  551.         NULL    /* next border in list */
  552. };
  553.  
  554. struct Gadget Switch1 = {
  555.         &Switch2,       /* next gadget */
  556.         436,90,        /* origin XY of hit box relative to window TopLeft */
  557.         16,9,   /* hit box width and height */
  558.         NULL,   /* gadget flags */
  559.         GADGIMMEDIATE,  /* activation flags */
  560.         BOOLGADGET,     /* gadget type flags */
  561.         (APTR)&Border16b,        /* gadget border or image to be rendered */
  562.         NULL,   /* alternate imagery for selection */
  563.         NULL,   /* first IntuiText structure */
  564.         NULL,   /* gadget mutual-exclude long word */
  565.         NULL,   /* SpecialInfo structure */
  566.         NULL,   /* user-definable data */
  567.         NULL    /* pointer to user-definable data */
  568. };
  569.  
  570.  
  571.  
  572. SHORT BorderVectors6[] = {
  573.         0,0,
  574.         19,0,
  575.         19,10,
  576.         0,10,
  577.         0,0
  578. };
  579. struct Border Border6 = {
  580.         -2,-1,  /* XY origin relative to container TopLeft */
  581.         3,0,JAM1,       /* front pen, back pen and drawmode */
  582.         5,      /* number of XY vectors */
  583.         BorderVectors6, /* pointer to XY vectors */
  584.         NULL    /* next border in list */
  585. };
  586.  
  587. struct Gadget Button11 = {
  588.         &Switch1,      /* next gadget */
  589.         196,150,        /* origin XY of hit box relative to window TopLeft */
  590.         16,9,   /* hit box width and height */
  591.         GADGHBOX+GADGHIMAGE,    /* gadget flags */
  592.         GADGIMMEDIATE,  /* activation flags */
  593.         BOOLGADGET,     /* gadget type flags */
  594.         (APTR)&Border6, /* gadget border or image to be rendered */
  595.         NULL,   /* alternate imagery for selection */
  596.         NULL,   /* first IntuiText structure */
  597.         NULL,   /* gadget mutual-exclude long word */
  598.         NULL,   /* SpecialInfo structure */
  599.         NULL,   /* user-definable data */
  600.         NULL    /* pointer to user-definable data */
  601. };
  602.  
  603. SHORT BorderVectors7[] = {
  604.         0,0,
  605.         19,0,
  606.         19,10,
  607.         0,10,
  608.         0,0
  609. };
  610. struct Border Border7 = {
  611.         -2,-1,  /* XY origin relative to container TopLeft */
  612.         3,0,JAM1,       /* front pen, back pen and drawmode */
  613.         5,      /* number of XY vectors */
  614.         BorderVectors7, /* pointer to XY vectors */
  615.         NULL    /* next border in list */
  616. };
  617.  
  618. struct Gadget Button10 = {
  619.         &Button11,      /* next gadget */
  620.         196,130,        /* origin XY of hit box relative to window TopLeft */
  621.         16,9,   /* hit box width and height */
  622.         NULL,   /* gadget flags */
  623.         GADGIMMEDIATE,  /* activation flags */
  624.         BOOLGADGET,     /* gadget type flags */
  625.         (APTR)&Border7, /* gadget border or image to be rendered */
  626.         NULL,   /* alternate imagery for selection */
  627.         NULL,   /* first IntuiText structure */
  628.         NULL,   /* gadget mutual-exclude long word */
  629.         NULL,   /* SpecialInfo structure */
  630.         NULL,   /* user-definable data */
  631.         NULL    /* pointer to user-definable data */
  632. };
  633.  
  634. SHORT BorderVectors8[] = {
  635.         0,0,
  636.         19,0,
  637.         19,10,
  638.         0,10,
  639.         0,0
  640. };
  641. struct Border Border8 = {
  642.         -2,-1,  /* XY origin relative to container TopLeft */
  643.         3,0,JAM1,       /* front pen, back pen and drawmode */
  644.         5,      /* number of XY vectors */
  645.         BorderVectors8, /* pointer to XY vectors */
  646.         NULL    /* next border in list */
  647. };
  648.  
  649. struct Gadget Button9 = {
  650.         &Button10,      /* next gadget */
  651.         196,110,        /* origin XY of hit box relative to window TopLeft */
  652.         16,9,   /* hit box width and height */
  653.         NULL,   /* gadget flags */
  654.         GADGIMMEDIATE,  /* activation flags */
  655.         BOOLGADGET,     /* gadget type flags */
  656.         (APTR)&Border8, /* gadget border or image to be rendered */
  657.         NULL,   /* alternate imagery for selection */
  658.         NULL,   /* first IntuiText structure */
  659.         NULL,   /* gadget mutual-exclude long word */
  660.         NULL,   /* SpecialInfo structure */
  661.         NULL,   /* user-definable data */
  662.         NULL    /* pointer to user-definable data */
  663. };
  664.  
  665. SHORT BorderVectors9[] = {
  666.         0,0,
  667.         19,0,
  668.         19,10,
  669.         0,10,
  670.         0,0
  671. };
  672. struct Border Border9 = {
  673.         -2,-1,  /* XY origin relative to container TopLeft */
  674.         3,0,JAM1,       /* front pen, back pen and drawmode */
  675.         5,      /* number of XY vectors */
  676.         BorderVectors9, /* pointer to XY vectors */
  677.         NULL    /* next border in list */
  678. };
  679.  
  680. struct Gadget Button8 = {
  681.         &Button9,       /* next gadget */
  682.         196,90,        /* origin XY of hit box relative to window TopLeft */
  683.         16,9,   /* hit box width and height */
  684.         NULL,   /* gadget flags */
  685.         GADGIMMEDIATE,  /* activation flags */
  686.         BOOLGADGET,     /* gadget type flags */
  687.         (APTR)&Border9, /* gadget border or image to be rendered */
  688.         NULL,   /* alternate imagery for selection */
  689.         NULL,   /* first IntuiText structure */
  690.         NULL,   /* gadget mutual-exclude long word */
  691.         NULL,   /* SpecialInfo structure */
  692.         NULL,   /* user-definable data */
  693.         NULL    /* pointer to user-definable data */
  694. };
  695.  
  696. SHORT BorderVectors10[] = {
  697.         0,0,
  698.         19,0,
  699.         19,10,
  700.         0,10,
  701.         0,0
  702. };
  703. struct Border Border10 = {
  704.         -2,-1,  /* XY origin relative to container TopLeft */
  705.         3,0,JAM1,       /* front pen, back pen and drawmode */
  706.         5,      /* number of XY vectors */
  707.         BorderVectors10,        /* pointer to XY vectors */
  708.         NULL    /* next border in list */
  709. };
  710.  
  711. struct Gadget Button7 = {
  712.         &Button8,       /* next gadget */
  713.         156,150,        /* origin XY of hit box relative to window TopLeft */
  714.         16,9,   /* hit box width and height */
  715.         GADGHBOX+GADGHIMAGE,    /* gadget flags */
  716.         GADGIMMEDIATE,  /* activation flags */
  717.         BOOLGADGET,     /* gadget type flags */
  718.         (APTR)&Border10,        /* gadget border or image to be rendered */
  719.         NULL,   /* alternate imagery for selection */
  720.         NULL,   /* first IntuiText structure */
  721.         NULL,   /* gadget mutual-exclude long word */
  722.         NULL,   /* SpecialInfo structure */
  723.         NULL,   /* user-definable data */
  724.         NULL    /* pointer to user-definable data */
  725. };
  726.  
  727. SHORT BorderVectors11[] = {
  728.         0,0,
  729.         19,0,
  730.         19,10,
  731.         0,10,
  732.         0,0
  733. };
  734. struct Border Border11 = {
  735.         -2,-1,  /* XY origin relative to container TopLeft */
  736.         3,0,JAM1,       /* front pen, back pen and drawmode */
  737.         5,      /* number of XY vectors */
  738.         BorderVectors11,        /* pointer to XY vectors */
  739.         NULL    /* next border in list */
  740. };
  741.  
  742. struct Gadget Button6 = {
  743.         &Button7,       /* next gadget */
  744.         156,130,        /* origin XY of hit box relative to window TopLeft */
  745.         16,9,   /* hit box width and height */
  746.         NULL,   /* gadget flags */
  747.         GADGIMMEDIATE,  /* activation flags */
  748.         BOOLGADGET,     /* gadget type flags */
  749.         (APTR)&Border11,        /* gadget border or image to be rendered */
  750.         NULL,   /* alternate imagery for selection */
  751.         NULL,   /* first IntuiText structure */
  752.         NULL,   /* gadget mutual-exclude long word */
  753.         NULL,   /* SpecialInfo structure */
  754.         NULL,   /* user-definable data */
  755.         NULL    /* pointer to user-definable data */
  756. };
  757.  
  758. SHORT BorderVectors12[] = {
  759.         0,0,
  760.         19,0,
  761.         19,10,
  762.         0,10,
  763.         0,0
  764. };
  765. struct Border Border12 = {
  766.         -2,-1,  /* XY origin relative to container TopLeft */
  767.         3,0,JAM1,       /* front pen, back pen and drawmode */
  768.         5,      /* number of XY vectors */
  769.         BorderVectors12,        /* pointer to XY vectors */
  770.         NULL    /* next border in list */
  771. };
  772.  
  773. struct Gadget Button5 = {
  774.         &Button6,       /* next gadget */
  775.         156,110,        /* origin XY of hit box relative to window TopLeft */
  776.         16,9,   /* hit box width and height */
  777.         NULL,   /* gadget flags */
  778.         GADGIMMEDIATE,  /* activation flags */
  779.         BOOLGADGET,     /* gadget type flags */
  780.         (APTR)&Border12,        /* gadget border or image to be rendered */
  781.         NULL,   /* alternate imagery for selection */
  782.         NULL,   /* first IntuiText structure */
  783.         NULL,   /* gadget mutual-exclude long word */
  784.         NULL,   /* SpecialInfo structure */
  785.         NULL,   /* user-definable data */
  786.         NULL    /* pointer to user-definable data */
  787. };
  788.  
  789. SHORT BorderVectors13[] = {
  790.         0,0,
  791.         19,0,
  792.         19,10,
  793.         0,10,
  794.         0,0
  795. };
  796. struct Border Border13 = {
  797.         -2,-1,  /* XY origin relative to container TopLeft */
  798.         3,0,JAM1,       /* front pen, back pen and drawmode */
  799.         5,      /* number of XY vectors */
  800.         BorderVectors13,        /* pointer to XY vectors */
  801.         NULL    /* next border in list */
  802. };
  803.  
  804. struct Gadget Button4 = {
  805.         &Button5,       /* next gadget */
  806.         156,90,        /* origin XY of hit box relative to window TopLeft */
  807.         16,9,   /* hit box width and height */
  808.         NULL,   /* gadget flags */
  809.         GADGIMMEDIATE,  /* activation flags */
  810.         BOOLGADGET,     /* gadget type flags */
  811.         (APTR)&Border13,        /* gadget border or image to be rendered */
  812.         NULL,   /* alternate imagery for selection */
  813.         NULL,   /* first IntuiText structure */
  814.         NULL,   /* gadget mutual-exclude long word */
  815.         NULL,   /* SpecialInfo structure */
  816.         NULL,   /* user-definable data */
  817.         NULL    /* pointer to user-definable data */
  818. };
  819.  
  820. SHORT BorderVectors14[] = {
  821.         0,0,
  822.         19,0,
  823.         19,10,
  824.         0,10,
  825.         0,0
  826. };
  827. struct Border Border14 = {
  828.         -2,-1,  /* XY origin relative to container TopLeft */
  829.         3,0,JAM1,       /* front pen, back pen and drawmode */
  830.         5,      /* number of XY vectors */
  831.         BorderVectors14,        /* pointer to XY vectors */
  832.         NULL    /* next border in list */
  833. };
  834.  
  835. struct Gadget Button3 = {
  836.         &Button4,       /* next gadget */
  837.         116,150,        /* origin XY of hit box relative to window TopLeft */
  838.         16,9,   /* hit box width and height */
  839.         GADGHBOX+GADGHIMAGE,    /* gadget flags */
  840.         GADGIMMEDIATE,  /* activation flags */
  841.         BOOLGADGET,     /* gadget type flags */
  842.         (APTR)&Border14,        /* gadget border or image to be rendered */
  843.         NULL,   /* alternate imagery for selection */
  844.         NULL,   /* first IntuiText structure */
  845.         NULL,   /* gadget mutual-exclude long word */
  846.         NULL,   /* SpecialInfo structure */
  847.         NULL,   /* user-definable data */
  848.         NULL    /* pointer to user-definable data */
  849. };
  850.  
  851. SHORT BorderVectors15[] = {
  852.         0,0,
  853.         19,0,
  854.         19,10,
  855.         0,10,
  856.         0,0
  857. };
  858. struct Border Border15 = {
  859.         -2,-1,  /* XY origin relative to container TopLeft */
  860.         3,0,JAM1,       /* front pen, back pen and drawmode */
  861.         5,      /* number of XY vectors */
  862.         BorderVectors15,        /* pointer to XY vectors */
  863.         NULL    /* next border in list */
  864. };
  865.  
  866. struct Gadget Button2 = {
  867.         &Button3,       /* next gadget */
  868.         116,130,        /* origin XY of hit box relative to window TopLeft */
  869.         16,9,   /* hit box width and height */
  870.         NULL,   /* gadget flags */
  871.         GADGIMMEDIATE,  /* activation flags */
  872.         BOOLGADGET,     /* gadget type flags */
  873.         (APTR)&Border15,        /* gadget border or image to be rendered */
  874.         NULL,   /* alternate imagery for selection */
  875.         NULL,   /* first IntuiText structure */
  876.         NULL,   /* gadget mutual-exclude long word */
  877.         NULL,   /* SpecialInfo structure */
  878.         NULL,   /* user-definable data */
  879.         NULL    /* pointer to user-definable data */
  880. };
  881.  
  882. SHORT BorderVectors16[] = {
  883.         0,0,
  884.         19,0,
  885.         19,10,
  886.         0,10,
  887.         0,0
  888. };
  889. struct Border Border16 = {
  890.         -2,-1,  /* XY origin relative to container TopLeft */
  891.         3,0,JAM1,       /* front pen, back pen and drawmode */
  892.         5,      /* number of XY vectors */
  893.         BorderVectors16,        /* pointer to XY vectors */
  894.         NULL    /* next border in list */
  895. };
  896.  
  897. struct Gadget Button1 = {
  898.         &Button2,       /* next gadget */
  899.         116,110,        /* origin XY of hit box relative to window TopLeft */
  900.         16,9,   /* hit box width and height */
  901.         NULL,   /* gadget flags */
  902.         GADGIMMEDIATE,  /* activation flags */
  903.         BOOLGADGET,     /* gadget type flags */
  904.         (APTR)&Border16,        /* gadget border or image to be rendered */
  905.         NULL,   /* alternate imagery for selection */
  906.         NULL,   /* first IntuiText structure */
  907.         NULL,   /* gadget mutual-exclude long word */
  908.         NULL,   /* SpecialInfo structure */
  909.         NULL,   /* user-definable data */
  910.         NULL    /* pointer to user-definable data */
  911. };
  912.  
  913. SHORT BorderVectors17[] = {
  914.         0,0,
  915.         19,0,
  916.         19,10,
  917.         0,10,
  918.         0,0
  919. };
  920. struct Border Border17 = {
  921.         -2,-1,  /* XY origin relative to container TopLeft */
  922.         3,0,JAM1,       /* front pen, back pen and drawmode */
  923.         5,      /* number of XY vectors */
  924.         BorderVectors17,        /* pointer to XY vectors */
  925.         NULL    /* next border in list */
  926. };
  927.  
  928. struct Gadget Button0 = {
  929.         &Button1,       /* next gadget */
  930.         116,90,        /* origin XY of hit box relative to window TopLeft */
  931.         16,9,   /* hit box width and height */
  932.         NULL,   /* gadget flags */
  933.         GADGIMMEDIATE,  /* activation flags */
  934.         BOOLGADGET,     /* gadget type flags */
  935.         (APTR)&Border17,        /* gadget border or image to be rendered */
  936.         NULL,   /* alternate imagery for selection */
  937.         NULL,   /* first IntuiText structure */
  938.         NULL,   /* gadget mutual-exclude long word */
  939.         NULL,   /* SpecialInfo structure */
  940.         NULL,   /* user-definable data */
  941.         NULL    /* pointer to user-definable data */
  942. };
  943.  
  944. SHORT BorderVectors4[] = {
  945.         0,0,
  946.         176,0,
  947.         176,26,
  948.         0,26,
  949.         0,0
  950. };
  951. struct Border Border4 = {
  952.         -2,-1,  /* XY origin relative to container TopLeft */
  953.         3,0,JAM1,       /* front pen, back pen and drawmode */
  954.         5,      /* number of XY vectors */
  955.         BorderVectors4, /* pointer to XY vectors */
  956.         NULL    /* next border in list */
  957. };
  958.  
  959. struct IntuiText IText3 = {
  960.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  961.         49,8,   /* XY origin relative to container TopLeft */
  962.         &gfont,   /* font pointer or NULL for default */
  963.         "3D PLOT",      /* pointer to text */
  964.         NULL    /* next IntuiText structure */
  965. };
  966.  
  967. struct Gadget Plot3DButton = {
  968.         &Button0,      /* next gadget */
  969.         435,17, /* origin XY of hit box relative to window TopLeft */
  970.         173,25, /* hit box width and height */
  971.         NULL,   /* gadget flags */
  972.         GADGIMMEDIATE,      /* activation flags */
  973.         BOOLGADGET,     /* gadget type flags */
  974.         (APTR)&Border4, /* gadget border or image to be rendered */
  975.         NULL,   /* alternate imagery for selection */
  976.         &IText3,        /* first IntuiText structure */
  977.         NULL,   /* gadget mutual-exclude long word */
  978.         NULL,   /* SpecialInfo structure */
  979.         NULL,   /* user-definable data */
  980.         NULL    /* pointer to user-definable data */
  981. };
  982.  
  983.  
  984.  
  985. SHORT BorderVectors4a[] = {
  986.         0,0,
  987.         176,0,
  988.         176,26,
  989.         0,26,
  990.         0,0
  991. };
  992. struct Border Border4a = {
  993.         -2,-1,  /* XY origin relative to container TopLeft */
  994.         3,0,JAM1,       /* front pen, back pen and drawmode */
  995.         5,      /* number of XY vectors */
  996.         BorderVectors4a, /* pointer to XY vectors */
  997.         NULL    /* next border in list */
  998. };
  999.  
  1000. struct IntuiText IText3a = {
  1001.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1002.         54,8,   /* XY origin relative to container TopLeft */
  1003.         &gfont,   /* font pointer or NULL for default */
  1004.         "EDIT",      /* pointer to text */
  1005.         NULL    /* next IntuiText structure */
  1006. };
  1007.  
  1008. struct Gadget EditButton = {
  1009.         &Plot3DButton,      /* next gadget */
  1010.         235,17, /* origin XY of hit box relative to window TopLeft */
  1011.         173,25, /* hit box width and height */
  1012.         GADGHCOMP,   /* gadget flags */
  1013.         GADGIMMEDIATE,      /* activation flags */
  1014.         BOOLGADGET,     /* gadget type flags */
  1015.         (APTR)&Border4a, /* gadget border or image to be rendered */
  1016.         NULL,   /* alternate imagery for selection */
  1017.         &IText3a,        /* first IntuiText structure */
  1018.         NULL,   /* gadget mutual-exclude long word */
  1019.         NULL,   /* SpecialInfo structure */
  1020.         NULL,   /* user-definable data */
  1021.         NULL    /* pointer to user-definable data */
  1022. };
  1023.  
  1024.  
  1025. SHORT BorderVectors5[] = {
  1026.         0,0,
  1027.         176,0,
  1028.         176,26,
  1029.         0,26,
  1030.         0,0
  1031. };
  1032. struct Border Border5 = {
  1033.         -2,-1,  /* XY origin relative to container TopLeft */
  1034.         3,0,JAM1,       /* front pen, back pen and drawmode */
  1035.         5,      /* number of XY vectors */
  1036.         BorderVectors5, /* pointer to XY vectors */
  1037.         NULL    /* next border in list */
  1038. };
  1039.  
  1040. struct IntuiText IText4 = {
  1041.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1042.         49,8,   /* XY origin relative to container TopLeft */
  1043.         &gfont,   /* font pointer or NULL for default */
  1044.         "2D PLOT",      /* pointer to text */
  1045.         NULL    /* next IntuiText structure */
  1046. };
  1047.  
  1048. struct Gadget Plot2DButton = {
  1049.         &EditButton,      /* next gadget */
  1050.         32,17,  /* origin XY of hit box relative to window TopLeft */
  1051.         173,25, /* hit box width and height */
  1052.         NULL,   /* gadget flags */
  1053.         GADGIMMEDIATE,      /* activation flags */
  1054.         BOOLGADGET,     /* gadget type flags */
  1055.         (APTR)&Border5, /* gadget border or image to be rendered */
  1056.         NULL,   /* alternate imagery for selection */
  1057.         &IText4,        /* first IntuiText structure */
  1058.         NULL,   /* gadget mutual-exclude long word */
  1059.         NULL,   /* SpecialInfo structure */
  1060.         NULL,   /* user-definable data */
  1061.         NULL    /* pointer to user-definable data */
  1062. };
  1063.  
  1064.  
  1065.  
  1066. SHORT BorderVectors1[] = {
  1067.         0,0,
  1068.         194,0,
  1069.         194,19,
  1070.         0,19,
  1071.         0,0
  1072. };
  1073. struct Border Border1 = {
  1074.         -2,-1,  /* XY origin relative to container TopLeft */
  1075.         3,0,JAM1,       /* front pen, back pen and drawmode */
  1076.         5,      /* number of XY vectors */
  1077.         BorderVectors1, /* pointer to XY vectors */
  1078.         NULL    /* next border in list */
  1079. };
  1080.  
  1081. struct IntuiText IText1 = {
  1082.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1083.         48,5,   /* XY origin relative to container TopLeft */
  1084.         &gfont,   /* font pointer or NULL for default */
  1085.         "Start Plot",   /* pointer to text */
  1086.         NULL    /* next IntuiText structure */
  1087. };
  1088.  
  1089. struct Gadget StartButton = {
  1090.         &Plot2DButton,   /* next gadget */
  1091.         191,177,        /* origin XY of hit box relative to window TopLeft */
  1092.         191,18, /* hit box width and height */
  1093.         NULL,   /* gadget flags */
  1094.         GADGIMMEDIATE,      /* activation flags */
  1095.         BOOLGADGET,     /* gadget type flags */
  1096.         (APTR)&Border1, /* gadget border or image to be rendered */
  1097.         NULL,   /* alternate imagery for selection */
  1098.         &IText1,        /* first IntuiText structure */
  1099.         NULL,   /* gadget mutual-exclude long word */
  1100.         NULL,   /* SpecialInfo structure */
  1101.         NULL,   /* user-definable data */
  1102.         NULL    /* pointer to user-definable data */
  1103. };
  1104.  
  1105. UBYTE FileNameSIBuff[100]="PLOT:Data/FileName";
  1106. struct StringInfo FileNameSInfo = {
  1107.         FileNameSIBuff, /* buffer where text will be edited */
  1108.         UNDOBUFFER,     /* optional undo buffer */
  1109.         0,      /* character position in buffer */
  1110.         100,    /* maximum number of characters to allow */
  1111.         0,      /* first displayed character buffer position */
  1112.         0,0,0,0,0,      /* Intuition initialized and maintained variables */
  1113.         0,      /* Rastport of gadget */
  1114.         0,      /* initial value for integer gadgets */
  1115.         NULL    /* alternate keymap (fill in if you set the flag) */
  1116. };
  1117.  
  1118. SHORT BorderVectors3[] = {
  1119.         0,0,
  1120.         279,0,
  1121.         279,15,
  1122.         0,15,
  1123.         0,1
  1124. };
  1125. struct Border Border3 = {
  1126.         -2,-3,  /* XY origin relative to container TopLeft */
  1127.         3,0,COMPLEMENT, /* front pen, back pen and drawmode */
  1128.         5,      /* number of XY vectors */
  1129.         BorderVectors3, /* pointer to XY vectors */
  1130.         NULL    /* next border in list */
  1131. };
  1132.  
  1133. struct Gadget FileName = {
  1134.         &StartButton,      /* next gadget */
  1135.         198,50, /* origin XY of hit box relative to window TopLeft */
  1136.         276,12, /* hit box width and height */
  1137.         NULL,   /* gadget flags */
  1138.         GADGIMMEDIATE+STRINGCENTER,     /* activation flags */
  1139.         STRGADGET,      /* gadget type flags */
  1140.         (APTR)&Border3, /* gadget border or image to be rendered */
  1141.         NULL,   /* alternate imagery for selection */
  1142.         NULL,   /* first IntuiText structure */
  1143.         NULL,   /* gadget mutual-exclude long word */
  1144.         (APTR)&FileNameSInfo,   /* SpecialInfo structure */
  1145.         NULL,   /* user-definable data */
  1146.         NULL    /* pointer to user-definable data */
  1147. };
  1148.  
  1149. SHORT BorderVectors2[] = {
  1150.         0,0,
  1151.         80,0,
  1152.         80,14,
  1153.         0,14,
  1154.         0,0
  1155. };
  1156. struct Border Border2 = {
  1157.         -2,-1,  /* XY origin relative to container TopLeft */
  1158.         3,0,JAM1,       /* front pen, back pen and drawmode */
  1159.         5,      /* number of XY vectors */
  1160.         BorderVectors2, /* pointer to XY vectors */
  1161.         NULL    /* next border in list */
  1162. };
  1163.  
  1164. struct IntuiText IText2 = {
  1165.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1166.         17,2,   /* XY origin relative to container TopLeft */
  1167.         NULL,   /* font pointer or NULL for default */
  1168.         "Path", /* pointer to text */
  1169.         NULL    /* next IntuiText structure */
  1170. };
  1171.  
  1172. struct Gadget PathButton = {
  1173.         &FileName,      /* next gadget */
  1174.         98,48,  /* origin XY of hit box relative to window TopLeft */
  1175.         77,13,  /* hit box width and height */
  1176.         NULL,   /* gadget flags */
  1177.         GADGIMMEDIATE,      /* activation flags */
  1178.         BOOLGADGET,     /* gadget type flags */
  1179.         (APTR)&Border2, /* gadget border or image to be rendered */
  1180.         NULL,   /* alternate imagery for selection */
  1181.         &IText2,        /* first IntuiText structure */
  1182.         NULL,   /* gadget mutual-exclude long word */
  1183.         NULL,   /* SpecialInfo structure */
  1184.         NULL,   /* user-definable data */
  1185.         NULL    /* pointer to user-definable data */
  1186. };
  1187.  
  1188. struct IntuiText IText12 = {
  1189.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1190.         25,150, /* XY origin relative to container TopLeft */
  1191.         NULL,   /* font pointer or NULL for default */
  1192.         "Off",  /* pointer to text */
  1193.         NULL        /* next IntuiText structure */
  1194. };
  1195.  
  1196.  
  1197. struct IntuiText IText11 = {
  1198.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1199.         343,130, /* XY origin relative to container TopLeft */
  1200.         NULL,   /* font pointer or NULL for default */
  1201.         "UnderSide",     /* pointer to text */
  1202.         &IText12 /* next IntuiText structure */
  1203. };
  1204.  
  1205. struct IntuiText IText10 = {
  1206.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1207.         343,110, /* XY origin relative to container TopLeft */
  1208.         NULL,   /* font pointer or NULL for default */
  1209.         "Axes",     /* pointer to text */
  1210.         &IText11 /* next IntuiText structure */
  1211. };
  1212.  
  1213. struct IntuiText IText9 = {
  1214.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1215.         343,90, /* XY origin relative to container TopLeft */
  1216.         NULL,   /* font pointer or NULL for default */
  1217.         "CrossNet",     /* pointer to text */
  1218.         &IText10 /* next IntuiText structure */
  1219. };
  1220.  
  1221.  
  1222.  
  1223. struct IntuiText IText8 = {
  1224.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1225.         23,130, /* XY origin relative to container TopLeft */
  1226.         NULL,   /* font pointer or NULL for default */
  1227.         "Column 3",     /* pointer to text */
  1228.         &IText9 /* next IntuiText structure */
  1229. };
  1230.  
  1231. struct IntuiText IText7 = {
  1232.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1233.         23,110, /* XY origin relative to container TopLeft */
  1234.         NULL,   /* font pointer or NULL for default */
  1235.         "Column 2",     /* pointer to text */
  1236.         &IText8 /* next IntuiText structure */
  1237. };
  1238.  
  1239. struct IntuiText IText6 = {
  1240.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1241.         23,90, /* XY origin relative to container TopLeft */
  1242.         NULL,   /* font pointer or NULL for default */
  1243.         "Column 1",     /* pointer to text */
  1244.         &IText7 /* next IntuiText structure */
  1245. };
  1246.  
  1247.  
  1248. struct IntuiText IText5a = {
  1249.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1250.         438,72,        /* XY origin relative to container TopLeft */
  1251.         NULL,   /* font pointer or NULL for default */
  1252.         "ON   OFF",      /* pointer to text */
  1253.         &IText6 /* next IntuiText structure */
  1254. };
  1255.  
  1256. struct IntuiText IText5 = {
  1257.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1258.         118,72,        /* XY origin relative to container TopLeft */
  1259.         NULL,   /* font pointer or NULL for default */
  1260.         "X    Y    ERROR",      /* pointer to text */
  1261.         &IText5a /* next IntuiText structure */
  1262. };
  1263.  
  1264. #define IntuiTextList1 IText5
  1265.  
  1266. struct NewWindow Window = {
  1267.         0,0,    /* window XY origin relative to TopLeft of screen */
  1268.         640,200,        /* window width and height */
  1269.         1,2,    /* detail and block pens */
  1270.         MENUPICK|GADGETDOWN+CLOSEWINDOW+REFRESHWINDOW|RAWKEY,       /* IDCMP flags */
  1271.         ACTIVATE|WINDOWCLOSE|SMART_REFRESH|WINDOWSIZING|WINDOWDRAG,   /* other window flags */
  1272.         &PathButton,       /* first gadget in gadget list */
  1273.         NULL,   /* custom CHECKMARK imagery */
  1274.         "             << PLOT 1.2 >>              Data Analysis Environment                 ",   /* window title */
  1275.         NULL,   /* custom screen pointer */
  1276.         NULL,   /* custom bitmap */
  1277.         100,50,    /* minimum width and height */
  1278.         640,256,        /* maximum width and height */
  1279.         WBENCHSCREEN    /* destination screen type */
  1280. };
  1281.  
  1282.  
  1283. struct IntuiText FileCheckText1 = {
  1284.         0,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1285.         55,17,   /* XY origin relative to container TopLeft */
  1286.         NULL,   /* font pointer or NULL for default */
  1287.         "File Does NOT Exist",      /* pointer to text */
  1288.         NULL    /* next IntuiText structure */
  1289. };
  1290.  
  1291. struct IntuiText FileCheckText2 = {
  1292.         0,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1293.         10,3,   /* XY origin relative to container TopLeft */
  1294.         NULL,   /* font pointer or NULL for default */
  1295.         " OK  ",      /* pointer to text */
  1296.         NULL    /* next IntuiText structure */
  1297. };
  1298.  
  1299. struct IntuiText FileCheckText3 = {
  1300.         0,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1301.         10,3,   /* XY origin relative to container TopLeft */
  1302.         NULL,   /* font pointer or NULL for default */
  1303.         " OK  ",      /* pointer to text */
  1304.         NULL    /* next IntuiText structure */
  1305. };
  1306.  
  1307. struct IntuiText NewFileText1 = {
  1308.         0,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1309.         55,17,   /* XY origin relative to container TopLeft */
  1310.         NULL,   /* font pointer or NULL for default */
  1311.         "Open NEW File to Edit?",      /* pointer to text */
  1312.         NULL    /* next IntuiText structure */
  1313. };
  1314. struct IntuiText NewFileText2 = {
  1315.         0,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1316.         10,3,   /* XY origin relative to container TopLeft */
  1317.         NULL,   /* font pointer or NULL for default */
  1318.         " Yes  ",      /* pointer to text */
  1319.         NULL    /* next IntuiText structure */
  1320. };
  1321. struct IntuiText NewFileText3 = {
  1322.         0,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1323.         10,3,   /* XY origin relative to container TopLeft */
  1324.         NULL,   /* font pointer or NULL for default */
  1325.         " NO  ",      /* pointer to text */
  1326.         NULL    /* next IntuiText structure */
  1327. };
  1328.  
  1329.  
  1330.  
  1331. /**********        ADVERSITEMENT REQUESTER TEXT      ******************/
  1332.  
  1333.  
  1334. struct IntuiText AText5 = {
  1335.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1336.         76,28,  /* XY origin relative to container TopLeft */
  1337.         NULL,   /* font pointer or NULL for default */
  1338.         "Plot     Plot2Draw", /* pointer to text */
  1339.         NULL /* next IntuiText structure */
  1340. };
  1341.  
  1342. struct IntuiText AText4 = {
  1343.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1344.         17,52,  /* XY origin relative to container TopLeft */
  1345.         NULL,   /* font pointer or NULL for default */
  1346.         "Multiplot  ThreeDPlot  Text_2_Icad",    /* pointer to text */
  1347.         &AText5 /* next IntuiText structure */
  1348. };
  1349.  
  1350. struct IntuiText AText3 = {
  1351.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1352.         6,42,  /* XY origin relative to container TopLeft */
  1353.         NULL,   /* font pointer or NULL for default */
  1354.         "The following programs are © T Mooney",        /* pointer to text */
  1355.         &AText4 /* next IntuiText structure */
  1356. };
  1357.  
  1358. struct IntuiText AText2 = {
  1359.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1360.         6,18,  /* XY origin relative to container TopLeft */
  1361.         NULL,   /* font pointer or NULL for default */
  1362.         "The folowing programs are © AG Baxter",        /* pointer to text */
  1363.         &AText3 /* next IntuiText structure */
  1364. };
  1365.  
  1366. struct IntuiText AText1 = {
  1367.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1368.         113,6, /* XY origin relative to container TopLeft */
  1369.         &gfont,   /* font pointer or NULL for default */
  1370.         "PLOT 1.2",     /* pointer to text */
  1371.         &AText2 /* next IntuiText structure */
  1372. };
  1373.  
  1374. struct IntuiText AText6 = {
  1375.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1376.         6,3,  /* XY origin relative to container TopLeft */
  1377.         NULL,   /* font pointer or NULL for default */
  1378.         "OK",        /* pointer to text */
  1379.         NULL /* next IntuiText structure */
  1380. };
  1381.  
  1382.  
  1383. struct IntuiText A2Text7 = {
  1384.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1385.         15,68,  /* XY origin relative to container TopLeft */
  1386.         NULL,   /* font pointer or NULL for default */
  1387.         "AUSTRALIA",    /* pointer to text */
  1388.         NULL /* next IntuiText structure */
  1389. };
  1390.  
  1391. struct IntuiText A2Text6 = {
  1392.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1393.         15,58,  /* XY origin relative to container TopLeft */
  1394.         NULL,   /* font pointer or NULL for default */
  1395.         "Post Office, Parkville 3053.",  /* pointer to text */
  1396.         &A2Text7 /* next IntuiText structure */
  1397. };
  1398.  
  1399. struct IntuiText A2Text5 = {
  1400.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1401.         15,48, /* XY origin relative to container TopLeft */
  1402.         NULL,   /* font pointer or NULL for default */
  1403.         "Walter & Eliza Hall Institute,",        /* pointer to text */
  1404.         &A2Text6 /* next IntuiText structure */
  1405. };
  1406.  
  1407. struct IntuiText A2Text4 = {
  1408.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1409.         15,38, /* XY origin relative to container TopLeft */
  1410.         NULL,   /* font pointer or NULL for default */
  1411.         "AG Baxter,",    /* pointer to text */
  1412.         &A2Text5 /* next IntuiText structure */
  1413. };
  1414.  
  1415. struct IntuiText A2Text3 = {
  1416.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1417.         15,28,  /* XY origin relative to container TopLeft */
  1418.         NULL,   /* font pointer or NULL for default */
  1419.         "Enquiries to:", /* pointer to text */
  1420.         &A2Text4 /* next IntuiText structure */
  1421. };
  1422.  
  1423. struct IntuiText A2Text2 = {
  1424.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1425.         15,14,  /* XY origin relative to container TopLeft */
  1426.         NULL,   /* font pointer or NULL for default */
  1427.         "sale or distribution for profit.",      /* pointer to text */
  1428.         &A2Text3 /* next IntuiText structure */
  1429. };
  1430.  
  1431. struct IntuiText A2Text1 = {
  1432.         2,1,JAM2,       /* front and back text pens, drawmode and fill byte */
  1433.         15,4, /* XY origin relative to container TopLeft */
  1434.         NULL,   /* font pointer or NULL for default */
  1435.         "Distribution conditions forbid ",      /* pointer to text */
  1436.         &A2Text2 /* next IntuiText structure */
  1437. };
  1438.  
  1439.  
  1440. /********        DEFINE EDITOR WINDOW STRUCTURES         *********/
  1441.  
  1442. SHORT WBorderVectors1[] = {
  1443.         0,0,
  1444.         83,0,
  1445.         83,15,
  1446.         0,15,
  1447.         0,0
  1448. };
  1449. struct Border WBorder1 = {
  1450.         -2,-1,  /* XY origin relative to container TopLeft */
  1451.         3,0,JAM1,       /* front pen, back pen and drawmode */
  1452.         5,      /* number of XY vectors */
  1453.         WBorderVectors1, /* pointer to XY vectors */
  1454.         NULL    /* next border in list */
  1455. };
  1456.  
  1457. struct IntuiText WText1 = {
  1458.         3,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1459.         14,3,   /* XY origin relative to container TopLeft */
  1460.         NULL,   /* font pointer or NULL for default */
  1461.         "CANCEL",       /* pointer to text */
  1462.         NULL    /* next IntuiText structure */
  1463. };
  1464.  
  1465. struct Gadget WGadget3 = {
  1466.         NULL,   /* next gadget */
  1467.         202,88, /* origin XY of hit box relative to window TopLeft */
  1468.         80,14,  /* hit box width and height */
  1469.         NULL,   /* gadget flags */
  1470.         GADGIMMEDIATE,  /* activation flags */
  1471.         BOOLGADGET,     /* gadget type flags */
  1472.         (APTR)&WBorder1, /* gadget border or image to be rendered */
  1473.         NULL,   /* alternate imagery for selection */
  1474.         &WText1,        /* first IntuiText structure */
  1475.         NULL,   /* gadget mutual-exclude long word */
  1476.         NULL,   /* SpecialInfo structure */
  1477.         NULL,   /* user-definable data */
  1478.         NULL    /* pointer to user-definable data */
  1479. };
  1480.  
  1481. SHORT WBorderVectors2[] = {
  1482.         0,0,
  1483.         61,0,
  1484.         61,15,
  1485.         0,15,
  1486.         0,0
  1487. };
  1488. struct Border WBorder2 = {
  1489.         -2,-1,  /* XY origin relative to container TopLeft */
  1490.         3,0,JAM1,       /* front pen, back pen and drawmode */
  1491.         5,      /* number of XY vectors */
  1492.         WBorderVectors2, /* pointer to XY vectors */
  1493.         NULL    /* next border in list */
  1494. };
  1495.  
  1496. struct IntuiText WText2 = {
  1497.         3,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1498.         17,3,   /* XY origin relative to container TopLeft */
  1499.         NULL,   /* font pointer or NULL for default */
  1500.         "USE",  /* pointer to text */
  1501.         NULL    /* next IntuiText structure */
  1502. };
  1503.  
  1504. struct Gadget WGadget2 = {
  1505.         &WGadget3,       /* next gadget */
  1506.         30,88,  /* origin XY of hit box relative to window TopLeft */
  1507.         58,14,  /* hit box width and height */
  1508.         NULL,   /* gadget flags */
  1509.         GADGIMMEDIATE,  /* activation flags */
  1510.         BOOLGADGET,     /* gadget type flags */
  1511.         (APTR)&WBorder2, /* gadget border or image to be rendered */
  1512.         NULL,   /* alternate imagery for selection */
  1513.         &WText2,        /* first IntuiText structure */
  1514.         NULL,   /* gadget mutual-exclude long word */
  1515.         NULL,   /* SpecialInfo structure */
  1516.         NULL,   /* user-definable data */
  1517.         NULL    /* pointer to user-definable data */
  1518. };
  1519.  
  1520. UBYTE EdSIBuff[50];
  1521. struct StringInfo WGadget1SInfo = {
  1522.         EdSIBuff,  /* buffer where text will be edited */
  1523.         NULL,   /* optional undo buffer */
  1524.         0,      /* character position in buffer */
  1525.         50,     /* maximum number of characters to allow */
  1526.         0,      /* first displayed character buffer position */
  1527.         0,0,0,0,0,      /* Intuition initialized and maintained variables */
  1528.         0,      /* Rastport of gadget */
  1529.         0,      /* initial value for integer gadgets */
  1530.         NULL    /* alternate keymap (fill in if you set the flag) */
  1531. };
  1532.  
  1533. SHORT WBorderVectors3[] = {
  1534.         0,0,
  1535.         257,0,
  1536.         257,14,
  1537.         0,14,
  1538.         0,0
  1539. };
  1540. struct Border WBorder3 = {
  1541.         -2,-3,  /* XY origin relative to container TopLeft */
  1542.         3,0,JAM1,       /* front pen, back pen and drawmode */
  1543.         5,      /* number of XY vectors */
  1544.         WBorderVectors3, /* pointer to XY vectors */
  1545.         NULL    /* next border in list */
  1546. };
  1547.  
  1548. struct Gadget WGadget1 = {
  1549.         &WGadget2,       /* next gadget */
  1550.         32,57,  /* origin XY of hit box relative to window TopLeft */
  1551.         254,13, /* hit box width and height */
  1552.         NULL,       /* gadget flags */
  1553.         RELVERIFY+STRINGCENTER, /* activation flags */
  1554.         STRGADGET,      /* gadget type flags */
  1555.         (APTR)&WBorder3, /* gadget border or image to be rendered */
  1556.         NULL,   /* alternate imagery for selection */
  1557.         NULL,   /* first IntuiText structure */
  1558.         NULL,   /* gadget mutual-exclude long word */
  1559.         (APTR)&WGadget1SInfo,    /* SpecialInfo structure */
  1560.         NULL,   /* user-definable data */
  1561.         NULL    /* pointer to user-definable data */
  1562. };
  1563.  
  1564.  
  1565. struct IntuiText WText5 = {
  1566.         3,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1567.         28,38,  /* XY origin relative to container TopLeft */
  1568.         NULL,   /* font pointer or NULL for default */
  1569.         "the c: directory.",    /* pointer to text */
  1570.         NULL    /* next IntuiText structure */
  1571. };
  1572.  
  1573. struct IntuiText WText4 = {
  1574.         3,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1575.         29,25,  /* XY origin relative to container TopLeft */
  1576.         NULL,   /* font pointer or NULL for default */
  1577.         "including the filepath if not in ",    /* pointer to text */
  1578.         &WText5 /* next IntuiText structure */
  1579. };
  1580.  
  1581. struct IntuiText WText3 = {
  1582.         3,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  1583.         29,14,  /* XY origin relative to container TopLeft */
  1584.         NULL,   /* font pointer or NULL for default */
  1585.         "Enter name of preferred editor",       /* pointer to text */
  1586.         &WText4 /* next IntuiText structure */
  1587. };
  1588.  
  1589.  
  1590. struct NewWindow EdWindow = {
  1591.         167,45, /* window XY origin relative to TopLeft of screen */
  1592.         316,121,        /* window width and height */
  1593.         1,2,    /* detail and block pens */
  1594.         GADGETDOWN,     /* IDCMP flags */
  1595.         ACTIVATE+WINDOWSIZING+WINDOWDRAG+WINDOWDEPTH,    /* other window flags */
  1596.         &WGadget1,       /* first gadget in gadget list */
  1597.         NULL,   /* custom CHECKMARK imagery */
  1598.         "           Define Editor            ", /* window title */
  1599.         NULL,   /* custom screen pointer */
  1600.         NULL,   /* custom bitmap */
  1601.         5,5,    /* minimum width and height */
  1602.         640,200,        /* maximum width and height */
  1603.         WBENCHSCREEN    /* destination screen type */
  1604. };
  1605.  
  1606.  
  1607.  
  1608.