[comp.sys.amiga] 10,11,12 of 21 SHAR'ed

crunch@well.UUCP (John Draper) (12/06/86)

#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	imagimag.c
#	imagout.c
#	itextdcl.c
# This archive created: Sat Dec  6 01:12:10 1986
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'imagimag.c'
then
	echo shar: "will not over-write existing file 'imagimag.c'"
else
cat << \SHAR_EOF > 'imagimag.c'
/*****************************************************************
* Gadget images for the Image Editor portion of the Gadget Editor
*
* By Ray R. Larson   This version; Sept. 28, 1986
*
*   The following images are used with the tool selection gadgets
*   defined in imagdcl.c
*
*****************************************************************/
 
/*****************************************************************/
/*  The following data structure contains the freehand tool data */
/*****************************************************************/
USHORT freehand_dat[]=  {
  0xffff,
  0xffff,  0xffff,  0xc260,  0x8208,  0x2136,  0x19d0,  0x6dcc,  0x9e69,
  0xef34,  0xcad6,  0x6e80,  0x8608,  0x6304,  0xcb56,  0x575c,  0x9e59,
  0xef34,  0x0b56,  0x66e1,  0x9e48,  0x2134,  0xcb90,  0x4000,  0xffff,
  0xffff,  0xffff,  0xc37c,  0xffff,  0xffff,  0xffff,  0xc19c,  0xff80,
  0x7fff,  0xffff,  0xffff,  0xf83f,  0x9fff,  0xffff,  0xe2d4,  0xffff,
  0xefff,  0x83ff,  0xc37c,  0xffff,  0xeffc,  0x3e7f,  0xc4c7,  0xffff,
  0xcff9,  0xffbf,  0xe014,  0xffff,  0x3ff3,  0xffbf,  0xc000,  0xfffe,
  0x7fe7,  0xffff,  0xc3ef,  0xfffe,  0xffcf,  0xffdf,  0xf34a,  0xffff,
  0x1f1f,  0xffdf,  0xed0b,  0xffff,  0xc07f,  0xc03f,  0xc057,  0xffff,
  0xffff,  0xffff,  0xe226,  0xffff,  0xffff,  0xffff,  0xe6e1,  0xffff,
  0xffff,  0xffff,  0xc057,  0xffff,  0xffff,  0xffff,  0xe226,  0xffff,
  0xffff,  0xffff,  0xe6ea,  0xffff,  0xffff,  0xffff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xef47,  0xffff,  0xffff,  0xffff,  0xc5c8,  0xfdf7,
  0xdec9,  0xe62f,  0xc000,  0xe196,  0x10cb,  0x3529,  0xc000,  0xf9f7,
  0x9cfb,  0x34a9,  0xc000,  0xe1a6,  0x10cb,  0xf4a9,  0xc000,  0xe1b7,
  0xdecb,  0x346f,  0xc000,  0x8000,  0x0000,  0x0000,  0x4000,  0x8000,
  0x0000,  0x0000,  0x4000,  0x807f,  0x8000,  0x0000,  0x4000,  0x87c0,
  0x6000,  0x0000,  0x4000,  0x8000,  0x1000,  0x7c00,  0x4000,  0x8000,
  0x1003,  0xc180,  0x4000,  0x8000,  0x3006,  0x0040,  0x4000,  0x8000,
  0xc00c,  0x0040,  0x4000,  0x8001,  0x8018,  0x0000,  0x4000,  0x8001,
  0x0030,  0x0020,  0x4000,  0x8000,  0xe0e0,  0x0020,  0x4000,  0x8000,
  0x3f80,  0x3fc0,  0x4000,  0x8000,  0x0000,  0x0000,  0x4000,  0x8000,
  0x0000,  0x0000,  0x4000,  0x8000,  0x0000,  0x0000,  0x4000,  0x8000,
  0x0000,  0x0000,  0x4000,  0x8000,  0x0000,  0x0000,  0x4000,  0x8000,
  0x0000,  0x0000,  0x4000,  0xffff,  0xffff,  0xffff,  0xc000,  0x0001,
 
     };
 
/******************************************************************/
/*  The following data structure defines the freehand tool image  */
/******************************************************************/
 
struct Image freehand_image=  {
       0, 0, /* Left, Top */
       50, 25, /* Width, Height */
       2,     /* Depth */
       (USHORT *)&freehand_dat, /* ImageData */
       0x03,  /* PlanePick */
       0x00,  /* PlaneOnOff */
       NULL     /* Next Image */
      };
/*******************************************************************/
/*  The following data structure contains the line tool image data */
/*******************************************************************/
USHORT linetool_dat[]=  {
  0xffff,
  0xffff,  0xffff,  0xc260,  0xffe7,  0xc8f2,  0x1fff,  0xedcc,  0xffe7,
  0xc972,  0xffff,  0xee80,  0xffe7,  0xc9b2,  0x3fff,  0xd75c,  0xffe7,
  0xc9d2,  0xffff,  0xe6e1,  0xffe0,  0xc9e2,  0x1fff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xc37c,  0xffff,  0xffff,  0xff3f,  0xc19c,  0xff7f,
  0xffff,  0xf8ff,  0xffff,  0xff7f,  0xffff,  0x87ff,  0xe2d4,  0xff7f,
  0xfffc,  0x7fff,  0xc37c,  0xff7f,  0xffe3,  0xffff,  0xc4c7,  0xf800,
  0x0000,  0x0007,  0xe014,  0xff7f,  0xf1ff,  0xffff,  0xc000,  0xff7f,
  0x8fff,  0xffff,  0xc3ef,  0xff78,  0x7fff,  0xffff,  0xf34a,  0xffc7,
  0xffff,  0xffff,  0xed0b,  0xff3f,  0xffff,  0xffff,  0xc057,  0xffff,
  0xffff,  0xffff,  0xe226,  0xffff,  0xffff,  0xffff,  0xe6e1,  0xffff,
  0xffff,  0xffff,  0xc057,  0xffff,  0xffff,  0xffff,  0xe226,  0xffff,
  0xffff,  0xffff,  0xe6ea,  0xffff,  0xffff,  0xffff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xec79,  0xffff,  0xffff,  0xffff,  0xc5c8,  0x8018,
  0x370d,  0xe000,  0x712c,  0x8018,  0x368d,  0x0000,  0x607d,  0x8018,
  0x364d,  0xc000,  0x6a2a,  0x8018,  0x362d,  0x0000,  0x6a2a,  0x801f,
  0x361d,  0xe000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x00c0,  0x6a2a,  0x8080,  0x0000,  0x0700,  0x6a2a,  0x8080,
  0x0000,  0x7800,  0x6a2a,  0x8080,  0x0003,  0x8000,  0x6a2a,  0x8080,
  0x001c,  0x0000,  0x6a20,  0x87ff,  0xffff,  0xfff8,  0x6f6c,  0x8080,
  0x0e00,  0x0000,  0x6064,  0x8080,  0x7000,  0x0000,  0x7275,  0x8087,
  0x8000,  0x0000,  0x6465,  0x8038,  0x0000,  0x0000,  0x7468,  0x80c0,
  0x0000,  0x0000,  0x6520,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0xffff,  0xffff,  0xffff,  0xea2a,  0x0001,
 
     };
 
