home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff304.lzh / Lines / window.h < prev   
C/C++ Source or Header  |  1990-01-10  |  5KB  |  199 lines

  1. /*
  2.  * window.h : Intuition structures needed for the screen, windows,
  3.  *             and requesters. Parts created with PowerWindows 2.0.
  4.  *             by Joel Swank 5/26/89
  5.  */
  6.  
  7.  
  8. #define XSIZE 670
  9. #define YSIZE 440
  10. #define MAXHELP 20
  11.  
  12. /*
  13.  * definition of the main window
  14.  */
  15.  
  16. static struct NewWindow    New_Window = {
  17.     0, 2,            /* Take all except the */
  18.     XSIZE, YSIZE,    /* top two lines       */
  19.     -1, -1,            /* Default pens */
  20.     VANILLAKEY,    /* Inputs acceppeted */
  21.     SMART_REFRESH /* window flags */
  22.     | ACTIVATE | BORDERLESS ,
  23.     NULL,            /* no gadgets */
  24.     (struct Image *) NULL,
  25.     (UBYTE *) NULL,
  26.     (struct Screen *) NULL,        /* filled at startup */
  27.     (struct BitMap *) NULL,
  28.     0, 0, 0, 0,        /* no change sizes, doesn't matter */
  29.     CUSTOMSCREEN
  30.     } ;
  31.  
  32.  
  33.  
  34. /*
  35.  * definition of my custom screen
  36.  */
  37.  
  38.  
  39. static struct NewScreen newscreen = {
  40.    0, 0,
  41.    XSIZE, YSIZE+2,
  42.    3,
  43.    0, 1,
  44.    HIRES | LACE | SCREENQUIET,
  45.    CUSTOMSCREEN,
  46.    NULL,
  47.    NULL,
  48.    NULL,
  49.    NULL } ;
  50.  
  51. static USHORT Palette[] = {
  52.     0x0000, /* color #0 */
  53.     0x003F, /* color #1 */
  54.     0x000F, /* color #2 */
  55.     0x0DEF, /* color #3 */
  56.     0x00F0, /* color #4 */
  57.     0x0F00, /* color #5 */
  58.     0x0CF2, /* color #6 */
  59.     0x0FFF    /* color #7 */
  60. #define PaletteColorCount 8
  61. };
  62.  
  63.  
  64. /*
  65.  * definition of the help text
  66.  */
  67.  
  68. char *HelpText[40] = {
  69. " Clines - Color line pattern generator",
  70. " ",
  71. "   Control from keyboard as follows:",
  72. " ",
  73. " space   Start/Stop generation",
  74. " o       Do one generation",
  75. " f       start/stop alternating color",
  76. " e       start/stop erasing",
  77. " r       start/stop changing palette",
  78. " b       Toggle white/black background",
  79. " a       About this program",
  80. " x,q     Exit Program",
  81. " Escape  Exit Program",
  82. NULL };
  83.  
  84.  
  85. struct TextAttr TOPAZ80 = {
  86.     (STRPTR)"topaz.font",
  87.     TOPAZ_EIGHTY,0,0
  88. };
  89.  
  90.  
  91. /*
  92.  * definition of the help window
  93.  */
  94.  
  95. struct NewWindow NewWindowStructureHelp = {
  96.     0,0,    /* window XY origin relative to TopLeft of screen */
  97.     344,161,    /* window width and height */
  98.     0,1,    /* detail and block pens */
  99.     REFRESHWINDOW | CLOSEWINDOW | VANILLAKEY,    /* Inputs acceppeted */
  100.     WINDOWDRAG | WINDOWDEPTH | WINDOWCLOSE
  101.     | SIMPLE_REFRESH ,    /* other window flags */
  102.     NULL,    /* first gadget in gadget list */
  103.     NULL,    /* custom CHECKMARK imagery */
  104.     (UBYTE *)"      Clines Help Window      ",    /* window title */
  105.     NULL,    /* custom screen pointer */
  106.     NULL,    /* custom bitmap */
  107.     0,0,    /* minimum width and height */
  108.     640,200,    /* maximum width and height */
  109.     CUSTOMSCREEN    /* destination screen type */
  110. };
  111.  
  112. /*
  113.  *    Data describing the requester text
  114.  *
  115.  */
  116.  
  117. struct IntuiText oktxt = {
  118.     3,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  119.     5,3,    /* XY origin relative to container TopLeft */
  120.     &TOPAZ80,    /* font pointer or NULL for default */
  121.     (UBYTE *)"OK",    /* pointer to text */
  122.     NULL    /* next IntuiText structure */
  123. };
  124.  
  125. struct IntuiText opfailtxt = {
  126.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  127.     14,16,    /* XY origin relative to container TopLeft */
  128.     &TOPAZ80,    /* font pointer or NULL for default */
  129.     (UBYTE *)"Open Failed",    /* pointer to text */
  130.     NULL    /* next IntuiText structure */
  131. };
  132.  
  133. struct IntuiText scrfailtxt = {
  134.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  135.     14,16,    /* XY origin relative to container TopLeft */
  136.     &TOPAZ80,    /* font pointer or NULL for default */
  137.     (UBYTE *)"Screen failed to open",    /* pointer to text */
  138.     NULL    /* next IntuiText structure */
  139. };
  140.  
  141.  
  142. struct IntuiText winfailtxt = {
  143.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  144.     14,16,    /* XY origin relative to container TopLeft */
  145.     &TOPAZ80,    /* font pointer or NULL for default */
  146.     (UBYTE *)"Window failed to open",    /* pointer to text */
  147.     NULL    /* next IntuiText structure */
  148. };
  149.  
  150.  
  151. struct IntuiText cantxt = {
  152.     3,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  153.     5,3,    /* XY origin relative to container TopLeft */
  154.     &TOPAZ80,    /* font pointer or NULL for default */
  155.     (UBYTE *)"CANCEL",    /* pointer to text */
  156.     NULL    /* next IntuiText structure */
  157. };
  158.  
  159. struct IntuiText retrytxt = {
  160.     3,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  161.     5,3,    /* XY origin relative to container TopLeft */
  162.     &TOPAZ80,    /* font pointer or NULL for default */
  163.     (UBYTE *)"RETRY",    /* pointer to text */
  164.     NULL    /* next IntuiText structure */
  165. };
  166.  
  167. struct IntuiText aboutmsg4 = {
  168.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  169.     14,40,    /* XY origin relative to container TopLeft */
  170.     &TOPAZ80,    /* font pointer or NULL for default */
  171.     (UBYTE *) "         May 26, 1989",    /* pointer to text */
  172.     NULL    /* next IntuiText structure */
  173. };
  174.  
  175. struct IntuiText aboutmsg3 = {
  176.     3,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  177.     14,30,    /* XY origin relative to container TopLeft */
  178.     &TOPAZ80,    /* font pointer or NULL for default */
  179.     (UBYTE *)  "        by Joel Swank",    /* pointer to text */
  180.     &aboutmsg4 /* next IntuiText structure */
  181. };
  182.  
  183. struct IntuiText aboutmsg2 = {
  184.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  185.     14,20,    /* XY origin relative to container TopLeft */
  186.     &TOPAZ80,    /* font pointer or NULL for default */
  187.     (UBYTE *) "         Version 1.1",
  188.     &aboutmsg3    /* next IntuiText structure */
  189. };
  190.  
  191. struct IntuiText aboutmsg = {
  192.     0,1,JAM2,    /* front and back text pens, drawmode and fill byte */
  193.     14,10,    /* XY origin relative to container TopLeft */
  194.     &TOPAZ80,    /* font pointer or NULL for default */
  195.     (UBYTE *)"Color Line Pattern Generater",    /* pointer to text */
  196.     &aboutmsg2    /* next IntuiText structure */
  197. };
  198.  
  199.