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

  1.  
  2. UBYTE AxisLabelSIBuff[150]="";
  3. struct StringInfo AxisLabelSInfo = {
  4.         AxisLabelSIBuff,  /* buffer where text will be edited */
  5.         NULL,   /* optional undo buffer */
  6.         0,      /* character position in buffer */
  7.         150,     /* maximum number of characters to allow */
  8.         0,      /* first displayed character buffer position */
  9.         0,0,0,0,0,      /* Intuition initialized and maintained variables */
  10.         0,      /* Rastport of gadget */
  11.         0,      /* initial value for integer gadgets */
  12.         NULL    /* alternate keymap (fill in if you set the flag) */
  13. };
  14.  
  15. SHORT LabelVectors[] = {
  16.         0,0,
  17.         236,0,
  18.         236,17,
  19.         0,17,
  20.         0,1
  21. };
  22. struct Border LabelBorder = {
  23.         -1,-5,  /* XY origin relative to container TopLeft */
  24.         1,0,JAM1,       /* front pen, back pen and drawmode */
  25.         5,      /* number of XY vectors */
  26.         LabelVectors, /* pointer to XY vectors */
  27.         NULL    /* next border in list */
  28. };
  29.  
  30. struct Gadget AxisLabel = {
  31.         NULL,       /* next gadget */
  32.         175,140, /* origin XY of hit box relative to window TopLeft */
  33.         235,13, /* hit box width and height */
  34.         NULL,   /* gadget flags */
  35.         RELVERIFY+STRINGCENTER, /* activation flags */
  36.         STRGADGET,      /* gadget type flags */
  37.         (APTR)&LabelBorder, /* gadget border or image to be rendered */
  38.         NULL,   /* alternate imagery for selection */
  39.         NULL,   /* first IntuiText structure */
  40.         NULL,   /* gadget mutual-exclude long word */
  41.         (APTR)&AxisLabelSInfo,    /* SpecialInfo structure */
  42.         NULL,   /* user-definable data */
  43.         NULL    /* pointer to user-definable data */
  44. };
  45.  
  46.  
  47. SHORT UpBorderVectors[] = {
  48.         0,2,
  49.         0,18,
  50.         5,16,
  51.         5,20,
  52.         15,10,
  53.         5,0,
  54.         5,4,
  55.         0,2,
  56. };
  57.  
  58. struct Border TicUpBorder = {
  59.         0,0,  /* XY origin relative to container TopLeft */
  60.         1,0,JAM1, /* front pen, back pen and drawmode */
  61.         8,      /* number of XY vectors */
  62.         UpBorderVectors, /* pointer to XY vectors */
  63.         NULL    /* next border in list */
  64. };
  65.  
  66.  
  67. struct Gadget TicUp = {
  68.         &AxisLabel,      /* next gadget */
  69.         263,33,        /* origin XY of hit box relative to window TopLeft */
  70.         15,20,  /* hit box width and height */
  71.         GADGHBOX+GADGHIMAGE,  /* gadget flags */
  72.         GADGIMMEDIATE,  /* activation flags */
  73.         BOOLGADGET,     /* gadget type flags */
  74.         (APTR)&TicUpBorder, /* gadget border or image to be rendered */
  75.         NULL,   /* alternate imagery for selection */
  76.         NULL,   /* first IntuiText structure */
  77.         NULL,   /* gadget mutual-exclude long word */
  78.         NULL,   /* SpecialInfo structure */
  79.         NULL,   /* user-definable data */
  80.         NULL    /* pointer to user-definable data */
  81. };
  82.  
  83. SHORT DownBorderVectors[] = {
  84.         10,0,
  85.         0,10,
  86.         10,20,
  87.         10,16,
  88.         15,18,
  89.         15,2,
  90.         10,4,
  91.         10,0,
  92. };
  93. struct Border TicDownBorder = {
  94.         0,0,  /* XY origin relative to container TopLeft */
  95.         1,0,JAM1, /* front pen, back pen and drawmode */
  96.         8,      /* number of XY vectors */
  97.         DownBorderVectors, /* pointer to XY vectors */
  98.         NULL    /* next border in list */
  99. };
  100.  
  101.  
  102. struct Gadget TicDown = {
  103.         &TicUp,      /* next gadget */
  104.         200,33,        /* origin XY of hit box relative to window TopLeft */
  105.         15,20,  /* hit box width and height */
  106.         GADGHBOX+GADGHIMAGE,  /* gadget flags */
  107.         GADGIMMEDIATE,  /* activation flags */
  108.         BOOLGADGET,     /* gadget type flags */
  109.         (APTR)&TicDownBorder, /* gadget border or image to be rendered */
  110.         NULL,   /* alternate imagery for selection */
  111.         NULL,   /* first IntuiText structure */
  112.         NULL,   /* gadget mutual-exclude long word */
  113.         NULL,   /* SpecialInfo structure */
  114.         NULL,   /* user-definable data */
  115.         NULL    /* pointer to user-definable data */
  116. };
  117.  
  118.  
  119. SHORT AxisBorderVectors3[] = {
  120.         0,0,
  121.         40,0,
  122.         40,17,
  123.         0,17,
  124.         0,1
  125. };
  126. struct Border AxisBorder3 = {
  127.         -1,-5,  /* XY origin relative to container TopLeft */
  128.         1,0,JAM1, /* front pen, back pen and drawmode */
  129.         5,      /* number of XY vectors */
  130.         AxisBorderVectors3, /* pointer to XY vectors */
  131.         NULL    /* next border in list */
  132. };
  133.  
  134. UBYTE TicNumberSIBuff[7]="5";
  135. struct StringInfo TicNumberSInfo = {
  136.         TicNumberSIBuff, /* buffer where text will be edited */
  137.         NULL,   /* optional undo buffer */
  138.         0,      /* character position in buffer */
  139.         3,      /* maximum number of characters to allow */
  140.         0,      /* first displayed character buffer position */
  141.         0,0,0,0,0,      /* Intuition initialized and maintained variables */
  142.         0,      /* Rastport of gadget */
  143.         5,      /* initial value for integer gadgets */
  144.         NULL    /* alternate keymap (fill in if you set the flag) */
  145. };
  146.  
  147. struct Gadget TicNumber = {
  148.         &TicDown,       /* next gadget */
  149.         220,40,        /* origin XY of hit box relative to window TopLeft */
  150.         37,16,  /* hit box width and height */
  151.         NULL,   /* gadget flags */
  152.         RELVERIFY+LONGINT+STRINGCENTER, /* activation flags */
  153.         STRGADGET,      /* gadget type flags */
  154.         (APTR)&AxisBorder3, /* gadget border or image to be rendered */
  155.         NULL,   /* alternate imagery for selection */
  156.         NULL,   /* first IntuiText structure */
  157.         NULL,   /* gadget mutual-exclude long word */
  158.         (APTR)&TicNumberSInfo,    /* SpecialInfo structure */
  159.         NULL,   /* user-definable data */
  160.         NULL    /* pointer to user-definable data */
  161. };
  162.  
  163. struct Border MinUpBorder = {
  164.         0,0,  /* XY origin relative to container TopLeft */
  165.         1,0,JAM1, /* front pen, back pen and drawmode */
  166.         8,      /* number of XY vectors */
  167.         UpBorderVectors, /* pointer to XY vectors */
  168.         NULL    /* next border in list */
  169. };
  170.  
  171.  
  172. struct Gadget MinUp = {
  173.         &TicNumber,      /* next gadget */
  174.         293,63,        /* origin XY of hit box relative to window TopLeft */
  175.         15,20,  /* hit box width and height */
  176.         GADGHBOX+GADGHIMAGE,  /* gadget flags */
  177.         GADGIMMEDIATE,  /* activation flags */
  178.         BOOLGADGET,     /* gadget type flags */
  179.         (APTR)&MinUpBorder, /* gadget border or image to be rendered */
  180.         NULL,   /* alternate imagery for selection */
  181.         NULL,   /* first IntuiText structure */
  182.         NULL,   /* gadget mutual-exclude long word */
  183.         NULL,   /* SpecialInfo structure */
  184.         NULL,   /* user-definable data */
  185.         NULL    /* pointer to user-definable data */
  186. };
  187.  
  188.  
  189. struct Border MinDownBorder = {
  190.         0,0,  /* XY origin relative to container TopLeft */
  191.         1,0,JAM1, /* front pen, back pen and drawmode */
  192.         8,      /* number of XY vectors */
  193.         DownBorderVectors, /* pointer to XY vectors */
  194.         NULL    /* next border in list */
  195. };
  196.  
  197. struct Gadget MinDown = {
  198.         &MinUp,      /* next gadget */
  199.         200,63,        /* origin XY of hit box relative to window TopLeft */
  200.         15,20,  /* hit box width and height */
  201.         GADGHBOX+GADGHIMAGE,  /* gadget flags */
  202.         GADGIMMEDIATE,  /* activation flags */
  203.         BOOLGADGET,     /* gadget type flags */
  204.         (APTR)&MinDownBorder, /* gadget border or image to be rendered */
  205.         NULL,   /* alternate imagery for selection */
  206.         NULL,   /* first IntuiText structure */
  207.         NULL,   /* gadget mutual-exclude long word */
  208.         NULL,   /* SpecialInfo structure */
  209.         NULL,   /* user-definable data */
  210.         NULL    /* pointer to user-definable data */
  211. };
  212.  
  213.  
  214.  
  215.  
  216. SHORT AxisBorderVectors1[] = {
  217.         0,0,
  218.         70,0,
  219.         70,17,
  220.         0,17,
  221.         0,1
  222. };
  223.  
  224. struct Border AxisBorder2 = {
  225.         -1,-5,  /* XY origin relative to container TopLeft */
  226.         1,0,JAM1, /* front pen, back pen and drawmode */
  227.         5,      /* number of XY vectors */
  228.         AxisBorderVectors1, /* pointer to XY vectors */
  229.         NULL    /* next border in list */
  230. };
  231.  
  232. UBYTE MinValueSIBuff[30]="0";
  233. struct StringInfo MinValueSInfo = {
  234.         MinValueSIBuff, /* buffer where text will be edited */
  235.         NULL,   /* optional undo buffer */
  236.         0,      /* character position in buffer */
  237.         10,      /* maximum number of characters to allow */
  238.         0,      /* first displayed character buffer position */
  239.         0,0,0,0,0,      /* Intuition initialized and maintained variables */
  240.         0,      /* Rastport of gadget */
  241.         0,      /* initial value for integer gadgets */
  242.         NULL    /* alternate keymap (fill in if you set the flag) */
  243. };
  244.  
  245. struct Gadget MinValue = {
  246.         &MinDown,       /* next gadget */
  247.         220,70,        /* origin XY of hit box relative to window TopLeft */
  248.         67,16,  /* hit box width and height */
  249.         NULL,   /* gadget flags */
  250.         RELVERIFY+STRINGCENTER, /* activation flags */
  251.         STRGADGET,      /* gadget type flags */
  252.         (APTR)&AxisBorder2, /* gadget border or image to be rendered */
  253.         NULL,   /* alternate imagery for selection */
  254.         NULL,   /* first IntuiText structure */
  255.         NULL,   /* gadget mutual-exclude long word */
  256.         (APTR)&MinValueSInfo,    /* SpecialInfo structure */
  257.         NULL,   /* user-definable data */
  258.         NULL    /* pointer to user-definable data */
  259. };
  260.  
  261. struct Border MaxDownBorder = {
  262.         0,0,  /* XY origin relative to container TopLeft */
  263.         1,0,JAM1, /* front pen, back pen and drawmode */
  264.         8,      /* number of XY vectors */
  265.         DownBorderVectors, /* pointer to XY vectors */
  266.         NULL    /* next border in list */
  267. };
  268.  
  269.  
  270. struct Gadget MaxDown = {
  271.         &MinValue,      /* next gadget */
  272.         200,93,        /* origin XY of hit box relative to window TopLeft */
  273.         15,20,  /* hit box width and height */
  274.         GADGHBOX+GADGHIMAGE,  /* gadget flags */
  275.         GADGIMMEDIATE,  /* activation flags */
  276.         BOOLGADGET,     /* gadget type flags */
  277.         (APTR)&MaxDownBorder, /* gadget border or image to be rendered */
  278.         NULL,   /* alternate imagery for selection */
  279.         NULL,   /* first IntuiText structure */
  280.         NULL,   /* gadget mutual-exclude long word */
  281.         NULL,   /* SpecialInfo structure */
  282.         NULL,   /* user-definable data */
  283.         NULL    /* pointer to user-definable data */
  284. };
  285.  
  286. struct Border MaxUpBorder = {
  287.         0,0,  /* XY origin relative to container TopLeft */
  288.         1,0,JAM1, /* front pen, back pen and drawmode */
  289.         8,      /* number of XY vectors */
  290.         UpBorderVectors, /* pointer to XY vectors */
  291.         NULL    /* next border in list */
  292. };
  293.  
  294. struct Gadget MaxUp = {
  295.         &MaxDown,      /* next gadget */
  296.         293,93,        /* origin XY of hit box relative to window TopLeft */
  297.         15,20,  /* hit box width and height */
  298.         GADGHBOX+GADGHIMAGE,  /* gadget flags */
  299.         GADGIMMEDIATE,  /* activation flags */
  300.         BOOLGADGET,     /* gadget type flags */
  301.         (APTR)&MaxUpBorder, /* gadget border or image to be rendered */
  302.         NULL,   /* alternate imagery for selection */
  303.         NULL,   /* first IntuiText structure */
  304.         NULL,   /* gadget mutual-exclude long word */
  305.         NULL,   /* SpecialInfo structure */
  306.         NULL,   /* user-definable data */
  307.         NULL    /* pointer to user-definable data */
  308. };
  309.  
  310. struct Border AxisBorder1 = {
  311.         -1,-5,  /* XY origin relative to container TopLeft */
  312.         1,0,JAM1, /* front pen, back pen and drawmode */
  313.         5,      /* number of XY vectors */
  314.         AxisBorderVectors1, /* pointer to XY vectors */
  315.         NULL    /* next border in list */
  316. };
  317.  
  318. UBYTE MaxValueSIBuff[30]="0";
  319. struct StringInfo MaxValueSInfo = {
  320.         MaxValueSIBuff, /* buffer where text will be edited */
  321.         NULL,   /* optional undo buffer */
  322.         0,      /* character position in buffer */
  323.         10,      /* maximum number of characters to allow */
  324.         0,      /* first displayed character buffer position */
  325.         0,0,0,0,0,      /* Intuition initialized and maintained variables */
  326.         0,      /* Rastport of gadget */
  327.         0,      /* initial value for integer gadgets */
  328.         NULL    /* alternate keymap (fill in if you set the flag) */
  329. };
  330.  
  331. struct Gadget MaxValue = {
  332.         &MaxUp,       /* next gadget */
  333.         220,100,        /* origin XY of hit box relative to window TopLeft */
  334.         67,16,  /* hit box width and height */
  335.         NULL,   /* gadget flags */
  336.         RELVERIFY+STRINGCENTER, /* activation flags */
  337.         STRGADGET,      /* gadget type flags */
  338.         (APTR)&AxisBorder1, /* gadget border or image to be rendered */
  339.         NULL,   /* alternate imagery for selection */
  340.         NULL,   /* first IntuiText structure */
  341.         NULL,   /* gadget mutual-exclude long word */
  342.         (APTR)&MaxValueSInfo,    /* SpecialInfo structure */
  343.         NULL,   /* user-definable data */
  344.         NULL    /* pointer to user-definable data */
  345. };
  346.  
  347.  
  348. extern struct Image Continue;
  349.  
  350. struct Gadget AxisContinue = {
  351.         &MaxValue,      /* next gadget */
  352.         331,184,        /* origin XY of hit box relative to window TopLeft */
  353.         99,43,  /* hit box width and height */
  354.         GADGHBOX+GADGHIMAGE+GADGIMAGE,  /* gadget flags */
  355.         GADGIMMEDIATE,  /* activation flags */
  356.         BOOLGADGET,     /* gadget type flags */
  357.         (APTR)&Continue, /* gadget border or image to be rendered */
  358.         NULL,   /* alternate imagery for selection */
  359.         NULL,   /* first IntuiText structure */
  360.         NULL,   /* gadget mutual-exclude long word */
  361.         NULL,   /* SpecialInfo structure */
  362.         NULL,   /* user-definable data */
  363.         NULL    /* pointer to user-definable data */
  364. };
  365.  
  366.  
  367. struct IntuiText AxisText4 = {
  368.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  369.         60,140, /* XY origin relative to container TopLeft */
  370.         NULL,   /* font pointer or NULL for default */
  371.         "Axis Label",       /* pointer to text */
  372.         NULL    /* next IntuiText structure */
  373. };
  374.  
  375. struct IntuiText AxisText3 = {
  376.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  377.         60,70, /* XY origin relative to container TopLeft */
  378.         NULL,   /* font pointer or NULL for default */
  379.         "Minimum Value",       /* pointer to text */
  380.         &AxisText4    /* next IntuiText structure */
  381. };
  382.  
  383. struct IntuiText AxisText2 = {
  384.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  385.         60,100, /* XY origin relative to container TopLeft */
  386.         NULL,   /* font pointer or NULL for default */
  387.         "Maximum Value",       /* pointer to text */
  388.         &AxisText3    /* next IntuiText structure */
  389. };
  390.  
  391. struct IntuiText AxisText1 = {
  392.         1,0,JAM2,       /* front and back text pens, drawmode and fill byte */
  393.         60,40,   /* XY origin relative to container TopLeft */
  394.         NULL,   /* font pointer or NULL for default */
  395.         "Number of Tics",   /* pointer to text */
  396.         &AxisText2        /* next IntuiText structure */
  397. };
  398.  
  399.