/***************************************************************/
/*  The following data structure defines the line tool image   */
/***************************************************************/
 
struct Image linetool_image=  {
       0, 0, /* Left, Top */
       50, 25, /* Width, Height */
       2,     /* Depth */
       (USHORT *)&linetool_dat, /* ImageData */
       0x03,  /* PlanePick */
       0x00,  /* PlaneOnOff */
       NULL     /* Next Image */
      };
/******************************************************************/
/*  The following data structure contains the box tool image data */
/******************************************************************/
USHORT boxtool_dat[]=  {
  0xffff,
  0xffff,  0xffff,  0xc260,  0xfff8,  0x1809,  0xf3ff,  0xedcc,  0xfff9,
  0xc9ce,  0x4fff,  0xee80,  0xfff8,  0x39cf,  0x3fff,  0xd75c,  0xfff9,
  0xc9cc,  0xcfff,  0xe6e1,  0xfff8,  0x0809,  0xf3ff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xc37c,  0xffff,  0xffff,  0xffff,  0xc19c,  0xffff,
  0xffff,  0x0003,  0xffff,  0xffc0,  0x0007,  0x7ffb,  0xe2d4,  0xffdf,
  0xfff7,  0x7ffb,  0xc37c,  0xffdf,  0xfff7,  0x7ffb,  0xc4c7,  0xffdf,
  0xfff7,  0x0003,  0xe014,  0xffdf,  0xfff7,  0xffff,  0xc000,  0xffdf,
  0xffff,  0xffff,  0xc3ef,  0xffdf,  0xfff7,  0xffff,  0xf34a,  0xffdf,
  0xfff7,  0xffff,  0xed0b,  0xffdf,  0xfff7,  0xffff,  0xc057,  0xffc0,
  0x0107,  0xffff,  0xe226,  0xffff,  0xffff,  0xffff,  0xe6e1,  0xffff,
  0xffff,  0xffff,  0xc057,  0xffff,  0xffff,  0xffff,  0xe226,  0xffff,
  0xffff,  0xffff,  0xe6ea,  0xffff,  0xffff,  0xffff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xec79,  0xffff,  0xffff,  0xffff,  0xc5c8,  0x8007,
  0xe7f6,  0x0c00,  0x712c,  0x8006,  0x3631,  0xb000,  0x607d,  0x8007,
  0xc630,  0xc000,  0x6a2a,  0x8006,  0x3633,  0x3000,  0x6a2a,  0x8007,
  0xf7f6,  0x0c00,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x803f,
  0xfff8,  0x0000,  0x6a2a,  0x8020,  0x0008,  0x0000,  0x6a2a,  0x8020,
  0x0008,  0x0000,  0x6a20,  0x8020,  0x0008,  0x0000,  0x6f6c,  0x8020,
  0x0008,  0x0000,  0x6064,  0x8020,  0x01ff,  0xffc0,  0x7275,  0x8020,
  0x0108,  0x0040,  0x6465,  0x8020,  0x0108,  0x0040,  0x7468,  0x8020,
  0x0108,  0x0040,  0x6520,  0x803f,  0xfff8,  0x0040,  0x6a2a,  0x8000,
  0x0100,  0x0040,  0x6a2a,  0x8000,  0x0100,  0x0040,  0x6a2a,  0x8000,
  0x01ff,  0xffc0,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0xffff,  0xffff,  0xffff,  0xea2a,  0x0001,
 
     };
 
/***************************************************************/
/*  The following data structure defines the box tool image    */
/***************************************************************/
 
struct Image boxtool_image=  {
       0, 0, /* Left, Top */
       50, 25, /* Width, Height */
       2,     /* Depth */
       (USHORT *)&boxtool_dat, /* ImageData */
       0x03,  /* PlanePick */
       0x00,  /* PlaneOnOff */
       NULL     /* Next Image */
      };
