home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff384.lzh / NorthC / Example1.LZH / cRender / requester.h < prev    next >
C/C++ Source or Header  |  1990-08-30  |  5KB  |  206 lines

  1. /*
  2.   (c) 1990 S.Hawtin.
  3.   Permission is granted to copy this file provided
  4.    1) It is not used for commercial gain
  5.    2) This notice is included in all copies
  6.    3) Altered copies are marked as such
  7.  
  8.   No liability is accepted for the contents of the file.
  9.  
  10.     requester.h    within        NorthC render
  11. */
  12.  
  13. /* Define the data structures for the CRender requester, 
  14.  
  15.   I know that include files should not define data structures but this
  16. makes "aif.c" that much cleaner
  17. */
  18.  
  19. SHORT int_border_points[]=
  20.    {
  21.      -7, -4, /* Move(-7,-4)  */
  22.      57, -4, /* Draw(200,-4) */
  23.      57, 11, /* Draw(200,11) */
  24.      -7, 11, /* Draw(-7,11)  */
  25.      -7, -4  /* Draw(-7,-4)  */ 
  26.     };
  27.  
  28. struct Border int_border=
  29.    {
  30.     0, 0,1,0,JAM1,5,int_border_points,NULL,
  31.     };
  32.  
  33. struct IntuiText int1_text=
  34.    {
  35.     1,         /* FrontPen */
  36.     0,         /* BackPen */
  37.     JAM1,      /* DrawMode */
  38.     -40, 0,    /* LeftEdge */
  39.     NULL,      /* ITextFont */
  40.     "dth:",    /* IText */
  41.     NULL,      /* NextText */
  42.     };
  43.  
  44. UBYTE int1_buffer[6];
  45. UBYTE int1_undo_buffer[6];
  46.  
  47. struct StringInfo int1_info=
  48.    {
  49.     int1_buffer,int1_undo_buffer,0,5,0
  50.     };
  51.  
  52. struct Gadget int1_gadget=
  53.    {
  54.     NULL,          /* NextGadget */
  55.     54,            /* LeftEdge */
  56.     26,            /* TopEdge */
  57.     50,           /* Width */
  58.     8,             /* Height */
  59.     GADGHCOMP,     /* Flags */
  60.     GADGIMMEDIATE|RELVERIFY|LONGINT, /* Activation */
  61.     STRGADGET|REQGADGET,     /* GadgetType */
  62.     (APTR) &int_border, /* GadgetRender */
  63.     NULL,          /* SelectRender */
  64.     &int1_text,  /* GadgetText */
  65.     NULL,          /* MutualExclude */
  66.     (APTR) &int1_info, /* SpecialInfo */
  67.     0,             /* GadgetID */
  68.     NULL           /* UserData */
  69.     };
  70.  
  71. struct IntuiText int2_text=
  72.    {
  73.     1,0,JAM1,-40,0,NULL,"dph:",NULL
  74.     };
  75.  
  76. UBYTE int2_buffer[6];
  77. UBYTE int2_undo_buffer[6];
  78.  
  79. struct StringInfo int2_info=
  80.    {
  81.     int2_buffer,       /* Buffer */
  82.     int2_undo_buffer,  /* UndoBuffer */
  83.     0,                 /* BufferPos */
  84.     5,                 /* MaxChars */
  85.     0,                 /* DispPos */
  86.     };
  87.  
  88.  
  89. struct Gadget int2_gadget=
  90.    {
  91.     &int1_gadget,    /* NextGadget */
  92.     154,        /* LeftEdge */
  93.     26,            /* TopEdge */
  94.     50,            /* Width */
  95.     8,            /* Height */
  96.     GADGHCOMP,        /* Flags */
  97.     GADGIMMEDIATE|    /* Activation */
  98.     RELVERIFY|LONGINT,
  99.     STRGADGET|        /* GadgetType */
  100.     REQGADGET,
  101.     (APTR) &int_border, /* GadgetRender */
  102.     NULL,        /* SelectRender */
  103.     &int2_text,        /* GadgetText */
  104.     NULL,        /* MutualExclude */
  105.     (APTR) &int2_info,
  106.     0,            /* GadgetID */
  107.     NULL        /* UserData */
  108.     };
  109.  
  110. SHORT ok_border_points[] =
  111.    {
  112.      0,  0, /* Move(0,0) */
  113.     22,  0, /* Draw(22,0) */
  114.     22, 10, /* Draw(22,10) */
  115.      0, 10, /* Draw(0,10) */
  116.      0,  0  /* Draw(0,0) */ 
  117.     };
  118.  
  119. struct Border ok_border =
  120.    {
  121.     0, 0,        /* LeftEdge */
  122.     1,           /* FrontPen */
  123.     0,           /* BackPen */
  124.     JAM1,        /* DrawMode */
  125.     5,           /* Count */
  126.     ok_border_points, /* XY */
  127.     NULL,        /* NextBorder */
  128.     };
  129.  
  130. struct IntuiText ok_text =
  131.    {
  132.     1,      /* FrontPen */
  133.     0,      /* BackPen */
  134.     JAM1,   /* DrawMode */
  135.     4, 2,   /* LeftEdge, TopEdge. */
  136.     NULL,   /* ITextFont */
  137.     "OK",   /* IText */
  138.     NULL,   /* NextText */
  139.     };
  140.  
  141. struct Gadget ok_gadget =
  142.    {
  143.     &int2_gadget, /* NextGadget */
  144.     14,            /* LeftEdge */
  145.     47,            /* TopEdge */
  146.     23,            /* Width */
  147.     11,            /* Height */
  148.     GADGHCOMP,     /* Flags */
  149.     GADGIMMEDIATE|RELVERIFY|ENDGADGET,  /* Activation */
  150.     BOOLGADGET|REQGADGET,    /* GadgetType */
  151.     (APTR) &ok_border, /* GadgetRender */
  152.     NULL,          /* SelectRender */
  153.     &ok_text,      /* GadgetText */
  154.     NULL,          /* MutualExclude */
  155.     NULL,          /* SpecialInfo */
  156.     0,             /* GadgetID */
  157.     NULL           /* UserData */
  158.     };
  159.  
  160. SHORT requester_border_points[] =
  161.    {
  162.       0,  0,
  163.     218,  0,
  164.     218, 64,
  165.       0, 64,
  166.       0,  0 
  167.     };
  168.  
  169. struct Border requester_border =
  170.    {
  171.     0, 0,        /* LeftEdge, TopEdge. */
  172.     1,           /* FrontPen */
  173.     0,           /* BackPen */
  174.     JAM1,        /* DrawMode */
  175.     5,           /* Count */
  176.     requester_border_points, /* XY */
  177.     NULL,        /* NextBorder */
  178.     };
  179.  
  180. struct IntuiText requester_text =
  181.    {
  182.     1,         /* FrontPen */
  183.     0,         /* BackPen */
  184.     JAM1,      /* DrawMode */
  185.     14, 8,     /* LeftEdge, TopEdge. */
  186.     NULL,      /* ITextFont */
  187.     "Set rotation speed:", /* IText */
  188.     NULL,      /* NextText */
  189.     };
  190.  
  191. struct Requester my_requester =
  192.    {
  193.     NULL,              /* OlderRequester */
  194.     5, 20,             /* LeftEdge, TopEdge */
  195.     219, 65,           /* Width, Height */
  196.     0, 0,              /* RelLeft, RelTop */
  197.     &ok_gadget,        /* ReqGadget */
  198.     &requester_border, /* ReqBorder */
  199.     &requester_text,   /* ReqText */
  200.     NULL,              /* Flags */
  201.     2,                 /* BackFill */
  202.     };
  203.  
  204.  
  205.  
  206.