home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
- * Gadget Data Structure Definitions
- *
- * THIS FILE USES 4 COLUMN TABS!
- *
- * This include file contains gadget structure definitions and declarations
- * for Leach's status window. There are two gadgets: one for showing or
- * hiding the ruler and one for enabling and disabling ruler movement. Each
- * gadget has an associated IntuiText structure.
- *
- * This file can be included in just one .C file cause it allocates storage.
- *
- * GADGET STRUCT FYI:
- *
- * struct Gadget
- * {
- * struct Gadget *NextGadget;
- * SHORT LeftEdge, TopEdge;
- * SHORT Width, Height;
- * USHORT Flags;
- * USHORT Activation;
- * USHORT GadgetType;
- * APTR GadgetRender;
- * APTR SelectRender;
- * struct IntuiText *GadgetText;
- * LONG MutualExclude; Not implemented in Ver 1.2
- * APTR SpecialInfo;
- * USHORT GadgetID;
- * APTR UserData;
- * };
- *
- * struct IntuiText
- * {
- * UBYTE FrontPen, BackPen;
- * UBYTE DrawMode;
- * short LeftEdge, TopEdge;
- * struct TextAttr *ITextFont;
- * UBYTE *IText;
- * struct IntuiText *NextText;
- * };
- *
- ******************************************************************************/
-
- #define GHGT 8
- #define XOR COMPLEMENT
-
- extern UBYTE statustext[]; /* Status window text string. */
-
- /* These 8-character (+ EOS) strings are displayed in the gadget select boxes */
-
- UBYTE show_text[] = " SHOW ";
- UBYTE hide_text[] = " HIDE ";
- UBYTE move_text[] = " MOVE ";
- UBYTE frez_text[] = " FREEZE ";
- UBYTE left_text[] = "<";
- UBYTE rite_text[] = ">";
-
- struct IntuiText gad_text[] =
- {
- { /* For SHOW/HIDE gadget */
- 0, 1,
- JAM2,
- 0, 0, /* Relative to gadget select box. */
- NULL, /* Use default font. */
- show_text,
- NULL /* No more text. */
- },
- { /* For MOVE/FREEZE gadget */
- 0, 1,
- JAM2,
- 0, 0,
- NULL,
- move_text,
- NULL
- },
- { /* For left color gadget */
- 0, 1,
- JAM2,
- 0, 0,
- NULL,
- left_text,
- NULL
- },
- { /* For rite color gadget */
- 0, 1,
- JAM2,
- 0, 0,
- NULL,
- rite_text,
- NULL
- }
- }; /* end of gad_text[] initialization */
-
- struct Gadget swind_gad[] =
- {
- { /* SHOW/HIDE GADGET */
- &swind_gad[1], /* Address of next gadget. */
- 488, 11, /* LeftEdge, TopEdge */
- 6 * 8, GHGT, /* Width, Height */
- GADGHNONE, /* Flags */
- TOGGLESELECT | /* Activation */
- RELVERIFY,
- BOOLGADGET, /* GadgetType */
- NULL, /* GadgetRender */
- NULL, /* SelectRender */
- &gad_text[0], /* Show/Hide text */
- NULL, /* Mutual exclude */
- NULL, /* SpecialInfo */
- 0, /* GadgetID */
- (APTR) &hide_text[0] /* Alternate text for gadget */
- },
- { /* MOVE/FREEZE GADGET */
- &swind_gad[2], /* Address of next gadget. */
- 488 + 6*8 + 4, 11, /* LeftEdge, TopEdge */
- 8*8, GHGT,
- GADGHNONE | GADGDISABLED,
- TOGGLESELECT | RELVERIFY,
- BOOLGADGET,
- NULL,
- NULL,
- &gad_text[1],
- NULL,
- NULL,
- 0,
- (APTR) &frez_text[0] /* Alternate text for gadget */
- },
- { /* Left color GADGET */
- &swind_gad[3], /* Address of next gadget. */
- 488 + (6+8)*8 + 2*4 ,11, /* LeftEdge, TopEdge */
- 8, GHGT, /* Width, Height */
- GADGHCOMP, /* Flags */
- RELVERIFY, /* Activation */
- BOOLGADGET, /* GadgetType */
- NULL, /* GadgetRender */
- NULL, /* SelectRender */
- &gad_text[2],
- NULL, /* Mutual exclude */
- NULL, /* SpecialInfo */
- 0, /* GadgetID */
- NULL
- },
- { /* Right color GADGET */
- NULL, /* Last gadget in list */
- 488 + (6+8+1)*8 + 3*4 ,11, /* LeftEdge, TopEdge */
- 8, GHGT, /* Width, Height */
- GADGHCOMP, /* Flags */
- RELVERIFY, /* Activation */
- BOOLGADGET, /* GadgetType */
- NULL, /* GadgetRender */
- NULL, /* SelectRender */
- &gad_text[3],
- NULL, /* Mutual exclude */
- NULL, /* SpecialInfo */
- 0, /* GadgetID */
- NULL
- },
- }; /* end of swind_gad[] initialization */
-
- #define SHOWGAD swind_gad[0]
- #define MOVEGAD swind_gad[1]
-
-
-