/*********************************************************************/
/*  The following data structure contains the circle tool image data */
/*********************************************************************/
USHORT circtool_dat[]=  {
  0xffff,
  0xffff,  0xffff,  0xc260,  0xfe19,  0x0386,  0x7c0f,  0xedcc,  0xf9c9,
  0x3a72,  0x7cff,  0xee80,  0xf9f9,  0x027e,  0x7c3f,  0xd75c,  0xf9c9,
  0x2672,  0x7cff,  0xe6e1,  0xfc19,  0x3306,  0x040f,  0xc000,  0xffff,
  0xffff,  0xffff,  0xc37c,  0xffff,  0xffff,  0xffff,  0xc19c,  0xffff,
  0xc01f,  0xffff,  0xffff,  0xfffc,  0x3fe1,  0xffff,  0xe2d4,  0xfff3,
  0xfffe,  0x7fff,  0xc37c,  0xffef,  0xffff,  0xbfff,  0xc4c7,  0xffdf,
  0xffff,  0xdfff,  0xe014,  0xffdf,  0xffff,  0xdfff,  0xc000,  0xffdf,
  0xffff,  0xdfff,  0xc3ef,  0xffdf,  0xffff,  0xdfff,  0xf34a,  0xfc07,
  0xffff,  0xbfff,  0xed0b,  0xe3f0,  0xfffe,  0x7fff,  0xc057,  0xcffc,
  0x3fe1,  0xffff,  0xe226,  0xdfff,  0x401f,  0xffff,  0xe6e1,  0xdfff,
  0x7fff,  0xffff,  0xc057,  0xcffe,  0x7fff,  0xffff,  0xe226,  0xe3f8,
  0xffff,  0xffff,  0xe6ea,  0xfc07,  0xffff,  0xffff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xef47,  0xffff,  0xffff,  0xffff,  0xc5c8,  0x81e6,
  0xfc79,  0x83f0,  0x6c0a,  0x8636,  0xc58d,  0x8300,  0x7d3b,  0x8606,
  0xfd81,  0x83c0,  0x6a2a,  0x8636,  0xd98d,  0x8300,  0x6a2a,  0x83e6,
  0xccf9,  0xfbf0,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0380,  0x6a2a,  0x8000,  0x3fe0,  0x06c0,  0x6a2a,  0x8003,
  0xc01e,  0x0440,  0x6a2a,  0x800c,  0x0001,  0x8440,  0x6a2a,  0x8010,
  0x0000,  0x4440,  0x6020,  0x8020,  0x0000,  0x2440,  0x6c6c,  0x8020,
  0x0000,  0x26c0,  0x6461,  0x8020,  0x0000,  0x2380,  0x7563,  0x8020,
  0x0000,  0x2000,  0x6566,  0x8000,  0x0000,  0x4000,  0x6865,  0x8008,
  0x0001,  0x8000,  0x6020,  0x8002,  0x401e,  0x0000,  0x6a2a,  0x8000,
  0x3fe0,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0xffff,  0xffff,  0xffff,  0xea2a,  0x0004,
 
     };
 
/***************************************************************/
/*  The following data structure defines the circle tool image */
/***************************************************************/
 
struct Image circtool_image=  {
       0, 0, /* Left, Top */
       50, 25, /* Width, Height */
       2,     /* Depth */
       (USHORT *)&circtool_dat, /* ImageData */
       0x03,  /* PlanePick */
       0x00,  /* PlaneOnOff */
       NULL     /* Next Image */
      };
/********************************************************************/
/*  The following data structure contains the filled box image data */
/********************************************************************/
USHORT recttool_dat[]=  {
  0xffff,
  0xffff,  0xffff,  0xc260,  0x824f,  0x3f81,  0x809e,  0x6dcc,  0x9e4f,
  0x309c,  0x9ccc,  0xee80,  0x864f,  0x3f81,  0x9cf3,  0xd75c,  0x9e4f,
  0x3f9c,  0x9ce4,  0xe6e1,  0x9e41,  0x0781,  0x809e,  0x4000,  0xffff,
  0xffff,  0xffff,  0xc37c,  0xffff,  0xffff,  0xffff,  0xc19c,  0xffff,
  0xffff,  0xffff,  0xffff,  0xffff,  0xffff,  0xffff,  0xe2d4,  0xffff,
  0xffff,  0xffff,  0xc37c,  0xfffc,  0x0007,  0xffff,  0xc4c7,  0xfffc,
  0x0007,  0xffff,  0xe014,  0xff80,  0x0007,  0xffff,  0xc000,  0xff80,
  0x0007,  0xffff,  0xc3ef,  0xff80,  0x0000,  0xffff,  0xf34a,  0xfffc,
  0x0000,  0xffff,  0xed0b,  0xfffc,  0x0000,  0xffff,  0xc057,  0xfffc,
  0x0000,  0xffff,  0xe226,  0xfffc,  0x0000,  0xffff,  0xe6e1,  0xfffc,
  0x0000,  0xffff,  0xc057,  0xfffc,  0x0000,  0xffff,  0xe226,  0xffff,
  0xffff,  0xffff,  0xe6ea,  0xffff,  0xffff,  0xffff,  0xc000,  0xffff,
  0xffff,  0xffff,  0xec79,  0xffff,  0xffff,  0xffff,  0xc5c8,  0xfdb0,
  0xc07e,  0x7f61,  0xf42c,  0xe1b0,  0xcf63,  0x6333,  0x607d,  0xf9b0,
  0xc07e,  0x630c,  0x6a2a,  0xe1b0,  0xc063,  0x631b,  0x6a2a,  0xe1be,
  0xf87e,  0x7f61,  0xea2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0007,  0xfff8,  0x6a2a,  0x8000,  0x0007,  0xfff8,  0x6a2a,  0x8003,
  0xffff,  0xfff8,  0x6a20,  0x8003,  0xffff,  0xfff8,  0x6f6c,  0x8000,
  0x03ff,  0xfff8,  0x6064,  0x8000,  0x03ff,  0xfff8,  0x7275,  0x8000,
  0x03ff,  0x0000,  0x6465,  0x8003,  0xffff,  0x0000,  0x7468,  0x8003,
  0xffff,  0x0000,  0x6520,  0x8003,  0xffff,  0x0000,  0x6a2a,  0x8003,
  0xffff,  0x0000,  0x6a2a,  0x8003,  0xffff,  0x0000,  0x6a2a,  0x8003,
  0xffff,  0x0000,  0x6a2a,  0x8000,  0x0000,  0x0000,  0x6a2a,  0x8000,
  0x0000,  0x0000,  0x6a2a,  0xffff,  0xffff,  0xffff,  0xea2a,  0x0001,
 
     };
 
/********************************************************************/
/*  The following data structure defines the filled box tool image  */
/********************************************************************/
 
struct Image recttool_image=  {
       0, 0, /* Left, Top */
       50, 25, /* Width, Height */
       2,     /* Depth */
       (USHORT *)&recttool_dat, /* ImageData */
       0x03,  /* PlanePick */
       0x00,  /* PlaneOnOff */
       NULL     /* Next Image */
      };
SHAR_EOF
fi
if test -f 'imagout.c'
then
	echo shar: "will not over-write existing file 'imagout.c'"
