home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 523b.lha / Drawmap_v2.25d / Sources.LZH / Sources / drawmap-req.h < prev    next >
C/C++ Source or Header  |  1991-06-10  |  5KB  |  193 lines

  1. /* file drawmap-req.h */
  2.  
  3. #define NUM_CHAR 80                    /* # characters in text buffer */
  4.  
  5. #define TLEFT   24                     /* left edge of requester */
  6. #define TTOP    24                     /* top edge of requester  */
  7. #define TWIDTH  8*(30+5)         /* width of requester     */
  8. #define THEIGHT 80                     /* height of requester    */
  9.  
  10. #define GAD_FIRST 1                    /* initial gadget id       */
  11. #define GAD_LEFT  16                   /* string gadget left edge */
  12. #define GAD_TOP   THEIGHT/2            /* string gadget top edge  */
  13. #define NUM_PAIRS_LEFT sizeof(borderleft) / (2*sizeof(short))
  14. #define NUM_PAIRS_TOP sizeof(bordertop) / (2*sizeof(short))
  15. #define NUM_PAIRS_RIGHT sizeof(borderright) / (2*sizeof(short))
  16. #define NUM_PAIRS_BOTTOM sizeof(borderbottom) / (2*sizeof(short))
  17.  
  18. struct IntuiText rtext2 = {             /* text in requester */
  19.    WHITE, ORANGE, JAM1,
  20.    GAD_LEFT-2, (GAD_TOP-4)/2-2,
  21.    NULL,
  22.    (UBYTE *) "Enter desired text:",
  23.    NULL
  24. };
  25.  
  26. struct IntuiText rtext = {             /* shadowed */
  27.    BLUE, ORANGE, JAM1,
  28.    GAD_LEFT, (GAD_TOP-4)/2,
  29.    NULL,
  30.    (UBYTE *) "Enter desired text:",
  31.    &rtext2
  32. };
  33.  
  34. UBYTE userinput[NUM_CHAR+1];           /* buffer for user text */
  35. #define defaulttext "Text"             /* default text         */
  36.  
  37. struct StringInfo gadgetinput = {      /* gadget string text           */
  38.    &userinput[0],                      /* buffer for user input        */
  39.    NULL,                               /* no undo buffer               */
  40.    0,                                  /* character position in buffer */
  41.    NUM_CHAR+1,                         /* max. characters in buffer    */
  42.    0,                                  /* buffer position of first     */
  43.                                        /*   displayed character        */
  44.    0, 0, 0, 0, 0, NULL, 0, NULL        /* Intuition local variables    */
  45. };
  46.  
  47. struct Gadget gad = {                  /* string gadget structure  */
  48.    NULL,                               /* pointer to next gadget   */
  49.    GAD_LEFT, GAD_TOP, 8*(30+1),  /* left, top, width, height */
  50.          10,                           /*   of hit box             */
  51.    GADGHCOMP,                          /* flags                    */
  52.    RELVERIFY | ENDGADGET,              /* activation flags         */
  53.    REQGADGET | STRGADGET,              /* gadget type = string     */
  54.    NULL,                               /* border descriptor        */
  55.    NULL,                               /* alternate imagery        */
  56.    NULL,                               /* gadget text              */
  57.    0,                                  /* no mutual exclusion      */
  58.    (APTR) &gadgetinput,                /* special info             */
  59.    GAD_FIRST,                          /* gadget identifier        */
  60.    NULL                                /* pointer to data          */
  61. };
  62.  
  63. short bordertop2[] = {                 /* inside top border */
  64.    8, 8,
  65.    TWIDTH-9, 8
  66. };
  67.  
  68. short borderright2[] = {               /* inside right border */
  69.    TWIDTH-9, 8,
  70.    TWIDTH-9, THEIGHT-9
  71. };
  72.  
  73. short borderbottom2[] = {              /* inside bottom border */
  74.    TWIDTH-9, THEIGHT-9,
  75.    8, THEIGHT-9
  76. };
  77.  
  78. short borderleft2[] = {                /* inside left border */
  79.    8, THEIGHT-9,
  80.    8, 8
  81. };
  82.  
  83. short bordertop[] = {                  /* top border lines */
  84.    0, 0,
  85.    TWIDTH-1, 0,
  86.    TWIDTH-2, 1,
  87.    1, 1,
  88.    2, 2,
  89.    TWIDTH-3, 2,
  90.    TWIDTH-4, 3,
  91.    3, 3
  92. };
  93.  
  94.  
  95. short borderright[] = {                /* right border lines */
  96.    TWIDTH-4, 3,
  97.    TWIDTH-4, THEIGHT-4,
  98.    TWIDTH-3, 2,
  99.    TWIDTH-3, THEIGHT-3,
  100.    TWIDTH-2, THEIGHT-2,
  101.    TWIDTH-2, 1,
  102.    TWIDTH-1, 0,
  103.    TWIDTH-1, THEIGHT-1
  104. };
  105.  
  106.  
  107. short borderbottom[] = {               /* bottom border lines */
  108.    TWIDTH-1, THEIGHT-1,
  109.    0, THEIGHT-1,
  110.    1, THEIGHT-2,
  111.    TWIDTH-2, THEIGHT-2,
  112.    TWIDTH-3, THEIGHT-3,
  113.    2, THEIGHT-3,
  114.    3, THEIGHT-4,
  115.    TWIDTH-4, THEIGHT-4
  116. };
  117.  
  118.  
  119. short borderleft[] = {                 /* left border lines */
  120.    3, THEIGHT-4,
  121.    3, 3,
  122.    2, THEIGHT-3,
  123.    2, 2,
  124.    1, 1,
  125.    1, THEIGHT-2,
  126.    0, THEIGHT-1,
  127.    0, 0
  128. };
  129.  
  130.  
  131. struct Border border_left2 = {         /* inside left border */
  132.    0, 0,
  133.    BLACK, ORANGE, JAM1,
  134.    2,
  135.    (short *) &borderleft2[0],
  136.    NULL
  137. };
  138.  
  139. struct Border border_bottom2 = {       /* inside bottom border */
  140.    0, 0,
  141.    WHITE, ORANGE, JAM1,
  142.    2,
  143.    (short *) &borderbottom2[0],
  144.    &border_left2
  145. };
  146.  
  147. struct Border border_right2 = {        /* inside right border */
  148.    0, 0,
  149.    WHITE, ORANGE, JAM1,
  150.    2,
  151.    (short *) &borderright2[0],
  152.    &border_bottom2
  153. };
  154.  
  155. struct Border border_top2 = {          /* inside top border */
  156.    0, 0,   BLACK, ORANGE, JAM1,
  157.    2,
  158.    (short *) &bordertop2[0],
  159.    &border_right2
  160. };
  161.  
  162. struct Border border_left = {          /* left border */
  163.    0, 0,
  164.    WHITE, ORANGE, JAM1,
  165.    NUM_PAIRS_LEFT,
  166.    (short *) &borderleft[0],
  167.    &border_top2
  168. };
  169.  
  170. struct Border border_bottom = {        /* bottom border */
  171.    0, 0,
  172.    BLACK, ORANGE, JAM1,
  173.    NUM_PAIRS_BOTTOM,
  174.    (short *) &borderbottom[0],
  175.    &border_left
  176. };
  177.  
  178. struct Border border_right = {         /* right border */
  179.    0, 0,
  180.    BLACK, ORANGE, JAM1,
  181.    NUM_PAIRS_RIGHT,
  182.    (short *) &borderright[0],
  183.    &border_bottom
  184. };
  185.  
  186. struct Border border_top = {     /* top border */
  187.    0, 0,
  188.    WHITE, ORANGE, JAM1,
  189.    NUM_PAIRS_TOP,
  190.    (short *) &bordertop[0],
  191.    &border_right
  192. };
  193.