
/**********************************************************************
 *                    Gadget Structure Definitions
 * 
 * The following structures were defined using the Gadget Editor created 
 * by the Programmer's Network.
 * The credits for the Gadget Editor are:
 * 
 *     John Draper    - Initial design, coordination, and integration.
 *     Ray Larson     - Images and Intuitext. 
 *     Brent Southard - Saving and restoring gadgets in binary form.
 *     Dave Milligan  - Gadget Editor Main menu.
 * 
 * 
 **********************************************************************/

/*  The header files needed for gadget definitions  */ 
#include <intuition/intuition.h> 
#include <intuition/intuitionbase.h> 
#include <libraries/dosextens.h> 
#include <graphics/gfxbase.h> 
#include <graphics/gfx.h> 
#include <graphics/display.h> 

#include <graphics/text.h> 
#include <ctype.h> 
/*  Definitions for Gadget ID numbers               */ 
#define  ON_GADGAD   0

/**********************************************************************
 *  Text attribute structures used in rendering IntuiTexts
 **********************************************************************/


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};



/**********************************************************************
 *  Border Definitions for on_gad gadget
 **********************************************************************/

SHORT on_gad_Pairs_1[] = {
  0,     0,   
  105,     0,   
  105,     15,   
  0,     15,   
  0,     0    
};
struct Border on_gad_bord_1 = {
  -1,  -1,       /* LeftEdge, TopEdge */
  1,  3,  JAM2,  /* FrontPen, BackPen, DrawMode*/
  5,             /* Count of XY pairs */  
  (SHORT *)&on_gad_Pairs_1, /* XY pairs */
  NULL           /* Next Border */
};


/**********************************************************************
 *  IntuiTexts for the on_gad gadget.
 **********************************************************************/

struct IntuiText on_gad_Text_0 = {
   1, 0,     /* FrontPen, BackPen */
   JAM2,       /* DrawMode */
   44, 4,     /* LeftEdge, TopEdge */
   &TxtAt_Plain, /* ITextFont Pointer */ 
   /* The IText */
   (UBYTE *)"ON",
   NULL
 };



/**********************************************************************
 *  Gadget Structure definition for the on_gad gadget.
 **********************************************************************/

struct Gadget on_gad = {
  NULL,     /* NextGadget pointer */
  151, 33,    /* LeftEdge, TopEdge  */
  105, 15,    /* Width, Height      */
  /* Gadget Flags */
  GADGHCOMP,
  /* Activation Flags */
  RELVERIFY | GADGIMMEDIATE,
  /* GadgetType */
  BOOLGADGET,
  (APTR)&on_gad_bord_1,   /*  GadgetRender */
  NULL,    /* SelectRender */
   &on_gad_Text_0,  /* GadgetText */
  0x0,    /* MutualExclude */
  NULL,   /* SpecialInfo */
  ON_GADGAD,    /* GadgetID         */
  0x1     /* UserData Pointer */
};