else
cat << \SHAR_EOF > 'imagout.c'
/***************************** Imagout.c ************************************
*
*  Image editor for the Gadget Editor. C source output routine.
*
*  This module by
*  Ray R. Larson   This version: Sept. 28, 1986
*
*
*  This routine is set up to output a single image to a file as C source.
*  It inserts a name supplied by the calling program as part of the
*  names for the image data and Image structure. This can be considered
*  example code for how to output the image data. It is NOT part the
*  normal Image_Ed routines.
****************************************************************************/
char kprintstr[200]; /* work string for debugging output */
           /* because kprintf doesn't work for me */
 
/*  The usual header files to be inserted later  */
#include <intuition/intuition.h>
#include <libraries/dosextens.h>
#include <graphics/gfxbase.h>
#include <graphics/gfx.h>
#include <graphics/display.h>
#include <exec/memory.h>
#include <workbench/workbench.h>
#include <workbench/startup.h>
#include <devices/narrator.h>
#include <devices/audio.h>
#include <libraries/translator.h>
#include <stdio.h>
 
/* outdat writes out the c code for generating the image */
imagout(outtext, im, imagename)
   FILE *outtext;
   struct Image *im;
   char *imagename; /* Names for the image and the file */
   {
    SHORT i, lastword;
    char *c, *comment, uname[40];
 
    /* number of words in imagedata */
    lastword = im->Width/16;
    if (lastword % 16 != 0) lastword +=1;
    lastword *= (im->Height * im->Depth);
 
 
    strcpy(uname,imagename);
    for (c = uname; *c = toupper(*c); c++);
    comment =
"/***************************************************************/";
    /* open the output file using the name supplied via */
    /* the fname parameter            */
 
    /* write out the image data (the important part) */
    fprintf(outtext,"%s\n",comment);
    fprintf(outtext,"/*  The following data structure contains the image data 
*/\n");
    fprintf(outtext,"%s\n",comment);
 
    fprintf(outtext,"USHORT %s_dat[]=  {\n",imagename);
    for (i=0; i<=lastword; i++)
       {fprintf(outtext,"  0x%04x,",
            im->ImageData[i]);
        if (i%8 == 0) fprintf(outtext,"\n");
       }
    fprintf(outtext,"\n     };\n\n");
 
 
    /* write out the image structure */
    fprintf(outtext,"%s\n",comment);
    fprintf(outtext,"/*  The following data structure defines the image  */\n");
    fprintf(outtext,"%s\n\n",comment);
 
    fprintf(outtext,"struct Image %s =  {\n",imagename);
    fprintf(outtext,"       %d, %d, /* Left, Top
*/\n",im->LeftEdge,im->TopEdge);
    fprintf(outtext,"       %d, %d, /* Width, Height
*/\n",im->Width,im->Height);
    fprintf(outtext,"       %d,     /* Depth */ \n",im->Depth);
    fprintf(outtext,"       (USHORT *)&%s_dat, /* ImageData */\n",imagename);
    fprintf(outtext,"       0x%02x,  /* PlanePick */\n",im->PlanePick);
    fprintf(outtext,"       0x%02x,  /* PlaneOnOff */\n",im->PlaneOnOff);
    fprintf(outtext,"       NULL     /* Next Image */\n");
    fprintf(outtext,"      }; \n");
    }
SHAR_EOF
fi
if test -f 'itextdcl.c'
then
	echo shar: "will not over-write existing file 'itextdcl.c'"
else
cat << \SHAR_EOF > 'itextdcl.c'
/****************************** ITextDCL.c ************************************
 *
 *  ITextDCL() - IntuiText Editor Requester declarations for the Gadget editor
 *
 *  By Ray R. Larson
 *
 *  Copyright (C) 1986. All rights reserved.
 *
 *  This program is freely distributable as long as this copyright notice
 *  is retained. It intended for personal, non-commercial use.
 *
 *                      *         *          *
 *
 *  This module contains the myriad gadget, image, and intuitext declarations
 *  used in ITextEd.c
 ***************************************************************************/
 
 
#include <exec/types.h>
#include <graphics/gfxbase.h>
#include <graphics/text.h>
#include <libraries/dos.h>
#include <libraries/dosextens.h>
#include <intuition/intuition.h>
#include <intuition/intuitionbase.h>
#include <ctype.h>
#include <stdio.h>
#include <workbench/workbench.h>
 
#define INTUITION_REV      1
#define GRAPHICS_REV      1
 
#define CHARACTER_WIDTH  8
#define CHARACTER_HEIGHT 8
 
/* ========================================================================*/
/* Intuitext requester gadget ids                                          */
 
#define CLASSBITS 8
 
#define UPDOWNCLASS 1
#define CHOICECLASS 2
#define CHANGECLASS 3
#define BUTTONCLASS 4
 
#define GADGETNUM 255
 
#define LOAD   0
#define CANCEL 1
#define ADDTXT 2
 
#define UP     0
#define DOWN   1
#define POT    2
 
#define ITXT0  0
#define ITXT1  1
#define ITXT2  2
#define ITXT3  3
#define ITXT4  4
#define ITXT5  5
#define ITXT6  6
#define ITXT7  7
 
#define PLAIN    0
#define UNDERLIN 1
#define BOLD     2
#define ITALIC   4
#define BACKGPEN 5
#define FGPEN    6
#define MODJAM1  7
#define MODJAM2  8
#define MODINV   9
#define STRGAD  10
 
#define LOADGADGET   BUTTONCLASS << CLASSBITS | LOAD
#define CANCELGADGET BUTTONCLASS << CLASSBITS | CANCEL
#define ADDTXTGADGET BUTTONCLASS << CLASSBITS | ADDTXT
 
#define UPGADGET     UPDOWNCLASS << CLASSBITS | UP
#define DOWNGADGET   UPDOWNCLASS << CLASSBITS | DOWN
#define POTGADGET    UPDOWNCLASS << CLASSBITS | POT
 
#define ITXT0GADGET  CHOICECLASS << CLASSBITS | ITXT0
#define ITXT1GADGET  CHOICECLASS << CLASSBITS | ITXT1
#define ITXT2GADGET  CHOICECLASS << CLASSBITS | ITXT2
#define ITXT3GADGET  CHOICECLASS << CLASSBITS | ITXT3
#define ITXT4GADGET  CHOICECLASS << CLASSBITS | ITXT4
#define ITXT5GADGET  CHOICECLASS << CLASSBITS | ITXT5
#define ITXT6GADGET  CHOICECLASS << CLASSBITS | ITXT6
#define ITXT7GADGET  CHOICECLASS << CLASSBITS | ITXT7
 
#define PLAINGAD  CHANGECLASS << CLASSBITS | PLAIN
#define UNDERLGAD  CHANGECLASS << CLASSBITS | UNDERLIN
#define BOLDGAD    CHANGECLASS << CLASSBITS | BOLD
#define ITALICGAD  CHANGECLASS << CLASSBITS | ITALIC
#define BGPENGAD   CHANGECLASS << CLASSBITS | BACKGPEN
#define FGPENGAD   CHANGECLASS << CLASSBITS | FGPEN
#define JAM1GAD    CHANGECLASS << CLASSBITS | MODJAM1
#define JAM2GAD    CHANGECLASS << CLASSBITS | MODJAM2
#define INVGAD    CHANGECLASS << CLASSBITS | MODINV
#define MODITGAD    CHANGECLASS << CLASSBITS | STRGAD
 
#define MAXITXTS 100
 
 
/****************************************************************************
* Fonts available for use in IntuiText created by the editor.
****************************************************************************/
char def_font[] = "topaz.font";
 
struct TextAttr TxtAt_Plain = { (UBYTE *)def_font, 8, FS_NORMAL, FPF_ROMFONT};
 
struct TextAttr TxtAt_BIU = {(UBYTE *)def_font, 8,
        FSF_BOLD | FSF_ITALIC | FSF_UNDERLINED, FPF_ROMFONT};
 
struct TextAttr TxtAt_BU = {(UBYTE *)def_font, 8,
        FSF_BOLD | FSF_UNDERLINED, FPF_ROMFONT};
 
struct TextAttr TxtAt_BI = {(UBYTE *)def_font, 8,
        FSF_BOLD | FSF_ITALIC, FPF_ROMFONT};
 
struct TextAttr TxtAt_B ={(UBYTE *)def_font, 8,
        FSF_BOLD, FPF_ROMFONT};
 
struct TextAttr TxtAt_IU ={(UBYTE *)def_font, 8,
        FSF_ITALIC | FSF_UNDERLINED, FPF_ROMFONT};
 
struct TextAttr TxtAt_I ={(UBYTE *)def_font, 8,
        FSF_ITALIC, FPF_ROMFONT};
 
struct TextAttr TxtAt_U ={(UBYTE *)def_font, 8,
        FSF_UNDERLINED, FPF_ROMFONT};
 
/* This array's subscripts are the ORed bit values of the text types */
struct TextAttr *TxtFonts[]=
    { &TxtAt_Plain, /* 0 */
      &TxtAt_U,     /* 1 */
      &TxtAt_B,     /* 2 */
      &TxtAt_BU,    /* 3 */
      &TxtAt_I,     /* 4 */
      &TxtAt_IU,    /* 5 */
      &TxtAt_BI,    /* 6 */
      &TxtAt_BIU    /* 7 */
     };
 
 
/****************************************
 * The ITxt list selection Gadget stuff *
 ***************************************/
 
struct IntuiText ITxtList[] =
  {
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,/* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    },
    {
    0,1, JAM2,              /* frontpen, backpen, drawmode */
    0,0,                    /* left,top */
    NULL,                   /* font */
    NULL,       /* text */
    NULL                    /* next */
    }
  };
 
struct Gadget ITxtListGadget[] =
  {
    { /* ITxt name selection 0 */
    &ITxtListGadget[1],      /* next gadget */
    5,14,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[0],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT0GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 1 */
    &ITxtListGadget[2],      /* next gadget */
    5,24,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[1],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT1GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 2 */
    &ITxtListGadget[3],      /* next gadget */
    5,34,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[2],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT2GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 3 */
    &ITxtListGadget[4],      /* next gadget */
    5,44,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[3],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT3GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 4 */
    &ITxtListGadget[5],      /* next gadget */
    5,54,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[4],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT4GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 5 */
    &ITxtListGadget[6],      /* next gadget */
    5,64,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[5],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT5GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 6 */
    &ITxtListGadget[7],      /* next gadget */
    5,74,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,           /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[6],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT6GADGET,             /* gadget id   */
    NULL                     /* special info*/
    },
    { /* ITxt name selection 7 */
    NULL,           /* next gadget */
    5,84,                    /* location    */
    244,8,
    GADGHCOMP,               /* flags       */
    RELVERIFY ,              /* activation  */
    BOOLGADGET|REQGADGET,    /* type        */
    NULL,                    /* rendering   */
    NULL,                    /* rendering   */
    &ITxtList[7],            /* text        */
    0,                       /* mutual exlcude */
    NULL,                    /* string info */
    ITXT7GADGET,             /* gadget id   */
    NULL                     /* special info*/
    }
  };
/********************************
 * The Load Button gadget stuff *
 *******************************/
SHORT ButtonPoints1[] =
  {
  -4, -4,
  66, -4,
  66, 12,
  -4, 12,
  -4, -4
  };
struct Border ButtonBorder1 =
  {
  0,0,
  2,1,JAM1,
  5,
  &ButtonPoints1[0],
  NULL
  };
SHORT ButtonPoints0[] =
  {
  -3, -2,
  65, -2,
  65, 10,
  -3, 10,
  -3, -2
  };
struct Border ButtonBorder0 =
  {
  0,0,
  1,0,JAM1,
  5,
  &ButtonPoints0[0],
  &ButtonBorder1
  };
 
struct IntuiText LoadText =
  {
  1,0, JAM2,              /* frontpen, backpen, drawmode */
  0,0,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)" Modify",                   /* text */
  NULL                    /* next */
  };
 
struct Gadget LoadGadget =
  { /* Load button */
  &ITxtListGadget[0],      /* next gadget */
  14,130,                  /* location    */
  64,8,
  GADGHCOMP,               /* flags       */
  GADGIMMEDIATE|ENDGADGET, /* activation  */
  BOOLGADGET|REQGADGET,    /* type        */
  (APTR) &ButtonBorder0,   /* rendering   */
  NULL,                    /* rendering   */
  &LoadText,               /* text        */
  0,                       /* mutual exlcude */
  NULL,                    /* string info */
  LOADGADGET,              /* gadget id   */
  NULL                     /* special info*/
  };
 
SHORT ATPoints1[] =
  {
  -4, -4,
  97, -4,
  97, 12,
  -4, 12,
  -4, -4
  };
struct Border ATBorder1 =
  {
  0,0,
  2,1,JAM1,
  5,
  &ATPoints1[0],
  NULL
  };
SHORT ATPoints0[] =
  {
  -3, -2,
  96, -2,
  96, 10,
  -3, 10,
  -3, -2
  };
struct Border ATBorder0 =
  {
  0,0,
  1,0,JAM1,
  5,
  &ATPoints0[0],
  &ATBorder1
  };
 
/* AddTxtGadget */
struct IntuiText AddText =
  {
  1,0, JAM2,              /* frontpen, backpen, drawmode */
  0,0,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"Add New Text",                   /* text */
  NULL                    /* next */
  };
 
struct Gadget AddTxtGadget =
  { /* Load button */
  &LoadGadget,      /* next gadget */
  80,105,                  /* location    */
  90,8,
  GADGHCOMP,               /* flags       */
  GADGIMMEDIATE|ENDGADGET, /* activation  */
  BOOLGADGET|REQGADGET,    /* type        */
  (APTR) &ATBorder0,   /* rendering   */
  NULL,                    /* rendering   */
  &AddText,               /* text        */
  0,                       /* mutual exlcude */
  NULL,                    /* string info */
  ADDTXTGADGET,              /* gadget id   */
  NULL                     /* special info*/
  };
 
/**********************************
 * The Cancel Button gadget stuff *
 *********************************/
struct IntuiText CancelText =
  {
  1,0, JAM2,              /* frontpen, backpen, drawmode */
  0,0,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)" Cancel",      /* text */
  NULL                    /* next */
  };
 
