home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 073.lha / CommandRequester / commandreq.h < prev    next >
C/C++ Source or Header  |  1986-11-20  |  3KB  |  116 lines

  1.  
  2. /***************************************************************************
  3. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  4.                    CommandReq -- Command File Requester
  5.                  Copyright 1987 Jay Johnson and Sam Morse
  6. ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  7.                    Written by Jay Johnson and Sam Morse
  8.                       Version 1.0 July 17th 1987
  9. ***************************************************************************
  10. This program is public domain. The authors assume no liability for missuse
  11. of this program and are not liable for any damage incurred during use. Use
  12. at your own risk.
  13.  
  14. This program may be used in commercial software ONLY with the written consent
  15. of the original authors.
  16.  
  17. Please send modifications of this code to the below address so that we may
  18. better control the evalution and insure that the best revisions are included
  19. in updates.
  20. ****************************************************************************/
  21. /* commandreq.h */
  22. /* executing a command requester definition */
  23.  
  24. /*  Definitions for Gadget ID numbers               */
  25.  
  26.  
  27. #define YES 650
  28. #define STOP 651
  29. #define NO 652
  30. #define FUNCT 654
  31.  
  32. SHORT command_pairs[] = {
  33.   0,     0,   
  34.   209,     0,
  35.   209,     9,
  36.   0,     9,
  37.   0,     0    
  38. };
  39. struct Border command_bord = {
  40.   -1,  -1,  2,  1,  JAM2,  5,  (SHORT *)&command_pairs,  NULL};
  41.  
  42.  
  43. UBYTE command_sbuf_1[256] = " ";
  44. UBYTE command_ubuf_1[256];
  45.  
  46. struct StringInfo command_txstr_1 = {
  47.   command_sbuf_1, command_ubuf_1, 0, 255, 0, 0, 1, 26, 16,12, 0x0, 0,0x0};
  48.  
  49.  
  50. struct Gadget command = {
  51.  NULL, 11, 21, 208, 8,GADGHCOMP,RELVERIFY,STRGADGET,(APTR)&command_bord,
  52.   NULL,   NULL,  0x0,  (APTR)&command_txstr_1,  FUNCT,  NULL};
  53.  
  54.  
  55. /**********************************************************************
  56.  *  IntuiTexts for the trace selection requester.
  57.  **********************************************************************/
  58.  
  59. struct IntuiText commandsel_text[] =
  60.  {
  61.    {
  62.      2,0,JAM1,6,-34,&TxtAt_Plain,(UBYTE *)"Execute this command:",&commandsel_text[1]
  63.    },
  64.    {
  65.      1, 2,JAM2,22,5,&TxtAt_Plain,(UBYTE *)"YES",&commandsel_text[2]
  66.    },
  67.    {
  68.      1, 2,JAM2,91,5,&TxtAt_Plain,(UBYTE *)"STOP!",&commandsel_text[3]
  69.    },
  70.    {
  71.      1, 2,JAM2,177,5,&TxtAt_Plain,(UBYTE *)"NO",NULL
  72.    },
  73. };
  74.  
  75. /**********************************************************************
  76.  *  Gadget Structure definition for the sense length requester.
  77.  **********************************************************************/
  78.  
  79. struct Gadget commandreqgad[] =
  80.  {
  81.    {
  82.       &commandreqgad[1],5,40,70,16, GADGIMAGE,RELVERIFY,BOOLGADGET,
  83.       (APTR)&midwb_img,NULL,&commandsel_text,0xffff,NULL,YES,NULL
  84.    },
  85.    {
  86.       &commandreqgad[2],80,40,70,16, GADGIMAGE,RELVERIFY,BOOLGADGET,
  87.       (APTR)&midwb_img,NULL,NULL,0xffff,NULL,STOP,NULL
  88.    },
  89.    {
  90.       &command,155,40,70,16, GADGIMAGE,RELVERIFY,BOOLGADGET,
  91.       (APTR)&midwb_img,NULL,NULL,0xffff,NULL,NO,NULL
  92.    },
  93. };
  94.  
  95.  
  96. SHORT commandreq_Pairs[] = {
  97.   0,     0,   
  98.   230,     0,
  99.   230,     60,
  100.   0,     60,
  101.   0,     0    
  102. };
  103.  
  104. struct Border commandreq_bord = {
  105.   0,0,2,3,JAM2,5,(SHORT *)&commandreq_Pairs, NULL};
  106.  
  107. struct Requester commandreq = {
  108.    NULL,0,0,231,61,0,0,&commandreqgad[0],&commandreq_bord,NULL,
  109.    POINTREL,0x1,NULL,NULL,NULL};
  110.  
  111.  
  112. struct NewWindow commandreqwin = {
  113.   200,50,231,61,0,1,GADGETUP|REQCLEAR,BORDERLESS|SMART_REFRESH
  114.   ,NULL,NULL,NULL,NULL,NULL,0,0,0,0,WBENCHSCREEN};
  115.  
  116.