struct Gadget CancelGadget =
  { /* Cancel button */
  &AddTxtGadget,             /* next gadget */
  187,130,                 /* location    */
  64,8,
  GADGHCOMP,               /* flags       */
  GADGIMMEDIATE|ENDGADGET, /* activation  */
  BOOLGADGET|REQGADGET,    /* type        */
  (APTR) &ButtonBorder0,   /* rendering   */
  NULL,                    /* rendering   */
  &CancelText,             /* text        */
  0,                       /* mutual exlcude */
  NULL,                    /* string info */
  CANCELGADGET,            /* gadget id   */
  NULL                     /* special info*/
  };
 
/***********************************************
 * The Scroll Selection List up (arrow) gadget *
 **********************************************/
UWORD UpArrowData[15] = {
   0xfffc,
   0xfcfc,
   0xf87c,
   0xf03c,
   0xe01c,
   0xc00c,
   0x8004,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfffc
};
 
struct Image UpArrow =
  {
   0,0,
   14,
   14,
   1,
   &UpArrowData[0],
   0x1, 0x0,
   NULL
   };
 
struct Gadget UpGadget =
  { /* Up a file gadget */
  &CancelGadget,           /* next gadget */
  247,13,                  /* location    */
  12,15,
  GADGIMAGE|GADGHNONE,     /* flags       */
  GADGIMMEDIATE,           /* activation  */
  BOOLGADGET|REQGADGET,    /* type        */
  (APTR) &UpArrow,         /* rendering   */
  NULL,                    /* rendering   */
  NULL,                    /* text        */
  0,                       /* mutual exlcude */
  NULL,                    /* string info */
  UPGADGET,                /* gadget id   */
  NULL                     /* special info*/
  };
/*************************************************
 * The Scroll Selection List down (arrow) gadget *
 ************************************************/
UWORD DownArrowData[15] = {
   0xfffc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0xfcfc,
   0x8004,
   0xc00c,
   0xe01c,
   0xf03c,
   0xf87c,
   0xfcfc,
   0xfffc
};
 
struct Image DownArrow =
  {
   0,0,
   14,
   14,
   1,
   &DownArrowData[0],
   0x1, 0x0,
   NULL
   };
 
struct Gadget DownGadget =
  { /* Down a file gadget */
  &UpGadget,               /* next gadget */
  247,79,                  /* location    */
  12,15,
  GADGIMAGE|GADGHNONE,     /* flags       */
  GADGIMMEDIATE,           /* activation  */
  BOOLGADGET|REQGADGET,    /* type        */
  (APTR) &DownArrow,       /* rendering   */
  NULL,                    /* rendering   */
  NULL,                    /* text        */
  0,                       /* mutual exlcude */
  NULL,                    /* string info */
  DOWNGADGET,              /* gadget id   */
  NULL                     /* special info*/
  };
 
/***************************************************
 * The Scroll Selection list up down Potentiometer *
 **************************************************/
struct PropInfo KnobInfo =
  {
  AUTOKNOB | FREEVERT | PROPBORDERLESS,
  0,
  0, /* VertPot */
  0,
  0x7fff, /* VertBody */
  0,0,0,0,0,0
  };
 
struct Image KnobImage =
  {
  0,0,
  0,0,0,
  NULL,
  0,0,
  NULL
  };
 
struct Gadget PotGadget =
  { /* Potentiometer file gadget */
  &DownGadget,             /* next gadget */
  247,28,                  /* location    */
  14,50,
  GADGHNONE,               /* flags       */
  RELVERIFY,               /* activation  */
  PROPGADGET|REQGADGET,    /* type        */
  (APTR) &KnobImage,       /* rendering   */
  NULL,                    /* rendering   */
  NULL,                    /* text        */
  0,                       /* mutual exlcude */
  (APTR)&KnobInfo,         /* string info */
  POTGADGET,               /* gadget id   */
  NULL                     /* special info*/
  };
/***************************************************************************
*                  Other Requester structures                              *
***************************************************************************/
struct IntuiText HeadingText =
  {
  2,1, JAM2,              /* frontpen, backpen, drawmode */
  65,3,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"Select IntuiText",/* text */
  NULL                    /* next */
  };
 
SHORT Requester0Points[] = {
  2,1,
  261,1,
  261,144,
  2,144,
  2,1
  };
struct Border Requester0Border = {
  0,0,
  1,0,JAM1,
  5,
  &Requester0Points[0],
  NULL
  };
 
SHORT Requester1Points[] = {
  2,12,
  261,12
  };
struct Border Requester1Border = {
  0,0,
  1,0,JAM1,
  2,
  &Requester1Points[0],
  &Requester0Border
  };
 
SHORT Requester2Points[] = {
  2,93,
  261,93
  };
struct Border Requester2Border = {
  0,0,
  1,0,JAM1,
  2,
  &Requester2Points[0],
  &Requester1Border
  };
 
SHORT Requester3Points[] = {
  246,12,
  246,93,
  246,78,
  261,78,
  261,27,
  247,27
  };
struct Border Requester3Border = {
  0,0,
  1,0,JAM1,
  6,
  &Requester3Points[0],
  &Requester2Border
  };
/****************************************************************************
 *           Structures for the IntuiText Add and Modify Requester
 ***************************************************************************/
SHORT ITxtReqPairs []=
   { 0,0,
     349,0,
     349,134,
     0,134,
     0,0
    };
 
struct Border ITxtReqBord =
   { 0,0,1,0,JAM1,5,&ITxtReqPairs[0],NULL};
 
struct IntuiText ModTxtText =
  {
  2,1, JAM2,              /* frontpen, backpen, drawmode */
  65,3,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)" Add or Modify IntuiText ",/* text */
  NULL                    /* next */
  };
 
struct IntuiText ITDispText =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  -5,0,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"This text shows the attributes selected", /* text */
  NULL                    /* next */
  };
 
struct Gadget DummyGad = {
  NULL, 25, 33,1,1,
  GADGHCOMP,
  GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  NULL,NULL,&ITDispText,
  0x0,
  0x0,
  0, NULL
};
 
SHORT modtxtpairs_1[] = {
  0,     0,
  90,     0,
  90,     16,
  0,     16,
  0,     0
};
struct Border modtxtbord_1 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_1,
  NULL
};
 
struct IntuiText OKIT =
  {
  0,1, JAM2,              /* frontpen, backpen, drawmode */
  4,3,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"    OK    ",   /* text */
  NULL                    /* next */
  };
 
struct Gadget OKtxtGad = {
  &DummyGad, 243, 106, 90, 16,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_1,  (APTR)&modtxtbord_1, &OKIT,
  0x0,
  0x0,
  LOADGADGET, NULL
};
 
SHORT modtxtpairs_2[] = {
  0,     0,
  90,     0,
  90,     16,
  0,     16,
  0,     0
};
struct Border modtxtbord_2 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_2,
  NULL
};
 
struct IntuiText CanIT =
  {
  0,1, JAM2,              /* frontpen, backpen, drawmode */
  4,3,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"  CANCEL  ",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget CantxtGad = {
 &OKtxtGad, 20, 106, 90, 16,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_2,  (APTR)&modtxtbord_2, &CanIT,
  0x0,
  0x0, CANCELGADGET, NULL
};
 
 
/****************************************************************/
/*  The following data structure contains the image data  used  */
/*  for the pen color palettes.                                 */
/****************************************************************/
USHORT Colors_dat[]=  {
  0xffff,
  0xffff,  0xffff,  0xffff,  0xffff,  0xffff,  0xfe01,  0x8000,  0x000f,
  0xffff,  0xfe00,  0x0001,  0xffff,  0xfe06,  0x8000,  0x000f,  0xffff,
  0xfe00,  0x0001,  0xffff,  0xfe00,  0x8000,  0x000f,  0xffff,  0xfe00,
  0x0001,  0xffff,  0xfe00,  0x8000,  0x000f,  0xffff,  0xfe00,  0x0001,
  0xffff,  0xffe0,  0x8000,  0x000f,  0xffff,  0xfe00,  0x0001,  0xffff,
  0xfec0,  0x8000,  0x000f,  0xffff,  0xfe00,  0x0001,  0xffff,  0xfec0,
  0x8000,  0x000f,  0xffff,  0xfe00,  0x0001,  0xffff,  0xfec6,  0x8000,
  0x000f,  0xffff,  0xfe00,  0x0001,  0xffff,  0xff81,  0x8000,  0x000f,
  0xffff,  0xfe00,  0x0001,  0xffff,  0xffc3,  0x8000,  0x000f,  0xffff,
  0xfe00,  0x0001,  0xffff,  0xfe00,  0x8000,  0x000f,  0xffff,  0xfe00,
  0x0001,  0xffff,  0xfe00,  0x8000,  0x000f,  0xffff,  0xfe00,  0x0001,
  0xffff,  0xfe03,  0xffff,  0xffff,  0xffff,  0xffff,  0xffff,  0xffff,
  0xfe00,  0x0000,  0x0000,  0x0000,  0x0000,  0x0000,  0x0000,  0x00b7,
  0x0000,  0x0000,  0x0000,  0x01ff,  0xffff,  0xffff,  0xfc00,  0x0000,
  0x0000,  0x0000,  0x01ff,  0xffff,  0xffff,  0xfc61,  0x0000,  0x0000,
  0x0000,  0x01ff,  0xffff,  0xffff,  0xfdc3,  0x0000,  0x0000,  0x0000,
  0x01ff,  0xffff,  0xffff,  0xfdc1,  0x0000,  0x0000,  0x0000,  0x01ff,
  0xffff,  0xffff,  0xfc00,  0x0000,  0x0000,  0x0000,  0x01ff,  0xffff,
  0xffff,  0xfdc0,  0x0000,  0x0000,  0x0000,  0x01ff,  0xffff,  0xffff,
  0xfdc0,  0x0000,  0x0000,  0x0000,  0x01ff,  0xffff,  0xffff,  0xfc06,
  0x0000,  0x0000,  0x0000,  0x01ff,  0xffff,  0xffff,  0xfc00,  0x0000,
  0x0000,  0x0000,  0x01ff,  0xffff,  0xffff,  0xfcc0,  0x0000,  0x0000,
  0x0000,  0x01ff,  0xffff,  0xffff,  0xfc61,  0x0000,  0x0000,  0x0000,
  0x01ff,  0xffff,  0xffff,  0xfd66,  0x0000,  0x0000,  0x0000,  0x0000,
  0x0000,  0x0000,  0x0186,  0x0003,
     };
 
/***************************************************************/
/*  The following data structure defines the image  */
/***************************************************************/
 
struct Image ColorsImage =  {
       0, 0, /* Left, Top */
       103, 14, /* Width, Height */
       2,     /* Depth */
       (USHORT *)&Colors_dat, /* ImageData */
       0x03,  /* PlanePick */
       0x00,  /* PlaneOnOff */
       NULL     /* Next Image */
      };
 
struct IntuiText BGPenIT =
  {
  0,1, JAM2,              /* frontpen, backpen, drawmode */
  1,-9,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"Background Pen",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget BackPenGad = {
 &CantxtGad, 220, 79, 103, 14,
  GADGIMAGE | GADGHNONE,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&ColorsImage, NULL, &BGPenIT,
  0x0,
  0x0, BGPENGAD, NULL
};
 
struct IntuiText FGPenIT=
  {
  0,1, JAM2,              /* frontpen, backpen, drawmode */
  1,-9,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"Text Pen Color",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget ForePenGad = {
 &BackPenGad, 220, 52 , 103, 14,
  GADGIMAGE | GADGHNONE,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&ColorsImage, NULL, &FGPenIT,
  0x0,
  0x0, FGPENGAD, NULL
};
 
 
SHORT modtxtpairs_5[] = {
  0,     0,
  67,     0,
  67,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_5 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_5,
  NULL
};
 
struct IntuiText InvIT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  1,1,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"   XOR  ",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget INVERSEGad = {
 &ForePenGad, 121, 69, 67, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_5,  (APTR)&modtxtbord_5, &InvIT,
  0x0,
  0x0, INVGAD, NULL
};
 
SHORT modtxtpairs_6[] = {
  0,     0,
  67,     0,
  67,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_6 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_6,
  NULL
};
 
struct IntuiText J2IT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  1,1,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"  JAM2  ",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget JAM2Gad = {
 &INVERSEGad, 121, 57, 67, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_6,  (APTR)&modtxtbord_6, &J2IT,
  0x0,
  0x0, JAM2GAD, NULL
};
 
SHORT modtxtpairs_7[] = {
  0,     0,
  67,     0,
  67,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_7 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_7,
  NULL
};
 
struct IntuiText J1IT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  1,1,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"  JAM1  ",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget JAM1Gad = {
 &JAM2Gad, 121, 45, 67, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_7,  (APTR)&modtxtbord_7, &J1IT,
  0x0,
  0x0, JAM1GAD, NULL
};
 
SHORT modtxtpairs_8[] = {
  0,     0,
  72,     0,
  72,     11,
  0,     11,
  0,     0
};
struct Border modtxtbord_8 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_8,
  NULL
};
 
struct IntuiText ItalIT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  1,1,                    /* left,top */
  &TxtAt_I,                   /* font */
  (UBYTE *)" Italic ",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget ItaltxtGad = {
 &JAM1Gad, 16, 81, 72, 11,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_8,  (APTR)&modtxtbord_8, &ItalIT,
  0x0,
  0x0, ITALICGAD, NULL
};
 
SHORT modtxtpairs_9[] = {
  0,     0,
  72,     0,
  72,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_9 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_9,
  NULL
};
 
struct IntuiText BoldIT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  1,1,                    /* left,top */
  &TxtAt_B,                   /* font */
  (UBYTE *)"  Bold",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget BoldtxtGad = {
 &ItaltxtGad, 16, 69, 72, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_9,  (APTR)&modtxtbord_9, &BoldIT,
  0x0,
  0x0, BOLDGAD, NULL
};
 
SHORT modtxtpairs_10[] = {
  0,     0,
  72,     0,
  72,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_10 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_10,
  NULL
};
 
struct IntuiText ULineIT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  8,1,                    /* left,top */
  &TxtAt_U,                   /* font */
  (UBYTE *)"Underln",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget UlinetxtGad = {
 &BoldtxtGad, 16, 57, 72, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_10,  (APTR)&modtxtbord_10, &ULineIT,
  0x0,
  0x0, UNDERLGAD, NULL
};
 
SHORT modtxtpairs_11[] = {
  0,     0,
  72,     0,
  72,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_11 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_11,
  NULL
};
 
struct IntuiText PlainIT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  1,1,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"  Plain ",   /* text */
  NULL                    /* next */
  };
 
 
struct Gadget PlaintxtGad = {
 &UlinetxtGad, 16, 45, 72, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  BOOLGADGET | REQGADGET,
  (APTR)&modtxtbord_11,  (APTR)&modtxtbord_11, &PlainIT,
  0x0,
  0x0, PLAINGAD, NULL
};
 
SHORT modtxtpairs_12[] = {
  0,     0,
  314,     0,
  314,     10,
  0,     10,
  0,     0
};
struct Border modtxtbord_12 = {
  -1,  -1,
  1,  3,  JAM2,
  5,
  (SHORT *)&modtxtpairs_12,
  NULL
};
 
UBYTE ModBuff[80];
UBYTE ModUBuff[80];
 
struct IntuiText ModIT =
  {
  1,0, JAM1,              /* frontpen, backpen, drawmode */
  0,-9,                    /* left,top */
  NULL,                   /* font */
  (UBYTE *)"Enter or Edit Text: ",   /* text */
  NULL                    /* next */
  };
 
 
struct StringInfo ModStrInfo = {
  ModBuff, /*buffer*/
  ModUBuff, /*undo buffer*/
  0,      /*Bufferpos*/
  80,     /*MaxChars*/
  0,      /*DispPos*/
  0,      /*UndoPos*/
  0,      /*NumChars*/
  39,     /*DispCount*/
  15,     /*CLeft*/
  22,     /*CTop*/
  NULL,   /*LayerPtr*/
  0L,     /*LongInt*/
  NULL   /*AltKeyMap*/
};
 
struct Gadget ModTxtGad = {
 &PlaintxtGad, 15, 22, 314, 10,
  GADGHCOMP,
  RELVERIFY | GADGIMMEDIATE,
  STRGADGET | REQGADGET,
  (APTR)&modtxtbord_12,  (APTR)&modtxtbord_12, &ModIT,
  0x0,
  (APTR)&ModStrInfo, MODITGAD, NULL
};
SHAR_EOF
fi
exit 0
#	End of shell archive